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