OSHUN  beta
Arbitrary Order Spherical-Harmonic 1D-3P Vlasov-Fokker-Planck-Maxwell code
Electric_Field_Methods::Current_xyz Class Reference

#include <implicitE.h>

Collaboration diagram for Electric_Field_Methods::Current_xyz:

Public Member Functions

 Current_xyz (EMF1D &emf)
 
Field1DJ (int component)
 
void calculate_J (State1D &Yin)
 
Field1DJx ()
 
Field1DJy ()
 
Field1DJz ()
 

Private Attributes

Field1D jayx
 
Field1D jayy
 
Field1D jayz
 
complex< double > fourpioverthree
 
valarray< complex< double > > tempx
 
valarray< complex< double > > tempy
 
valarray< complex< double > > tempz
 
size_t Nbc
 
size_t szx
 

Detailed Description

Definition at line 28 of file implicitE.h.

Constructor & Destructor Documentation

◆ Current_xyz()

Electric_Field_Methods::Current_xyz::Current_xyz ( EMF1D emf)

Definition at line 53 of file implicitE.cpp.

References Input::Input_List::BoundaryCells, Input::List(), Nbc, Input::Input_List::NxLocal, and szx.

57  : jayx(emf.Ex()),
58  jayy(emf.Ex()),
59  jayz(emf.Ex()),
60  // p3og(Algorithms::MakeAxis(
61  // static_cast< complex<double> >(Input::List().pmin),
62  // static_cast< complex<double> >(Input::List().pmaxs[0]),
63  // Input::List().ps[0])),
64  // Delta_p(static_cast< complex<double> >((Input::List().pmaxs[0]-Input::List().pmin)/Input::List().ps[0])),
65  // small(static_cast< complex<double> >(Input::List().pmin)),
66  tempx(0.0,emf.Ex().numx()),
67  tempy(0.0,emf.Ex().numx()),
68  tempz(0.0,emf.Ex().numx()),
69  fourpioverthree(4.0*M_PI/3.0,0.0)
70  {
72  szx = Input::List().NxLocal[0];
73  // for (size_t s(0); s<Yin.Species();++s)
74  // {
75  // for (size_t i(0); i<p3og.size(); ++i) { // calculate p^3/g
76  // p3og[i] = (p3og[i]*p3og[i])*(p3og[i]/sqrt(1.0+p3og[i]*p3og[i]));
77  // }
78  // p3ogv.push_back(p3og);
79  // }
80  // small *= small; small *= small; small *= Input::List().pmin;
81  // small *= 0.2; small *= 1.0/(Input::List().pmin+Delta_p);
82  }
complex< double > fourpioverthree
Definition: implicitE.h:53
size_t numx() const
Definition: state.h:197
std::vector< size_t > NxLocal
Definition: input.h:168
valarray< complex< double > > tempz
Definition: implicitE.h:59
valarray< complex< double > > tempx
Definition: implicitE.h:57
Field1D & Ex()
Definition: state.h:290
Input_List & List()
Definition: input.cpp:1585
valarray< complex< double > > tempy
Definition: implicitE.h:58
int BoundaryCells
Definition: input.h:50
Here is the call graph for this function:

Member Function Documentation

◆ calculate_J()

void Electric_Field_Methods::Current_xyz::calculate_J ( State1D Yin)

Definition at line 135 of file implicitE.cpp.

References State1D::DF(), State1D::EMF(), EMF1D::Ex(), DistFunc1D::getcurrent(), jayx, jayy, jayz, Field1D::numx(), and State1D::Species().

Referenced by Electric_Field_Methods::Implicit_E_Field::advance(), and Jz().

