HermesCommon  3.0
newton_matrix_solver.h
Go to the documentation of this file.
1 // This file is part of HermesCommon
2 //
3 // Copyright (c) 2009 hp-FEM group at the University of Nevada, Reno (UNR).
4 // Email: hpfem-group@unr.edu, home page: http://www.hpfem.org/.
5 //
6 // Hermes2D is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published
8 // by the Free Software Foundation; either version 2 of the License,
9 // or (at your option) any later version.
10 //
11 // Hermes2D is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with Hermes2D; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #ifndef __HERMES_COMMON_NEWTON_MATRIX_SOLVER_H_
23 #define __HERMES_COMMON_NEWTON_MATRIX_SOLVER_H_
24 
26 
27 namespace Hermes
28 {
29  namespace Solvers
30  {
31  template<typename Scalar>
32  class HERMES_API NewtonMatrixSolver : public NonlinearMatrixSolver < Scalar >
33  {
34  public:
36  virtual ~NewtonMatrixSolver() {};
37 
38  protected:
39  virtual double update_solution_return_change_norm(Scalar* linear_system_solution);
40 
42  virtual NonlinearConvergenceState get_convergence_state();
43 
46  void init_newton();
47 
49  inline std::string getClassName() const { return "NewtonMatrixSolver"; }
50  };
51  }
52 }
53 #endif
General namespace for the Hermes library.
std::string getClassName() const
State querying helpers.
Base class for defining interface for nonlinear solvers.
NonlinearConvergenceState
Nonlinear Convergence state.
General nonlinear solver functionality.