OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
AppFrame::ThetaResidual Class Reference

A more sophisticated residual class that splits jobs between the two kinds of residual needed for ThetaTimestepping. More...

#include <timestepping.h>

Inheritance diagram for AppFrame::ThetaResidual:
Inheritance graph
[legend]
Collaboration diagram for AppFrame::ThetaResidual:
Collaboration graph
[legend]

Public Member Functions

 ThetaResidual (ApplicationBase &application)
 
virtual double operator() (FEVector &dst, const FEVectors &src) const
 This function returns the residual in dst, using the vectors from src.
 
- Public Member Functions inherited from AppFrame::Residual
virtual ~Residual ()
 

Private Attributes

SmartPointer< ApplicationBaseapp
 The Application class providing the function Application::residual().
 

Detailed Description

A more sophisticated residual class that splits jobs between the two kinds of residual needed for ThetaTimestepping.

In each step of ThetaTimestepping, knowing the solution of the previous step up, the following system is solved for the solution at the new timestep u:

\begin{eqnarray*} \left(\frac1{\delta t} u + \vartheta A(u) \right) &= r_p \\ r_p &= \frac1{\delta t} u_p + (\vartheta-1) A(u_p). \end{eqnarray*}

The vector r1 is computed using a Residual. If A is a nonlinear operator, a Newton scheme is used to solve the first line. This Newton scheme will use a Residual as well, computing the residual of the first equation.

Although both residuals are different, they have the same structure. in particular, the form A computed by a LocalIntegrator is the same, just scaled differently.

This class now allows you to use the same LocalIntegrator for both residuals. Just use the value named scaling instead of theta when computing local forms. The subtraction of r1 is done by this class and thus no concern anymore.

For an example how to use this class, refer to Tests::RotatingCone2.

Author
Guido Kanschat

Constructor & Destructor Documentation

AppFrame::ThetaResidual::ThetaResidual ( ApplicationBase application)

Member Function Documentation

virtual double AppFrame::ThetaResidual::operator() ( FEVector dst,
const FEVectors src 
) const
virtual

This function returns the residual in dst, using the vectors from src.

Implements AppFrame::Residual.

Member Data Documentation

SmartPointer<ApplicationBase> AppFrame::ThetaResidual::app
private

The Application class providing the function Application::residual().


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