diff options
author | 2019-06-10 13:34:55 -0700 | |
---|---|---|
committer | 2019-06-10 13:34:55 -0700 | |
commit | 4e2bc0444eacb6b3db36d7c3c3f7bbe6233c5f19 (patch) | |
tree | 5d5bb1d98d7f0ff4394f24607f4c46a6b3b04a6a /Source/Utils/WarpXAlgorithmSelection.H | |
parent | 2c25e914fcaae826a4e28acdc1e7c5348e05a168 (diff) | |
parent | 4c01a51d48f0f95b6ac309060d279145c5443064 (diff) | |
download | WarpX-4e2bc0444eacb6b3db36d7c3c3f7bbe6233c5f19.tar.gz WarpX-4e2bc0444eacb6b3db36d7c3c3f7bbe6233c5f19.tar.zst WarpX-4e2bc0444eacb6b3db36d7c3c3f7bbe6233c5f19.zip |
Merge branch 'dev' into fft_from_local_boxes
Diffstat (limited to 'Source/Utils/WarpXAlgorithmSelection.H')
-rw-r--r-- | Source/Utils/WarpXAlgorithmSelection.H | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/Source/Utils/WarpXAlgorithmSelection.H b/Source/Utils/WarpXAlgorithmSelection.H new file mode 100644 index 000000000..3fb23698a --- /dev/null +++ b/Source/Utils/WarpXAlgorithmSelection.H @@ -0,0 +1,57 @@ +#ifndef UTILS_WARPXALGORITHMSELECTION_H_ +#define UTILS_WARPXALGORITHMSELECTION_H_ + +#include <AMReX_ParmParse.H> +#include <string> + +struct MaxwellSolverAlgo { + // These numbers corresponds to the algorithm code in WarpX's + // `warpx_push_bvec` and `warpx_push_evec_f` + enum { + Yee = 0, + CKC = 1 + }; +}; + +struct ParticlePusherAlgo { + // These numbers correspond to the algorithm code in WarpX's + // `warpx_particle_pusher` + enum { + Boris = 0, + Vay = 1 + }; +}; + +struct CurrentDepositionAlgo { + enum { + // These numbers corresponds to the algorithm code in PICSAR's + // `depose_jxjyjz_generic` and `depose_jxjyjz_generic_2d` + Direct = 3, + DirectVectorized = 2, + EsirkepovNonOptimized = 1, + Esirkepov = 0 + }; +}; + +struct ChargeDepositionAlgo { + // These numbers corresponds to the algorithm code in WarpX's + // `warpx_charge_deposition` function + enum { + Vectorized = 0, + Standard = 1 + }; +}; + +struct GatheringAlgo { + // These numbers corresponds to the algorithm code in PICSAR's + // `geteb3d_energy_conserving_generic` function + enum { + Vectorized = 0, + Standard = 1 + }; +}; + +int +GetAlgorithmInteger( amrex::ParmParse& pp, const char* pp_search_key ); + +#endif // UTILS_WARPXALGORITHMSELECTION_H_ |