diff options
author | 2022-12-07 15:40:02 -0800 | |
---|---|---|
committer | 2022-12-07 15:40:02 -0800 | |
commit | 4073384c7b66b1848bcc94e6c986f7d532c7da11 (patch) | |
tree | a3a7d152098eff3f8c049638ac40b93a40551108 /Source/Utils | |
parent | 02447ce0f59e729865a8cbe9502bf6ca0c91e2cd (diff) | |
download | WarpX-4073384c7b66b1848bcc94e6c986f7d532c7da11.tar.gz WarpX-4073384c7b66b1848bcc94e6c986f7d532c7da11.tar.zst WarpX-4073384c7b66b1848bcc94e6c986f7d532c7da11.zip |
PSATD: Implement First-Order Equations (#3466)
* Implement First-Order PSATD Equations
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix Unused Parameter Warning
* Fix RZ Build
* Fix Normalization of G to Match PML
* Add CI Test: 3D Uniform Plasma
* Cleaning
* Update 2D CI Checksums
* Update 3D CI Checksums
* Add F,G to CI Checksums of `uniform_plasma_multiJ`
* Allow User to Choose First-Order v. Second-Order
* Add WARPX_ALWAYS_ASSERT_WITH_MESSAGE
* Rename New Class `PsatdAlgorithmFirstOrder`
* Remove Inline Comment
* Update RZ CI Checksums
* Fix inline comment
* Use auxiliary variables to avoid divisions
* Use auxiliary variables to avoid divisions
* Make `nci_psatd_stability` dir and merge inputs
* Move all Galilean tests to `nci_psatd_stability`
* Fix CI
* Fix index for backward FFT of J
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Diffstat (limited to 'Source/Utils')
-rw-r--r-- | Source/Utils/WarpXAlgorithmSelection.H | 11 | ||||
-rw-r--r-- | Source/Utils/WarpXAlgorithmSelection.cpp | 10 |
2 files changed, 18 insertions, 3 deletions
diff --git a/Source/Utils/WarpXAlgorithmSelection.H b/Source/Utils/WarpXAlgorithmSelection.H index c3160cfad..936fd3d2b 100644 --- a/Source/Utils/WarpXAlgorithmSelection.H +++ b/Source/Utils/WarpXAlgorithmSelection.H @@ -84,6 +84,13 @@ struct GatheringAlgo { }; }; +struct PSATDSolutionType { + enum { + FirstOrder = 0, + SecondOrder = 1 + }; +}; + struct JInTime { enum { Constant = 0, @@ -93,8 +100,8 @@ struct JInTime { struct RhoInTime { enum { - Linear = 1, - Quadratic = 2 + Constant = 0, + Linear = 1 }; }; diff --git a/Source/Utils/WarpXAlgorithmSelection.cpp b/Source/Utils/WarpXAlgorithmSelection.cpp index b99459b46..c5ef16743 100644 --- a/Source/Utils/WarpXAlgorithmSelection.cpp +++ b/Source/Utils/WarpXAlgorithmSelection.cpp @@ -63,6 +63,12 @@ const std::map<std::string, int> gathering_algo_to_int = { {"default", GatheringAlgo::EnergyConserving } }; +const std::map<std::string, int> psatd_solution_type_to_int = { + {"first-order", PSATDSolutionType::FirstOrder}, + {"second-order", PSATDSolutionType::SecondOrder}, + {"default", PSATDSolutionType::SecondOrder} +}; + const std::map<std::string, int> J_in_time_to_int = { {"constant", JInTime::Constant}, {"linear", JInTime::Linear}, @@ -70,8 +76,8 @@ const std::map<std::string, int> J_in_time_to_int = { }; const std::map<std::string, int> rho_in_time_to_int = { + {"constant", RhoInTime::Constant}, {"linear", RhoInTime::Linear}, - {"quadratic", RhoInTime::Quadratic}, {"default", RhoInTime::Linear} }; @@ -145,6 +151,8 @@ GetAlgorithmInteger( amrex::ParmParse& pp, const char* pp_search_key ){ algo_to_int = charge_deposition_algo_to_int; } else if (0 == std::strcmp(pp_search_key, "field_gathering")) { algo_to_int = gathering_algo_to_int; + } else if (0 == std::strcmp(pp_search_key, "solution_type")) { + algo_to_int = psatd_solution_type_to_int; } else if (0 == std::strcmp(pp_search_key, "J_in_time")) { algo_to_int = J_in_time_to_int; } else if (0 == std::strcmp(pp_search_key, "rho_in_time")) { |