OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
FuelCell::ApplicationCore::NewtonBasic Class Reference

This class performs basic Newton iterations with a constant weight. More...

#include <newton_basic.h>

Inheritance diagram for FuelCell::ApplicationCore::NewtonBasic:
Inheritance graph
[legend]
Collaboration diagram for FuelCell::ApplicationCore::NewtonBasic:
Collaboration graph
[legend]

Public Member Functions

Constructors, destructor, and initialization
 NewtonBasic (ApplicationBase &app)
 Constructor. More...
 
 ~NewtonBasic ()
 Destructor. More...
 
virtual void declare_parameters (ParameterHandler &param)
 Declare parameters. More...
 
virtual void initialize (ParameterHandler &param)
 Initialize parameters. More...
 
Solve function
virtual void solve (FEVector &u, const FEVectors &in_vectors)
 This function implements basic Newton iterations with a constant weight. More...
 
- Public Member Functions inherited from FuelCell::ApplicationCore::newtonBase
 newtonBase (ApplicationBase &app)
 Constructor, receiving the application computing the residual and solving the linear problem. More...
 
void _initialize (ParameterHandler &param)
 Read the parameters local to newtonBase. More...
 
double threshold (double new_value)
 Set the maximal residual reduction allowed without triggering assembling in the next step. More...
 
void initialize_initial_guess (BlockVector< double > &dst)
 Control object for the Newton iteration. More...
 
virtual void assemble ()
 Instead of assembling, this function only sets a flag, such that the inner application will be required to assemble a new derivative matrix next time solve() is called. More...
 
virtual double residual (FuelCell::ApplicationCore::FEVector &dst, const FuelCell::ApplicationCore::FEVectors &rhs)
 Returns the L2-norm of the residual and the residual vector in "dst" using the residual function in the ApplicationBase used to initialize the application. More...
 
- Public Member Functions inherited from FuelCell::ApplicationCore::ApplicationWrapper
 ApplicationWrapper (ApplicationBase &app)
 Constructor for a derived application. More...
 
 ~ApplicationWrapper ()
 Destructor. More...
 
virtual void remesh ()
 Generate the next mesh depending on the mesh generation parameters. More...
 
virtual void init_vector (FEVector &dst) const
 Initialize vector to problem size. More...
 
virtual double residual (FEVector &dst, const FEVectors &src, bool apply_boundaries=true)
 Compute residual of src and store it into dst. More...
 
virtual void Tsolve (FEVector &dst, const FEVectors &src)
 Solve the dual system assembled with right hand side rhs and return the result in start. More...
 
virtual double estimate (const FEVectors &src)
 Estimate cell-wise errors. More...
 
virtual double evaluate (const FEVectors &src)
 Evaluate a functional. More...
 
virtual void grid_out (const std::string &filename) const
 
virtual void data_out (const std::string &filename, const FEVectors &src)
 Write data in the format specified by the ParameterHandler. More...
 
virtual std::string id () const
 Return a unique identification string for this application. More...
 
virtual void notify (const Event &reason)
 Add a reason for assembling. More...
 
- Public Member Functions inherited from FuelCell::ApplicationCore::ApplicationBase
 ApplicationBase (boost::shared_ptr< ApplicationData > data=boost::shared_ptr< ApplicationData >())
 Constructor for an application. More...
 
 ApplicationBase (const ApplicationBase &other)
 Copy constructor. More...
 
virtual ~ApplicationBase ()
 Virtual destructor. More...
 
void print_parameters_to_file (ParameterHandler &param, const std::string &file_name, const ParameterHandler::OutputStyle &style)
 Print default parameters for the application to a file. More...
 
virtual void start_vector (FEVector &dst, std::string) const
 Initialize vector to problem size. More...
 
virtual void grid_out (const std::string &)
 Write the mesh in the format specified by the ParameterHandler. More...
 
boost::shared_ptr
< ApplicationData
get_data ()
 Get access to the protected variable data. More...
 
const boost::shared_ptr
< ApplicationData
get_data () const
 Get read-only access to the protected variable data. More...
 
virtual void clear ()
 All true in notifications. More...
 
