Public Member Functions | List of all members
SineWave Class Reference

Sine wave spatial distribution. More...

#include <sine_wave.hpp>

Inheritance diagram for SineWave:
Inheritance graph
[legend]
Collaboration diagram for SineWave:
Collaboration graph
[legend]

Public Member Functions

 SineWave (double amplitude, double wavelength, double phase, double offset)
 Class constructor return amp*sin(x*k+phase)+offest. More...
 
double operator() (double x) const
 Calculates initial conditions. More...
 
- Public Member Functions inherited from SpatialDistribution1D
virtual ~SpatialDistribution1D (void)
 Abstract class for initial conditions. More...
 

Detailed Description

Sine wave spatial distribution.

Definition at line 14 of file sine_wave.hpp.

Constructor & Destructor Documentation

◆ SineWave()

SineWave::SineWave ( double  amplitude,
double  wavelength,
double  phase,
double  offset 
)

Class constructor return amp*sin(x*k+phase)+offest.

Parameters
amplitudeThe amplitude of the sine function
wavelengthThe wavelength
phaseThe phase
offsetThe constant added to the sine

Definition at line 4 of file sine_wave.cpp.

Member Function Documentation

◆ operator()()

double SineWave::operator() ( double  x) const
virtual

Calculates initial conditions.

Parameters
xPosition
Returns
Value of the function at x

Implements SpatialDistribution1D.

Definition at line 13 of file sine_wave.cpp.


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