OSHUN  beta
Arbitrary Order Spherical-Harmonic 1D-3P Vlasov-Fokker-Planck-Maxwell code
Algorithms::AxisBundle< T > Class Template Reference

#include <lib-algorithms.h>

Public Member Functions

valarray< T > x (size_t i) const
 
size_t Nx (size_t i) const
 
xmin (size_t i) const
 
xmax (size_t i) const
 
size_t xdim () const
 
dx (size_t i) const
 
valarray< T > xg (size_t i) const
 
size_t Nxg (size_t i) const
 
xgmin (size_t i) const
 
xgmax (size_t i) const
 
size_t xgdim () const
 
valarray< T > p (size_t i) const
 
size_t Np (size_t i) const
 
pmin (size_t i) const
 
pmax (size_t i) const
 
size_t pdim () const
 
dp (size_t i) const
 
valarray< T > px (size_t i) const
 
size_t Npx (size_t i) const
 
pxmin (size_t i) const
 
pxmax (size_t i) const
 
size_t pxdim () const
 
valarray< T > py (size_t i) const
 
size_t Npy (size_t i) const
 
pymin (size_t i) const
 
pymax (size_t i) const
 
size_t pydim () const
 
valarray< T > pz (size_t i) const
 
size_t Npz (size_t i) const
 
pzmin (size_t i) const
 
pzmax (size_t i) const
 
size_t pzdim () const
 
 AxisBundle (const vector< T > _xmin, const vector< T > _xmax, const vector< size_t > _Nx, const vector< T > _xgmin, const vector< T > _xgmax, const vector< size_t > _Nxg, const vector< T > _pmax, const vector< size_t > _Np, const vector< size_t > _Npx, const vector< size_t > _Npy, const vector< size_t > _Npz)
 
 AxisBundle (const AxisBundle &a)
 
 ~AxisBundle ()
 

Private Attributes

vector< Axis< T > > _px
 
vector< Axis< T > > _py
 
vector< Axis< T > > _pz
 
vector< CAxis< T > > _x
 
vector< CAxis< T > > _xg
 
vector< CAxis< T > > _p
 
vector< T > _dx
 
vector< T > _dp
 

Detailed Description

template<typename T>
class Algorithms::AxisBundle< T >

Definition at line 94 of file lib-algorithms.h.

Constructor & Destructor Documentation

◆ AxisBundle() [1/2]

template<typename T>
Algorithms::AxisBundle< T >::AxisBundle ( const vector< T >  _xmin,
const vector< T >  _xmax,
const vector< size_t >  _Nx,
const vector< T >  _xgmin,
const vector< T >  _xgmax,
const vector< size_t >  _Nxg,
const vector< T >  _pmax,
const vector< size_t >  _Np,
const vector< size_t >  _Npx,
const vector< size_t >  _Npy,
const vector< size_t >  _Npz 
)
inline

Definition at line 141 of file lib-algorithms.h.

144  { // dimensions in configuration space
145  for (size_t i(0); i < _Nx.size(); ++i) {
146  _x.push_back( CAxis<T>( _xmin[i], _xmax[i], _Nx[i]));
147  }
148  for (size_t i(0); i < _Nxg.size(); ++i) {
149  _xg.push_back( CAxis<T>( _xgmin[i], _xgmax[i], _Nxg[i]));
150  }
151  for (size_t i(0); i < _Nxg.size(); ++i) {
152  _dx.push_back((_xmax[i]-_xmin[i])/(static_cast<T>(_Nx[i])));
153  }
154  // for (size_t i(0); i < _Np.size(); ++i) {
155  // _p.push_back( Axis<T>( _pmax[i]/(static_cast<T>(2 * _Np[i])), _pmax[i], _Np[i]) );
156  // }
157  for (size_t i(0); i < _Np.size(); ++i) {
158  _p.push_back( CAxis<T>(static_cast<T>(0.0), _pmax[i], _Np[i]) );
159  }
160 
161  for (size_t i(0); i < _Np.size(); ++i) {
162  _dp.push_back((_pmax[i])/(static_cast<T>(_Np[i])));
163  }
164 
165  for (size_t i(0); i < _Npx.size(); ++i) {
166  _px.push_back( Axis<T>( static_cast<T>(-1.0) * _pmax[i], _pmax[i], _Npx[i]));
167  }
168  for (size_t i(0); i < _Npy.size(); ++i) {
169  _py.push_back( Axis<T>( static_cast<T>(-1.0) * _pmax[i], _pmax[i], _Npy[i]));
170  }
171  for (size_t i(0); i < _Npz.size(); ++i) {
172  _pz.push_back( Axis<T>( static_cast<T>(-1.0) * _pmax[i], _pmax[i], _Npz[i]));
173  }
174  }
vector< Axis< T > > _px
vector< CAxis< T > > _xg
vector< Axis< T > > _pz
vector< Axis< T > > _py
vector< CAxis< T > > _p
vector< CAxis< T > > _x

