XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
FluxSurfaceAverage< Device > Class Template Reference

#include <flux_surface_average.hpp>

Collaboration diagram for FluxSurfaceAverage< Device >:
Collaboration graph
[legend]

Public Member Functions

 FluxSurfaceAverage ()
 
template<class Device2 >
FluxSurfaceAverage< Device2 > mirror () const
 
 FluxSurfaceAverage (NLReader::NamelistReader &nlr, const DomainDecomposition< DeviceType > &pol_decomp, const MagneticField< DeviceType > &magnetic_field, const Plane< HostType > &plane, const PlaneFiles &plane_files, const VolumesAndAreas &volumes_and_areas, const View< int *, CLayout, DeviceType > &num_t_node, const View< int **, CLayout, DeviceType > &tr_node)
 
View< double *, CLayout, Device > to_surf (const View< double *, CLayout, Device > &input) const
 
void from_surf (const View< double *, CLayout, Device > &input, const View< double *, CLayout, Device > &output) const
 
View< double *, CLayout, Device > average (const View< double *, CLayout, Device > &array) const
 
View< double *, CLayout, Device > average (const View< double *, CLayout, Device > &array, const View< double *, CLayout, Device > &output_surf) const
 
void average (const View< double *, CLayout, Device > &array, const View< double *, CLayout, Device > &output_surf, const View< double *, CLayout, Device > &tmp00) const
 
void average (const View< double **, CLayout, Device > &array) const
 
View< double *, CLayout, Device > average_3D (const DomainDecomposition< DeviceType > &pol_decomp, const View< double *, CLayout, Device > &array, const View< double *, CLayout, Device > &output_array) const
 
int nsurfs () const
 

Private Member Functions

void wall_nodes_strikep_method (NLReader::NamelistReader &nlr, const MagneticField< DeviceType > &magnetic_field, const Plane< HostType > &plane, const PlaneFiles &plane_files, const View< double *, CLayout, HostType > &psi_surf, const View< int *, CLayout, DeviceType > &num_t_node, const View< int **, CLayout, DeviceType > &tr_node)
 
template<>
void wall_nodes_strikep_method (NLReader::NamelistReader &nlr, const MagneticField< DeviceType > &magnetic_field, const Plane< HostType > &plane, const PlaneFiles &plane_files, const View< double *, CLayout, HostType > &psi_surf, const View< int *, CLayout, DeviceType > &num_t_node_d, const View< int **, CLayout, DeviceType > &tr_node_d)
 
template<>
 FluxSurfaceAverage (NLReader::NamelistReader &nlr, const DomainDecomposition< DeviceType > &pol_decomp, const MagneticField< DeviceType > &magnetic_field, const Plane< HostType > &plane, const PlaneFiles &plane_files, const VolumesAndAreas &volumes_and_areas, const View< int *, CLayout, DeviceType > &num_t_node, const View< int **, CLayout, DeviceType > &tr_node)
 

Private Attributes

Matrix< Device > to_flux_surface
 
Matrix< Device > from_flux_surface
 
View< double *, CLayout, Device > surf_vol
 
View< double *, CLayout, Device > surf_vol_3D
 

Friends

template<class Device2 >
class FluxSurfaceAverage
 

Constructor & Destructor Documentation

template<class Device>
FluxSurfaceAverage< Device >::FluxSurfaceAverage ( )
inline
template<class Device>
FluxSurfaceAverage< Device >::FluxSurfaceAverage ( NLReader::NamelistReader nlr,
const DomainDecomposition< DeviceType > &  pol_decomp,
const MagneticField< DeviceType > &  magnetic_field,
const Plane< HostType > &  plane,
const PlaneFiles plane_files,
const VolumesAndAreas volumes_and_areas,
const View< int *, CLayout, DeviceType > &  num_t_node,
const View< int **, CLayout, DeviceType > &  tr_node 
)
template<>
FluxSurfaceAverage< HostType >::FluxSurfaceAverage ( NLReader::NamelistReader nlr,
const DomainDecomposition< DeviceType > &  pol_decomp,
const MagneticField< DeviceType > &  magnetic_field,
const Plane< HostType > &  plane,
const PlaneFiles plane_files,
const VolumesAndAreas volumes_and_areas,
const View< int *, CLayout, DeviceType > &  num_t_node,
const View< int **, CLayout, DeviceType > &  tr_node 
)
private

Here is the call graph for this function:

Member Function Documentation

template<class Device>
View< double *, CLayout, Device > FluxSurfaceAverage< Device >::average ( const View< double *, CLayout, Device > &  array) const

Conducts a flux-surface average on the poloidal plane in place

