CubbyFlow::ScalarField< N > Class Template Referenceabstract

Abstract base class for N-D scalar field. More...

#include <Core/Field/ScalarField.hpp>

Inheritance diagram for CubbyFlow::ScalarField< N >:
CubbyFlow::Field< N > CubbyFlow::ConstantScalarField< N > CubbyFlow::CustomScalarField< N > CubbyFlow::ScalarGrid< N > CubbyFlow::CellCenteredScalarGrid< N > CubbyFlow::VertexCenteredScalarGrid< N >

Public Member Functions

 ScalarField ()=default
 Default constructor. More...
 
 ~ScalarField () override=default
 Default destructor. More...
 
 ScalarField (const ScalarField &)=default
 Default copy constructor. More...
 
 ScalarField (ScalarField &&) noexcept=default
 Default move constructor. More...
 
ScalarFieldoperator= (const ScalarField &)=default
 Default copy assignment operator. More...
 
ScalarFieldoperator= (ScalarField &&) noexcept=default
 Default move assignment operator. More...
 
virtual double Sample (const Vector< double, N > &x) const =0
 Returns sampled value at given position x. More...
 
virtual Vector< double, N > Gradient (const Vector< double, N > &x) const
 Returns gradient vector at given position x. More...
 
virtual double Laplacian (const Vector< double, N > &x) const
 Returns Laplacian at given position x. More...
 
virtual std::function< double(const Vector< double, N > &)> Sampler () const
 Returns sampler function object. More...
 
- Public Member Functions inherited from CubbyFlow::Field< N >
 Field ()=default
 Default constructor. More...
 
virtual ~Field ()=default
 Default virtual destructor. More...
 
 Field (const Field &)=default
 Default copy constructor. More...
 
 Field (Field &&) noexcept=default
 Default move constructor. More...
 
Fieldoperator= (const Field &)=default
 Default copy assignment operator. More...
 
Fieldoperator= (Field &&) noexcept=default
 Default move assignment operator. More...
 

Detailed Description

template<size_t N>
class CubbyFlow::ScalarField< N >

Abstract base class for N-D scalar field.

Constructor & Destructor Documentation

◆ ScalarField() [1/3]

template<size_t N>
CubbyFlow::ScalarField< N >::ScalarField ( )
default

Default constructor.

◆ ~ScalarField()

template<size_t N>
CubbyFlow::ScalarField< N >::~ScalarField ( )
overridedefault

Default destructor.

◆ ScalarField() [2/3]

template<size_t N>
CubbyFlow::ScalarField< N >::ScalarField ( const ScalarField< N > &  )
default

Default copy constructor.

◆ ScalarField() [3/3]

template<size_t N>
CubbyFlow::ScalarField< N >::ScalarField ( ScalarField< N > &&  )
defaultnoexcept

Default move constructor.

Member Function Documentation

◆ Gradient()

template<size_t N>
virtual Vector<double, N> CubbyFlow::ScalarField< N >::Gradient ( const Vector< double, N > &  x) const
virtual

Returns gradient vector at given position x.

Reimplemented in CubbyFlow::ScalarGrid< N >, and CubbyFlow::CustomScalarField< N >.

◆ Laplacian()

template<size_t N>
virtual double CubbyFlow::ScalarField< N >::Laplacian ( const Vector< double, N > &  x) const
virtual

Returns Laplacian at given position x.

Reimplemented in CubbyFlow::ScalarGrid< N >, and CubbyFlow::CustomScalarField< N >.

◆ operator=() [1/2]

template<size_t N>
ScalarField& CubbyFlow::ScalarField< N >::operator= ( const ScalarField< N > &  )
default

Default copy assignment operator.

◆ operator=() [2/2]

template<size_t N>
ScalarField& CubbyFlow::ScalarField< N >::operator= ( ScalarField< N > &&  )
defaultnoexcept

Default move assignment operator.

◆ Sample()

template<size_t N>
virtual double CubbyFlow::ScalarField< N >::Sample ( const Vector< double, N > &  x) const
pure virtual

Returns sampled value at given position x.

Implemented in CubbyFlow::ScalarGrid< N >, CubbyFlow::CustomScalarField< N >, and CubbyFlow::ConstantScalarField< N >.

◆ Sampler()

template<size_t N>
virtual std::function<double(const Vector<double, N>&)> CubbyFlow::ScalarField< N >::Sampler ( ) const
virtual

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