From cc7c8e8ae3726e435a6d419675f736723b99a262 Mon Sep 17 00:00:00 2001
From: Chichi Lalescu <chichilalescu@gmail.com>
Date: Sun, 21 Jan 2018 16:32:10 +0100
Subject: [PATCH] tweak drag interval

---
 bfps/DNS.py                     | 2 +-
 bfps/cpp/vorticity_equation.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bfps/DNS.py b/bfps/DNS.py
index dc2d4c5f..3d531005 100644
--- a/bfps/DNS.py
+++ b/bfps/DNS.py
@@ -669,7 +669,6 @@ class DNS(_code):
             if self.dns_type in extra_parameters.keys():
                 for k in extra_parameters[self.dns_type].keys():
                     self.parameters[k] = extra_parameters[self.dns_type][k]
-        self.parameters['dt'] = (opt.dtfactor / opt.n)
         if ((self.parameters['niter_todo'] % self.parameters['niter_out']) != 0):
             self.parameters['niter_out'] = self.parameters['niter_todo']
         if len(opt.src_work_dir) == 0:
@@ -699,6 +698,7 @@ class DNS(_code):
             opt.nz > opt.n):
             opt.n = min(opt.nx, opt.ny, opt.nz)
             print("Warning: '-n' parameter changed to minimum of nx, ny, nz. This affects the computation of nu.")
+        self.parameters['dt'] = (opt.dtfactor / opt.n)
         self.parameters['nu'] = (opt.kMeta * 2 / opt.n)**(4./3)
         # check value of kMax
         kM = opt.n * 0.5
diff --git a/bfps/cpp/vorticity_equation.cpp b/bfps/cpp/vorticity_equation.cpp
index def6b4a4..9535ad88 100644
--- a/bfps/cpp/vorticity_equation.cpp
+++ b/bfps/cpp/vorticity_equation.cpp
@@ -307,7 +307,7 @@ void vorticity_equation<rnumber, be>::add_forcing(
         this->add_Kolmogorov_forcing(dst, this->fmode, amplitude);
         this->add_field_band(
                 dst, vort_field,
-                0, this->fmode,
+                this->fk0, this->fk1,
                 -this->friction_coefficient);
         return;
     }
-- 
GitLab