ABLATE Source Documentation  0.12.34
ablate::mathFunctions::FormulaBase Class Reference

#include <formulaBase.hpp>

+ Inheritance diagram for ablate::mathFunctions::FormulaBase:

Public Member Functions

 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 double Eval (const double &x, const double &y, const double &z, const double &t) const =0
 
virtual double Eval (const double *xyz, const int &ndims, const double &t) const =0
 
virtual void Eval (const double &x, const double &y, const double &z, const double &t, std::vector< double > &result) const =0
 
virtual void Eval (const double *xyz, const int &ndims, const double &t, std::vector< double > &result) const =0
 
virtual PetscFunction GetPetscFunction ()=0
 
virtual void * GetContext ()=0
 
virtual ~MathFunction ()=default
 

Protected Member Functions

 FormulaBase (std::string functionString, const std::shared_ptr< ablate::parameters::Parameters > &constants)
 

Static Protected Member Functions

static std::invalid_argument ConvertToException (mu::Parser::exception_type &exception)
 

Protected Attributes

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
 

Detailed Description

Formula base is the base abstract class shared by other formulas

Constructor & Destructor Documentation

◆ FormulaBase()

ablate::mathFunctions::FormulaBase::FormulaBase ( std::string  functionString,
const std::shared_ptr< ablate::parameters::Parameters > &  constants 
)
explicitprotected

protected constructor to build the formula base

Parameters
functionString
constants

Member Function Documentation

◆ ConvertToException()

std::invalid_argument ablate::mathFunctions::FormulaBase::ConvertToException ( mu::Parser::exception_type &  exception)
staticprotected

helper function to convert to a invalid_exception

Parameters
exception
Returns

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