WarpX
NCIGodfreyFilter.H
Go to the documentation of this file.
1 /* Copyright 2019 Maxence Thevenet
2  *
3  * This file is part of WarpX.
4  *
5  * License: BSD-3-Clause-LBNL
6  */
7 #ifndef WARPX_GODFREY_FILTER_H_
8 #define WARPX_GODFREY_FILTER_H_
9 
10 #include "NCIGodfreyFilter_fwd.H"
11 
12 #include "Filter.H"
13 
14 #include <AMReX_REAL.H>
15 
16 enum class godfrey_coeff_set { Ex_Ey_Bz=0, Bx_By_Ez=1 };
17 
27 class NCIGodfreyFilter : public Filter
28 {
29 public:
30 
31  NCIGodfreyFilter () = default;
32 
33  NCIGodfreyFilter(godfrey_coeff_set coeff_set, amrex::Real cdtodz,
34  bool nodal_gather);
35 
36  void ComputeStencils();
37 
38  static constexpr int m_stencil_width = 4;
39 
40 private:
41 
42 //NCIGodfreyFilter not implemented in 1D
43 #if (AMREX_SPACEDIM >= 2)
44  // Set of coefficients (different fields require to read
45  // different coefficients from the table)
47  // The stencil depends on parameter c*dt/dz
48  amrex::Real m_cdtodz;
49  // Whether the gather is from nodal fields or staggered fields
51 #endif
52 
53 };
54 
55 #endif // #ifndef WARPX_GODFREY_FILTER_H_
godfrey_coeff_set
Definition: NCIGodfreyFilter.H:16
Definition: Filter.H:18
Class for Godfrey's filter to suppress Numerical Cherenkov Instability.
Definition: NCIGodfreyFilter.H:28
NCIGodfreyFilter()=default
bool m_nodal_gather
Definition: NCIGodfreyFilter.H:50
godfrey_coeff_set m_coeff_set
Definition: NCIGodfreyFilter.H:46
void ComputeStencils()
Definition: NCIGodfreyFilter.cpp:44
static constexpr int m_stencil_width
Definition: NCIGodfreyFilter.H:38
amrex::Real m_cdtodz
Definition: NCIGodfreyFilter.H:48