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

#include <PsatdAlgorithmJConstantInTime.H>

Inheritance diagram for PsatdAlgorithmJConstantInTime:
SpectralBaseAlgorithm

Public Member Functions

 PsatdAlgorithmJConstantInTime (const SpectralKSpace &spectral_kspace, const amrex::DistributionMapping &dm, const SpectralFieldIndex &spectral_index, int norder_x, int norder_y, int norder_z, short grid_type, const amrex::Vector< amrex::Real > &v_galilean, amrex::Real dt, bool update_with_rho, bool time_averaging, bool dive_cleaning, bool divb_cleaning)
 Constructor of the class PsatdAlgorithmJConstantInTime. More...
 
void pushSpectralFields (SpectralFieldData &f) const 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, amrex::Real dt)
 Initializes the coefficients used in pushSpectralFields to update the E and B fields. More...
 
void InitializeSpectralCoefficientsAveraging (const SpectralKSpace &spectral_kspace, const amrex::DistributionMapping &dm, 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...
 
void CurrentCorrection (SpectralFieldData &field_data) 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...
 
void VayDeposition (SpectralFieldData &field_data) 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 ()=default
 
 SpectralBaseAlgorithm (const SpectralBaseAlgorithm &)=default
 
SpectralBaseAlgorithmoperator= (const SpectralBaseAlgorithm &)=default
 
 SpectralBaseAlgorithm (SpectralBaseAlgorithm &&)=default
 
SpectralBaseAlgorithmoperator= (SpectralBaseAlgorithm &&)=default
 
void ComputeSpectralDivE (int lev, 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
 
SpectralComplexCoefficients T2_coef
 
SpectralComplexCoefficients X1_coef
 
SpectralComplexCoefficients X2_coef
 
SpectralComplexCoefficients X3_coef
 
SpectralComplexCoefficients X4_coef
 
SpectralComplexCoefficients Psi1_coef
 
SpectralComplexCoefficients Psi2_coef
 
SpectralComplexCoefficients Y1_coef
 
SpectralComplexCoefficients Y2_coef
 
SpectralComplexCoefficients Y3_coef
 
SpectralComplexCoefficients Y4_coef
 
KVectorComponent modified_kx_vec_centered
 
KVectorComponent modified_kz_vec_centered
 
amrex::Vector< amrex::Real > m_v_galilean
 
amrex::Real m_dt
 
bool m_update_with_rho
 
bool m_time_averaging
 
bool m_dive_cleaning
 
bool m_divb_cleaning
 
bool m_is_galilean
 

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, int norder_x, int norder_y, int norder_z, short grid_type)
 Constructor. More...
 
- Protected Attributes inherited from SpectralBaseAlgorithm
SpectralFieldIndex m_spectral_index
 
KVectorComponent modified_kx_vec
 
KVectorComponent modified_kz_vec
 

Constructor & Destructor Documentation

◆ PsatdAlgorithmJConstantInTime()

PsatdAlgorithmJConstantInTime::PsatdAlgorithmJConstantInTime ( const SpectralKSpace spectral_kspace,
const amrex::DistributionMapping dm,
const SpectralFieldIndex spectral_index,
int  norder_x,
int  norder_y,
int  norder_z,
short  grid_type,
const amrex::Vector< amrex::Real > &  v_galilean,
amrex::Real  dt,
bool  update_with_rho,
bool  time_averaging,
bool  dive_cleaning,
bool  divb_cleaning 
)

Constructor of the class PsatdAlgorithmJConstantInTime.

Parameters
[in]spectral_kspacespectral space
[in]dmdistribution mapping
[in]spectral_indexobject containing indices to access data in spectral space
[in]norder_xorder of the spectral solver along x
[in]norder_yorder of the spectral solver along y
[in]norder_zorder of the spectral solver along z
[in]grid_typetype of grid (collocated or not)
[in]v_galileanGalilean velocity (three-dimensional array)
[in]dttime step of the simulation
[in]update_with_rhowhether the update equation for E uses rho or not
[in]time_averagingwhether to use time averaging for large time steps
[in]dive_cleaningUpdate F as part of the field update, so that errors in divE=rho propagate away at the speed of light
[in]divb_cleaningUpdate G as part of the field update, so that errors in divB=0 propagate away at the speed of light

Member Function Documentation

◆ CurrentCorrection()

void PsatdAlgorithmJConstantInTime::CurrentCorrection ( SpectralFieldData field_data)
finalvirtual

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

Implements SpectralBaseAlgorithm.

◆ InitializeSpectralCoefficients()

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

Initializes the coefficients used in pushSpectralFields to update the E and B fields.

Parameters
[in]spectral_kspacespectral space
[in]dmdistribution mapping
[in]dttime step of the simulation

◆ InitializeSpectralCoefficientsAveraging()

void PsatdAlgorithmJConstantInTime::InitializeSpectralCoefficientsAveraging ( const SpectralKSpace spectral_kspace,
const amrex::DistributionMapping dm,
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.

Parameters
[in]spectral_kspacespectral space
[in]dmdistribution mapping
[in]dttime step of the simulation

◆ pushSpectralFields()

void PsatdAlgorithmJConstantInTime::pushSpectralFields ( SpectralFieldData f) const
finalvirtual

Updates the E and B fields in spectral space, according to the relevant PSATD equations.

Parameters
[in,out]fall the fields in spectral space

Implements SpectralBaseAlgorithm.

◆ VayDeposition()

void PsatdAlgorithmJConstantInTime::VayDeposition ( SpectralFieldData field_data)
finalvirtual

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

Implements SpectralBaseAlgorithm.

Member Data Documentation

◆ C_coef

SpectralRealCoefficients PsatdAlgorithmJConstantInTime::C_coef
private

◆ m_divb_cleaning

bool PsatdAlgorithmJConstantInTime::m_divb_cleaning
private

◆ m_dive_cleaning

bool PsatdAlgorithmJConstantInTime::m_dive_cleaning
private

◆ m_dt

amrex::Real PsatdAlgorithmJConstantInTime::m_dt
private

◆ m_is_galilean

bool PsatdAlgorithmJConstantInTime::m_is_galilean
private

◆ m_time_averaging

bool PsatdAlgorithmJConstantInTime::m_time_averaging
private

◆ m_update_with_rho

bool PsatdAlgorithmJConstantInTime::m_update_with_rho
private

◆ m_v_galilean

amrex::Vector<amrex::Real> PsatdAlgorithmJConstantInTime::m_v_galilean
private

◆ modified_kx_vec_centered

KVectorComponent PsatdAlgorithmJConstantInTime::modified_kx_vec_centered
private

◆ modified_kz_vec_centered

KVectorComponent PsatdAlgorithmJConstantInTime::modified_kz_vec_centered
private

◆ Psi1_coef

SpectralComplexCoefficients PsatdAlgorithmJConstantInTime::Psi1_coef
private

◆ Psi2_coef

SpectralComplexCoefficients PsatdAlgorithmJConstantInTime::Psi2_coef
private

◆ S_ck_coef

SpectralRealCoefficients PsatdAlgorithmJConstantInTime::S_ck_coef
private

◆ T2_coef

SpectralComplexCoefficients PsatdAlgorithmJConstantInTime::T2_coef
private

◆ X1_coef

SpectralComplexCoefficients PsatdAlgorithmJConstantInTime::X1_coef
private

◆ X2_coef

SpectralComplexCoefficients PsatdAlgorithmJConstantInTime::X2_coef
private

◆ X3_coef

SpectralComplexCoefficients PsatdAlgorithmJConstantInTime::X3_coef
private

◆ X4_coef

SpectralComplexCoefficients PsatdAlgorithmJConstantInTime::X4_coef
private

◆ Y1_coef

SpectralComplexCoefficients PsatdAlgorithmJConstantInTime::Y1_coef
private

◆ Y2_coef

SpectralComplexCoefficients PsatdAlgorithmJConstantInTime::Y2_coef
private

◆ Y3_coef

SpectralComplexCoefficients PsatdAlgorithmJConstantInTime::Y3_coef
private

◆ Y4_coef

SpectralComplexCoefficients PsatdAlgorithmJConstantInTime::Y4_coef
private

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