135  {
136 //--------------------------------------------------------------
137 // Update the total current
138 //--------------------------------------------------------------
139  complex<double> c01(0.0,1.0);
140  complex<double> pmin, pmax;
141  size_t nump;
142  Array2D<double> current(3,Yin.EMF().Ex().numx());
143 
144  // jayx=0.0;jayy=0.0;jayz=0.0;
145  jayx = static_cast<complex<double> >(0.0);
146  jayy = static_cast<complex<double> >(0.0);
147  jayz = static_cast<complex<double> >(0.0);
148 
149 
150  for (size_t s(0); s < Yin.Species(); ++s){
151  current = Yin.DF(s).getcurrent();
152  for (size_t ix(0); ix < Yin.EMF().Ex().numx(); ++ix)
153  {
154  jayx(ix) += static_cast<complex<double>>(current(0,ix));
155  jayy(ix) += static_cast<complex<double>>(current(1,ix));
156  jayz(ix) += static_cast<complex<double>>(current(2,ix));
157 
158  }
159 
160  // jayx.array() += static_cast<complex<double>>(Yin.DF(s).getcurrent(0));
161  // jayy.array() += static_cast<complex<double>>(Yin.DF(s).getcurrent(1));
162  // jayz.array() += static_cast<complex<double>>(Yin.DF(s).getcurrent(2));
163  }
164 }
size_t numx() const
Definition: state.h:197
DistFunc1D & DF(size_t s)
Definition: state.h:602
Field1D & Ex()
Definition: state.h:290
valarray< double > getcurrent(size_t dir)
Definition: state.cpp:965
size_t Species() const
Definition: state.h:596
EMF1D & EMF() const
Definition: state.h:610
Here is the call graph for this function:
Here is the caller graph for this function:

◆ J()

Field1D & Electric_Field_Methods::Current_xyz::J ( int  component)

Definition at line 86 of file implicitE.cpp.

References Jx(), Jy(), and Jz().

86  {
87 //--------------------------------------------------------------
88 // Return the current component 1 --> x, 2 --> y, 3 --> z
89 //--------------------------------------------------------------
90 
91  switch (component) {
92  case 1: {
93  return Jx();
94  break;
95  }
96  case 2: {
97  return Jy();
98  break;
99  }
100  case 3: {
101  return Jz();
102  break;
103  }
104  default: {
105  cout << "There is no such component for the current!" << endl;
106  exit(1);
107  break;
108  }
109  }
110  return Jx();
111 }
Here is the call graph for this function:

◆ Jx()

Field1D & Electric_Field_Methods::Current_xyz::Jx ( )

Definition at line 115 of file implicitE.cpp.

References jayx.

Referenced by Electric_Field_Methods::Implicit_E_Field::advance(), and J().

115  {
116  return jayx;
117  }
Here is the caller graph for this function:

◆ Jy()

Field1D & Electric_Field_Methods::Current_xyz::Jy ( )

Definition at line 121 of file implicitE.cpp.

References jayy.

Referenced by Electric_Field_Methods::Implicit_E_Field::advance(), Electric_Field_Methods::Implicit_E_Field::Ampere(), and J().

121  {
122  return jayy;
123  }
Here is the caller graph for this function:

◆ Jz()

Field1D & Electric_Field_Methods::Current_xyz::Jz ( )

Definition at line 127 of file implicitE.cpp.

References calculate_J(), and jayz.

Referenced by Electric_Field_Methods::Implicit_E_Field::advance(), Electric_Field_Methods::Implicit_E_Field::Ampere(), and J().

127  {
128  return jayz;
129  }
Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ fourpioverthree

complex<double> Electric_Field_Methods::Current_xyz::fourpioverthree
private

Definition at line 53 of file implicitE.h.

◆ jayx

Field1D Electric_Field_Methods::Current_xyz::jayx
private

Definition at line 50 of file implicitE.h.

Referenced by calculate_J(), and Jx().

◆ jayy

Field1D Electric_Field_Methods::Current_xyz::jayy
private

Definition at line 50 of file implicitE.h.

Referenced by calculate_J(), and Jy().

◆ jayz

Field1D Electric_Field_Methods::Current_xyz::jayz
private

Definition at line 50 of file implicitE.h.

Referenced by calculate_J(), and Jz().

◆ Nbc

size_t Electric_Field_Methods::Current_xyz::Nbc
private

Definition at line 61 of file implicitE.h.

Referenced by Current_xyz().

◆ szx

size_t Electric_Field_Methods::Current_xyz::szx
private

Definition at line 61 of file implicitE.h.

Referenced by Current_xyz().

◆ tempx

valarray< complex<double> > Electric_Field_Methods::Current_xyz::tempx
private

Definition at line 57 of file implicitE.h.

◆ tempy

valarray< complex<double> > Electric_Field_Methods::Current_xyz::tempy
private

Definition at line 58 of file implicitE.h.

◆ tempz

valarray< complex<double> > Electric_Field_Methods::Current_xyz::tempz
private

Definition at line 59 of file implicitE.h.


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