OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
newton_w_3pp.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------
2 // $Id: newton_w_3pp.h 1354 2013-08-17 00:01:22Z secanell $
3 //
4 // Copyright (C) 2009 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 #ifndef __deal2__appframe__newton_w_3pp_h
14 #define __deal2__appframe__newton_w_3pp_h
15 
16 #include <appframe/base.h>
17 #include <appframe/residual.h>
18 #include <lac/solver_control.h>
19 #include <newton_base.h>
20 
21 
22 namespace AppFrame
23 {
32 class Newton3pp : public newtonBase
33  {
34  public:
35 
37 
39 
40  virtual void solve(AppFrame::FEVector& u,
41  const AppFrame::FEVectors& in_vectors);
42 
43  private:
44 
45  double sum_of_squares(double residual_norm);
46 
50  double three_point_step (int line_search_iterations,double lambda_current, double lambda_previous, double mf_original, double mf_current, double mf_previous);
51 
55  bool armijo(double step_length,double residual_norm,double new_residual_norm);
56 
62  double alpha;
63  int step;
64  };
65 }
66 
67 #endif