1 #ifndef ABLATELIBRARY_FORMULA_HPP
2 #define ABLATELIBRARY_FORMULA_HPP
6 #include "formulaBase.hpp"
7 #include "parameters/parameters.hpp"
9 namespace ablate::mathFunctions {
13 std::vector<std::unique_ptr<double>> nestedValues;
14 std::vector<std::shared_ptr<MathFunction>> nestedFunctions;
17 static PetscErrorCode ParsedPetscNested(PetscInt dim, PetscReal
time,
const PetscReal x[], PetscInt Nf, PetscScalar* u,
void* ctx);
21 void operator=(
const Formula&) =
delete;
23 explicit Formula(std::string functionString,
const std::map<std::string, std::shared_ptr<MathFunction>>& = {}, std::shared_ptr<ablate::parameters::Parameters> constants = {});
25 double Eval(
const double& x,
const double& y,
const double& z,
const double& t)
const override;
27 double Eval(
const double* xyz,
const int& ndims,
const double& t)
const override;
29 void Eval(
const double& x,
const double& y,
const double& z,
const double& t, std::vector<double>& result)
const override;
31 void Eval(
const double* xyz,
const int& ndims,
const double& t, std::vector<double>& result)
const override;