CustomScalarField3.h
Go to the documentation of this file.
Builder & WithFunction(const std::function< double(const Vector3D &)> &func)
Returns builder with field function.
Front-end to create CustomScalarField3 objects step by step.
Definition: CustomScalarField3.h:81
Builder & WithGradientFunction(const std::function< Vector3D(const Vector3D &)> &func)
Returns builder with divergence function.
CustomScalarField3(const std::function< double(const Vector3D &)> &customFunction, double derivativeResolution=1e-3)
Constructs a field with given function.
Builder & WithDerivativeResolution(double resolution)
Returns builder with derivative resolution.
double Laplacian(const Vector3D &x) const override
Returns the Laplacian at given position x.
Definition: pybind11Utils.h:24
static Builder GetBuilder()
Returns builder fox CustomScalarField3.
CustomScalarField3 Build() const
Builds CustomScalarField3.
3-D scalar field with custom field function.
Definition: CustomScalarField3.h:17
CustomScalarField3Ptr MakeShared() const
Builds shared pointer of CustomScalarField3 instance.
std::function< double(const Vector3D &)> Sampler() const override
Returns the sampler function.
Builder & WithLaplacianFunction(const std::function< double(const Vector3D &)> &func)
Returns builder with curl function.
Vector3D Gradient(const Vector3D &x) const override
Returns the gradient vector at given position x.
std::shared_ptr< CustomScalarField3 > CustomScalarField3Ptr
Shared pointer type for the CustomScalarField3.
Definition: CustomScalarField3.h:76
double Sample(const Vector3D &x) const override
Returns the sampled value at given position x.