Commit ac31be3f authored by sniklas142's avatar sniklas142
Browse files

add inherited class of vort eq to implement ou forcing

parent 47bba94d
......@@ -213,7 +213,9 @@ set(cpp_for_lib
${PROJECT_SOURCE_DIR}/cpp/full_code/NSVEp_extra_sampling.cpp
${PROJECT_SOURCE_DIR}/cpp/particles/particles_inner_computer.cpp
${PROJECT_SOURCE_DIR}/cpp/full_code/ornstein_uhlenbeck_process.cpp
${PROJECT_SOURCE_DIR}/cpp/full_code/ornstein_uhlenbeck_test.cpp)
${PROJECT_SOURCE_DIR}/cpp/full_code/ornstein_uhlenbeck_test.cpp
${PROJECT_SOURCE_DIR}/cpp/full_code/ou_vorticity_equation.cpp)
set(hpp_for_lib
${PROJECT_SOURCE_DIR}/cpp/full_code/code_base.hpp
${PROJECT_SOURCE_DIR}/cpp/full_code/direct_numerical_simulation.hpp
......@@ -289,6 +291,7 @@ set(hpp_for_lib
${PROJECT_SOURCE_DIR}/cpp/spline.hpp
${PROJECT_SOURCE_DIR}/cpp/full_code/ornstein_uhlenbeck_process.hpp
${PROJECT_SOURCE_DIR}/cpp/full_code/ornstein_uhlenbeck_test.hpp
${PROJECT_SOURCE_DIR}/cpp/full_code/ou_vorticity_equation.hpp
)
#file(GLOB_RECURSE hpp_for_lib ${PROJECT_SOURCE_DIR}/*.hpp)
LIST(APPEND source_files ${hpp_for_lib} ${cpp_for_lib})
......
#include "ou_vorticity_equation.hpp"
#include <cmath>
#include <cstring>
#include <cassert>
#include "scope_timer.hpp"
#define NDEBUG
template <class rnumber, field_backend be>
ou_vorticity_equation<rnumber,be>::~ou_vorticity_equation()
{
delete this->ou;
}
#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:
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,
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,
ou_kmin, ou_kmax, ou_energy_amplitude,
DKX, DKY, DKZ, FFTW_PLAN_RIGOR);
}
~ou_vorticity_equation();
};
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment