1 #ifndef ABLATELIBRARY_FUNCTIONWRAPPER_HPP
2 #define ABLATELIBRARY_FUNCTIONWRAPPER_HPP
4 #include "mathFunction.hpp"
5 namespace ablate::mathFunctions {
9 typedef std::function<PetscErrorCode(
int dim,
double time,
const double x[],
int nf,
double* u,
void* ctx)> Function;
14 static PetscErrorCode WrappedPetscFunction(PetscInt dim, PetscReal time,
const PetscReal x[], PetscInt Nf, PetscScalar* u,
void* ctx);
22 double Eval(
const double& x,
const double& y,
const double& z,
const double& t)
const override;
24 double Eval(
const double* xyz,
const int& ndims,
const double& t)
const override;
26 void Eval(
const double& x,
const double& y,
const double& z,
const double& t, std::vector<double>& result)
const override;
28 void Eval(
const double* xyz,
const int& ndims,
const double& t, std::vector<double>& result)
const override;
Definition: functionWrapper.hpp:7
void * GetContext() override
Definition: functionWrapper.hpp:32
double Eval(const double &x, const double &y, const double &z, const double &t) const override
Definition: functionWrapper.cpp:6
PetscFunction GetPetscFunction() override
Definition: functionWrapper.hpp:30
Definition: mathFunction.hpp:13