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