IBAMR  IBAMR version 0.19.
Public Member Functions | List of all members
IBTK::muParserCartGridFunction Class Reference

Class muParserCartGridFunction is an implementation of the strategy class CartGridFunction that allows for the run-time specification of (possibly spatially- and temporally-varying) functions which are used to set double precision values on standard SAMRAI SAMRAI::hier::PatchData objects.

#include <ibtk/muParserCartGridFunction.h>

Inheritance diagram for IBTK::muParserCartGridFunction:
Inheritance graph
[legend]

Public Member Functions

 muParserCartGridFunction (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, SAMRAI::tbox::Pointer< SAMRAI::geom::CartesianGridGeometry< NDIM > > grid_geom)
 Constructor. More...
 
 ~muParserCartGridFunction ()=default
 Empty destructor. More...
 

Methods to set patch interior data.

virtual void setDataOnPatchHierarchy (int data_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > > var, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, double data_time, bool initial_time=false, int coarsest_ln=invalid_level_number, int finest_ln=invalid_level_number)
 Evaluate the function on the patch interiors on the specified levels of the patch hierarchy using the virtual function setDataOnPatch(). More...
 
virtual void setDataOnPatchLevel (int data_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > > var, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level, double data_time, bool initial_time=false)
 Evaluate the function on the patch interiors on the specified level of the patch hierarchy using the virtual function setDataOnPatch(). More...
 
std::string d_object_name
 

Methods to set patch interior data.

SAMRAI::tbox::Pointer< SAMRAI::geom::CartesianGridGeometry< NDIM > > d_grid_geom
 
std::map< std::string, doubled_constants
 
std::vector< std::string > d_function_strings
 
std::vector< mu::Parser > d_parsers
 
double d_parser_time = 0.0
 
Point d_parser_posn
 
bool isTimeDependent () const override
 Indicates whether the concrete CartGridFunction object is time-dependent. More...
 
void setDataOnPatch (int data_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > > var, SAMRAI::tbox::Pointer< SAMRAI::hier::Patch< NDIM > > patch, double data_time, bool initial_time=false, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > level=SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > >(nullptr)) override
 Virtual function to evaluate the function on the patch interior. More...
 
 muParserCartGridFunction ()=delete
 Default constructor. More...
 
 muParserCartGridFunction (const muParserCartGridFunction &from)=delete
 Copy constructor. More...
 
muParserCartGridFunctionoperator= (const muParserCartGridFunction &that)=delete
 Assignment operator. More...
 

Constructor & Destructor Documentation

◆ muParserCartGridFunction() [1/3]

IBTK::muParserCartGridFunction::muParserCartGridFunction ( std::string  object_name,
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database input_db,
SAMRAI::tbox::Pointer< SAMRAI::geom::CartesianGridGeometry< NDIM > >  grid_geom 
)

◆ ~muParserCartGridFunction()

IBTK::muParserCartGridFunction::~muParserCartGridFunction ( )
default

◆ muParserCartGridFunction() [2/3]

IBTK::muParserCartGridFunction::muParserCartGridFunction ( )
privatedelete
Note
This constructor is not implemented and should not be used.

◆ muParserCartGridFunction() [3/3]

IBTK::muParserCartGridFunction::muParserCartGridFunction ( const muParserCartGridFunction from)
privatedelete
Note
This constructor is not implemented and should not be used.
Parameters
fromThe value to copy to this object.

Member Function Documentation

◆ isTimeDependent()

bool IBTK::muParserCartGridFunction::isTimeDependent ( ) const
overridevirtual

◆ setDataOnPatch()

void IBTK::muParserCartGridFunction::setDataOnPatch ( int  data_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > >  var,
SAMRAI::tbox::Pointer< SAMRAI::hier::Patch< NDIM > >  patch,
double  data_time,
bool  initial_time = false,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > >  level = SAMRAI::tbox::PointerSAMRAI::hier::PatchLevel< NDIM > >(nullptr) 
)
overridevirtual

◆ operator=()

muParserCartGridFunction& IBTK::muParserCartGridFunction::operator= ( const muParserCartGridFunction that)
privatedelete
Note
This operator is not implemented and should not be used.
Parameters
thatThe value to assign to this object.
Returns
A reference to this object.

◆ setDataOnPatchHierarchy()

virtual void IBTK::CartGridFunction::setDataOnPatchHierarchy ( int  data_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > >  var,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
double  data_time,
bool  initial_time = false,
int  coarsest_ln = invalid_level_number,
int  finest_ln = invalid_level_number 
)
virtualinherited

◆ setDataOnPatchLevel()

virtual void IBTK::CartGridFunction::setDataOnPatchLevel ( int  data_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > >  var,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > >  patch_level,
double  data_time,
bool  initial_time = false 
)
virtualinherited

Member Data Documentation

◆ d_grid_geom

SAMRAI::tbox::Pointer<SAMRAI::geom::CartesianGridGeometry<NDIM> > IBTK::muParserCartGridFunction::d_grid_geom
private

The Cartesian grid geometry object provides the extents of the computational domain.

◆ d_constants

std::map<std::string, double> IBTK::muParserCartGridFunction::d_constants
private

User-provided constants specified in the input file.

◆ d_function_strings

std::vector<std::string> IBTK::muParserCartGridFunction::d_function_strings
private

The strings providing the data-setting functions which are evaluated by the mu::Parser objects.

◆ d_parsers

std::vector<mu::Parser> IBTK::muParserCartGridFunction::d_parsers
private

The mu::Parser objects which evaluate the data-setting functions.

◆ d_parser_time

double IBTK::muParserCartGridFunction::d_parser_time = 0.0
private

Time and position variables.

◆ d_parser_posn

Point IBTK::muParserCartGridFunction::d_parser_posn
private

◆ d_object_name

std::string IBTK::CartGridFunction::d_object_name
protectedinherited

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