diff options
author | 2023-08-01 12:00:50 +0200 | |
---|---|---|
committer | 2023-08-01 12:00:50 +0200 | |
commit | 63dc76ff15c1c8660f30e1ff1cfcb9c2f04db814 (patch) | |
tree | b9ab0e372c0bb50fc80b379f9d287dab1ef1fb3b /Source/main.cpp | |
parent | 862df560823cedaf08b67cbee527ed9bedc79683 (diff) | |
download | WarpX-63dc76ff15c1c8660f30e1ff1cfcb9c2f04db814.tar.gz WarpX-63dc76ff15c1c8660f30e1ff1cfcb9c2f04db814.tar.zst WarpX-63dc76ff15c1c8660f30e1ff1cfcb9c2f04db814.zip |
Refactoring: instantiate WarpX class via MakeWarpX function (#4104)
* move functions from main to WarpX class and make WarpX constructible only using factory method
* instantiate WarpX via MakeWarpX static member function
* test adding MakeWarpX to warpx_init in python wrapper
* revert to the use of a simple pointer for the WarpX instance
* fix issue
* use finalize in python wrapper
* change finalize order
* move finalize
* fix bug
Diffstat (limited to 'Source/main.cpp')
-rw-r--r-- | Source/main.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/Source/main.cpp b/Source/main.cpp index b889bb24a..3051539d8 100644 --- a/Source/main.cpp +++ b/Source/main.cpp @@ -11,7 +11,6 @@ #include "Initialization/WarpXAMReXInit.H" #include "Utils/WarpXProfilerWrapper.H" #include "Utils/WarpXrocfftUtil.H" -#include "Utils/WarpXUtil.H" #include <ablastr/parallelization/MPIInitHelpers.H> #include <ablastr/utils/timer/Timer.H> @@ -27,22 +26,13 @@ int main(int argc, char* argv[]) utils::rocfft::setup(); - ParseGeometryInput(); - - ConvertLabParamsToBoost(); - ReadBCParams(); - -#ifdef WARPX_DIM_RZ - CheckGriddingForRZSpectral(); -#endif - { WARPX_PROFILE_VAR("main()", pmain); auto timer = ablastr::utils::timer::Timer{}; timer.record_start_time(); - WarpX warpx; + auto& warpx = WarpX::GetInstance(); warpx.InitData(); @@ -58,6 +48,8 @@ int main(int argc, char* argv[]) } WARPX_PROFILE_VAR_STOP(pmain); + + WarpX::Finalize(); } utils::rocfft::cleanup(); |