virtual void clear_events ()
 All false in notifications. More...
 
virtual unsigned int get_solution_index ()
 Returns solution index. More...
 

Static Public Attributes

Events
static const Event bad_derivative
 This event is set if the convergence becomes bad. More...
 
- Static Public Attributes inherited from FuelCell::ApplicationCore::newtonBase
static const
FuelCell::ApplicationCore::Event 
bad_derivative
 The Event set if convergence is becoming bad and a new matrix should be assembled. More...
 

Private Attributes

Basic Newton iteration parameters
double weight
 A constant weight is the same for all basic Newton iterations. More...
 

Additional Inherited Members

- Public Attributes inherited from FuelCell::ApplicationCore::newtonBase
ReductionControl control
 Control object for the Newton iteration. More...
 
double numIter
 Number of Iterations;. More...
 
- Protected Member Functions inherited from FuelCell::ApplicationCore::newtonBase
void debug_output (const FEVector &sol, const FEVector &update, const FEVector &residual) const
 Function used to output any necessary information at each Newton iteration for debugging purposes. More...
 
- Protected Member Functions inherited from FuelCell::ApplicationCore::ApplicationWrapper
SmartPointer< ApplicationBaseget_wrapped_application ()
 Gain access to the inner application. More...
 
- Protected Member Functions inherited from FuelCell::ApplicationCore::ApplicationBase
void print_caller_name (const std::string &caller_name) const
 Print caller name. More...
 
- Protected Attributes inherited from FuelCell::ApplicationCore::newtonBase
bool assemble_now
 This flag is set by the function assemble(), indicating that the matrix must be assembled anew upon start. More...
 
double assemble_threshold
 Threshold for re-assembling matrix. More...
 
bool debug_solution
 Print updated solution after each step into file Newton_uNNN? More...
 
bool debug_update
 Print Newton update after each step into file Newton_dNNN? More...
 
bool debug_residual
 Print Newton residual after each step into file Newton_rNNN? More...
 
unsigned int debug
 Write debug output to FcstUtilities::log; the higher the number, the more output. More...
 
unsigned int step
 The number of a basic Newton iteration. More...
 
std::vector< unsigned int > blocks
 This vector specifies the blocks of the global solution which are supposed to be treated specially. More...
 
unsigned int n_blocks
 The total number of blocks. More...
 
- Protected Attributes inherited from FuelCell::ApplicationCore::ApplicationWrapper
SmartPointer< ApplicationBaseapp
 Pointer to the application this one depends upon. More...
 
- Protected Attributes inherited from FuelCell::ApplicationCore::ApplicationBase
boost::shared_ptr
< ApplicationData
data
 Object for auxiliary data. More...
 
Event notifications
 Accumulate reasons for assembling here. More...
 

Detailed Description

This class performs basic Newton iterations with a constant weight.

Author
Valentin N. Zingan, 2012

Constructor & Destructor Documentation

FuelCell::ApplicationCore::NewtonBasic::NewtonBasic ( ApplicationBase app)

Constructor.

FuelCell::ApplicationCore::NewtonBasic::~NewtonBasic ( )

Destructor.

Member Function Documentation

virtual void FuelCell::ApplicationCore::NewtonBasic::declare_parameters ( ParameterHandler &  param)
virtual

Declare parameters.

Reimplemented from FuelCell::ApplicationCore::newtonBase.

virtual void FuelCell::ApplicationCore::NewtonBasic::initialize ( ParameterHandler &  param)
virtual

Initialize parameters.

Reimplemented from FuelCell::ApplicationCore::newtonBase.

virtual void FuelCell::ApplicationCore::NewtonBasic::solve ( FEVector u,
const FEVectors in_vectors 
)
virtual

This function implements basic Newton iterations with a constant weight.

Implements FuelCell::ApplicationCore::newtonBase.

Member Data Documentation

const Event FuelCell::ApplicationCore::NewtonBasic::bad_derivative
static

This event is set if the convergence becomes bad.

double FuelCell::ApplicationCore::NewtonBasic::weight
private

A constant weight is the same for all basic Newton iterations.


The documentation for this class was generated from the following file: