Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys > Class Template Reference

A wrapper that implements the prescribed interface for direct product meshes in Portage using the Direct_Product_Mesh (direct_product_mesh.h) More...

#include <direct_product_mesh_wrapper.h>

Public Member Functions

 Direct_Product_Mesh_Wrapper ()=delete
 Default constructor (disabled) More...
 
 Direct_Product_Mesh_Wrapper (Direct_Product_Mesh< D, CoordSys > const &mesh)
 Constructor for the mesh wrapper. More...
 
 Direct_Product_Mesh_Wrapper (Direct_Product_Mesh_Wrapper< D, CoordSys > const &)=delete
 Copy constructor (disabled). More...
 
Direct_Product_Mesh_Wrapperoperator= (Direct_Product_Mesh_Wrapper< D, CoordSys > const &)=delete
 Assignment operator (disabled). More...
 
 ~Direct_Product_Mesh_Wrapper ()
 Destructor. More...
 
Direct_Product_Mesh< D, CoordSys > const & mesh () const
 
int space_dimension () const
 Get dimensionality of the mesh. More...
 
bool distributed () const
 Is mesh distributed? More...
 
int num_ghost_layers () const
 Number of ghost layers in each direction at each end. More...
 
void get_global_bounds (Point< D > *plo, Point< D > *phi) const
 Get global mesh bounds. More...
 
int num_axis_points (const int dim, const Entity_type ptype=ALL) const
 Get number of points along axis. More...
 
counting_iterator axis_point_begin (const int dim) const
 Get iterator for axis point (beginning of array). More...
 
counting_iterator axis_point_end (const int dim) const
 Get iterator for axis point (end of array). More...
 
int num_owned_nodes () const
 Get number of nodes owned by this processing element. More...
 
int num_ghost_nodes () const
 Get number of ghost nodes on this processing element. More...
 
Entity_type node_get_type (const int id) const
 Node type (PARALLEL_OWNED, PARALLEL_GHOST or BOUNDARY_GHOST) More...
 
Point< D > get_node_coordinates (const int pointid) const
 Get coordinates of node. More...
 
double get_axis_point (const int dim, const int pointid) const
 Get axis point value. More...
 
int num_axis_cells (const int dim, const Entity_type ptype=ALL) const
 Get number of cells along axis. More...
 
int num_owned_cells () const
 Get number of cells owned by this processing element. More...
 
int num_ghost_cells () const
 Get number of ghost cells on this processing element. More...
 
Entity_type cell_get_type (const int id) const
 Cell type (PARALLEL_OWNED, PARALLEL_GHOST or BOUNDARY_GHOST) More...
 
bool on_exterior_boundary (const Entity_kind entity, const int id) const
 If entity is on exterior (global not partition) boundary. More...
 
void cell_get_bounds (const int id, Point< D > *plo, Point< D > *phi) const
 Get lower and upper corners of cell bounding box. More...
 
void cell_get_coordinates (const int id, std::vector< Point< D >> *ccoords) const
 Get coordinates of cell points. More...
 
double cell_volume (const int id) const
 Get cell volume. More...
 
void cell_centroid (const int id, Point< D > *ccen) const
 Get cell centroid. More...
 
counting_iterator begin (Entity_kind const entity, Entity_type const etype=ALL) const
 Iterators on mesh entity - begin. More...
 
counting_iterator end (Entity_kind const entity, Entity_type const etype=ALL) const
 Iterator on mesh entity - end. More...
 
int indices_to_cellid (const std::array< int, D > &indices) const
 Convert from indices of lo corner of cell to cell ID. More...
 
std::array< int, D > cellid_to_indices (const int id) const
 Convert from ID to indices of lo corner of cell. More...
 
int indices_to_nodeid (const std::array< int, D > &indices) const
 Convert from indices of node to node ID. More...
 
std::array< int, D > nodeid_to_indices (const int id) const
 Convert from node ID to indices of node. More...
 
void cell_get_node_adj_cells (const int cellid, const Entity_type ptype, std::vector< int > *adjcells) const
 Get the list of cell IDs for all cells attached to a specific cell through its faces. More...
 
void node_get_cell_adj_nodes (const int nodeid, const Entity_type ptype, std::vector< int > *adjnodes) const
 Get the list of node IDs for all nodes attached to all cells attached to a specific node. More...
 

Detailed Description

template<int D, class CoordSys = DefaultCoordSys>
class Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >

A wrapper that implements the prescribed interface for direct product meshes in Portage using the Direct_Product_Mesh (direct_product_mesh.h)

Unlike the Direct_Product_Mesh class that supports queries only per axis, this class supports some aggregate queries (e.g. number of cells in the mesh, cell bounds as D-dimensional points).

This class is meant to be used with Search and Intersect classes operating on direct product meshes and not classes that assume an unstructured mesh (e.g. SearchKDTree or IntersectR2D etc.).

Constructor & Destructor Documentation

◆ Direct_Product_Mesh_Wrapper() [1/3]

template<int D, class CoordSys = DefaultCoordSys>
Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::Direct_Product_Mesh_Wrapper ( )
delete

Default constructor (disabled)

◆ Direct_Product_Mesh_Wrapper() [2/3]

template<int D, class CoordSys >
Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::Direct_Product_Mesh_Wrapper ( Direct_Product_Mesh< D, CoordSys > const &  mesh)
explicit

Constructor for the mesh wrapper.

Parameters
[in]meshThe Direct_Product_Mesh we wish to wrap.

◆ Direct_Product_Mesh_Wrapper() [3/3]

template<int D, class CoordSys = DefaultCoordSys>
Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::Direct_Product_Mesh_Wrapper ( Direct_Product_Mesh_Wrapper< D, CoordSys > const &  )
delete

Copy constructor (disabled).

◆ ~Direct_Product_Mesh_Wrapper()

template<int D, class CoordSys >
Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::~Direct_Product_Mesh_Wrapper ( )

Destructor.

Member Function Documentation

◆ axis_point_begin()

template<int D, class CoordSys >
counting_iterator Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::axis_point_begin ( const int  dim) const

Get iterator for axis point (beginning of array).

◆ axis_point_end()

template<int D, class CoordSys >
counting_iterator Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::axis_point_end ( const int  dim) const

Get iterator for axis point (end of array).

◆ begin()

template<int D, class CoordSys >
counting_iterator Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::begin ( Entity_kind const  entity,
Entity_type const  etype = ALL 
) const

Iterators on mesh entity - begin.

◆ cell_centroid()

template<int D, class CoordSys >
void Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::cell_centroid ( const int  id,
Point< D > *  ccen 
) const

Get cell centroid.

◆ cell_get_bounds()

template<int D, class CoordSys >
void Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::cell_get_bounds ( const int  id,
Point< D > *  plo,
Point< D > *  phi 
) const

Get lower and upper corners of cell bounding box.

◆ cell_get_coordinates()

template<int D, class CoordSys >
void Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::cell_get_coordinates ( const int  id,
std::vector< Point< D >> *  ccoords 
) const

Get coordinates of cell points.

◆ cell_get_node_adj_cells()

template<int D, class CoordSys >
void Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::cell_get_node_adj_cells ( const int  cellid,
const Entity_type  ptype,
std::vector< int > *  adjcells 
) const

Get the list of cell IDs for all cells attached to a specific cell through its faces.

Parameters
[in]cellidThe ID of the cell.
[in]ptypeThe Entity_type (e.g. PARALLEL_OWNED)
[out]adjcellsThe list of cell IDs for all cells attached to cell cellid through its faces, excluding cellid. The order of cells is consistent with the order of respective interfaces returned by cell_get_faces_and_dirs, but all the boundary faces are skipped.

◆ cell_get_type()

template<int D, class CoordSys >
Entity_type Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::cell_get_type ( const int  id) const

Cell type (PARALLEL_OWNED, PARALLEL_GHOST or BOUNDARY_GHOST)

◆ cell_volume()

template<int D, class CoordSys >
double Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::cell_volume ( const int  id) const

Get cell volume.

◆ cellid_to_indices()

template<int D, class CoordSys >
std::array< int, D > Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::cellid_to_indices ( const int  id) const

Convert from ID to indices of lo corner of cell.

◆ distributed()

template<int D, class CoordSys >
bool Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::distributed ( ) const

Is mesh distributed?

◆ end()

template<int D, class CoordSys >
counting_iterator Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::end ( Entity_kind const  entity,
Entity_type const  etype = ALL 
) const

Iterator on mesh entity - end.

◆ get_axis_point()

template<int D, class CoordSys >
double Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::get_axis_point ( const int  dim,
const int  pointid 
) const

Get axis point value.

◆ get_global_bounds()

template<int D, class CoordSys >
void Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::get_global_bounds ( Point< D > *  plo,
Point< D > *  phi 
) const

Get global mesh bounds.

Because a Direct_Product_Mesh is required to be an axis-aligned box, the global mesh bounds are specified as a Point at the lower corner and a Point at the upper corner (lower and upper along all axes).

The points must have the same size as the mesh dimensionality.

◆ get_node_coordinates()

template<int D, class CoordSys >
Point< D > Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::get_node_coordinates ( const int  pointid) const

Get coordinates of node.

◆ indices_to_cellid()

template<int D, class CoordSys >
int Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::indices_to_cellid ( const std::array< int, D > &  indices) const

Convert from indices of lo corner of cell to cell ID.

◆ indices_to_nodeid()

template<int D, class CoordSys >
int Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::indices_to_nodeid ( const std::array< int, D > &  indices) const

Convert from indices of node to node ID.

◆ mesh()

template<int D, class CoordSys >
Direct_Product_Mesh< D, CoordSys > const & Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::mesh ( ) const

◆ node_get_cell_adj_nodes()

template<int D, class CoordSys >
void Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::node_get_cell_adj_nodes ( const int  nodeid,
const Entity_type  ptype,
std::vector< int > *  adjnodes 
) const

Get the list of node IDs for all nodes attached to all cells attached to a specific node.

Parameters
[in]nodeidThe ID of the node.
[in]ptypeThe Entity_type (e.g. PARALLEL_OWNED)
[out]adjnodesThe list of node IDs for all cells attached to nodeid, excluding nodeid.

◆ node_get_type()

template<int D, class CoordSys >
Entity_type Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::node_get_type ( const int  id) const

Node type (PARALLEL_OWNED, PARALLEL_GHOST or BOUNDARY_GHOST)

◆ nodeid_to_indices()

template<int D, class CoordSys >
std::array< int, D > Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::nodeid_to_indices ( const int  id) const

Convert from node ID to indices of node.

◆ num_axis_cells()

template<int D, class CoordSys >
int Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::num_axis_cells ( const int  dim,
const Entity_type  ptype = ALL 
) const

Get number of cells along axis.

◆ num_axis_points()

template<int D, class CoordSys >
int Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::num_axis_points ( const int  dim,
const Entity_type  ptype = ALL 
) const

Get number of points along axis.

◆ num_ghost_cells()

template<int D, class CoordSys >
int Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::num_ghost_cells ( ) const

Get number of ghost cells on this processing element.

◆ num_ghost_layers()

template<int D, class CoordSys >
int Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::num_ghost_layers ( ) const

Number of ghost layers in each direction at each end.

◆ num_ghost_nodes()

template<int D, class CoordSys >
int Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::num_ghost_nodes ( ) const

Get number of ghost nodes on this processing element.

◆ num_owned_cells()

template<int D, class CoordSys >
int Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::num_owned_cells ( ) const

Get number of cells owned by this processing element.

◆ num_owned_nodes()

template<int D, class CoordSys >
int Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::num_owned_nodes ( ) const

Get number of nodes owned by this processing element.

◆ on_exterior_boundary()

template<int D, class CoordSys >
bool Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::on_exterior_boundary ( const Entity_kind  entity,
const int  id 
) const

If entity is on exterior (global not partition) boundary.

◆ operator=()

template<int D, class CoordSys = DefaultCoordSys>
Direct_Product_Mesh_Wrapper& Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::operator= ( Direct_Product_Mesh_Wrapper< D, CoordSys > const &  )
delete

Assignment operator (disabled).

◆ space_dimension()

template<int D, class CoordSys >
int Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::space_dimension ( ) const

Get dimensionality of the mesh.


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