WarpX
Loading...
Searching...
No Matches
PsatdAlgorithmGalilean Class Reference

#include <PsatdAlgorithmGalilean.H>

Inheritance diagram for PsatdAlgorithmGalilean:
SpectralBaseAlgorithm

Public Member Functions

 PsatdAlgorithmGalilean (const SpectralKSpace &spectral_kspace, const amrex::DistributionMapping &dm, const SpectralFieldIndex &spectral_index, int norder_x, int norder_y, int norder_z, ablastr::utils::enums::GridType 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 PsatdAlgorithmGalilean.
 
void pushSpectralFields (SpectralFieldData &f) const final
 Updates the E and B fields in spectral space, according to the relevant PSATD equations.
 
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.
 
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.
 
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.
 
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.
 
- 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, ablastr::fields::VectorField const &Efield, amrex::MultiFab &divE)
 Compute spectral divergence of E.
 

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
 

Additional Inherited Members

- Protected Types inherited from SpectralBaseAlgorithm
using SpectralRealCoefficients
 
using SpectralComplexCoefficients
 
- 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, ablastr::utils::enums::GridType grid_type)
 Constructor.
 
- Protected Attributes inherited from SpectralBaseAlgorithm
SpectralFieldIndex m_spectral_index
 
KVectorComponent modified_kx_vec
 
KVectorComponent modified_kz_vec
 

Constructor & Destructor Documentation

◆ PsatdAlgorithmGalilean()

PsatdAlgorithmGalilean::PsatdAlgorithmGalilean ( const SpectralKSpace & spectral_kspace,
const amrex::DistributionMapping & dm,
const SpectralFieldIndex & spectral_index,
int norder_x,
int norder_y,
int norder_z,
ablastr::utils::enums::GridType 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 PsatdAlgorithmGalilean.

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 PsatdAlgorithmGalilean::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 PsatdAlgorithmGalilean::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 PsatdAlgorithmGalilean::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 PsatdAlgorithmGalilean::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 PsatdAlgorithmGalilean::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 PsatdAlgorithmGalilean::C_coef
private

◆ m_dt

amrex::Real PsatdAlgorithmGalilean::m_dt
private

◆ m_time_averaging

bool PsatdAlgorithmGalilean::m_time_averaging
private

◆ m_update_with_rho

bool PsatdAlgorithmGalilean::m_update_with_rho
private

◆ m_v_galilean

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

◆ modified_kx_vec_centered

KVectorComponent PsatdAlgorithmGalilean::modified_kx_vec_centered
private

◆ modified_kz_vec_centered

KVectorComponent PsatdAlgorithmGalilean::modified_kz_vec_centered
private

◆ Psi1_coef

SpectralComplexCoefficients PsatdAlgorithmGalilean::Psi1_coef
private

◆ Psi2_coef

SpectralComplexCoefficients PsatdAlgorithmGalilean::Psi2_coef
private

◆ S_ck_coef

SpectralRealCoefficients PsatdAlgorithmGalilean::S_ck_coef
private

◆ T2_coef

SpectralComplexCoefficients PsatdAlgorithmGalilean::T2_coef
private

◆ X1_coef

SpectralComplexCoefficients PsatdAlgorithmGalilean::X1_coef
private

◆ X2_coef

SpectralComplexCoefficients PsatdAlgorithmGalilean::X2_coef
private

◆ X3_coef

SpectralComplexCoefficients PsatdAlgorithmGalilean::X3_coef
private

◆ X4_coef

SpectralComplexCoefficients PsatdAlgorithmGalilean::X4_coef
private

◆ Y1_coef

SpectralComplexCoefficients PsatdAlgorithmGalilean::Y1_coef
private

◆ Y2_coef

SpectralComplexCoefficients PsatdAlgorithmGalilean::Y2_coef
private

◆ Y3_coef

SpectralComplexCoefficients PsatdAlgorithmGalilean::Y3_coef
private

◆ Y4_coef

SpectralComplexCoefficients PsatdAlgorithmGalilean::Y4_coef
private

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