SpECTRE  v2024.04.12
MathFunction< VolumeDim, Fr > Class Template Referenceabstract

#include <MathFunction.hpp>

Public Types

using frame = Fr
 

Public Member Functions

 WRAPPED_PUPable_abstract (MathFunction)
 
virtual std::unique_ptr< MathFunctionget_clone () const =0
 
virtual bool operator== (const MathFunction< VolumeDim, Fr > &other) const =0
 
virtual bool operator!= (const MathFunction< VolumeDim, Fr > &other) const =0
 
virtual Scalar< double > operator() (const tnsr::I< double, VolumeDim, Fr > &x) const =0
 Returns the value of the function at the coordinate 'x'. More...
 
virtual Scalar< DataVectoroperator() (const tnsr::I< DataVector, VolumeDim, Fr > &x) const =0
 Returns the value of the function at the coordinate 'x'. More...
 
virtual tnsr::i< double, VolumeDim, Fr > first_deriv (const tnsr::I< double, VolumeDim, Fr > &x) const =0
 Returns the first partial derivatives of the function at 'x'. More...
 
virtual tnsr::i< DataVector, VolumeDim, Fr > first_deriv (const tnsr::I< DataVector, VolumeDim, Fr > &x) const =0
 Returns the first partial derivatives of the function at 'x'. More...
 
virtual tnsr::ii< double, VolumeDim, Fr > second_deriv (const tnsr::I< double, VolumeDim, Fr > &x) const =0
 Returns the second partial derivatives of the function at 'x'. More...
 
virtual tnsr::ii< DataVector, VolumeDim, Fr > second_deriv (const tnsr::I< DataVector, VolumeDim, Fr > &x) const =0
 Returns the second partial derivatives of the function at 'x'. More...
 
virtual tnsr::iii< double, VolumeDim, Fr > third_deriv (const tnsr::I< double, VolumeDim, Fr > &x) const =0
 Returns the third partial derivatives of the function at 'x'. More...
 
virtual tnsr::iii< DataVector, VolumeDim, Fr > third_deriv (const tnsr::I< DataVector, VolumeDim, Fr > &x) const =0
 Returns the third partial derivatives of the function at 'x'. More...
 

Static Public Attributes

static constexpr size_t volume_dim = VolumeDim
 

Detailed Description

template<size_t VolumeDim, typename Fr>
class MathFunction< VolumeDim, Fr >

Encodes a function \(R^n \to R\) where n is VolumeDim.

Encodes a function \(R^n \to R\) where n is VolumeDim and where the function input (i.e., the spatial coordinates) is given as a rank-1 tensor.

Member Function Documentation

◆ first_deriv() [1/2]

template<size_t VolumeDim, typename Fr >
virtual tnsr::i< DataVector, VolumeDim, Fr > MathFunction< VolumeDim, Fr >::first_deriv ( const tnsr::I< DataVector, VolumeDim, Fr > &  x) const
pure virtual

Returns the first partial derivatives of the function at 'x'.

Implemented in MathFunctions::Gaussian< VolumeDim, Fr >.

◆ first_deriv() [2/2]

template<size_t VolumeDim, typename Fr >
virtual tnsr::i< double, VolumeDim, Fr > MathFunction< VolumeDim, Fr >::first_deriv ( const tnsr::I< double, VolumeDim, Fr > &  x) const
pure virtual

Returns the first partial derivatives of the function at 'x'.

Implemented in MathFunctions::Gaussian< VolumeDim, Fr >.

◆ operator()() [1/2]

template<size_t VolumeDim, typename Fr >
virtual Scalar< DataVector > MathFunction< VolumeDim, Fr >::operator() ( const tnsr::I< DataVector, VolumeDim, Fr > &  x) const
pure virtual

Returns the value of the function at the coordinate 'x'.

Implemented in MathFunctions::Gaussian< VolumeDim, Fr >.

◆ operator()() [2/2]

template<size_t VolumeDim, typename Fr >
virtual Scalar< double > MathFunction< VolumeDim, Fr >::operator() ( const tnsr::I< double, VolumeDim, Fr > &  x) const
pure virtual

Returns the value of the function at the coordinate 'x'.

Implemented in MathFunctions::Gaussian< VolumeDim, Fr >.

◆ second_deriv() [1/2]

template<size_t VolumeDim, typename Fr >
virtual tnsr::ii< DataVector, VolumeDim, Fr > MathFunction< VolumeDim, Fr >::second_deriv ( const tnsr::I< DataVector, VolumeDim, Fr > &  x) const
pure virtual

Returns the second partial derivatives of the function at 'x'.

Implemented in MathFunctions::Gaussian< VolumeDim, Fr >.

◆ second_deriv() [2/2]

template<size_t VolumeDim, typename Fr >
virtual tnsr::ii< double, VolumeDim, Fr > MathFunction< VolumeDim, Fr >::second_deriv ( const tnsr::I< double, VolumeDim, Fr > &  x) const
pure virtual

Returns the second partial derivatives of the function at 'x'.

Implemented in MathFunctions::Gaussian< VolumeDim, Fr >.

◆ third_deriv() [1/2]

template<size_t VolumeDim, typename Fr >
virtual tnsr::iii< DataVector, VolumeDim, Fr > MathFunction< VolumeDim, Fr >::third_deriv ( const tnsr::I< DataVector, VolumeDim, Fr > &  x) const
pure virtual

Returns the third partial derivatives of the function at 'x'.

Implemented in MathFunctions::Gaussian< VolumeDim, Fr >.

◆ third_deriv() [2/2]

template<size_t VolumeDim, typename Fr >
virtual tnsr::iii< double, VolumeDim, Fr > MathFunction< VolumeDim, Fr >::third_deriv ( const tnsr::I< double, VolumeDim, Fr > &  x) const
pure virtual

Returns the third partial derivatives of the function at 'x'.

Implemented in MathFunctions::Gaussian< VolumeDim, Fr >.


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