blob: b889bb24a7696f254dcdd611e821066cb0a1444c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/* Copyright 2016-2020 Andrew Myers, Ann Almgren, Axel Huebl
* David Grote, Jean-Luc Vay, Remi Lehe
* Revathi Jambunathan, Weiqun Zhang
*
* This file is part of WarpX.
*
* License: BSD-3-Clause-LBNL
*/
#include "WarpX.H"
#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>
#include <ablastr/warn_manager/WarnManager.H>
#include <AMReX_Print.H>
int main(int argc, char* argv[])
{
ablastr::parallelization::mpi_init(argc, argv);
warpx::initialization::amrex_init(argc, 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;
warpx.InitData();
warpx.Evolve();
//Print warning messages at the end of the simulation
ablastr::warn_manager::GetWMInstance().PrintGlobalWarnings("THE END");
timer.record_stop_time();
if (warpx.Verbose()) {
amrex::Print() << "Total Time : "
<< timer.get_global_duration() << '\n';
}
WARPX_PROFILE_VAR_STOP(pmain);
}
utils::rocfft::cleanup();
amrex::Finalize();
ablastr::parallelization::mpi_finalize ();
}
|