Parameters
[in]arrayView containing the input values at each vertex of the local plane
Returns
View of the results on each surface, i.e. not mapped back to vertices yet

Here is the caller graph for this function:

template<class Device>
View< double *, CLayout, Device > FluxSurfaceAverage< Device >::average ( const View< double *, CLayout, Device > &  array,
const View< double *, CLayout, Device > &  output_array 
) const

Calculates the flux-surface average.

Parameters
[in]arrayView containing the input values at each vertex of the local plane
[out]output_arrayView containing the results of the flux-surface average
Returns
View of the results on each surface, i.e. not mapped back to vertices yet
template<class Device>
void FluxSurfaceAverage< Device >::average ( const View< double *, CLayout, Device > &  array,
const View< double *, CLayout, Device > &  output_array,
const View< double *, CLayout, Device > &  tmp00 
) const

Calculates the flux-surface average.

Parameters
[in]arrayView containing the input values at each vertex of the local plane
[out]output_arrayView with the results of the average for each vertex
[out]tmp00View used as scratch memory
template<class Device>
void FluxSurfaceAverage< Device >::average ( const View< double **, CLayout, Device > &  array_set) const

Conducts a flux-surface average on the poloidal plane of a set of arrays stored in a 2D View where the outer index is the number of arrays

Parameters
[in,out]array_setView containing the input values at each vertex for a set of arrays. The values are overwritten with the results.

Here is the call graph for this function:

template<class Device>
View< double *, CLayout, Device > FluxSurfaceAverage< Device >::average_3D ( const DomainDecomposition< DeviceType > &  pol_decomp,
const View< double *, CLayout, Device > &  array,
const View< double *, CLayout, Device > &  output_array 
) const

Calculates the 3D flux-surface average. The function assumes that each plane has the same psi surfaces in the same order.

Parameters
[in]pol_decompThe domain decomposition
[in]arrayView containing the input values at each vertex of the local plane
[out]output_arrayView with the results of the average for each vertex
Returns
View of the results on each surface, i.e. not mapped back to vertices yet

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Device>
void FluxSurfaceAverage< Device >::from_surf ( const View< double *, CLayout, Device > &  input_surf,
const View< double *, CLayout, Device > &  output 
) const

Maps flux-surface values back to the vertices.

Parameters
[in]input_surfView containing the values on each flux surface
[out]outputView with the surface values mapped back to each vertex

Here is the caller graph for this function:

template<class Device>
template<class Device2 >
FluxSurfaceAverage<Device2> FluxSurfaceAverage< Device >::mirror ( ) const
inline
template<class Device >
int FluxSurfaceAverage< Device >::nsurfs ( ) const

Returns the number of surfaces mapped by the flux surface matrices

Returns
the number of surfaces

Here is the caller graph for this function:

template<class Device>
View< double *, CLayout, Device > FluxSurfaceAverage< Device >::to_surf ( const View< double *, CLayout, Device > &  input) const

Calculates the flux-surface average.

Parameters
[in]arrayView containing the input values at each vertex of the local plane
Returns
View of the results on each surface, i.e. not mapped back to vertices yet

Here is the caller graph for this function:

template<class Device>
void FluxSurfaceAverage< Device >::wall_nodes_strikep_method ( NLReader::NamelistReader nlr,
const MagneticField< DeviceType > &  magnetic_field,
const Plane< HostType > &  plane,
const PlaneFiles plane_files,
const View< double *, CLayout, HostType > &  psi_surf,
const View< int *, CLayout, DeviceType > &  num_t_node,
const View< int **, CLayout, DeviceType > &  tr_node 
)
private
template<>
void FluxSurfaceAverage< HostType >::wall_nodes_strikep_method ( NLReader::NamelistReader nlr,
const MagneticField< DeviceType > &  magnetic_field,
const Plane< HostType > &  plane,
const PlaneFiles plane_files,
const View< double *, CLayout, HostType > &  psi_surf,
const View< int *, CLayout, DeviceType > &  num_t_node_d,
const View< int **, CLayout, DeviceType > &  tr_node_d 
)
private

Here is the call graph for this function:

Friends And Related Function Documentation

template<class Device>
template<class Device2 >
friend class FluxSurfaceAverage
friend

Member Data Documentation

template<class Device>
Matrix<Device> FluxSurfaceAverage< Device >::from_flux_surface
private
template<class Device>
View<double*, CLayout, Device> FluxSurfaceAverage< Device >::surf_vol
private
template<class Device>
View<double*, CLayout, Device> FluxSurfaceAverage< Device >::surf_vol_3D
private
template<class Device>
Matrix<Device> FluxSurfaceAverage< Device >::to_flux_surface
private

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