-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create a struct to hold the Microphysics runtime parameters #1433
Merged
Merged
Changes from 7 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6913c96
start implementing a struct for run params
zingale f50e1d0
this seems to work
zingale 64f17d3
some formatting
zingale 4317b46
Merge branch 'development' into param_stuct
zingale 7dc0891
Merge branch 'development' into param_stuct
zingale 7babc3b
Merge branch 'development' into param_stuct
zingale 4fdcab3
Merge branch 'development' into param_stuct
zingale 6c644cd
Merge branch 'development' into param_stuct
zingale 850d61f
add deprecation warning
zingale c8880b7
update format
zingale 2a6fda9
Merge branch 'development' into param_stuct
zingale 2c9f08e
Merge branch 'development' into param_stuct
zingale d456856
Merge branch 'development' into param_stuct
zingale File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
PRECISION = DOUBLE | ||
PROFILE = FALSE | ||
|
||
DEBUG = FALSE | ||
|
||
DIM = 3 | ||
|
||
COMP = gnu | ||
|
||
USE_MPI = FALSE | ||
USE_OMP = FALSE | ||
|
||
USE_REACT = TRUE | ||
|
||
EBASE = main | ||
|
||
BL_NO_FORT = TRUE | ||
|
||
# define the location of the Microphysics top directory | ||
MICROPHYSICS_HOME := ../.. | ||
|
||
# This sets the EOS directory | ||
EOS_DIR := helmholtz | ||
|
||
# This sets the network directory | ||
NETWORK_DIR := aprox19 | ||
|
||
EXTERN_SEARCH += . .. | ||
|
||
Bpack := ./Make.package | ||
Blocs := . | ||
|
||
include $(MICROPHYSICS_HOME)/unit_test/Make.unit_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
CEXE_sources += main.cpp | ||
|
||
CEXE_headers += test_parameters.H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@namespace: unit_test | ||
|
||
dens_min real 1.d6 | ||
dens_max real 1.d9 | ||
temp_min real 1.d6 | ||
temp_max real 1.d12 | ||
|
||
small_temp real 1.e4 | ||
small_dens real 1.e-4 | ||
|
||
test_string character "test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
unit_test.test_string = "this is a C++ string" | ||
eos.eos_input_is_constant = 0 | ||
|
||
amr.probin = probin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#include <AMReX_PlotFileUtil.H> | ||
#include <AMReX_ParmParse.H> | ||
#include <AMReX_Print.H> | ||
|
||
#include <AMReX_Geometry.H> | ||
#include <AMReX_MultiFab.H> | ||
#include <AMReX_BCRec.H> | ||
|
||
|
||
using namespace amrex; | ||
|
||
#include <test_parameters.H> | ||
#include <AMReX_buildInfo.H> | ||
|
||
#include <extern_parameters.H> | ||
#include <unit_test.H> | ||
|
||
int main (int argc, char* argv[]) | ||
{ | ||
amrex::Initialize(argc, argv); | ||
|
||
main_main(); | ||
|
||
amrex::Finalize(); | ||
return 0; | ||
} | ||
|
||
void main_main () | ||
{ | ||
|
||
// do the runtime parameter initializations and microphysics inits | ||
if (ParallelDescriptor::IOProcessor()) { | ||
std::cout << "reading extern runtime parameters ..." << std::endl; | ||
} | ||
|
||
ParmParse ppa("amr"); | ||
|
||
auto params = init_unit_test(); | ||
|
||
std::cout << "in C++" << std::endl; | ||
|
||
std::cout << " eos_input_is_constant = " << eos_rp::eos_input_is_constant << " " << params.eos.eos_input_is_constant << std::endl; | ||
std::cout << " test_string = " << unit_test_rp::test_string << " " << params.unit_test.test_string << std::endl; | ||
std::cout << " dens_min = " << unit_test_rp::dens_min << " " << params.unit_test.dens_min << std::endl; | ||
std::cout << " nonaka_file = " << integrator_rp::nonaka_file << " " << params.integrator.nonaka_file << std::endl; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef TEST_EOS_H | ||
#define TEST_EOS_H | ||
|
||
void main_main(); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This need to be updated since #1536
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated