OSHUN  beta
Arbitrary Order Spherical-Harmonic 1D-3P Vlasov-Fokker-Planck-Maxwell code
implicitE.h
Go to the documentation of this file.
1 
11  #ifndef DECL_IMPLICITEFIELD_H
12  #define DECL_IMPLICITEFIELD_H
13 
14 //**************************************************************
15 //**************************************************************
16 // Definition for the Electric_Field_Methods namespace
17 //**************************************************************
18 //**************************************************************
19 
20 
22 //<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
23 
24 
25 
26 //**************************************************************
27 //--------------------------------------------------------------
28  class Current_xyz {
29 //--------------------------------------------------------------
30 // Decleration of the Current
31 //--------------------------------------------------------------
32  public:
33 // Constructors/Destructors
34  Current_xyz(EMF1D& emf);
35 
36 // Choose component
37  Field1D& J(int component);
38  void calculate_J(State1D& Yin);
39 
40 
41 // Components
42  Field1D& Jx();
43  // void calculate_Jx(State1D& Yin);
44  Field1D& Jy();
45  // void calculate_Jy(State1D& Yin);
46  Field1D& Jz();
47  // void calculate_Jz(State1D& Yin);
48 
49  private:
51 
52  // complex<double> Delta_p, small;
53  complex<double> fourpioverthree;
54  // valarray< complex<double> > p3og;
55  // vector <valarray< complex<double> >> p3ogv;
56 
57  valarray< complex<double> > tempx;
58  valarray< complex<double> > tempy;
59  valarray< complex<double> > tempz;
60 
61  size_t Nbc, szx;
62 
63  };
64 //--------------------------------------------------------------
65 //**************************************************************
66 
67 
68 
69 //**************************************************************
70 //--------------------------------------------------------------
71  class Efield_xyz {
72 //--------------------------------------------------------------
73 // Decleration of the Current
74 //--------------------------------------------------------------
75  public:
76 // Constructors/Destructors
77  Efield_xyz(EMF1D& emf);
78 
79 // Choose component
80  Field1D& E(int component);
81 
82 // Components
83  Field1D& Ex();
84  Field1D& Ey();
85  Field1D& Ez();
86 
87  private:
88  Field1D efieldx, efieldy, efieldz;
89 
90 // complex<double> Delta_p, small;
91 // Axis< complex<double> > p3og;
92 
93  };
94 //--------------------------------------------------------------
95 //**************************************************************
96 
97 //**************************************************************
98 //--------------------------------------------------------------
99  class Efield_Method {
100 //--------------------------------------------------------------
101 // Abstract class for explicit methods
102 //--------------------------------------------------------------
103  public:
104  virtual void advance(Algorithms::RK3<State1D>* rk, State1D& Y, collisions& coll, VlasovFunctor1D_implicitE_p2* rkF)=0;//, double time, double dt) = 0; // "covariant" return
105  // virtual bool implicitE() const = 0;
106  virtual ~Efield_Method() = 0;
107  };
108 //--------------------------------------------------------------
109 //**************************************************************
110 
111 
112 // //**************************************************************
113 // //--------------------------------------------------------------
114 // class Explicit_E_Field: public Efield_Method {
115 // //--------------------------------------------------------------
116 // // class for explicit electric field
117 // //--------------------------------------------------------------
118 // public:
119 // // Constructor
120 // Explicit_E_Field(State1D& Yin, int tout_start);
121 
122 // // Main function
123 // void advance(Algorithms::RK3<State1D>* rk, Euler_Backward* eb, RKFunctor1D* rkF);
124 
125 // // Is the electric field implicit?
126 // bool implicitE() const;
127 
128 // private:
129 
130 // // Reference to Y
131 // State1D& Y;
132 
133 // // Time
134 // double t;
135 
136 // // This class does not do anything at this stage
137 
138 // };
139 // //--------------------------------------------------------------
140 //**************************************************************
141 
142 
143 //**************************************************************
144 //--------------------------------------------------------------
146 //--------------------------------------------------------------
147 // class for ==> implicit electric field
148 //--------------------------------------------------------------
149  public:
150 // Constructor
151  Implicit_E_Field(EMF1D& emf, const double& deltat, const double& deltax);
152 
153 // Main function
154  void advance(Algorithms::RK3<State1D>* rk, State1D& Y, collisions& coll, VlasovFunctor1D_implicitE_p2* rkF);//, double time, double dt);
155 
156 // Is the electric field implicit?
157  // bool implicitE() const;
158 
159  private:
160 // Reference to Y
161  // State1D& Y;
162 
163 // Current and electric field
164  Current_xyz JN, J0, J_Ex, J_Ey, J_Ez;
165  Efield_xyz EN, E0, DE;
166  double dt;
167  complex<double> idx;//, idy;
168 
169 // Storage of harmonics
170  // State1D Ysafe;
171  // SHarmonic1D f00;
172  // SHarmonic1D f10, f11;
173  // SHarmonic1D f20, f21, f22;
174 
175 // Time
176  // double t;
177 
178 
179 // Ampere's law JN = rot(B)
180  void Ampere(EMF1D& emf);
181  void FindDE(EMF1D& emf);
182 
183 // Boundary Cells
184  int Nbc, szx;//, szy;
185 // Derivative constants
186 
187  // size_t l0, m0;
188 
189 // Implicit methods
190  // bool if_implicitES;
191  // bool if_implicit1D;
192  };
193 //--------------------------------------------------------------
194 
195 //**************************************************************
196 
197  }
198 //<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
199 
200  #endif
complex< double > fourpioverthree
Definition: implicitE.h:53
A 1D Field.
Definition: state.h:184
valarray< complex< double > > tempz
Definition: implicitE.h:59
valarray< complex< double > > tempx
Definition: implicitE.h:57
Definition: state.h:577
Field1D & J(int component)
Definition: implicitE.cpp:86
Definition: state.h:271
valarray< complex< double > > tempy
Definition: implicitE.h:58