diff options
author | 2020-05-22 18:23:56 -0700 | |
---|---|---|
committer | 2020-05-22 18:23:56 -0700 | |
commit | 78d23945b7cda7c1920d397af2c2c54d5dc590d4 (patch) | |
tree | 359ec85df6efed64328b6d211060cbdefabd7435 /Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H | |
parent | 41d40b0f3b48fd87d56726e860363d8e29c65881 (diff) | |
download | WarpX-78d23945b7cda7c1920d397af2c2c54d5dc590d4.tar.gz WarpX-78d23945b7cda7c1920d397af2c2c54d5dc590d4.tar.zst WarpX-78d23945b7cda7c1920d397af2c2c54d5dc590d4.zip |
Use C++ templates for the PML field pusher (#808)
* Allow to pass component in stencil templates
* Define and use enum to address PML components
* Start implementing PML equations
* Implement EvolveEPML
* Implemented EvolveBPML
* Added interface for pml_has_particles
* Added interface for pml_has_particles
* [skip ci] Add update expressions for E
* [skip ci] Fix compilation
* Call new PML pusher for B field
* Fix compilation errors
* Fix more typos
* Abort code if `do_pml` is used in cylindrical geometry
* Add contribution from F in EvolveEPML
* Remove unused function for CKC coefficients
* Remove unneeded ExchangeF
* Add damping for J
* Apply suggestions from code review
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
* Revert "Apply suggestions from code review"
This reverts commit 08f262a676ba5e5b44b9118b8daba1b03c08b64b.
* Remove sanity checks for nodal
* Implement dive cleaning in PML
* Implement push F in the PML
* Clean-up unused code
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H')
-rw-r--r-- | Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H b/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H index b23e3bbed..e60ceed3e 100644 --- a/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H +++ b/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H @@ -9,6 +9,7 @@ #define WARPX_FINITE_DIFFERENCE_SOLVER_H_ #include <AMReX_MultiFab.H> +#include "BoundaryConditions/PML.H" /** * \brief Top-level class for the electromagnetic finite-difference solver @@ -53,6 +54,20 @@ class FiniteDifferenceSolver void ComputeDivE ( const std::array<std::unique_ptr<amrex::MultiFab>,3>& Efield, amrex::MultiFab& divE ); + void EvolveBPML ( std::array< amrex::MultiFab*, 3 > Bfield, + std::array< amrex::MultiFab*, 3 > const Efield, + amrex::Real const dt ); + + void EvolveEPML ( std::array< amrex::MultiFab*, 3 > Efield, + std::array< amrex::MultiFab*, 3 > const Bfield, + std::array< amrex::MultiFab*, 3 > const Jfield, + amrex::MultiFab* const Ffield, + MultiSigmaBox const& sigba, + amrex::Real const dt, bool pml_has_particles ); + + void EvolveFPML ( amrex::MultiFab* Ffield, + std::array< amrex::MultiFab*, 3 > const Efield, + amrex::Real const dt ); private: @@ -130,6 +145,26 @@ class FiniteDifferenceSolver const std::array<std::unique_ptr<amrex::MultiFab>,3>& Efield, amrex::MultiFab& divE ); + template< typename T_Algo > + void EvolveBPMLCartesian ( + std::array< amrex::MultiFab*, 3 > Bfield, + std::array< amrex::MultiFab*, 3 > const Efield, + amrex::Real const dt ); + + template< typename T_Algo > + void EvolveEPMLCartesian ( + std::array< amrex::MultiFab*, 3 > Efield, + std::array< amrex::MultiFab*, 3 > const Bfield, + std::array< amrex::MultiFab*, 3 > const Jfield, + amrex::MultiFab* const Ffield, + MultiSigmaBox const& sigba, + amrex::Real const dt, bool pml_has_particles ); + + template< typename T_Algo > + void EvolveFPMLCartesian ( amrex::MultiFab* Ffield, + std::array< amrex::MultiFab*, 3 > const Efield, + amrex::Real const dt ); + #endif }; |