Jet  v1.3.3
Classes | Public Member Functions | Static Public Member Functions | List of all members
jet::CustomVectorField3 Class Referencefinal

3-D vector field with custom field function. More...

#include <jet/custom_vector_field3.h>

Inheritance diagram for jet::CustomVectorField3:
jet::VectorField3 jet::Field3

Classes

class  Builder
 Front-end to create CustomVectorField3 objects step by step. More...
 

Public Member Functions

 CustomVectorField3 (const std::function< Vector3D(const Vector3D &)> &customFunction, double derivativeResolution=1e-3)
 Constructs a field with given function. More...
 
 CustomVectorField3 (const std::function< Vector3D(const Vector3D &)> &customFunction, const std::function< double(const Vector3D &)> &customDivergenceFunction, double derivativeResolution=1e-3)
 Constructs a field with given field and gradient function. More...
 
 CustomVectorField3 (const std::function< Vector3D(const Vector3D &)> &customFunction, const std::function< double(const Vector3D &)> &customDivergenceFunction, const std::function< Vector3D(const Vector3D &)> &customCurlFunction)
 Constructs a field with given field, gradient, and Laplacian function. More...
 
Vector3D sample (const Vector3D &x) const override
 Returns the sampled value at given position x. More...
 
double divergence (const Vector3D &x) const override
 Returns the divergence at given position x. More...
 
Vector3D curl (const Vector3D &x) const override
 Returns the curl at given position x. More...
 
std::function< Vector3D(const Vector3D &)> sampler () const override
 Returns the sampler function. More...
 
- Public Member Functions inherited from jet::VectorField3
 VectorField3 ()
 Default constructor. More...
 
virtual ~VectorField3 ()
 Default destructor. More...
 
- Public Member Functions inherited from jet::Field3
 Field3 ()
 
virtual ~Field3 ()
 

Static Public Member Functions

static Builder builder ()
 Returns builder fox CustomVectorField2. More...
 

Detailed Description

3-D vector field with custom field function.

Constructor & Destructor Documentation

◆ CustomVectorField3() [1/3]

jet::CustomVectorField3::CustomVectorField3 ( const std::function< Vector3D(const Vector3D &)> &  customFunction,
double  derivativeResolution = 1e-3 
)

Constructs a field with given function.

This constructor creates a field with user-provided function object. To compute derivatives, such as gradient and Laplacian, finite differencing is used. Thus, the differencing resolution also can be provided as the last parameter.

◆ CustomVectorField3() [2/3]

jet::CustomVectorField3::CustomVectorField3 ( const std::function< Vector3D(const Vector3D &)> &  customFunction,
const std::function< double(const Vector3D &)> &  customDivergenceFunction,
double  derivativeResolution = 1e-3 
)

Constructs a field with given field and gradient function.

This constructor creates a field with user-provided field and gradient function objects. To compute Laplacian, finite differencing is used. Thus, the differencing resolution also can be provided as the last parameter.

◆ CustomVectorField3() [3/3]

jet::CustomVectorField3::CustomVectorField3 ( const std::function< Vector3D(const Vector3D &)> &  customFunction,
const std::function< double(const Vector3D &)> &  customDivergenceFunction,
const std::function< Vector3D(const Vector3D &)> &  customCurlFunction 
)

Constructs a field with given field, gradient, and Laplacian function.

Member Function Documentation

◆ builder()

static Builder jet::CustomVectorField3::builder ( )
static

Returns builder fox CustomVectorField2.

◆ curl()

Vector3D jet::CustomVectorField3::curl ( const Vector3D x) const
overridevirtual

Returns the curl at given position x.

Reimplemented from jet::VectorField3.

◆ divergence()

double jet::CustomVectorField3::divergence ( const Vector3D x) const
overridevirtual

Returns the divergence at given position x.

Reimplemented from jet::VectorField3.

◆ sample()

Vector3D jet::CustomVectorField3::sample ( const Vector3D x) const
overridevirtual

Returns the sampled value at given position x.

Implements jet::VectorField3.

◆ sampler()

std::function<Vector3D(const Vector3D&)> jet::CustomVectorField3::sampler ( ) const
overridevirtual

Returns the sampler function.

Reimplemented from jet::VectorField3.


The documentation for this class was generated from the following file: