Skip to content

Commit

Permalink
Merge branch 'main' into reactDiff
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnonaka committed Aug 21, 2024
2 parents fba95df + b7a9ce4 commit 1533f0f
Show file tree
Hide file tree
Showing 18 changed files with 463 additions and 435 deletions.
6 changes: 5 additions & 1 deletion exec/chemistry_testing/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ USE_OMP = FALSE
USE_CUDA = FALSE
COMP = gnu
DIM = 3
MAX_SPEC = 8
MAX_SPEC = 8
MAX_REAC = 5

TINY_PROFILE = FALSE

Expand Down Expand Up @@ -40,3 +41,6 @@ include $(AMREX_HOME)/Tools/GNUMake/Make.rules
MAXSPECIES := $(strip $(MAX_SPEC))
DEFINES += -DMAX_SPECIES=$(MAXSPECIES)

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

3 changes: 2 additions & 1 deletion exec/chemistry_testing/Make.package
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
CEXE_sources += main.cpp
CEXE_headers += myfunc.H
CEXE_sources += chemistry_testing_functions.cpp
CEXE_headers += chemistry_testing_functions.H
31 changes: 31 additions & 0 deletions exec/chemistry_testing/chemistry_testing_functions.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#ifndef MYFUNC_H_
#define MYFUNC_H_

void main_main(const char* argv);

void EMstep_chem_only(amrex::MultiFab& rho_old, amrex::MultiFab& rho_new,
const amrex::Geometry geom, const amrex::Real dt);

void RK3step_chem_only(amrex::MultiFab& rho_old, amrex::MultiFab& rho_new,
const amrex::Geometry geom, const amrex::Real dt);

void compute_chemistry_source_CLE_1(amrex::Real dt, amrex::Real dV, MultiFab& mf_in, int startComp_in,
MultiFab& source, int startComp_out);

void compute_chemistry_source_CLE_2(amrex::Real dt, amrex::Real dV, MultiFab& mf_in, int startComp_in,
MultiFab& source, int startComp_out, MultiFab& ranchem);

AMREX_GPU_HOST_DEVICE void compute_reaction_rates(GpuArray<amrex::Real,MAX_SPECIES>& n_dens,
GpuArray<amrex::Real,MAX_REACTION>& a_r);

AMREX_GPU_HOST_DEVICE void advance_reaction_det_cell(GpuArray<amrex::Real,MAX_SPECIES>& n_old,
GpuArray<amrex::Real,MAX_SPECIES>& n_new,amrex::Real dt);

AMREX_GPU_HOST_DEVICE void advance_reaction_CLE_cell(GpuArray<amrex::Real,MAX_SPECIES>& n_old,
GpuArray<amrex::Real,MAX_SPECIES>& n_new,
amrex::Real dt,amrex::Real dV,RandomEngine const& engine);

AMREX_GPU_HOST_DEVICE void advance_reaction_SSA_cell(GpuArray<amrex::Real,MAX_SPECIES>& n_old,
GpuArray<amrex::Real,MAX_SPECIES>& n_new,
amrex::Real dt,amrex::Real dV,RandomEngine const& engine);
#endif
Loading

0 comments on commit 1533f0f

Please sign in to comment.