diff_solver.C
Go to the documentation of this file.00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2012 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 #include "libmesh/diff_solver.h" 00020 #include "libmesh/newton_solver.h" 00021 00022 namespace libMesh 00023 { 00024 00025 00026 00027 DiffSolver::DiffSolver (sys_type& s) 00028 : max_linear_iterations(1000), 00029 max_nonlinear_iterations(100), 00030 quiet(true), 00031 verbose(false), 00032 continue_after_max_iterations(true), 00033 continue_after_backtrack_failure(false), 00034 absolute_residual_tolerance(0.), 00035 relative_residual_tolerance(0.), 00036 absolute_step_tolerance(0.), 00037 relative_step_tolerance(0.), 00038 initial_linear_tolerance(1e-12), 00039 minimum_linear_tolerance(TOLERANCE*TOLERANCE), 00040 max_solution_norm(0.), 00041 max_residual_norm(0.), 00042 _system (s), 00043 _solve_result(INVALID_SOLVE_RESULT) 00044 { 00045 } 00046 00047 00048 00049 AutoPtr<DiffSolver> DiffSolver::build (sys_type& s) 00050 { 00051 return AutoPtr<DiffSolver>(new NewtonSolver(s)); 00052 } 00053 00054 00055 00056 void DiffSolver::reinit () 00057 { 00058 // Reset the max_step_size and max_residual_norm for a new mesh 00059 max_solution_norm = 0.; 00060 max_residual_norm = 0.; 00061 } 00062 00063 00064 00065 void DiffSolver::init () 00066 { 00067 // Reset the max_step_size and max_residual_norm for a new problem 00068 max_solution_norm = 0.; 00069 max_residual_norm = 0.; 00070 } 00071 00072 } // namespace libMesh
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:46 UTC
Hosted By: