Commit be7f6da3 authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

tweaks DNS for external use

initial condition must be generated even for unlisted solvers.
This commit also changes the name of a variable for style reasons
parent f760c950
Pipeline #65018 passed with stage
in 4 minutes and 27 seconds
......@@ -654,7 +654,7 @@ class DNS(_code):
parser_NSVEp_extra = subparsers.add_parser(
'NSVEp_extra_sampling',
help = 'plain Navier-Stokes vorticity formulation, with basic fluid tracers, that sample velocity gradient, as well as pressure and its derivatives.')
for parser in [
for pp in [
'NSVE',
'NSVE_no_output',
'NSVEparticles_no_output',
......@@ -663,23 +663,23 @@ class DNS(_code):
'NSVEp_extra',
'static_field',
'kraichnan_field']:
eval('self.simulation_parser_arguments({0})'.format('parser_' + parser))
eval('self.job_parser_arguments({0})'.format('parser_' + parser))
eval('self.parameters_to_parser_arguments({0})'.format('parser_' + parser))
eval('self.simulation_parser_arguments({0})'.format('parser_' + pp))
eval('self.job_parser_arguments({0})'.format('parser_' + pp))
eval('self.parameters_to_parser_arguments({0})'.format('parser_' + pp))
eval('self.parameters_to_parser_arguments('
'parser_{0},'
'self.generate_extra_parameters(\'{0}\'))'.format(parser))
for parser in [
'self.generate_extra_parameters(\'{0}\'))'.format(pp))
for pp in [
'NSVEparticles_no_output',
'NSVEp2',
'NSVEp2p',
'NSVEp_extra',
'static_field',
'kraichnan_field']:
eval('self.particle_parser_arguments({0})'.format('parser_' + parser))
eval('self.particle_parser_arguments({0})'.format('parser_' + pp))
eval('self.parameters_to_parser_arguments('
'parser_{0},'
'self.NSVEp_extra_parameters)'.format(parser))
'self.NSVEp_extra_parameters)'.format(pp))
return None
def generate_extra_parameters(
self,
......@@ -1033,6 +1033,8 @@ class DNS(_code):
# take care of fields' initial condition
# first, check if initial field exists
need_field = False
if self.check_current_vorticity_exists:
need_field = True
if self.dns_type in [
'NSVE',
'NSVE_no_output',
......
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