ARTEMIS
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 <AMReX_Array.H>
9 #include <AMReX_Config.H>
10 #include <AMReX_REAL.H>
11 
12 #include <AMReX_BaseFwd.H>
13 
14 #include <array>
15 #include <memory>
16 
17 #if WARPX_USE_PSATD
18 
19 /* \brief Class that updates the field in spectral space and stores the coefficients
20  * of the corresponding update equation, according to the comoving spectral scheme.
21  */
23 {
24  public:
25 
29  PsatdAlgorithmComoving (const SpectralKSpace& spectral_kspace,
31  const SpectralFieldIndex& spectral_index,
32  const int norder_x,
33  const int norder_y,
34  const int norder_z,
35  const short grid_type,
36  const amrex::Vector<amrex::Real>& v_comoving,
37  const amrex::Real dt,
38  const bool update_with_rho);
39 
43  virtual void pushSpectralFields (SpectralFieldData& f) const override final;
44 
45  /* \brief Initialize the coefficients needed in the update equations
46  */
47  void InitializeSpectralCoefficients (const SpectralKSpace& spectral_kspace,
49  const amrex::Real dt);
50 
59  virtual void CurrentCorrection (SpectralFieldData& field_data) override final;
60 
69  virtual void VayDeposition (SpectralFieldData& field_data) override final;
70 
71  private:
72 
73  // Real and complex spectral coefficients
76 
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_PSATD
92 #endif // WARPX_PSATD_ALGORITHM_COMOVING_H_
Definition: PsatdAlgorithmComoving.H:23
amrex::Vector< amrex::Real > m_v_comoving
Definition: PsatdAlgorithmComoving.H:87
SpectralComplexCoefficients X2_coef
Definition: PsatdAlgorithmComoving.H:75
KVectorComponent kx_vec
Definition: PsatdAlgorithmComoving.H:80
void InitializeSpectralCoefficients(const SpectralKSpace &spectral_kspace, const amrex::DistributionMapping &dm, const amrex::Real dt)
Definition: PsatdAlgorithmComoving.cpp:160
SpectralComplexCoefficients Theta2_coef
Definition: PsatdAlgorithmComoving.H:75
KVectorComponent kz_vec
Definition: PsatdAlgorithmComoving.H:84
virtual void pushSpectralFields(SpectralFieldData &f) const override final
Override the update equations in Fourier space.
Definition: PsatdAlgorithmComoving.cpp:69
virtual void VayDeposition(SpectralFieldData &field_data) override final
Virtual function for Vay current deposition in Fourier space. This function overrides the virtual fun...
Definition: PsatdAlgorithmComoving.cpp:503
amrex::Real m_dt
Definition: PsatdAlgorithmComoving.H:88
PsatdAlgorithmComoving(const SpectralKSpace &spectral_kspace, const amrex::DistributionMapping &dm, const SpectralFieldIndex &spectral_index, const int norder_x, const int norder_y, const int norder_z, const short grid_type, const amrex::Vector< amrex::Real > &v_comoving, const amrex::Real dt, const bool update_with_rho)
Class constructor.
Definition: PsatdAlgorithmComoving.cpp:26
virtual void CurrentCorrection(SpectralFieldData &field_data) override final
Virtual function for current correction in Fourier space. This function overrides the virtual functio...
Definition: PsatdAlgorithmComoving.cpp:415
SpectralRealCoefficients C_coef
Definition: PsatdAlgorithmComoving.H:74
SpectralComplexCoefficients X1_coef
Definition: PsatdAlgorithmComoving.H:75
SpectralRealCoefficients S_ck_coef
Definition: PsatdAlgorithmComoving.H:74
SpectralComplexCoefficients X3_coef
Definition: PsatdAlgorithmComoving.H:75
SpectralFieldIndex m_spectral_index
Definition: PsatdAlgorithmComoving.H:77
SpectralComplexCoefficients X4_coef
Definition: PsatdAlgorithmComoving.H:75
Definition: SpectralBaseAlgorithm.H:36
Class that stores the fields in spectral space, and performs the Fourier transforms between real spac...
Definition: SpectralFieldData.H:122
Definition: SpectralFieldData.H:33
Class that represents the spectral space.
Definition: SpectralKSpace.H:48
int dt
Definition: stencil.py:440
f
Definition: write_atomic_data_cpp.py:88