WarpX
PsatdAlgorithmComoving.H
Go to the documentation of this file.
1 #ifndef WARPX_PSATD_ALGORITHM_COMOVING_H_
2 #define WARPX_PSATD_ALGORITHM_COMOVING_H_
3 
7 
8 #include <ablastr/utils/Enums.H>
9 
10 #include <AMReX_Array.H>
11 #include <AMReX_Config.H>
12 #include <AMReX_REAL.H>
13 
14 #include <AMReX_BaseFwd.H>
15 
16 #include <array>
17 #include <memory>
18 
19 #if WARPX_USE_FFT
20 
21 /* \brief Class that updates the field in spectral space and stores the coefficients
22  * of the corresponding update equation, according to the comoving spectral scheme.
23  */
25 {
26  public:
27 
31  PsatdAlgorithmComoving (const SpectralKSpace& spectral_kspace,
33  const SpectralFieldIndex& spectral_index,
34  int norder_x,
35  int norder_y,
36  int norder_z,
38  const amrex::Vector<amrex::Real>& v_comoving,
39  amrex::Real dt,
40  bool update_with_rho);
41 
45  void pushSpectralFields (SpectralFieldData& f) const final;
46 
47  /* \brief Initialize the coefficients needed in the update equations
48  */
49  void InitializeSpectralCoefficients (const SpectralKSpace& spectral_kspace,
51  amrex::Real dt);
52 
61  void CurrentCorrection (SpectralFieldData& field_data) final;
62 
71  void VayDeposition (SpectralFieldData& field_data) final;
72 
73  private:
74 
75  // Real and complex spectral coefficients
78 
79  // k vectors
81 #if defined(WARPX_DIM_3D)
82  KVectorComponent ky_vec;
83 #endif
85 
86  // Additional member variables
88  amrex::Real m_dt;
89 };
90 
91 #endif // WARPX_USE_FFT
92 #endif // WARPX_PSATD_ALGORITHM_COMOVING_H_
Definition: PsatdAlgorithmComoving.H:25
amrex::Vector< amrex::Real > m_v_comoving
Definition: PsatdAlgorithmComoving.H:87
SpectralComplexCoefficients X2_coef
Definition: PsatdAlgorithmComoving.H:77
KVectorComponent kx_vec
Definition: PsatdAlgorithmComoving.H:80
void InitializeSpectralCoefficients(const SpectralKSpace &spectral_kspace, const amrex::DistributionMapping &dm, amrex::Real dt)
Definition: PsatdAlgorithmComoving.cpp:163
SpectralComplexCoefficients Theta2_coef
Definition: PsatdAlgorithmComoving.H:77
void pushSpectralFields(SpectralFieldData &f) const final
Override the update equations in Fourier space.
Definition: PsatdAlgorithmComoving.cpp:72
KVectorComponent kz_vec
Definition: PsatdAlgorithmComoving.H:84
void CurrentCorrection(SpectralFieldData &field_data) final
Virtual function for current correction in Fourier space. This function overrides the virtual functio...
Definition: PsatdAlgorithmComoving.cpp:418
amrex::Real m_dt
Definition: PsatdAlgorithmComoving.H:88
SpectralRealCoefficients C_coef
Definition: PsatdAlgorithmComoving.H:76
void VayDeposition(SpectralFieldData &field_data) final
Virtual function for Vay current deposition in Fourier space. This function overrides the virtual fun...
Definition: PsatdAlgorithmComoving.cpp:506
SpectralComplexCoefficients X1_coef
Definition: PsatdAlgorithmComoving.H:77
PsatdAlgorithmComoving(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_comoving, amrex::Real dt, bool update_with_rho)
Class constructor.
Definition: PsatdAlgorithmComoving.cpp:28
SpectralRealCoefficients S_ck_coef
Definition: PsatdAlgorithmComoving.H:76
SpectralComplexCoefficients X3_coef
Definition: PsatdAlgorithmComoving.H:77
SpectralComplexCoefficients X4_coef
Definition: PsatdAlgorithmComoving.H:77
Definition: SpectralBaseAlgorithm.H:38
Class that stores the fields in spectral space, and performs the Fourier transforms between real spac...
Definition: SpectralFieldData.H:143
Definition: SpectralFieldData.H:34
Class that represents the spectral space.
Definition: SpectralKSpace.H:50
GridType
Definition: Enums.H:17
float dt
Definition: stencil.py:442