ABLATE Source Documentation  0.12.34
ablate::domain::Hdf5Initializer::Hdf5MathFunction Class Reference

#include <hdf5Initializer.hpp>

+ Inheritance diagram for ablate::domain::Hdf5Initializer::Hdf5MathFunction:

Public Member Functions

 Hdf5MathFunction (std::shared_ptr< Hdf5Mesh > baseMesh, std::string field)
 
 ~Hdf5MathFunction () override
 
virtual PetscErrorCode Eval (PetscInt dim, const PetscReal x[], PetscScalar *u) const
 
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
 
ablate::mathFunctions::PetscFunction GetPetscFunction () override
 
void * GetContext () override
 
- Public Member Functions inherited from ablate::mathFunctions::MathFunction
virtual ~MathFunction ()=default
 

Protected Attributes

const std::string field
 
DM fieldDm = nullptr
 
Vec fieldVec = nullptr
 
std::shared_ptr< Hdf5MeshbaseMesh
 
PetscInt components = -1
 
PetscInt dim = -1
 
PetscInt resultSize = -1
 

Detailed Description

Helper function

Constructor & Destructor Documentation

◆ Hdf5MathFunction()

ablate::domain::Hdf5Initializer::Hdf5MathFunction::Hdf5MathFunction ( std::shared_ptr< Hdf5Mesh baseMesh,
std::string  field 
)

Load the hdf5 vector

Parameters
baseMesh
field

◆ ~Hdf5MathFunction()

ablate::domain::Hdf5Initializer::Hdf5MathFunction::~Hdf5MathFunction ( )
override

cleanup/destroy the mesh, interpolant, vec

Member Function Documentation

◆ Eval() [1/5]

double ablate::domain::Hdf5Initializer::Hdf5MathFunction::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/5]

void ablate::domain::Hdf5Initializer::Hdf5MathFunction::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/5]

double ablate::domain::Hdf5Initializer::Hdf5MathFunction::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/5]

void ablate::domain::Hdf5Initializer::Hdf5MathFunction::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.

◆ Eval() [5/5]

PetscErrorCode ablate::domain::Hdf5Initializer::Hdf5MathFunction::Eval ( PetscInt  dim,
const PetscReal  x[],
PetscScalar *  u 
) const
virtual

method that does the interpolation for the provided point

Parameters
dim
x
Nf
u
Returns

◆ GetContext()

void* ablate::domain::Hdf5Initializer::Hdf5MathFunction::GetContext ( )
inlineoverridevirtual

Return a context for petsc style functions

Returns

Implements ablate::mathFunctions::MathFunction.

◆ GetPetscFunction()

ablate::mathFunctions::PetscFunction ablate::domain::Hdf5Initializer::Hdf5MathFunction::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: