1 #ifndef ABLATELIBRARY_GEOMETRY_HPP
2 #define ABLATELIBRARY_GEOMETRY_HPP
4 #include <mathFunctions/mathFunction.hpp>
7 namespace ablate::mathFunctions::geom {
11 const std::shared_ptr<mathFunctions::MathFunction> insideValues;
12 const std::shared_ptr<mathFunctions::MathFunction> outsideValues;
15 const PetscFunction insidePetscFunction;
16 void* insidePetscContext;
19 const PetscFunction outsidePetscFunction;
20 void* outsidePetscContext;
23 explicit Geometry(
const std::shared_ptr<mathFunctions::MathFunction>& insideValues,
const std::shared_ptr<mathFunctions::MathFunction>& outsideValues);
25 static PetscErrorCode GeometryPetscFunction(PetscInt dim, PetscReal time,
const PetscReal x[], PetscInt Nf, PetscScalar* u,
void* ctx);
28 double Eval(
const double& x,
const double& y,
const double& z,
const double& t)
const override;
30 double Eval(
const double* xyz,
const int& ndims,
const double& t)
const override;
32 void Eval(
const double& x,
const double& y,
const double& z,
const double& t, std::vector<double>& result)
const override;
34 void Eval(
const double* xyz,
const int& ndims,
const double& t, std::vector<double>& result)
const override;
47 virtual bool InsideGeometry(
const double* xyz,
const int& ndims,
const double& time)
const = 0;
52 inline const std::shared_ptr<mathFunctions::MathFunction>&
InsideValues()
const {
return insideValues; };
57 inline const std::shared_ptr<mathFunctions::MathFunction>
OutsideValues()
const {
return outsideValues; };
Definition: mathFunction.hpp:13
Definition: geometry.hpp:9
const std::shared_ptr< mathFunctions::MathFunction > OutsideValues() const
Definition: geometry.hpp:57
void * GetContext() override
Definition: geometry.hpp:36
PetscFunction GetPetscFunction() override
Definition: geometry.hpp:38
double Eval(const double &x, const double &y, const double &z, const double &t) const override
Definition: geometry.cpp:24
const std::shared_ptr< mathFunctions::MathFunction > & InsideValues() const
Definition: geometry.hpp:52
virtual bool InsideGeometry(const double *xyz, const int &ndims, const double &time) const =0