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

#include <PsatdAlgorithmJRhomSecondOrder.H>

Inheritance diagram for PsatdAlgorithmJRhomSecondOrder:
SpectralBaseAlgorithm

Public Member Functions

 PsatdAlgorithmJRhomSecondOrder (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, amrex::Real dt, bool update_with_rho, bool time_averaging, bool dive_cleaning, bool divb_cleaning, TimeDependencyJ time_dependency_J, TimeDependencyRho time_dependency_rho)
 Constructor of the class PsatdAlgorithmJRhomSecondOrder.
 
void pushSpectralFields (SpectralFieldData &f) const final
 Updates the E and B fields in spectral space, according to the PSATD-JRhom 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)
 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.
 
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
 
SpectralRealCoefficients Y1_coef
 
SpectralRealCoefficients Y2_coef
 
SpectralRealCoefficients Y3_coef
 
SpectralRealCoefficients Y4_coef
 
SpectralRealCoefficients Y5_coef
 
SpectralRealCoefficients Y6_coef
 
SpectralRealCoefficients Y7_coef
 
SpectralRealCoefficients Y8_coef
 
amrex::Real m_dt
 
bool m_update_with_rho
 
bool m_time_averaging
 
bool m_dive_cleaning
 
bool m_divb_cleaning
 
TimeDependencyJ m_time_dependency_J
 
TimeDependencyRho m_time_dependency_rho
 

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

◆ PsatdAlgorithmJRhomSecondOrder()

PsatdAlgorithmJRhomSecondOrder::PsatdAlgorithmJRhomSecondOrder ( 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,
amrex::Real dt,
bool update_with_rho,
bool time_averaging,
bool dive_cleaning,
bool divb_cleaning,
TimeDependencyJ time_dependency_J,
TimeDependencyRho time_dependency_rho )

Constructor of the class PsatdAlgorithmJRhomSecondOrder.

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]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
[in]time_dependency_Jtime dependency of J within one time step
[in]time_dependency_rhotime dependency of rho within one time step

Member Function Documentation

◆ CurrentCorrection()

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

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

◆ pushSpectralFields()

void PsatdAlgorithmJRhomSecondOrder::pushSpectralFields ( SpectralFieldData & f) const
finalvirtual

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

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

Implements SpectralBaseAlgorithm.

◆ VayDeposition()

void PsatdAlgorithmJRhomSecondOrder::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 PsatdAlgorithmJRhomSecondOrder::C_coef
private

◆ m_divb_cleaning

bool PsatdAlgorithmJRhomSecondOrder::m_divb_cleaning
private

◆ m_dive_cleaning

bool PsatdAlgorithmJRhomSecondOrder::m_dive_cleaning
private

◆ m_dt

amrex::Real PsatdAlgorithmJRhomSecondOrder::m_dt
private

◆ m_time_averaging

bool PsatdAlgorithmJRhomSecondOrder::m_time_averaging
private

◆ m_time_dependency_J

TimeDependencyJ PsatdAlgorithmJRhomSecondOrder::m_time_dependency_J
private

◆ m_time_dependency_rho

TimeDependencyRho PsatdAlgorithmJRhomSecondOrder::m_time_dependency_rho
private

◆ m_update_with_rho

bool PsatdAlgorithmJRhomSecondOrder::m_update_with_rho
private

◆ S_ck_coef

SpectralRealCoefficients PsatdAlgorithmJRhomSecondOrder::S_ck_coef
private

◆ Y1_coef

SpectralRealCoefficients PsatdAlgorithmJRhomSecondOrder::Y1_coef
private

◆ Y2_coef

SpectralRealCoefficients PsatdAlgorithmJRhomSecondOrder::Y2_coef
private

◆ Y3_coef

SpectralRealCoefficients PsatdAlgorithmJRhomSecondOrder::Y3_coef
private

◆ Y4_coef

SpectralRealCoefficients PsatdAlgorithmJRhomSecondOrder::Y4_coef
private

◆ Y5_coef

SpectralRealCoefficients PsatdAlgorithmJRhomSecondOrder::Y5_coef
private

◆ Y6_coef

SpectralRealCoefficients PsatdAlgorithmJRhomSecondOrder::Y6_coef
private

◆ Y7_coef

SpectralRealCoefficients PsatdAlgorithmJRhomSecondOrder::Y7_coef
private

◆ Y8_coef

SpectralRealCoefficients PsatdAlgorithmJRhomSecondOrder::Y8_coef
private

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