OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
newton_base.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 // $Id: newton_base.h 1354 2013-08-17 00:01:22Z secanell $
3 //
4 // Copyright (C) 2007 by Jason Boisvert
5 //
6 // This file is subject to QPL and may not be distributed
7 // without copyright and license information. Please refer
8 // to the file deal.II/doc/license.html for the text and
9 // further information on this license.
10 //
11 //---------------------------------------------------------------------------
12 
13 
14 #ifndef __deal2__appframe__newton_base_h
15 #define __deal2__appframe__newton_base_h
16 
17 #include <appframe/base.h>
18 #include <appframe/residual.h>
19 #include <lac/solver_control.h>
20 
21 using namespace dealii;
22 using namespace AppFrame;
23 
24 namespace AppFrame
25 {
36  {
37  public:
50 
56  virtual void assemble();
57 
58  virtual double residual(AppFrame::FEVector& dst,
59  const AppFrame::FEVectors& rhs);
60 
64  virtual void solve(AppFrame::FEVector& u,
65  const AppFrame::FEVectors& in_vectors);
77  virtual void declare_parameters (ParameterHandler& param);
78 
82  void _initialize (ParameterHandler& param);
83 
87  virtual void initialize (ParameterHandler& param);
88 
93  double threshold(double new_value);
94 
98  void initialize_initial_guess(BlockVector<double>& dst);
99 
103  ReductionControl control;
104 
105  // Output data
106  //int numIterations;
107  double numIter;
108  protected:
116 
120  SmartPointer<const Residual> compute_residual;
129 
167  unsigned int debug;
175  };
176 }
177 
178 #endif
179 
180 
181 
182