ABLATE Source Documentation  0.12.34
ablate::mathFunctions::Formula Class Reference
+ Inheritance diagram for ablate::mathFunctions::Formula:

Public Member Functions

 Formula (const Formula &)=delete
 
void operator= (const Formula &)=delete
 
 Formula (std::string functionString, const std::map< std::string, std::shared_ptr< MathFunction >> &={}, std::shared_ptr< ablate::parameters::Parameters > constants={})
 
double Eval (const double &x, const double &y, const double &z, const double &t) const override
 
double Eval (const double *xyz, const int &ndims, const double &t) const override
 
void Eval (const double &x, const double &y, const double &z, const double &t, std::vector< double > &result) const override
 
void Eval (const double *xyz, const int &ndims, const double &t, std::vector< double > &result) const override
 
void * GetContext () override
 
PetscFunction GetPetscFunction () override
 
- Public Member Functions inherited from ablate::mathFunctions::FormulaBase
 FormulaBase (const FormulaBase &)=delete
 prevent copy of this object
 
void operator= (const FormulaBase &)=delete
 prevent copy of this object
 
- Public Member Functions inherited from ablate::mathFunctions::MathFunction
virtual ~MathFunction ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from ablate::mathFunctions::FormulaBase
 FormulaBase (std::string functionString, const std::shared_ptr< ablate::parameters::Parameters > &constants)
 
- Static Protected Member Functions inherited from ablate::mathFunctions::FormulaBase
static std::invalid_argument ConvertToException (mu::Parser::exception_type &exception)
 
- Protected Attributes inherited from ablate::mathFunctions::FormulaBase
double coordinate [3] = {0, 0, 0}
 The coordinate linked to the parser.
 
double time = 0.0
 the time linked to the parser
 
mu::Parser parser
 The parser object library for this formula.
 
const std::string formula
 the formula output for debugging
 

Member Function Documentation

◆ Eval() [1/4]

double ablate::mathFunctions::Formula::Eval ( const double &  x,
const double &  y,
const double &  z,
const double &  t 
) const
overridevirtual

Return a single double value

Parameters
x
y
z
t
Returns

Implements ablate::mathFunctions::MathFunction.

◆ Eval() [2/4]

void ablate::mathFunctions::Formula::Eval ( const double &  x,
const double &  y,
const double &  z,
const double &  t,
std::vector< double > &  result 
) const
overridevirtual

Populate a result array

Parameters
x
y
z
t
result

Implements ablate::mathFunctions::MathFunction.

◆ Eval() [3/4]

double ablate::mathFunctions::Formula::Eval ( const double *  xyz,
const int &  ndims,
const double &  t 
) const
overridevirtual

Return a single double value based upon an xyz array

Parameters
xyz
ndims
t
Returns

Implements ablate::mathFunctions::MathFunction.

◆ Eval() [4/4]

void ablate::mathFunctions::Formula::Eval ( const double *  xyz,
const int &  ndims,
const double &  t,
std::vector< double > &  result 
) const
overridevirtual

Populate a result array based upon an xyz array

Parameters
xyz
ndims
t
result

Implements ablate::mathFunctions::MathFunction.

◆ GetContext()

void* ablate::mathFunctions::Formula::GetContext ( )
inlineoverridevirtual

Return a context for petsc style functions

Returns

Implements ablate::mathFunctions::MathFunction.

◆ GetPetscFunction()

PetscFunction ablate::mathFunctions::Formula::GetPetscFunction ( )
inlineoverridevirtual

Return a raw petsc style function to evaluate this math function

Returns

Implements ablate::mathFunctions::MathFunction.


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