◆ AxisBundle() [2/2]

template<typename T>
Algorithms::AxisBundle< T >::AxisBundle ( const AxisBundle< T > &  a)
inline

Definition at line 176 of file lib-algorithms.h.

176  {
177  for (size_t i(0); i < a.xdim(); ++i) {
178  _x.push_back( CAxis<T>(a.xmin(i), a.xmax(i), a.Nx(i)) );
179  }
180  for (size_t i(0); i < a.xgdim(); ++i) {
181  _xg.push_back( CAxis<T>(a.xgmin(i), a.xgmax(i), a.Nxg(i)) );
182  }
183  for (size_t i(0); i < a.xdim(); ++i) {
184  _dx.push_back( (a.xgmax(i)-a.xgmin(i))/a.Nxg(i) );
185  }
186  // for (size_t i(0); i < a.pdim(); ++i) {
187  // _p.push_back( Axis<T>(a.pmax(i)/static_cast<T>(2 * a.Np(i)),a.pmax(i),a.Np(i)) );
188  // }
189  for (size_t i(0); i < a.pdim(); ++i) {
190  _p.push_back( CAxis<T>(a.pmin(i),a.pmax(i),a.Np(i)) );
191  }
192  for (size_t i(0); i < a.pdim(); ++i) {
193  _dp.push_back( a.pmax(i)/a.Np(i) );
194  }
195 
196  for (size_t i(0); i < a.pxdim(); ++i) {
197  _px.push_back( Axis<T>( a.pxmin(i), a.pxmin(i), a.Npx(i)) );
198  }
199  for (size_t i(0); i < a.pydim(); ++i) {
200  _py.push_back( Axis<T>( a.pymin(i), a.pymin(i), a.Npy(i)) );
201  }
202  for (size_t i(0); i < a.pzdim(); ++i) {
203  _pz.push_back( Axis<T>( a.pzmin(i), a.pzmin(i), a.Npz(i)) );
204  }
205  }
vector< Axis< T > > _px
vector< CAxis< T > > _xg
vector< Axis< T > > _pz
vector< Axis< T > > _py
vector< CAxis< T > > _p
vector< CAxis< T > > _x

◆ ~AxisBundle()

template<typename T>
Algorithms::AxisBundle< T >::~AxisBundle ( )
inline

Definition at line 207 of file lib-algorithms.h.

207 { }

Member Function Documentation

◆ dp()

template<typename T>
T Algorithms::AxisBundle< T >::dp ( size_t  i) const
inline

Definition at line 117 of file lib-algorithms.h.

117 { return _dp[i]; }

◆ dx()

template<typename T>
T Algorithms::AxisBundle< T >::dx ( size_t  i) const
inline

Definition at line 102 of file lib-algorithms.h.

102 { return _dx[i]; }

◆ Np()

template<typename T>
size_t Algorithms::AxisBundle< T >::Np ( size_t  i) const
inline

Definition at line 113 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle(), Output_Data::fx1_1D::fx1_1D(), Output_Data::p2p1x1_1D::p2p1x1_1D(), and Export_Files::Xport::Xport().

113 { return (*(_p[i].v)).size(); }
vector< CAxis< T > > _p
Here is the caller graph for this function:

◆ Npx()

template<typename T>
size_t Algorithms::AxisBundle< T >::Npx ( size_t  i) const
inline

Definition at line 121 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle(), Output_Data::p1x1_1D::p1x1_1D(), Output_Data::p2p1x1_1D::p2p1x1_1D(), and Export_Files::Xport::Xport().

121 { return (*(_px[i].v)).size(); }
vector< Axis< T > > _px
Here is the caller graph for this function:

◆ Npy()

template<typename T>
size_t Algorithms::AxisBundle< T >::Npy ( size_t  i) const
inline

Definition at line 128 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle(), Output_Data::p2p1x1_1D::p2p1x1_1D(), and Export_Files::Xport::Xport().

128 { return (*(_py[i].v)).size(); }
vector< Axis< T > > _py
Here is the caller graph for this function:

◆ Npz()

