Commit 2e98c4b8 authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

add lambda parameter

parent 130d5809
Pipeline #37221 canceled with stage
...@@ -154,6 +154,7 @@ class DNS(_code): ...@@ -154,6 +154,7 @@ class DNS(_code):
self.NSVEp_extra_parameters['tracers0_enable_vorticity_omega'] = int(0) self.NSVEp_extra_parameters['tracers0_enable_vorticity_omega'] = int(0)
self.NSVEp_extra_parameters['tracers0_cutoff'] = float(1) self.NSVEp_extra_parameters['tracers0_cutoff'] = float(1)
self.NSVEp_extra_parameters['tracers0_inner_v0'] = float(1) self.NSVEp_extra_parameters['tracers0_inner_v0'] = float(1)
self.NSVEp_extra_parameters['tracers0_lambda'] = float(1)
#self.extra_parameters = {} #self.extra_parameters = {}
#for key in ['NSVE', 'NSVE_no_output', 'NSVEparticles', 'NSVEparticles_no_output', 'NSVEcomplex_particles']: #for key in ['NSVE', 'NSVE_no_output', 'NSVEparticles', 'NSVEparticles_no_output', 'NSVEcomplex_particles']:
# self.extra_parameters[key] = {} # self.extra_parameters[key] = {}
......
...@@ -43,7 +43,7 @@ int NSVEcomplex_particles<rnumber>::initialize(void) ...@@ -43,7 +43,7 @@ int NSVEcomplex_particles<rnumber>::initialize(void)
p2p_computer<double, long long int> current_p2p_computer; p2p_computer<double, long long int> current_p2p_computer;
current_p2p_computer.setEnable(this->enable_p2p); current_p2p_computer.setEnable(this->enable_p2p);
particles_inner_computer<double, long long int> current_particles_inner_computer(inner_v0); particles_inner_computer<double, long long int> current_particles_inner_computer(inner_v0, this->lambda);
current_particles_inner_computer.setEnable(enable_inner); current_particles_inner_computer.setEnable(enable_inner);
...@@ -249,6 +249,7 @@ int NSVEcomplex_particles<rnumber>::read_parameters(void) ...@@ -249,6 +249,7 @@ int NSVEcomplex_particles<rnumber>::read_parameters(void)
tval, this->enable_vorticity_omega); tval, this->enable_vorticity_omega);
this->cutoff = hdf5_tools::read_value<double>(parameter_file, "parameters/tracers0_cutoff"); this->cutoff = hdf5_tools::read_value<double>(parameter_file, "parameters/tracers0_cutoff");
this->inner_v0 = hdf5_tools::read_value<double>(parameter_file, "parameters/tracers0_inner_v0"); this->inner_v0 = hdf5_tools::read_value<double>(parameter_file, "parameters/tracers0_inner_v0");
this->lambda = hdf5_tools::read_value<double>(parameter_file, "parameters/tracers0_lambda");
H5Fclose(parameter_file); H5Fclose(parameter_file);
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
......
...@@ -61,6 +61,7 @@ class NSVEcomplex_particles: public NSVE<rnumber> ...@@ -61,6 +61,7 @@ class NSVEcomplex_particles: public NSVE<rnumber>
double cutoff; double cutoff;
double inner_v0; double inner_v0;
double lambda;
bool enable_p2p; bool enable_p2p;
bool enable_inner; bool enable_inner;
bool enable_vorticity_omega; bool enable_vorticity_omega;
...@@ -80,7 +81,7 @@ class NSVEcomplex_particles: public NSVE<rnumber> ...@@ -80,7 +81,7 @@ class NSVEcomplex_particles: public NSVE<rnumber>
NSVE<rnumber>( NSVE<rnumber>(
COMMUNICATOR, COMMUNICATOR,
simulation_name), simulation_name),
cutoff(10), inner_v0(1), enable_p2p(true), enable_inner(true), enable_vorticity_omega(true){} cutoff(10), inner_v0(1), lambda(1.0), enable_p2p(true), enable_inner(true), enable_vorticity_omega(true){}
~NSVEcomplex_particles(){} ~NSVEcomplex_particles(){}
int initialize(void); int initialize(void);
......
...@@ -9,10 +9,40 @@ template <class real_number, class partsize_t> ...@@ -9,10 +9,40 @@ template <class real_number, class partsize_t>
class particles_inner_computer{ class particles_inner_computer{
bool isActive; bool isActive;
const real_number v0; const real_number v0;
const real_number lambda;
const real_number lambda1;
const real_number lambda2;
const real_number lambda3;
public: public:
explicit particles_inner_computer(const real_number inV0) : isActive(true), v0(inV0){ explicit particles_inner_computer(const real_number inV0):
} isActive(true),
v0(inV0),
lambda(0),
lambda1(0),
lambda2(0),
lambda3(0)
{}
explicit particles_inner_computer(const real_number inV0, const real_number inLambda):
isActive(true),
v0(inV0),
lambda(inLambda),
lambda1(0),
lambda2(0),
lambda3(0)
{}
explicit particles_inner_computer(
const real_number inV0,
const real_number inLambda1,
const real_number inLambda2,
const real_number inLambda3):
isActive(true),
v0(inV0),
lambda(0),
lambda1(inLambda1),
lambda2(inLambda2),
lambda3(inLambda3)
{}
template <int size_particle_positions, int size_particle_rhs> template <int size_particle_positions, int size_particle_rhs>
void compute_interaction( void compute_interaction(
......
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