sine_wave.hpp
Go to the documentation of this file.
1 
6 #ifndef SINE_WAVE_HPP
7 #define SINE_WAVE_HPP 1
8 
9 #ifdef _MSC_VER
10 #define _USE_MATH_DEFINES
11 #endif // _MSC_VER
12 #include "../one_dimensional/spatial_distribution1d.hpp"
15 {
16 public:
17 
25  SineWave(double amplitude,
26  double wavelength,
27  double phase,
28  double offset);
29 
30  double operator()(double x) const;
31 
32 private:
33 
34  double amp_;
35  double k_;
36  double ph_;
37  double offset_;
38 };
39 
40 #endif // SINE_WAVE_HPP
Sine wave spatial distribution.
Definition: sine_wave.hpp:14
SineWave(double amplitude, double wavelength, double phase, double offset)
Class constructor return amp*sin(x*k+phase)+offest.
Definition: sine_wave.cpp:4
Base class for initial conditions.
double operator()(double x) const
Calculates initial conditions.
Definition: sine_wave.cpp:13