diff options
author | 2021-03-16 11:35:07 -0700 | |
---|---|---|
committer | 2021-03-16 11:35:07 -0700 | |
commit | 76ebee96eeabd7336c49c1250e255db59ec0d971 (patch) | |
tree | 30449968791934a0522271e6e19f71ea2935478d /Source/FieldSolver/SpectralSolver/SpectralSolver.H | |
parent | 6cf0ca819ce31f8e7ac471b49bbf078e54e55a94 (diff) | |
download | WarpX-76ebee96eeabd7336c49c1250e255db59ec0d971.tar.gz WarpX-76ebee96eeabd7336c49c1250e255db59ec0d971.tar.zst WarpX-76ebee96eeabd7336c49c1250e255db59ec0d971.zip |
Add timers in routines that depend on cell-related work (#1692)
* Add timers
* eol
* AtomicAdd
* lev argument for getCosts
* style
* style
* wip
* eol
* .ipynb
* passing down lev
* eol
* passing lev
* eol
* Update Source/Particles/Collision/PairWiseCoulombCollision.cpp
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
* Add for QED and ionization routines
* eol
* remove unneeded
* mfi-->pti
* move cost
* eol
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralSolver.H')
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralSolver.H | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralSolver.H b/Source/FieldSolver/SpectralSolver/SpectralSolver.H index 2626c6982..c9a7bbcc4 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralSolver.H +++ b/Source/FieldSolver/SpectralSolver/SpectralSolver.H @@ -28,13 +28,15 @@ class SpectralSolver // underlying classes `SpectralFieldData` and `PsatdAlgorithm` // Constructor - SpectralSolver( const amrex::BoxArray& realspace_ba, + SpectralSolver( const int lev, + const amrex::BoxArray& realspace_ba, const amrex::DistributionMapping& dm, const int norder_x, const int norder_y, const int norder_z, const bool nodal, const amrex::Array<amrex::Real,3>& v_galilean, const amrex::Array<amrex::Real,3>& v_comoving, - const amrex::RealVect dx, const amrex::Real dt, + const amrex::RealVect dx, + const amrex::Real dt, const bool pml=false, const bool periodic_single_box=false, const bool update_with_rho=false, @@ -44,7 +46,8 @@ class SpectralSolver * \brief Transform the component `i_comp` of MultiFab `mf` * to spectral space, and store the corresponding result internally * (in the spectral field specified by `field_index`) */ - void ForwardTransform( const amrex::MultiFab& mf, + void ForwardTransform( const int lev, + const amrex::MultiFab& mf, const int field_index, const int i_comp=0 ); @@ -52,7 +55,8 @@ class SpectralSolver * \brief Transform spectral field specified by `field_index` back to * real space, and store it in the component `i_comp` of `mf` */ - void BackwardTransform( amrex::MultiFab& mf, + void BackwardTransform( const int lev, + amrex::MultiFab& mf, const int field_index, const int i_comp=0 ); @@ -65,9 +69,10 @@ class SpectralSolver * \brief Public interface to call the member function ComputeSpectralDivE * of the base class SpectralBaseAlgorithm from objects of class SpectralSolver */ - void ComputeSpectralDivE ( const std::array<std::unique_ptr<amrex::MultiFab>,3>& Efield, + void ComputeSpectralDivE ( const int lev, + const std::array<std::unique_ptr<amrex::MultiFab>,3>& Efield, amrex::MultiFab& divE ) { - algorithm->ComputeSpectralDivE( field_data, Efield, divE ); + algorithm->ComputeSpectralDivE( lev, field_data, Efield, divE ); } /** @@ -80,9 +85,10 @@ class SpectralSolver * storing the three components of the current density * \param[in] rho unique pointer to MultiFab storing the charge density */ - void CurrentCorrection ( std::array<std::unique_ptr<amrex::MultiFab>,3>& current, + void CurrentCorrection ( const int lev, + std::array<std::unique_ptr<amrex::MultiFab>,3>& current, const std::unique_ptr<amrex::MultiFab>& rho ) { - algorithm->CurrentCorrection( field_data, current, rho ); + algorithm->CurrentCorrection( lev, field_data, current, rho ); } /** @@ -94,9 +100,9 @@ class SpectralSolver * \param[in,out] current Array of unique pointers to \c MultiFab storing * the three components of the current density */ - void VayDeposition (std::array<std::unique_ptr<amrex::MultiFab>,3>& current) + void VayDeposition (const int lev, std::array<std::unique_ptr<amrex::MultiFab>,3>& current) { - algorithm->VayDeposition(field_data, current); + algorithm->VayDeposition(lev, field_data, current); } private: |