Chombo + EB + MF
3.2
|
#include <CoefficientInterpolator.H>
Public Types | |
typedef LevelData_ | LevelDataType |
typedef SolutionLevelData_ | SolutionLevelDataType |
Public Member Functions | |
CoefficientInterpolator (int a_numComps) | |
virtual | ~CoefficientInterpolator () |
Destructor. More... | |
int | numComps () const |
Returns the number of components in the interpolated coefficient. More... | |
virtual void | interpolate (LevelDataType &a_result, Real a_time) |
virtual void | interpolate (LevelDataType &a_result, const SolutionLevelDataType &a_solution, Real a_time) |
virtual bool | dependsUponSolution () const |
virtual void | interpolatePrime (LevelDataType &a_prime, const SolutionLevelDataType &a_solution, Real a_time) |
virtual void | solve (SolutionLevelDataType &a_phi, const SolutionLevelDataType &a_f, Real a_time, const SolutionLevelDataType &a_phi0, Real a_tolerance) |
void | NewtonRaphson (SolutionLevelDataType &a_phi, const SolutionLevelDataType &a_f, Real a_time, const SolutionLevelDataType &a_phi0, Real a_tolerance) |
Private Member Functions | |
CoefficientInterpolator () | |
CoefficientInterpolator (const CoefficientInterpolator &) | |
CoefficientInterpolator & | operator= (const CoefficientInterpolator &) |
Private Attributes | |
int | m_numComps |
bool | m_inCall |
This abstract base class provides an interface to time-dependent spatial coefficient data for various partial differential equations. One obtains constant access to coefficient data by specifying the desired time centering. Subclasses of this base class define how that coefficient data is computed.
LevelDataType | The LevelData type used to store coefficient data. |
typedef LevelData_ CoefficientInterpolator< LevelData_, SolutionLevelData_ >::LevelDataType |
typedef SolutionLevelData_ CoefficientInterpolator< LevelData_, SolutionLevelData_ >::SolutionLevelDataType |
|
explicit |
Base class constructor. Called by every subclass.
a_numComps | The number of components in the interpolated coefficient. |
|
virtual |
Destructor.
Referenced by CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > >::CoefficientInterpolator().
|
private |
|
private |
int CoefficientInterpolator< LevelData_, SolutionLevelData_ >::numComps | ( | ) | const |
Returns the number of components in the interpolated coefficient.
Referenced by CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > >::~CoefficientInterpolator().
|
virtual |
Interpolate the coefficient at the given time, placing the result in the given LevelData object. This method must be overridden by subclasses.
a_result | The LevelData object that will store the result. |
a_time | The time at which the coefficient is to be evaluated. |
Referenced by CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > >::dependsUponSolution(), CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > >::interpolate(), and CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > >::NewtonRaphson().
|
virtual |
Interpolate the coefficient at the given time, placing the result in the given LevelData object. This method assumes that the coefficient depends upon the solution to the partial differential equation in question, so the solution is passed into it as an argument.
a_result | The LevelData object that will store the result. |
a_solution | The solution to the partial differential equation. |
a_time | The time at which the coefficient is to be evaluated. |
|
virtual |
Returns true if the coefficient depends on the solution to the partial differential equation (rendering it nonlinear), false otherwise. By default, the coefficient is assumed not to depend upon the solution.
Referenced by CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > >::interpolate(), CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > >::interpolatePrime(), and CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > >::numComps().
|
virtual |
Computes the derivative of the coefficient with respect to the solution at the desired time. By default, this sets a_deriv to 0.
a_prime | The coefficient derivative data will be stored here. |
a_solution | The solution to the partial differential equation. |
a_time | The time at which to compute the coefficient data. |
Referenced by CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > >::interpolate(), and CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > >::NewtonRaphson().
|
virtual |
This virtual void method performs the iterative nonlinear solve for .
a_phi | The solution to the equation, , will be stored here. |
a_f | The term in the equation. |
a_time | The time at which the equation is solved. |
a_phi0 | The initial estimate for . |
a_tolerance | The threshold for the error in the equation that dictates when iteration should cease. |
Referenced by CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > >::interpolatePrime().
void CoefficientInterpolator< LevelData_, SolutionLevelData_ >::NewtonRaphson | ( | SolutionLevelDataType & | a_phi, |
const SolutionLevelDataType & | a_f, | ||
Real | a_time, | ||
const SolutionLevelDataType & | a_phi0, | ||
Real | a_tolerance | ||
) |
This helper method solves the nonlinear equation for using Newton-Raphson iteration. It can be used by subclasses to implement the solve() virtual method.
a_phi | The solution to the equation, , will be stored here. |
a_f | The term in the equation. |
a_time | The time at which the equation is solved. |
a_phi0 | The initial estimate for . |
a_tolerance | The threshold for the error in the equation that dictates when iteration should cease. |
Referenced by CoefficientInterpolator< LevelData< FluxBox >, LevelData< FArrayBox > >::solve().
|
private |
|
private |
|
private |