Skip to content

Commit

Permalink
namelist
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnonaka committed Aug 22, 2024
1 parent 4e59a7a commit 92cad71
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 3 deletions.
14 changes: 11 additions & 3 deletions exec/reactDiff/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ USE_CUDA = FALSE
COMP = gnu
DIM = 2
MAX_SPEC = 8
MAX_REAC = 5

TINY_PROFILE = FALSE

Expand All @@ -19,9 +20,13 @@ include $(AMREX_HOME)/Tools/GNUMake/Make.defs
#VPATH_LOCATIONS += .
#INCLUDE_LOCATIONS += .

#include ../../src_reactDiff/Make.package
#VPATH_LOCATIONS += ../../src_reactDiff/
#INCLUDE_LOCATIONS += ../../src_reactDiff/
include ../../src_reactDiff/Make.package
VPATH_LOCATIONS += ../../src_reactDiff/
INCLUDE_LOCATIONS += ../../src_reactDiff/

include ../../src_chemistry/Make.package
VPATH_LOCATIONS += ../../src_chemistry/
INCLUDE_LOCATIONS += ../../src_chemistry/

include ../../src_analysis/Make.package
VPATH_LOCATIONS += ../../src_analysis/
Expand Down Expand Up @@ -54,3 +59,6 @@ endif
MAXSPECIES := $(strip $(MAX_SPEC))
DEFINES += -DMAX_SPECIES=$(MAXSPECIES)

MAXREACTION := $(strip $(MAX_REAC))
DEFINES += -DMAX_REACTION=$(MAXREACTION)

3 changes: 3 additions & 0 deletions src_reactDiff/Make.package
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CEXE_sources += reactDiff_functions.cpp
CEXE_headers += reactDiff_functions.H
CEXE_headers += reactDiff_namespace.H
16 changes: 16 additions & 0 deletions src_reactDiff/reactDiff_functions.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#ifndef _reactdiff_functions_H_
#define _reactdiff_functions_H_

#include <AMReX.H>

#include "common_functions.H"
#include "common_namespace.H"
#include "reactDiff_namespace.H"

using namespace reactDiff;
using namespace amrex;
using namespace common;

void InitializeReactDiffNamespace();

#endif
22 changes: 22 additions & 0 deletions src_reactDiff/reactDiff_functions.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include "reactDiff_functions.H"
#include "AMReX_ParmParse.H"

// only used for split schemes (temporal_integrator>=0)
// 0=explicit trapezoidal predictor/corrector
// 1=Crank-Nicolson semi-implicit
// 2=explicit midpoint
// 3=multinomial diffusion
// 4=forward Euler

AMREX_GPU_MANAGED int reactDiff::diffusion_type;

void InitializeReactDiffNamespace()
{
// extract inputs parameters
ParmParse pp;

diffusion_type = 0;
pp.query("diffusion_type",diffusion_type);

return;
}
4 changes: 4 additions & 0 deletions src_reactDiff/reactDiff_namespace.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
namespace reactDiff {

extern AMREX_GPU_MANAGED int diffusion_type;
}

0 comments on commit 92cad71

Please sign in to comment.