OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
newton_w_line_search.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2009-13 by Energy Systems Design Laboratory, University of Alberta
6 //
7 // This software is distributed under the MIT License.
8 // For more information, see the README file in /doc/LICENSE
9 //
10 // - Class: newton_w_line_search.h
11 // - Description: Variant of the Newton-Raphson solver
12 // - Developers: Marc Secanell
13 //
14 //---------------------------------------------------------------------------
15 
16 #ifndef __deal2__appframe__newton_w_lines_search_h
17 #define __deal2__appframe__newton_w_lines_search_h
18 
19 #include <solvers/newton_base.h>
20 
21 namespace FuelCell
22 {
23 namespace ApplicationCore
24 {
100  {
101  public:
114 
116  virtual void declare_parameters (ParameterHandler& param);
117 
119  void _initialize (ParameterHandler& param);
120 
122  virtual void initialize (ParameterHandler& param);
123 
128  const FuelCell::ApplicationCore::FEVectors& in_vectors);
129 
130 
131  private:
132 
139  double overrelax;
143  unsigned int overrelax_steps;
148 
152  unsigned int block_to_fix;
153 
162  bool find_negative_values(const FEVector& u);
163  };
164 }
165 }
166 
167 #endif
virtual void declare_parameters(ParameterHandler &param)
Declare the input parameters.
unsigned int block_to_fix
Block not allowed to be negative:
Definition: newton_w_line_search.h:152
Application class performing a Newton&#39;s iteration as described in newtonBase.
Definition: newton_w_line_search.h:99
unsigned int overrelax_steps
Number of iterations to which we apply overrelax.
Definition: newton_w_line_search.h:143
bool find_negative_values(const FEVector &u)
Routine used to find if there are any negative values on a given solution block.
static const FuelCell::ApplicationCore::Event bad_derivative
The Event set by NewtonLineSearch if convergence is becoming bad and a new matrix should be assembled...
Definition: newton_w_line_search.h:108
SmartPointer< ApplicationBase > app
Pointer to the application this one depends upon.
Definition: application_wrapper.h:106
void _initialize(ParameterHandler &param)
Read the parameters local to NewtonLineSearch.
NewtonLineSearch(ApplicationBase &app)
Constructor, receiving the application computing the residual and solving the linear problem...
Base class for applications.
Definition: application_base.h:113
Base class for all classes performing Newton&#39;s iteration.
Definition: newton_base.h:156
double overrelax
Value used to multiply , the solution update, from the Newton algorithm during the first overrelax_st...
Definition: newton_w_line_search.h:139
virtual void solve(FuelCell::ApplicationCore::FEVector &u, const FuelCell::ApplicationCore::FEVectors &in_vectors)
The actual Newton solver.
virtual void initialize(ParameterHandler &param)
Read the parameters.
Objects of this kind are used to notify interior applications of changes provoked by an outer loop...
Definition: event.h:51
BlockVector< double > FEVector
The vector class used by applications.
Definition: application_data.h:46
The data type used in function calls of Application.
Definition: fe_vectors.h:59
bool line_search
Do you want to use a line search at each step?
Definition: newton_w_line_search.h:147