template<typename T>
size_t Algorithms::AxisBundle< T >::Npz ( size_t  i) const
inline

Definition at line 135 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle(), and Export_Files::Xport::Xport().

135 { return (*(_pz[i].v)).size(); }
vector< Axis< T > > _pz
Here is the caller graph for this function:

◆ Nx()

template<typename T>
size_t Algorithms::AxisBundle< T >::Nx ( size_t  i) const
inline

Definition at line 98 of file lib-algorithms.h.

Referenced by Setup_Y::applyexternalfields(), Setup_Y::applytravelingwave(), Algorithms::AxisBundle< double >::AxisBundle(), Output_Data::Output_Preprocessor_1D::Bx(), Output_Data::Output_Preprocessor_1D::By(), Output_Data::Output_Preprocessor_1D::Bz(), Output_Data::Output_Preprocessor_1D::Ex(), Output_Data::Output_Preprocessor_1D::Ey(), Output_Data::Output_Preprocessor_1D::Ez(), Output_Data::Output_Preprocessor_1D::f0(), Output_Data::Output_Preprocessor_1D::f10(), Output_Data::Output_Preprocessor_1D::f11(), Output_Data::Output_Preprocessor_1D::f20(), Output_Data::Output_Preprocessor_1D::fl0(), Setup_Y::initialize(), Output_Data::Output_Preprocessor_1D::Jx(), Output_Data::Output_Preprocessor_1D::Jy(), Output_Data::Output_Preprocessor_1D::Jz(), main(), Output_Data::Output_Preprocessor_1D::n(), Output_Data::Output_Preprocessor_1D::ni(), Output_Data::Output_Preprocessor_1D::px(), Output_Data::Output_Preprocessor_1D::Qx(), Output_Data::Output_Preprocessor_1D::Qy(), Output_Data::Output_Preprocessor_1D::Qz(), Output_Data::Output_Preprocessor_1D::T(), Output_Data::Output_Preprocessor_1D::Ti(), Output_Data::Output_Preprocessor_1D::Ux(), Output_Data::Output_Preprocessor_1D::Uy(), Output_Data::Output_Preprocessor_1D::Uz(), Output_Data::Output_Preprocessor_1D::vNx(), Output_Data::Output_Preprocessor_1D::vNy(), Output_Data::Output_Preprocessor_1D::vNz(), and Output_Data::Output_Preprocessor_1D::Z().

98 { return (*(_x[i].v)).size(); }
vector< CAxis< T > > _x
Here is the caller graph for this function:

◆ Nxg()

template<typename T>
size_t Algorithms::AxisBundle< T >::Nxg ( size_t  i) const
inline

Definition at line 106 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle(), Output_Data::Output_Preprocessor_1D::Bx(), Output_Data::Output_Preprocessor_1D::By(), Output_Data::Output_Preprocessor_1D::Bz(), Output_Data::Output_Preprocessor_1D::Ex(), Output_Data::Output_Preprocessor_1D::Ey(), Output_Data::Output_Preprocessor_1D::Ez(), Output_Data::Output_Preprocessor_1D::f0(), Output_Data::Output_Preprocessor_1D::f10(), Output_Data::Output_Preprocessor_1D::f11(), Output_Data::Output_Preprocessor_1D::f20(), Output_Data::Output_Preprocessor_1D::fl0(), Output_Data::Output_Preprocessor_1D::Jx(), Output_Data::Output_Preprocessor_1D::Jy(), Output_Data::Output_Preprocessor_1D::Jz(), Output_Data::Output_Preprocessor_1D::n(), Output_Data::Output_Preprocessor_1D::ni(), Output_Data::Output_Preprocessor_1D::px(), Output_Data::Output_Preprocessor_1D::Qx(), Output_Data::Output_Preprocessor_1D::Qy(), Output_Data::Output_Preprocessor_1D::Qz(), Output_Data::Output_Preprocessor_1D::T(), Output_Data::Output_Preprocessor_1D::Ti(), Output_Data::Output_Preprocessor_1D::Ux(), Output_Data::Output_Preprocessor_1D::Uy(), Output_Data::Output_Preprocessor_1D::Uz(), Output_Data::Output_Preprocessor_1D::vNx(), Output_Data::Output_Preprocessor_1D::vNy(), Output_Data::Output_Preprocessor_1D::vNz(), Export_Files::Xport::Xport(), and Output_Data::Output_Preprocessor_1D::Z().

106 { return (*(_xg[i].v)).size(); }
vector< CAxis< T > > _xg
Here is the caller graph for this function:

◆ p()

