ou_vorticity_equation.hpp 1.36 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef OU_VORTICITY_EQUATION_HPP
#define OU_VORTICITY_EQUATION_HPP

#include <cstdlib>
#include "vorticity_equation.hpp"
#include "ornstein_uhlenbeck_process.hpp"


// vorticity_equation<double, FFTW> *test;

template <typename rnumber, field_backend be>
class ou_vorticity_equation : public vorticity_equation<rnumber, be>
{
    public:

sniklas142's avatar
sniklas142 committed
16
      std::string ou_forcing_type;
17
18
19
20
21
22
23
24
25
26

      ornstein_uhlenbeck_process<rnumber,be> *ou;
      ou_vorticity_equation(
        const char *NAME,
        int nx,
        int ny,
        int nz,
        double ou_kmin,
        double ou_kmax,
        double ou_energy_amplitude,
27
        double ou_gamma_factor,
28
29
30
31
32
33
34
35
36
37
        double DKX = 1.0,
        double DKY = 1.0,
        double DKZ = 1.0,
        unsigned FFTW_PLAN_RIGOR = FFTW_MEASURE):
          vorticity_equation<rnumber,be>(
            NAME, nx, ny, nz,
            DKX,DKY,DKZ, FFTW_PLAN_RIGOR){
              this->ou = new ornstein_uhlenbeck_process<rnumber,be>(
                NAME,
                nx, ny, nz,
38
                ou_kmin, ou_kmax, ou_energy_amplitude,ou_gamma_factor,
39
                DKX, DKY, DKZ, FFTW_PLAN_RIGOR);
sniklas142's avatar
sniklas142 committed
40
              this->ou_forcing_type = "replace";
41
42
43
44
            }

        ~ou_vorticity_equation();

sniklas142's avatar
sniklas142 committed
45
        void omega_nonlin(int src);
sniklas142's avatar
sniklas142 committed
46
        void step(double dt);
sniklas142's avatar
sniklas142 committed
47

48
49
        void add_ou_forcing_velocity(void);
        void add_ou_forcing_vorticity(void);
sniklas142's avatar
sniklas142 committed
50

51
52
53
54
};


#endif