1 #ifndef ABLATELIBRARY_NEARESTPOINT_HPP
2 #define ABLATELIBRARY_NEARESTPOINT_HPP
7 #include "mathFunction.hpp"
8 namespace ablate::mathFunctions {
16 const std::vector<double> coordinates;
19 const std::vector<double> values;
22 const std::size_t dimension;
25 const std::size_t numberPoints;
38 static PetscErrorCode NearestPointPetscFunction(PetscInt dim, PetscReal time,
const PetscReal x[], PetscInt Nf, PetscScalar* u,
void* ctx);
46 std::size_t FindNearestPoint(
const double* xyz, std::size_t xyzDimension)
const;
54 NearestPoint(
const std::vector<double>& coordinates,
const std::vector<double>& values);
56 double Eval(
const double& x,
const double& y,
const double& z,
const double& t)
const override;
58 double Eval(
const double* xyz,
const int& ndims,
const double& t)
const override;
60 void Eval(
const double& x,
const double& y,
const double& z,
const double& t, std::vector<double>& result)
const override;
62 void Eval(
const double* xyz,
const int& ndims,
const double& t, std::vector<double>& result)
const override;
Definition: mathFunction.hpp:13
Definition: nearestPoint.hpp:13
PetscFunction GetPetscFunction() override
Definition: nearestPoint.hpp:66
NearestPoint(const std::vector< double > &coordinates, const std::vector< double > &values)
Definition: nearestPoint.cpp:3
double Eval(const double &x, const double &y, const double &z, const double &t) const override
Definition: nearestPoint.cpp:40
void * GetContext() override
Definition: nearestPoint.hpp:64