Graph Framework
Loading...
Searching...
No Matches
pic::mesh< T > Class Template Reference

Mesh class. More...

#include <particle_in_cell.hpp>

Public Types

enum  offset { low , center , high }
 Mesh point. More...
 

Public Member Functions

 mesh (const T x_min, const T x_max, const size_t num, const characteristics< T > &norms)
 Construct a mesh object.
 
graph::shared_leaf< T > build_x_index (graph::shared_leaf< T > x) const
 Build x index.
 
graph::shared_leaf< T > build_i_index (graph::shared_leaf< T > x) const
 Build i index.
 
template<size_t I = 0, offset O = center>
graph::shared_leaf< T > build_y_index (graph::shared_leaf< T > x, const parameters< T > &params) const
 Build y index.
 
template<size_t I = 0, offset O = center>
graph::shared_leaf< T > build_dydx_index (graph::shared_leaf< T > x, const parameters< T > &params) const
 Build dy/dx index.
 
std::array< graph::shared_leaf< T >, 3 > build_mesh_solve (const ion< T > &ion) const
 Build mesh accumulation.
 
size_t size () const
 Get the number of computational ions.
 
template<size_t I = 0>
T * data () const
 Get the number of computational ions.
 
void define_variables (const output::result_file &file, output::data_set< T > &data, workflow::manager< T > &work)
 Define variables.
 
std::array< graph::shared_leaf< T >, 3 > build_weights (graph::shared_leaf< T > x) const
 Build interpolation weights.
 
graph::shared_leaf< T > build_interpolation (graph::shared_leaf< T > x) const
 Build interpolation expression.
 

Public Attributes

const T xmin
 Min x.
 
const T xmax
 Max x.
 
const T dx
 Dx.
 
std::array< graph::shared_leaf< T >, 4 > y
 Mesh y values.
 

Detailed Description

template<std::floating_point T>
class pic::mesh< T >

Mesh class.

Template Parameters
TBase type of the calculation.

Member Enumeration Documentation

◆ offset

template<std::floating_point T>
enum pic::mesh::offset

Mesh point.

Enumerator
low 

Lower index.

center 

Center index.

high 

Higher index.

Constructor & Destructor Documentation

◆ mesh()

template<std::floating_point T>
pic::mesh< T >::mesh ( const T  x_min,
const T  x_max,
const size_t  num,
const characteristics< T > &  norms 
)
inline

Construct a mesh object.

Parameters
[in]x_minMinimum X postion of mesh.
[in]x_maxMaximum X position of mesh.
[in]numNumber of mesh points.
[in]normsA pic::characteristics object.

Member Function Documentation

◆ build_dydx_index()

template<std::floating_point T>
template<size_t I = 0, offset O = center>
graph::shared_leaf< T > pic::mesh< T >::build_dydx_index ( graph::shared_leaf< T >  x,
const parameters< T > &  params 
) const
inline

Build dy/dx index.

Template Parameters
IMesh index.
OMesh offset.
Parameters
[in]xThe x position.
[in]paramsA pic::parameters object.
Returns
The indexed mesh Y position.

◆ build_i_index()

template<std::floating_point T>
graph::shared_leaf< T > pic::mesh< T >::build_i_index ( graph::shared_leaf< T >  x) const
inline

Build i index.

Parameters
[in]xThe x position.
Returns
The indexed mesh X position.

◆ build_interpolation()

template<std::floating_point T>
graph::shared_leaf< T > pic::mesh< T >::build_interpolation ( graph::shared_leaf< T >  x) const
inline

Build interpolation expression.

Parameters
[in]xThe x position.
Returns
The interpolated mesh quantity.

◆ build_mesh_solve()

template<std::floating_point T>
std::array< graph::shared_leaf< T >, 3 > pic::mesh< T >::build_mesh_solve ( const ion< T > &  ion) const
inline

Build mesh accumulation.

Parameters
[in]ionA pic::ion object.
Returns
Expressions for mesh accumulation.

◆ build_weights()

template<std::floating_point T>
std::array< graph::shared_leaf< T >, 3 > pic::mesh< T >::build_weights ( graph::shared_leaf< T >  x) const
inline

Build interpolation weights.

Parameters
[in]xThe x position.
Returns
The interpolated mesh weights.

◆ build_x_index()

template<std::floating_point T>
graph::shared_leaf< T > pic::mesh< T >::build_x_index ( graph::shared_leaf< T >  x) const
inline

Build x index.

Parameters
[in]xThe x position.
Returns
The indexed mesh X position.

◆ build_y_index()

template<std::floating_point T>
template<size_t I = 0, offset O = center>
graph::shared_leaf< T > pic::mesh< T >::build_y_index ( graph::shared_leaf< T >  x,
const parameters< T > &  params 
) const
inline

Build y index.

Template Parameters
IMesh index.
OMesh offset.
Parameters
[in]xThe x position.
[in]paramsA pic::parameters object.
Returns
The indexed mesh Y position.

◆ data()

template<std::floating_point T>
template<size_t I = 0>
T * pic::mesh< T >::data ( ) const
inline

Get the number of computational ions.

Template Parameters
IMesh index.
Returns
The number of particles.

◆ define_variables()

template<std::floating_point T>
void pic::mesh< T >::define_variables ( const output::result_file &  file,
output::data_set< T > &  data,
workflow::manager< T > &  work 
)
inline

Define variables.

Parameters
[in]fileA output::result_file object to define variables.
[in,out]dataA output::data_set object to create variable.
[in]workA workflow::manager object where data was computed.

◆ size()

template<std::floating_point T>
size_t pic::mesh< T >::size ( ) const
inline

Get the number of computational ions.

Returns
The number of particles.

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