Commit 8281d860 authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

get around precision argument problem

parent 171ab746
......@@ -40,14 +40,31 @@ def main():
choices = ['NavierStokes',
type = str)
# first option is the choice of base class or -h or -v
# all other options are passed on to the base_class instance
opt = parser.parse_args(sys.argv[1:2])
# error is thrown if first option is not a base class, so launch
# cannot be executed by mistake.
c = eval('{0}(fluid_precision = {1})'.format(opt.base_class, opt.precision))
if opt.base_class in ['NavierStokes-double',
precision = 'double'
precision = 'single'
c = eval('{0}(fluid_precision = {1})'.format(opt.base_class, precision))
c.launch(args = sys.argv[2:])
return None
......@@ -399,9 +399,5 @@ class _fluid_particle_base(_code):
_code.specific_parser_arguments(self, parser)
type = str, dest = 'precision',
default = 'single')
return None
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