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_Wrapper & | operator= (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]
|
delete |
Default constructor (disabled)
◆ Direct_Product_Mesh_Wrapper() [2/3]
|
explicit |
Constructor for the mesh wrapper.
- Parameters
-
[in] mesh The Direct_Product_Mesh we wish to wrap.
◆ Direct_Product_Mesh_Wrapper() [3/3]
|
delete |
Copy constructor (disabled).
◆ ~Direct_Product_Mesh_Wrapper()
Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::~Direct_Product_Mesh_Wrapper | ( | ) |
Destructor.
Member Function Documentation
◆ axis_point_begin()
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()
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()
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()
void Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::cell_centroid | ( | const int | id, |
Point< D > * | ccen | ||
) | const |
Get cell centroid.
◆ cell_get_bounds()
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()
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()
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] cellid The ID of the cell. [in] ptype The Entity_type (e.g. PARALLEL_OWNED) [out] adjcells The list of cell IDs for all cells attached to cell cellid
through its faces, excludingcellid
. 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()
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()
double Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::cell_volume | ( | const int | id | ) | const |
Get cell volume.
◆ cellid_to_indices()
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()
bool Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::distributed | ( | ) | const |
Is mesh distributed?
◆ end()
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()
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()
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()
Point< D > Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::get_node_coordinates | ( | const int | pointid | ) | const |
Get coordinates of node.
◆ indices_to_cellid()
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()
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()
Direct_Product_Mesh< D, CoordSys > const & Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::mesh | ( | ) | const |
◆ node_get_cell_adj_nodes()
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] nodeid The ID of the node. [in] ptype The Entity_type (e.g. PARALLEL_OWNED) [out] adjnodes The list of node IDs for all cells attached to nodeid
, excludingnodeid
.
◆ node_get_type()
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()
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()
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()
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()
int Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::num_ghost_cells | ( | ) | const |
Get number of ghost cells on this processing element.
◆ num_ghost_layers()
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()
int Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::num_ghost_nodes | ( | ) | const |
Get number of ghost nodes on this processing element.
◆ num_owned_cells()
int Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::num_owned_cells | ( | ) | const |
Get number of cells owned by this processing element.
◆ num_owned_nodes()
int Wonton::Direct_Product_Mesh_Wrapper< D, CoordSys >::num_owned_nodes | ( | ) | const |
Get number of nodes owned by this processing element.
◆ on_exterior_boundary()
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=()
|
delete |
Assignment operator (disabled).
◆ space_dimension()
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:
- /home/wonton/wonton/wonton/mesh/direct_product/direct_product_mesh_wrapper.h