template<typename T>
valarray<T> Algorithms::AxisBundle< T >::p ( size_t  i) const
inline

Definition at line 112 of file lib-algorithms.h.

Referenced by Setup_Y::initialize().

112 { return *(_p[i].v); }
vector< CAxis< T > > _p
Here is the caller graph for this function:

◆ pdim()

template<typename T>
size_t Algorithms::AxisBundle< T >::pdim ( ) const
inline

Definition at line 116 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle(), Output_Data::fx1_1D::fx1_1D(), Output_Data::p1x1_1D::p1x1_1D(), Output_Data::p2p1x1_1D::p2p1x1_1D(), and Export_Files::Xport::Xport().

116 { return _p.size(); }
vector< CAxis< T > > _p
Here is the caller graph for this function:

◆ pmax()

template<typename T>
T Algorithms::AxisBundle< T >::pmax ( size_t  i) const
inline

Definition at line 115 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle(), Output_Data::fx1_1D::fx1_1D(), Output_Data::p1x1_1D::p1x1_1D(), Output_Data::p2p1x1_1D::p2p1x1_1D(), and Export_Files::Xport::Xport().

115 { return (*(_p[i].v))[Np(i)-1]+0.5*_dp[i]; }
size_t Np(size_t i) const
vector< CAxis< T > > _p
Here is the caller graph for this function:

◆ pmin()

template<typename T>
T Algorithms::AxisBundle< T >::pmin ( size_t  i) const
inline

Definition at line 114 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle(), Output_Data::fx1_1D::fx1_1D(), Output_Data::p2p1x1_1D::p2p1x1_1D(), and Export_Files::Xport::Xport().

114 { return (*(_p[i].v))[0]-0.5*_dp[i]; }
vector< CAxis< T > > _p
Here is the caller graph for this function:

◆ px()

template<typename T>
valarray<T> Algorithms::AxisBundle< T >::px ( size_t  i) const
inline

Definition at line 120 of file lib-algorithms.h.

120 { return *(_px[i].v); }
vector< Axis< T > > _px

◆ pxdim()

template<typename T>
size_t Algorithms::AxisBundle< T >::pxdim ( ) const
inline

Definition at line 124 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle().

124 { return _px.size(); }
vector< Axis< T > > _px
Here is the caller graph for this function:

◆ pxmax()

template<typename T>
T Algorithms::AxisBundle< T >::pxmax ( size_t  i) const
inline

Definition at line 123 of file lib-algorithms.h.

123 { return (*(_px[i].v))[Npx(i)-1]; }
vector< Axis< T > > _px
size_t Npx(size_t i) const

◆ pxmin()

template<typename T>
T Algorithms::AxisBundle< T >::pxmin ( size_t  i) const
inline

Definition at line 122 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle().

122 { return (*(_px[i].v))[0]; }
vector< Axis< T > > _px
Here is the caller graph for this function:

◆ py()

template<typename T>
valarray<T> Algorithms::AxisBundle< T >::py ( size_t  i) const
inline

Definition at line 127 of file lib-algorithms.h.

127 { return *(_py[i].v); }
vector< Axis< T > > _py

◆ pydim()

template<typename T>
size_t Algorithms::AxisBundle< T >::pydim ( ) const
inline

Definition at line 131 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle().

131 { return _py.size(); }
vector< Axis< T > > _py
Here is the caller graph for this function:

◆ pymax()

template<typename T>
T Algorithms::AxisBundle< T >::pymax ( size_t  i) const
inline

Definition at line 130 of file lib-algorithms.h.

130 { return (*(_py[i].v))[Npy(i)-1]; }
size_t Npy(size_t i) const
vector< Axis< T > > _py

◆ pymin()

template<typename T>
T Algorithms::AxisBundle< T >::pymin ( size_t  i) const
inline

Definition at line 129 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle().

129 { return (*(_py[i].v))[0]; }
vector< Axis< T > > _py
Here is the caller graph for this function:

◆ pz()

template<typename T>
valarray<T> Algorithms::AxisBundle< T >::pz ( size_t  i) const
inline

Definition at line 134 of file lib-algorithms.h.

134 { return *(_pz[i].v); }
vector< Axis< T > > _pz

◆ pzdim()

template<typename T>
size_t Algorithms::AxisBundle< T >::pzdim ( ) const
inline

Definition at line 138 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle().

138 { return _pz.size(); }
vector< Axis< T > > _pz
Here is the caller graph for this function:

◆ pzmax()

template<typename T>
T Algorithms::AxisBundle< T >::pzmax ( size_t  i) const
inline

