Loading...
Searching...
No Matches
CustomScalarField.hpp
Go to the documentation of this file.
Front-end to create CustomScalarField objects step by step.
Definition CustomScalarField.hpp:101
std::shared_ptr< CustomScalarField< N > > MakeShared() const
Builds shared pointer of CustomScalarField instance.
Builder & WithLaplacianFunction(const std::function< double(const Vector< double, N > &)> &func)
Returns builder with curl function.
Builder & WithDerivativeResolution(double resolution)
Returns builder with derivative resolution.
Builder & WithGradientFunction(const std::function< Vector< double, N >(const Vector< double, N > &)> &func)
Returns builder with divergence function.
Builder & WithFunction(const std::function< double(const Vector< double, N > &)> &func)
Returns builder with field function.
CustomScalarField< N > Build() const
Builds CustomScalarField.
N-D scalar field with custom field function.
Definition CustomScalarField.hpp:21
CustomScalarField(std::function< double(const Vector< double, N > &)> customFunction, double derivativeResolution=1e-3)
Constructs a field with given function.
CustomScalarField(std::function< double(const Vector< double, N > &)> customFunction, std::function< Vector< double, N >(const Vector< double, N > &)> customGradientFunction, std::function< double(const Vector< double, N > &)> customLaplacianFunction)
Constructs a field with given field, gradient, and Laplacian function.
double Laplacian(const Vector< double, N > &x) const override
Returns the Laplacian at given position x.
std::function< double(const Vector< double, N > &)> Sampler() const override
Returns the sampler function.
static Builder GetBuilder()
Returns builder for CustomScalarField.
double Sample(const Vector< double, N > &x) const override
Returns the sampled value at given position x.
Vector< double, N > Gradient(const Vector< double, N > &x) const override
Returns the gradient vector at given position x.
CustomScalarField(std::function< double(const Vector< double, N > &)> customFunction, std::function< Vector< double, N >(const Vector< double, N > &)> customGradientFunction, double derivativeResolution=1e-3)
Constructs a field with given field and gradient function.
Definition Matrix.hpp:30
Definition pybind11Utils.hpp:21
std::shared_ptr< CustomScalarField3 > CustomScalarField3Ptr
Shared pointer type for the CustomScalarField3.
Definition CustomScalarField.hpp:94
std::shared_ptr< CustomScalarField2 > CustomScalarField2Ptr
Shared pointer type for the CustomScalarField2.
Definition CustomScalarField.hpp:91
1.9.8