diff --git a/Makefile.in b/Makefile.in index 3e1f331fb2..94ea473642 100644 --- a/Makefile.in +++ b/Makefile.in @@ -62,6 +62,7 @@ SRC_FILES := $(wildcard src/*.cpp) \ $(wildcard src/nr_radiation/implicit/*.cpp) \ $(wildcard src/cr/*.cpp) \ $(wildcard src/cr/integrators/*.cpp) \ + $(wildcard src/crdiffusion/*.cpp) \ src/hydro/rsolvers/$(RSOLVER_DIR)$(RSOLVER_FILE) \ $(wildcard src/inputs/*.cpp) \ $(wildcard src/mesh/*.cpp) \ diff --git a/configure.py b/configure.py index 12d64e8472..58230282c1 100755 --- a/configure.py +++ b/configure.py @@ -46,6 +46,7 @@ # -nr_radiation turn on non-relativistic radiation transport # -implicit_radiation implicit radiation transport module # -cr enable cosmic ray transport +# -crdiff enable cosmic ray diffusion with Multigrid # ---------------------------------------------------------------------------------------- # Modules @@ -267,6 +268,12 @@ default=False, help='enable cosmic ray transport') +# -cosmic ray diffusion argument +parser.add_argument('-crdiff', + action='store_true', + default=False, + help='enable implicit cosmic ray diffusion') + # The main choices for --cxx flag, using "ctype[-suffix]" formatting, where "ctype" is the # major family/suite/group of compilers and "suffix" may represent variants of the # compiler version and/or predefined sets of compiler options. The C++ compiler front ends @@ -558,6 +565,12 @@ def c_to_cpp(arg): else: definitions['CR_ENABLED'] = '0' +# -crdiff argument +if args['crdiff']: + definitions['CRDIFFUSION_ENABLED'] = '1' +else: + definitions['CRDIFFUSION_ENABLED'] = '0' + # --cxx=[name] argument if args['cxx'] == 'g++': @@ -1025,6 +1038,7 @@ def output_config(opt_descr, opt_choice, filehandle=None): output_config('Radiative Transfer', ('ON' if args['nr_radiation'] else 'OFF'), flog) output_config('Implicit Radiation', ('ON' if args['implicit_radiation'] else 'OFF'), flog) output_config('Cosmic Ray Transport', ('ON' if args['cr'] else 'OFF'), flog) +output_config('Cosmic Ray Diffusion', ('ON' if args['crdiff'] else 'OFF'), flog) output_config('Frame transformations', ('ON' if args['t'] else 'OFF'), flog) output_config('Self-Gravity', self_grav_string, flog) output_config('Super-Time-Stepping', ('ON' if args['sts'] else 'OFF'), flog) diff --git a/inputs/cosmic_ray/athinput.cr_diffusion_mg b/inputs/cosmic_ray/athinput.cr_diffusion_mg new file mode 100644 index 0000000000..779db0800e --- /dev/null +++ b/inputs/cosmic_ray/athinput.cr_diffusion_mg @@ -0,0 +1,75 @@ + +problem = CR diffusion test with Multigrid +reference = +configure = --prob=cr_diffusion_mg -crdiff + + +problem_id = MGCRDiffusion # problem ID: basename of output filenames + + +file_type = hst # History data dump +dt = 0.01 # time increment between outputs + + +file_type = vtk # Binary data dump +variable = prim # variables to be output +dcycle = 1 # time increment between outputs + +