diff options
author | 2018-10-24 07:48:33 -0700 | |
---|---|---|
committer | 2018-10-24 07:48:33 -0700 | |
commit | cc8996f77a002642b2e934c97fc357439f5ffbea (patch) | |
tree | 4fc8fa81ce3a7f91ba90bb27936215e99ff58ffc /Source/WarpXInitData.cpp | |
parent | dc05f98bfa204bde279a5e64d4a932edd83e7f84 (diff) | |
parent | 16a43f4310086650d90946b4c21e8c5e4ec2fb44 (diff) | |
download | WarpX-cc8996f77a002642b2e934c97fc357439f5ffbea.tar.gz WarpX-cc8996f77a002642b2e934c97fc357439f5ffbea.tar.zst WarpX-cc8996f77a002642b2e934c97fc357439f5ffbea.zip |
Merge pull request #23 from burlen/sensei_insitu_dev
Sensei insitu dev
Diffstat (limited to 'Source/WarpXInitData.cpp')
-rw-r--r-- | Source/WarpXInitData.cpp | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/Source/WarpXInitData.cpp b/Source/WarpXInitData.cpp index 769df87f5..a6b63a92d 100644 --- a/Source/WarpXInitData.cpp +++ b/Source/WarpXInitData.cpp @@ -7,6 +7,10 @@ #include <WarpX_f.H> #include <WarpXWrappers.h> +#ifdef BL_USE_SENSEI_INSITU +#include <AMReX_AmrMeshInSituBridge.H> +#endif + using namespace amrex; void @@ -43,14 +47,31 @@ WarpX::InitData () printGridSummary(std::cout, 0, finestLevel()); } +#ifdef BL_USE_SENSEI_INSITU + insitu_bridge = new amrex::AmrMeshInSituBridge; + insitu_bridge->setEnabled(insitu_int > 0 ? 1 : 0); + insitu_bridge->setConfig(insitu_config); + if (insitu_bridge->initialize()) + { + amrex::ErrorStream() + << "WarpX::InitData : Failed to initialize the in situ bridge." + << std::endl; + + amrex::Abort(); + } + insitu_bridge->setFrequency(1); +#endif + if (restart_chkfile.empty()) { - if (plot_int > 0) { + if (plot_int > 0) WritePlotFile(); - } - if (check_int > 0) { - WriteCheckPointFile(); - } + + if (check_int > 0) + WriteCheckPointFile(); + + if ((insitu_int > 0) && (insitu_start == 0)) + UpdateInSitu(); } } |