Definition at line 137 of file lib-algorithms.h.

137 { return (*(_pz[i].v))[Npz(i)-1]; }
vector< Axis< T > > _pz
size_t Npz(size_t i) const

◆ pzmin()

template<typename T>
T Algorithms::AxisBundle< T >::pzmin ( size_t  i) const
inline

Definition at line 136 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle().

136 { return (*(_pz[i].v))[0]; }
vector< Axis< T > > _pz
Here is the caller graph for this function:

◆ x()

template<typename T>
valarray<T> Algorithms::AxisBundle< T >::x ( size_t  i) const
inline

Definition at line 97 of file lib-algorithms.h.

Referenced by Setup_Y::applyexternalfields(), Setup_Y::applytravelingwave(), and Setup_Y::initialize().

97 { return *(_x[i].v); }
vector< CAxis< T > > _x
Here is the caller graph for this function:

◆ xdim()

template<typename T>
size_t Algorithms::AxisBundle< T >::xdim ( ) const
inline

Definition at line 101 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle().

101 { return _x.size(); }
vector< CAxis< T > > _x
Here is the caller graph for this function:

◆ xg()

template<typename T>
valarray<T> Algorithms::AxisBundle< T >::xg ( size_t  i) const
inline

Definition at line 105 of file lib-algorithms.h.

105 { return *(_xg[i].v); }
vector< CAxis< T > > _xg

◆ xgdim()

template<typename T>
size_t Algorithms::AxisBundle< T >::xgdim ( ) const
inline

Definition at line 109 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle().

109 { return _xg.size(); }
vector< CAxis< T > > _xg
Here is the caller graph for this function:

◆ xgmax()

template<typename T>
T Algorithms::AxisBundle< T >::xgmax ( size_t  i) const
inline

Definition at line 108 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle(), and Export_Files::Xport::Xport().

108 { return (*(_xg[i].v))[Nxg(i)-1]+0.5*_dx[i]; }
vector< CAxis< T > > _xg
size_t Nxg(size_t i) const
Here is the caller graph for this function:

◆ xgmin()

template<typename T>
T Algorithms::AxisBundle< T >::xgmin ( size_t  i) const
inline

Definition at line 107 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle(), and Export_Files::Xport::Xport().

107 { return (*(_xg[i].v))[0]-0.5*_dx[i]; }
vector< CAxis< T > > _xg
Here is the caller graph for this function:

◆ xmax()

template<typename T>
T Algorithms::AxisBundle< T >::xmax ( size_t  i) const
inline

Definition at line 100 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle(), and main().

100 { return (*(_x[i].v))[Nx(i)-1]+0.5*_dx[i]; }
vector< CAxis< T > > _x
size_t Nx(size_t i) const
Here is the caller graph for this function:

◆ xmin()

template<typename T>
T Algorithms::AxisBundle< T >::xmin ( size_t  i) const
inline

Definition at line 99 of file lib-algorithms.h.

Referenced by Algorithms::AxisBundle< double >::AxisBundle(), and main().

99 { return (*(_x[i].v))[0]-0.5*_dx[i]; }
vector< CAxis< T > > _x
Here is the caller graph for this function:

Field Documentation

◆ _dp

template<typename T>
vector<T> Algorithms::AxisBundle< T >::_dp
private

Definition at line 214 of file lib-algorithms.h.

◆ _dx

template<typename T>
vector<T> Algorithms::AxisBundle< T >::_dx
private

Definition at line 214 of file lib-algorithms.h.

◆ _p

template<typename T>
vector< CAxis<T> > Algorithms::AxisBundle< T >::_p
private

Definition at line 213 of file lib-algorithms.h.

◆ _px

template<typename T>
vector< Axis<T> > Algorithms::AxisBundle< T >::_px
private

Definition at line 212 of file lib-algorithms.h.

◆ _py

template<typename T>
vector< Axis<T> > Algorithms::AxisBundle< T >::_py
private

Definition at line 212 of file lib-algorithms.h.

◆ _pz

template<typename T>
vector< Axis<T> > Algorithms::AxisBundle< T >::_pz
private

Definition at line 212 of file lib-algorithms.h.

◆ _x

template<typename T>
vector< CAxis<T> > Algorithms::AxisBundle< T >::_x
private

Definition at line 213 of file lib-algorithms.h.

◆ _xg

template<typename T>
vector< CAxis<T> > Algorithms::AxisBundle< T >::_xg
private

Definition at line 213 of file lib-algorithms.h.


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