WarpX
Public Member Functions | Private Attributes | List of all members
PsatdAlgorithm Class Reference

Class that updates the field in spectral space and stores the coefficients of the corresponding update equation. More...

#include <PsatdAlgorithm.H>

Inheritance diagram for PsatdAlgorithm:
SpectralBaseAlgorithm

Public Member Functions

 PsatdAlgorithm (const SpectralKSpace &spectral_kspace, const amrex::DistributionMapping &dm, const int norder_x, const int norder_y, const int norder_z, const bool nodal, const amrex::Real dt, const bool update_with_rho)
 Constructor. More...
 
virtual void pushSpectralFields (SpectralFieldData &f) const override final
 Advance E and B fields in spectral space (stored in f) over one time step. More...
 
virtual int getRequiredNumberOfFields () const override final
 
void InitializeSpectralCoefficients (const SpectralKSpace &spectral_kspace, const amrex::DistributionMapping &dm, const amrex::Real dt)
 Initialize coefficients for update equations. More...
 
virtual void CurrentCorrection (SpectralFieldData &field_data, std::array< std::unique_ptr< amrex::MultiFab >, 3 > &current, 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 (SpectralFieldData &field_data, std::array< std::unique_ptr< amrex::MultiFab >, 3 > &current) 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 (SpectralFieldData &field_data, const std::array< std::unique_ptr< amrex::MultiFab >, 3 > &Efield, amrex::MultiFab &divE)
 Compute spectral divergence of E. More...
 

Private Attributes

SpectralRealCoefficients C_coef
 
SpectralRealCoefficients S_ck_coef
 
SpectralRealCoefficients X1_coef
 
SpectralRealCoefficients X2_coef
 
SpectralRealCoefficients X3_coef
 
amrex::Real m_dt
 
bool m_update_with_rho
 

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 int norder_x, const int norder_y, const int norder_z, const bool nodal)
 
- Protected Attributes inherited from SpectralBaseAlgorithm
KVectorComponent modified_kx_vec
 
KVectorComponent modified_ky_vec
 
KVectorComponent modified_kz_vec
 

Detailed Description

Class that updates the field in spectral space and stores the coefficients of the corresponding update equation.

Constructor & Destructor Documentation

◆ PsatdAlgorithm()

PsatdAlgorithm::PsatdAlgorithm ( const SpectralKSpace spectral_kspace,
const amrex::DistributionMapping &  dm,
const int  norder_x,
const int  norder_y,
const int  norder_z,
const bool  nodal,
const amrex::Real  dt,
const bool  update_with_rho 
)

Constructor.

Member Function Documentation

◆ CurrentCorrection()

void PsatdAlgorithm::CurrentCorrection ( SpectralFieldData field_data,
std::array< std::unique_ptr< amrex::MultiFab >, 3 > &  current,
const std::unique_ptr< amrex::MultiFab > &  rho 
)
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.

Parameters
[in,out]field_dataAll fields in Fourier space
[in,out]currentArray of unique pointers to MultiFab storing the three components of the current density
[in]rhoUnique pointer to MultiFab storing the charge density

Implements SpectralBaseAlgorithm.

◆ getRequiredNumberOfFields()

virtual int PsatdAlgorithm::getRequiredNumberOfFields ( ) const
inlinefinaloverridevirtual

Implements SpectralBaseAlgorithm.

◆ InitializeSpectralCoefficients()

void PsatdAlgorithm::InitializeSpectralCoefficients ( const SpectralKSpace spectral_kspace,
const amrex::DistributionMapping &  dm,
const amrex::Real  dt 
)

Initialize coefficients for update equations.

◆ pushSpectralFields()

void PsatdAlgorithm::pushSpectralFields ( SpectralFieldData f) const
finaloverridevirtual

Advance E and B fields in spectral space (stored in f) over one time step.

Implements SpectralBaseAlgorithm.

◆ VayDeposition()

void PsatdAlgorithm::VayDeposition ( SpectralFieldData field_data,
std::array< std::unique_ptr< amrex::MultiFab >, 3 > &  current 
)
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.

Parameters
[in,out]field_dataAll fields in Fourier space
[in,out]currentArray of unique pointers to MultiFab storing the three components of the current density

Implements SpectralBaseAlgorithm.

Member Data Documentation

◆ C_coef

SpectralRealCoefficients PsatdAlgorithm::C_coef
private

◆ m_dt

amrex::Real PsatdAlgorithm::m_dt
private

◆ m_update_with_rho

bool PsatdAlgorithm::m_update_with_rho
private

◆ S_ck_coef

SpectralRealCoefficients PsatdAlgorithm::S_ck_coef
private

◆ X1_coef

SpectralRealCoefficients PsatdAlgorithm::X1_coef
private

◆ X2_coef

SpectralRealCoefficients PsatdAlgorithm::X2_coef
private

◆ X3_coef

SpectralRealCoefficients PsatdAlgorithm::X3_coef
private

The documentation for this class was generated from the following files: