From 21032ab735c6b2f366d7d7885751c58da3f5983e Mon Sep 17 00:00:00 2001
From: sniklas142 <niklas.schnierstein@googlemail.com>
Date: Wed, 28 Aug 2019 14:04:40 +0200
Subject: [PATCH] wip move to addons

---
 CMakeLists.txt             | 4 +++-
 TurTLE/DNS.py              | 5 ++++-
 TurTLE/ou_quick_plot.py    | 8 ++++----
 cpp/vorticity_equation.hpp | 3 +--
 4 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a9e43590..7b7cd609 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -214,7 +214,8 @@ set(cpp_for_lib
     ${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/ou_vorticity_equation.cpp)
+    ${PROJECT_SOURCE_DIR}/cpp/full_code/ou_vorticity_equation.cpp
+    ${PROJECT_SOURCE_DIR}/cpp/full_code/NSVE_ou_forcing.cpp)
 
 set(hpp_for_lib
     ${PROJECT_SOURCE_DIR}/cpp/full_code/code_base.hpp
@@ -292,6 +293,7 @@ set(hpp_for_lib
     ${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
+    ${PROJECT_SOURCE_DIR}/cpp/full_code/NSVE_ou_forcing.hpp
     )
 #file(GLOB_RECURSE hpp_for_lib ${PROJECT_SOURCE_DIR}/*.hpp)
 LIST(APPEND source_files ${hpp_for_lib} ${cpp_for_lib})
diff --git a/TurTLE/DNS.py b/TurTLE/DNS.py
index 411f2cf7..88dc3854 100644
--- a/TurTLE/DNS.py
+++ b/TurTLE/DNS.py
@@ -655,6 +655,10 @@ class DNS(_code):
                 'NSVEp_extra_sampling',
                 help = 'plain Navier-Stokes vorticity formulation, with basic fluid tracers, that sample velocity gradient, as well as pressure and its derivatives.')
 
+        parser_NSVE_ou = subparsers.add_parser(
+                'NSVE_ou_forcing',
+                help = 'plain Navier-Stokes vorticity formulation, with ornstein-uhlenbeck forcing')
+
         for parser in ['NSVEparticles_no_output', 'NSVEp2', 'NSVEp2p', 'NSVEp_extra']:
             eval('self.simulation_parser_arguments({0})'.format('parser_' + parser))
             eval('self.job_parser_arguments({0})'.format('parser_' + parser))
@@ -1057,4 +1061,3 @@ class DNS(_code):
                 no_submit = opt.no_submit,
                 no_debug = opt.no_debug)
         return None
-
diff --git a/TurTLE/ou_quick_plot.py b/TurTLE/ou_quick_plot.py
index b42c2cd5..fcf5766e 100644
--- a/TurTLE/ou_quick_plot.py
+++ b/TurTLE/ou_quick_plot.py
@@ -56,9 +56,9 @@ class plot_field:
         
 
 
-# plot_spectrum()
-# plot_histogram()
+plot_spectrum()
+plot_histogram()
 p = plot_field()
-p.plot('ou_field.h5')
-p.plot('add_ou_test_field.h5')
+#p.plot('ou_field.h5')
+#p.plot('add_ou_test_field.h5')
 plt.show()
diff --git a/cpp/vorticity_equation.hpp b/cpp/vorticity_equation.hpp
index cbff223e..50db48f0 100644
--- a/cpp/vorticity_equation.hpp
+++ b/cpp/vorticity_equation.hpp
@@ -87,7 +87,7 @@ class vorticity_equation
         ~vorticity_equation(void);
 
         /* solver essential methods */
-        void omega_nonlin(int src);
+        virtual void omega_nonlin(int src);
         void step(double dt);
         void impose_zero_modes(void);
 
@@ -166,4 +166,3 @@ class vorticity_equation
 };
 
 #endif//VORTICITY_EQUATION
-
-- 
GitLab