00001 //--------------------------------------------------------------------------- 00002 // @f$Id: newton.h 25460 2012-04-27 09:19:06Z bangerth @f$ 00003 // 00004 // Copyright (C) 2010, 2012 by the deal.II authors 00005 // 00006 // This file is subject to QPL and may not be distributed 00007 // without copyright and license information. Please refer 00008 // to the file deal.II/doc/license.html for the text and 00009 // further information on this license. 00010 // 00011 //--------------------------------------------------------------------------- 00012 00013 #ifndef __deal2__newton_h 00014 #define __deal2__newton_h 00015 00016 #include <deal.II/base/smartpointer.h> 00017 #include <deal.II/lac/solver_control.h> 00018 #include <deal.II/algorithms/operator.h> 00019 00020 DEAL_II_NAMESPACE_OPEN 00021 00022 class ParameterHandler; 00023 00024 namespace Algorithms 00025 { 00063 template <class VECTOR> 00064 class Newton : public Operator<VECTOR> 00065 { 00066 public: 00073 Newton (Operator<VECTOR>& residual, Operator<VECTOR>& inverse_derivative); 00074 00079 void declare_parameters (ParameterHandler& param); 00080 00084 void initialize (ParameterHandler& param); 00085 00090 void initialize (OutputOperator<VECTOR>& output); 00091 00103 virtual void operator() (NamedData<VECTOR*>& out, const NamedData<VECTOR*>& in); 00104 00105 virtual void notify(const Event&); 00106 00114 double threshold(double new_value); 00115 00120 ReductionControl control; 00121 private: 00125 SmartPointer<Operator<VECTOR>, Newton<VECTOR> > residual; 00126 00131 SmartPointer<Operator<VECTOR>, Newton<VECTOR> > inverse_derivative; 00132 00138 SmartPointer<OutputOperator<VECTOR>, Newton<VECTOR> > data_out; 00139 00147 bool assemble_now; 00148 00162 unsigned int n_stepsize_iterations; 00163 00181 double assemble_threshold; 00182 00183 public: 00190 bool debug_vectors; 00196 unsigned int debug; 00197 }; 00198 } 00199 00200 DEAL_II_NAMESPACE_CLOSE 00201 00202 #endif 00203
documentation generated on Thu May 17 2012 20:04:34 by
doxygen
1.7.3