SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
MathFunctions::Sinusoid< 1, Fr > Class Template Reference

Sinusoid \(f = A \sin\left(k x + \delta \right)\). More...

#include <Sinusoid.hpp>

Classes

struct  Amplitude
struct  Phase
struct  Wavenumber

Public Types

using options = tmpl::list<Amplitude, Wavenumber, Phase>
Public Types inherited from MathFunction< 1, Fr >
using frame = Fr

Public Member Functions

 Sinusoid (double amplitude, double wavenumber, double phase)
std::unique_ptr< MathFunction< 1, Fr > > get_clone () const override
 WRAPPED_PUPable_decl_base_template (SINGLE_ARG(MathFunction< 1, Fr >), Sinusoid)
 Sinusoid (CkMigrateMessage *)
double operator() (const double &x) const override
 Returns the function value at the coordinate 'x'.
DataVector operator() (const DataVector &x) const override
double first_deriv (const double &x) const override
 Returns the first derivative at 'x'.
DataVector first_deriv (const DataVector &x) const override
double second_deriv (const double &x) const override
 Returns the second derivative at 'x'.
DataVector second_deriv (const DataVector &x) const override
double third_deriv (const double &x) const override
 Returns the third derivative at 'x'.
DataVector third_deriv (const DataVector &x) const override
bool operator== (const MathFunction< 1, Fr > &other) const override
bool operator!= (const MathFunction< 1, Fr > &other) const override
bool operator== (const Sinusoid< 1, Fr > &other) const
bool operator!= (const Sinusoid< 1, Fr > &other) const
void pup (PUP::er &p) override
Public Member Functions inherited from MathFunction< 1, Fr >
 WRAPPED_PUPable_abstract (MathFunction)
Scalar< double > operator() (const tnsr::I< double, 1, Fr > &x) const
Scalar< DataVectoroperator() (const tnsr::I< DataVector, 1, Fr > &x) const
tnsr::i< double, 1, Fr > first_deriv (const tnsr::I< double, 1, Fr > &x) const
tnsr::i< DataVector, 1, Fr > first_deriv (const tnsr::I< DataVector, 1, Fr > &x) const
tnsr::ii< double, 1, Fr > second_deriv (const tnsr::I< double, 1, Fr > &x) const
tnsr::ii< DataVector, 1, Fr > second_deriv (const tnsr::I< DataVector, 1, Fr > &x) const
tnsr::iii< double, 1, Fr > third_deriv (const tnsr::I< double, 1, Fr > &x) const
tnsr::iii< DataVector, 1, Fr > third_deriv (const tnsr::I< DataVector, 1, Fr > &x) const

Static Public Attributes

static constexpr Options::String help
Static Public Attributes inherited from MathFunction< 1, Fr >
static constexpr size_t volume_dim = 1

Detailed Description

template<typename Fr>
class MathFunctions::Sinusoid< 1, Fr >

Sinusoid \(f = A \sin\left(k x + \delta \right)\).

Details

Input file options are: Amplitude, Phase, and Wavenumber

Member Function Documentation

◆ first_deriv() [1/2]

template<typename Fr>
DataVector MathFunctions::Sinusoid< 1, Fr >::first_deriv ( const DataVector & x) const
overridevirtual

Implements MathFunction< 1, Fr >.

◆ first_deriv() [2/2]

template<typename Fr>
double MathFunctions::Sinusoid< 1, Fr >::first_deriv ( const double & x) const
overridevirtual

Returns the first derivative at 'x'.

Implements MathFunction< 1, Fr >.

◆ get_clone()

template<typename Fr>
std::unique_ptr< MathFunction< 1, Fr > > MathFunctions::Sinusoid< 1, Fr >::get_clone ( ) const
overridevirtual

Implements MathFunction< 1, Fr >.

◆ operator!=()

template<typename Fr>
bool MathFunctions::Sinusoid< 1, Fr >::operator!= ( const MathFunction< 1, Fr > & other) const
overridevirtual

Implements MathFunction< 1, Fr >.

◆ operator()() [1/2]

template<typename Fr>
DataVector MathFunctions::Sinusoid< 1, Fr >::operator() ( const DataVector & x) const
overridevirtual

Implements MathFunction< 1, Fr >.

◆ operator()() [2/2]

template<typename Fr>
double MathFunctions::Sinusoid< 1, Fr >::operator() ( const double & x) const
overridevirtual

Returns the function value at the coordinate 'x'.

Implements MathFunction< 1, Fr >.

◆ operator==()

template<typename Fr>
bool MathFunctions::Sinusoid< 1, Fr >::operator== ( const MathFunction< 1, Fr > & other) const
overridevirtual

Implements MathFunction< 1, Fr >.

◆ second_deriv() [1/2]

template<typename Fr>
DataVector MathFunctions::Sinusoid< 1, Fr >::second_deriv ( const DataVector & x) const
overridevirtual

Implements MathFunction< 1, Fr >.

◆ second_deriv() [2/2]

template<typename Fr>
double MathFunctions::Sinusoid< 1, Fr >::second_deriv ( const double & x) const
overridevirtual

Returns the second derivative at 'x'.

Implements MathFunction< 1, Fr >.

◆ third_deriv() [1/2]

template<typename Fr>
DataVector MathFunctions::Sinusoid< 1, Fr >::third_deriv ( const DataVector & x) const
overridevirtual

Implements MathFunction< 1, Fr >.

◆ third_deriv() [2/2]

template<typename Fr>
double MathFunctions::Sinusoid< 1, Fr >::third_deriv ( const double & x) const
overridevirtual

Returns the third derivative at 'x'.

Implements MathFunction< 1, Fr >.

Member Data Documentation

◆ help

template<typename Fr>
Options::String MathFunctions::Sinusoid< 1, Fr >::help
staticconstexpr
Initial value:
= {
"Applies a Sinusoid function to the input value"}

The documentation for this class was generated from the following file:
  • src/PointwiseFunctions/MathFunctions/Sinusoid.hpp