|
WarpX
|
#include <PsatdAlgorithm.H>
Public Member Functions | |
| PsatdAlgorithm (const SpectralKSpace &spectral_kspace, const amrex::DistributionMapping &dm, const SpectralFieldIndex &spectral_index, const int norder_x, const int norder_y, const int norder_z, const bool nodal, const amrex::IntVect &fill_guards, const amrex::Array< amrex::Real, 3 > &v_galilean, const amrex::Real dt, const bool update_with_rho, const bool time_averaging, const bool J_linear_in_time, const bool dive_cleaning, const bool divb_cleaning) | |
| Constructor of the class PsatdAlgorithm. More... | |
| virtual void | pushSpectralFields (SpectralFieldData &f) const override final |
| Updates the E and B fields in spectral space, according to the relevant PSATD equations. More... | |
| void | InitializeSpectralCoefficients (const SpectralKSpace &spectral_kspace, const amrex::DistributionMapping &dm, const amrex::Real dt) |
Initializes the coefficients used in pushSpectralFields to update the E and B fields. More... | |
| void | InitializeSpectralCoefficientsAvgLin (const SpectralKSpace &spectral_kspace, const amrex::DistributionMapping &dm, const amrex::Real dt) |
Initialize additional coefficients used in pushSpectralFields to update E,B, required only when using time averaging with the assumption that J is linear in time. More... | |
| void | InitializeSpectralCoefficientsAveraging (const SpectralKSpace &spectral_kspace, const amrex::DistributionMapping &dm, const amrex::Real dt) |
Initializes additional coefficients used in pushSpectralFields to update the E and B fields, required only when using time averaging with large time steps. More... | |
| virtual void | CurrentCorrection (const int lev, SpectralFieldData &field_data, std::array< std::unique_ptr< amrex::MultiFab >, 3 > ¤t, const std::unique_ptr< amrex::MultiFab > &rho) override final |
Virtual function for current correction in Fourier space (Vay et al, 2013). This function overrides the virtual function CurrentCorrection in the base class SpectralBaseAlgorithm and cannot be overridden by further derived classes. More... | |
| virtual void | VayDeposition (const int lev, SpectralFieldData &field_data, std::array< std::unique_ptr< amrex::MultiFab >, 3 > ¤t) override final |
Virtual function for Vay current deposition in Fourier space (Vay et al, 2013). This function overrides the virtual function VayDeposition in the base class SpectralBaseAlgorithm and cannot be overridden by further derived classes. More... | |
Public Member Functions inherited from SpectralBaseAlgorithm | |
| virtual | ~SpectralBaseAlgorithm () |
| void | ComputeSpectralDivE (const int lev, SpectralFieldData &field_data, const std::array< std::unique_ptr< amrex::MultiFab >, 3 > &Efield, amrex::MultiFab &divE) |
| Compute spectral divergence of E. More... | |
Additional Inherited Members | |
Protected Types inherited from SpectralBaseAlgorithm | |
| using | SpectralRealCoefficients = amrex::FabArray< amrex::BaseFab< amrex::Real > > |
| using | SpectralComplexCoefficients = amrex::FabArray< amrex::BaseFab< Complex > > |
Protected Member Functions inherited from SpectralBaseAlgorithm | |
| SpectralBaseAlgorithm (const SpectralKSpace &spectral_kspace, const amrex::DistributionMapping &dm, const SpectralFieldIndex &spectral_index, const int norder_x, const int norder_y, const int norder_z, const bool nodal, const amrex::IntVect &fill_guards) | |
| Constructor. More... | |
Protected Attributes inherited from SpectralBaseAlgorithm | |
| amrex::IntVect | m_fill_guards |
| SpectralFieldIndex | m_spectral_index |
| KVectorComponent | modified_kx_vec |
| KVectorComponent | modified_ky_vec |
| KVectorComponent | modified_kz_vec |
| PsatdAlgorithm::PsatdAlgorithm | ( | const SpectralKSpace & | spectral_kspace, |
| const amrex::DistributionMapping & | dm, | ||
| const SpectralFieldIndex & | spectral_index, | ||
| const int | norder_x, | ||
| const int | norder_y, | ||
| const int | norder_z, | ||
| const bool | nodal, | ||
| const amrex::IntVect & | fill_guards, | ||
| const amrex::Array< amrex::Real, 3 > & | v_galilean, | ||
| const amrex::Real | dt, | ||
| const bool | update_with_rho, | ||
| const bool | time_averaging, | ||
| const bool | J_linear_in_time, | ||
| const bool | dive_cleaning, | ||
| const bool | divb_cleaning | ||
| ) |
Constructor of the class PsatdAlgorithm.
| [in] | spectral_kspace | spectral space |
| [in] | dm | distribution mapping |
| [in] | spectral_index | object containing indices to access data in spectral space |
| [in] | norder_x | order of the spectral solver along x |
| [in] | norder_y | order of the spectral solver along y |
| [in] | norder_z | order of the spectral solver along z |
| [in] | nodal | whether the E and B fields are defined on a fully nodal grid or a Yee grid |
| [in] | v_galilean | Galilean velocity (three-dimensional array) |
| [in] | dt | time step of the simulation |
| [in] | update_with_rho | whether the update equation for E uses rho or not |
| [in] | time_averaging | whether to use time averaging for large time steps |
| [in] | J_linear_in_time | whether to use two currents computed at the beginning and the end of the time interval (instead of using one current computed at half time) |
|
finaloverridevirtual |
Virtual function for current correction in Fourier space (Vay et al, 2013). This function overrides the virtual function CurrentCorrection in the base class SpectralBaseAlgorithm and cannot be overridden by further derived classes.
| [in,out] | field_data | All fields in Fourier space |
| [in,out] | current | Array of unique pointers to MultiFab storing the three components of the current density |
| [in] | rho | Unique pointer to MultiFab storing the charge density |
Implements SpectralBaseAlgorithm.
| void PsatdAlgorithm::InitializeSpectralCoefficients | ( | const SpectralKSpace & | spectral_kspace, |
| const amrex::DistributionMapping & | dm, | ||
| const amrex::Real | dt | ||
| ) |
Initializes the coefficients used in pushSpectralFields to update the E and B fields.
| [in] | spectral_kspace | spectral space |
| [in] | dm | distribution mapping |
| [in] | dt | time step of the simulation |
| void PsatdAlgorithm::InitializeSpectralCoefficientsAveraging | ( | const SpectralKSpace & | spectral_kspace, |
| const amrex::DistributionMapping & | dm, | ||
| const amrex::Real | dt | ||
| ) |
Initializes additional coefficients used in pushSpectralFields to update the E and B fields, required only when using time averaging with large time steps.
| [in] | spectral_kspace | spectral space |
| [in] | dm | distribution mapping |
| [in] | dt | time step of the simulation |
| void PsatdAlgorithm::InitializeSpectralCoefficientsAvgLin | ( | const SpectralKSpace & | spectral_kspace, |
| const amrex::DistributionMapping & | dm, | ||
| const amrex::Real | dt | ||
| ) |
Initialize additional coefficients used in pushSpectralFields to update E,B, required only when using time averaging with the assumption that J is linear in time.
| [in] | spectral_kspace | spectral space |
| [in] | dm | distribution mapping |
| [in] | dt | time step of the simulation |
|
finaloverridevirtual |
Updates the E and B fields in spectral space, according to the relevant PSATD equations.
| [in,out] | f | all the fields in spectral space |
Implements SpectralBaseAlgorithm.
|
finaloverridevirtual |
Virtual function for Vay current deposition in Fourier space (Vay et al, 2013). This function overrides the virtual function VayDeposition in the base class SpectralBaseAlgorithm and cannot be overridden by further derived classes.
| [in,out] | field_data | All fields in Fourier space |
| [in,out] | current | Array of unique pointers to MultiFab storing the three components of the current density |
Implements SpectralBaseAlgorithm.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.13