Wonton::AuxMeshTopology< BasicMesh > Class Template Reference

#include <AuxMeshTopology.h>

Public Member Functions

 AuxMeshTopology (bool request_sides=true, bool request_wedges=true, bool request_corners=true)
 Constructor indicating which entities are wanted. More...
 
int num_owned_sides () const
 Number of owned sides in the mesh. More...
 
int num_owned_wedges () const
 Number of owned wedges in the mesh. More...
 
int num_owned_corners () const
 Number of owned corners in the mesh. More...
 
int num_ghost_sides () const
 Number of ghost sides in the mesh. More...
 
int num_ghost_wedges () const
 Number of ghost wedges in the mesh. More...
 
int num_ghost_corners () const
 Number of ghost corners in the mesh. More...
 
int num_entities (Entity_kind const entity, Entity_type const etype=Entity_type::ALL) const
 Number of items of given entity. More...
 
counting_iterator begin (Entity_kind const entity, Entity_type const etype=Entity_type::ALL) const
 Iterators on mesh entity - begin. More...
 
counting_iterator end (Entity_kind const entity, Entity_type const etype=Entity_type::ALL) const
 Iterator on mesh entity - end. More...
 
void cell_get_node_adj_cells (int const cellid, Entity_type const ptype, std::vector< int > *adjcells) const
 Get the list of cell IDs for all cells attached to a specific cell through its nodes. More...
 
void face_get_cells (int const faceid, Entity_type const etype, std::vector< int > *cells) const
 Get cells of given Entity_type connected to face (in no particular order) More...
 
int cell_get_face_adj_cell (int cell, int face) const
 Retrieve the cell incident to a given face of a given cell. More...
 
void cell_get_face_adj_cells (int const cellid, Entity_type const 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 (int const nodeid, Entity_type const 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...
 
bool on_exterior_boundary (Entity_kind const entity, int const entity_id) const
 if entity is on exterior boundary More...
 
template<int D>
void cell_get_coordinates (int const cellid, std::vector< Point< D >> *pplist) const
 Coordinates of nodes of cell. More...
 
template<int D>
void cell_centroid (int const cellid, Point< D > *ccen) const
 Centroid of a cell. More...
 
double cell_volume (int const cellid) const
 Volume of a cell. More...
 
template<int D>
void face_centroid (int const faceid, Point< D > *fcen) const
 Centroid of a face. More...
 
int side_get_node (int const sideid, int const inode) const
 
int side_get_cell (int const sideid) const
 Cell of side. More...
 
int side_get_face (int const sideid) const
 Face of side. More...
 
int side_get_wedge (int const sideid, int iwedge) const
 
int side_get_opposite_side (int const sideid) const
 
void cell_get_sides (int const cellid, std::vector< int > *csides) const
 Get all the sides of a cell. More...
 
void side_get_coordinates (int const sideid, std::array< Point< 3 >, 4 > *scoords, bool posvol_order=false) const
 side coordinates in 3D More...
 
void side_get_coordinates (int const sideid, std::array< Point< 2 >, 3 > *scoords, bool posvol_order=false) const
 side coordinates in 2D More...
 
void side_get_coordinates (int const sideid, std::array< Point< 1 >, 2 > *scoords, bool posvol_order=false) const
 side coordinates in 1D More...
 
double side_volume (int const sideid) const
 Volume of a side. More...
 
int wedge_get_side (int const wedgeid) const
 Side of wedge. More...
 
int wedge_get_cell (int const wedgeid) const
 Cell of wedge. More...
 
int wedge_get_face (int const wedgeid) const
 Face of wedge. More...
 
int wedge_get_corner (int const wedgeid) const
 Corner of a wedge. More...
 
int wedge_get_node (int const wedgeid) const
 node of a wedge More...
 
int wedge_get_opposite_wedge (const int wedgeid) const
 
int wedge_get_adjacent_wedge (const int wedgeid) const
 
double wedge_volume (int const wedgeid) const
 Volume of a wedge - half its side volume. More...
 
void wedge_get_coordinates (int const wedgeid, std::array< Point< 3 >, 4 > *wcoords, bool posvol_order=false) const
 Wedge coordinates in 3D. More...
 
void wedge_get_coordinates (int const wedgeid, std::array< Point< 2 >, 3 > *wcoords, bool posvol_order=false) const
 Wedge coordinates in 2D. More...
 
void wedge_get_coordinates (int const wedgeid, std::array< Point< 1 >, 2 > *wcoords, bool posvol_order=false) const
 Wedge coordinates in 1D. More...
 
void cell_get_wedges (int const cellid, std::vector< int > *wedgeids) const
 Get all the wedges in a cell. More...
 
void node_get_wedges (int const nodeid, Entity_type const type, std::vector< int > *wedgeids) const
 Get wedges at a node. More...
 
int corner_get_node (const int cornerid) const
 Get node of corner. More...
 
int corner_get_cell (int const cornerid) const
 Get cell of corner. More...
 
void corner_get_wedges (int const cornerid, std::vector< int > *wedgeids) const
 Get wedges of a corner. More...
 
void node_get_corners (int const nodeid, Entity_type const type, std::vector< int > *cornerids) const
 Get corners connected to a node. More...
 
void cell_get_corners (int const cellid, std::vector< int > *cornerids) const
 Get corners in a cell. More...
 
int cell_get_corner_at_node (int const cellid, int const nodeid) const
 Get a cell's corner at a particular node of the cell. More...
 
double corner_volume (int const cornerid) const
 Volume of a corner. More...
 
void cell_get_facetization (int const cellid, std::vector< std::vector< int >> *facetpoints, std::vector< Point< 3 >> *points) const
 Get a triangular facetization of polyhedral cell boundary. More...
 
void dual_cell_get_facetization (int const nodeid, std::vector< std::vector< int >> *facetpoints, std::vector< Point< 3 >> *points) const
 
void decompose_cell_into_tets (int cellid, std::vector< std::array< Wonton::Point< 3 >, 4 >> *tcoords, const bool planar_hex) const
 Get the simplest possible decomposition of a 3D cell into tets. More...
 
void dual_cell_get_coordinates (int const nodeid, std::vector< Point< 2 >> *pplist) const
 2D version of coords of nodes of a dual cell More...
 
void order_wedges_ccw (std::vector< int > *wedgeids) const
 Order wedges around a node in ccw manner. More...
 
bool ccw (Point< 2 > const &p1, Point< 2 > const &p2, Point< 2 > const &p3) const
 
std::vector< Point< 2 > > cellToXY (int cellID) const
 
void wedges_get_coordinates (int cellID, std::vector< std::array< Point< 3 >, 4 >> *wcoords) const
 Get coordinates of wedge in 3D. More...
 
void sides_get_coordinates (int cellID, std::vector< std::array< Point< 3 >, 4 >> *scoords) const
 Get coordinates of side in 3D. More...
 
void dual_cell_get_node_adj_cells (int const nodeid, Entity_type const ptype, std::vector< int > *adjnodes) const
 Get adjacent "dual cells" of a given "dual cell". More...
 
void dual_cell_get_coordinates (int const nodeid, std::vector< Point< 3 >> *pplist) const
 3D version of coords of nodes of a dual cell More...
 
void dual_wedges_get_coordinates (int nodeid, std::vector< std::array< Point< 3 >, 4 >> *wcoords) const
 
template<int D>
void dual_cell_centroid (int nodeid, Point< D > *centroid) const
 Centroid of a dual cell. More...
 
double dual_cell_volume (int const nodeid) const
 Get the volume of dual cell by finding the corners that attach to the node. More...
 

Protected Member Functions

void build_aux_entities ()
 

Friends

void build_sides_1D (AuxMeshTopology< BasicMesh > &mesh)
 
void build_sides_2D (AuxMeshTopology< BasicMesh > &mesh)
 
void build_sides_3D (AuxMeshTopology< BasicMesh > &mesh)
 

Detailed Description

template<typename BasicMesh>
class Wonton::AuxMeshTopology< BasicMesh >

2D: A side is a triangle formed by the two nodes of an edge/face and the cell center. A wedge is half of a side formed by one node of the edge, the edge center and the cell center. A corner is a quadrilateral formed by the two wedges in a cell at a node

3D: A side is a tet formed by the two nodes of an edge, a face center and a cell center. A wedge is half a side, formed by a node of the edge, the edge center, the face center and the cell center. A corner is formed by all the wedges of a cell at a node.

The basic mesh class must support cells, faces and nodes and adjacency queries between these entities (In 2D, faces are the same as edges and in 1D, faces are the same as nodes). In particular, the basic mesh class is expected to support the following methods to successfully instantiate this class:

int space_dimension() const; // dimensionality of mesh points (1, 2, 3)
int num_owned_cells() const;
int num_ghost_cells() const;
int num_owned_faces() const;
int num_ghost_faces() const;
int num_owned_nodes() const;
int num_ghost_nodes() const;
Wonton::Entity_type cell_get_type(int const cellid) const;
Wonton::Entity_type node_get_type(int const nodeid) const;

NOTE: Entity_type is Wonton::OWNED or Wonton::GHOST

Wonton::Element_type cell_get_element_type(int const cellid) const;

Can be Wonton::UNKNOWN_TOPOLOGY, Wonton::TRI, Wonton::QUAD, Wonton::POLYGON, Wonton::TET, Wonton::PRISM, Wonton::PYRAMID, Wonton::HEX, Wonton::POLYHEDRON

void cell_get_faces_and_dirs(int const cellid, std::vector<int> *cfaces,
std::vector<int> *cfdirs) const;

NOTE: The 'cfdirs' conveys the directions in which the faces are used by the cell. If the natural normal of the face points out of the cell, its direction should be returned as 1, if not, it should be returned as -1

void cell_get_nodes(int const cellid, std::vector<int> *cnodes) const;
void face_get_nodes(int const faceid, std::vector<int> *fnodes) const;
void face_get_cells(int const faceid, Wonton::Entity_type etype,
std::vector<int> *fcells) const;
void node_get_cells(int const nodeid, Wonton::Entity_type etype,
std::vector<int> *ncells) const;
template<int D>
void node_get_coordinates(int const nodeid, Wonton::Point<D> *pp) const;
GID_t get_global_id(int const id, Entity_kind const kind) const;
(where GID_t == int64_t)

******************************** NOTE ***********************************

THIS IS AN INCOMPLETE CLASS DESIGNED TO BE USED IN A 'CRTP' (CURIOUSLY RECURRING TEMPLATE PATTERN) DESIGN ALONG WITH THE BASICMESH CLASS TO PROVIDE A COMPLETE MESH CLASS (See https://en.m.wikipedia.org/wiki/Curiously_recurring_template_pattern)

So, If one is writing a mesh wrapper class called MY_MESH_WRAPPER, it is declared like so

class MY_MESH_WRAPPER : public AuxMeshTopology<MY_MESH_WRAPPER>
{......}

and it will automatically have the methods of the AuxMeshTopology class.

If MY_MESH_WRAPPER has equivalent classes for the ones in AuxMeshTopology (possibly because they are more efficient), then the ones from AuxMeshTopology are overridden

NOTE THAT THIS CLASS IS NOT DESIGNED TO EVER BE INSTANTIATED DIRECTLY


Constructor & Destructor Documentation

◆ AuxMeshTopology()

template<typename BasicMesh>
Wonton::AuxMeshTopology< BasicMesh >::AuxMeshTopology ( bool  request_sides = true,
bool  request_wedges = true,
bool  request_corners = true 
)
inline

Constructor indicating which entities are wanted.

It is possible to request none of the auxiliary entities so that one can instantiate a version of a derived class with the auxiliary entities or without (to save memory)

Member Function Documentation

◆ begin()

template<typename BasicMesh>
counting_iterator Wonton::AuxMeshTopology< BasicMesh >::begin ( Entity_kind const  entity,
Entity_type const  etype = Entity_type::ALL 
) const
inline

Iterators on mesh entity - begin.

◆ build_aux_entities()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::build_aux_entities ( )
inlineprotected

◆ ccw()

template<typename BasicMesh>
bool Wonton::AuxMeshTopology< BasicMesh >::ccw ( Point< 2 > const &  p1,
Point< 2 > const &  p2,
Point< 2 > const &  p3 
) const
inline

Returns true if the three 2D points (p1, p2, p3) are a counter-clockwise turn, otherwise returns false (corresponding to clockwise or collinear)

◆ cell_centroid()

template<typename BasicMesh>
template<int D>
void Wonton::AuxMeshTopology< BasicMesh >::cell_centroid ( int const  cellid,
Point< D > *  ccen 
) const
inline

Centroid of a cell.

◆ cell_get_coordinates()

template<typename BasicMesh >
template<int D>
void Wonton::AuxMeshTopology< BasicMesh >::cell_get_coordinates ( int const  cellid,
std::vector< Point< D >> *  pplist 
) const

Coordinates of nodes of cell.

coords of nodes of a cell

◆ cell_get_corner_at_node()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::cell_get_corner_at_node ( int const  cellid,
int const  nodeid 
) const
inline

Get a cell's corner at a particular node of the cell.

◆ cell_get_corners()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::cell_get_corners ( int const  cellid,
std::vector< int > *  cornerids 
) const
inline

Get corners in a cell.

◆ cell_get_face_adj_cell()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::cell_get_face_adj_cell ( int  cell,
int  face 
) const
inline

Retrieve the cell incident to a given face of a given cell.

Parameters
cellthe current cell.
facethe current face of the given cell.
Returns
the index of the incident cell to the given face or -1.

◆ cell_get_face_adj_cells()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::cell_get_face_adj_cells ( int const  cellid,
Entity_type const  ptype,
std::vector< int > *  adjcells 
) const
inline

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_facetization()

template<typename BasicMesh >
void Wonton::AuxMeshTopology< BasicMesh >::cell_get_facetization ( int const  cellid,
std::vector< std::vector< int >> *  facetpoints,
std::vector< Point< 3 >> *  points 
) const

Get a triangular facetization of polyhedral cell boundary.

Get a faceted (all planar faces) representation of a general 3D polyhedralcell

◆ cell_get_node_adj_cells()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::cell_get_node_adj_cells ( int const  cellid,
Entity_type const  ptype,
std::vector< int > *  adjcells 
) const
inline

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

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 nodes, excluding cellid.

◆ cell_get_sides()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::cell_get_sides ( int const  cellid,
std::vector< int > *  csides 
) const
inline

Get all the sides of a cell.

◆ cell_get_wedges()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::cell_get_wedges ( int const  cellid,
std::vector< int > *  wedgeids 
) const
inline

Get all the wedges in a cell.

◆ cell_volume()

template<typename BasicMesh>
double Wonton::AuxMeshTopology< BasicMesh >::cell_volume ( int const  cellid) const
inline

Volume of a cell.

◆ cellToXY()

template<typename BasicMesh>
std::vector<Point<2> > Wonton::AuxMeshTopology< BasicMesh >::cellToXY ( int  cellID) const
inline

◆ corner_get_cell()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::corner_get_cell ( int const  cornerid) const
inline

Get cell of corner.

◆ corner_get_node()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::corner_get_node ( const int  cornerid) const
inline

Get node of corner.

◆ corner_get_wedges()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::corner_get_wedges ( int const  cornerid,
std::vector< int > *  wedgeids 
) const
inline

Get wedges of a corner.

◆ corner_volume()

template<typename BasicMesh>
double Wonton::AuxMeshTopology< BasicMesh >::corner_volume ( int const  cornerid) const
inline

Volume of a corner.

◆ decompose_cell_into_tets()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::decompose_cell_into_tets ( int  cellid,
std::vector< std::array< Wonton::Point< 3 >, 4 >> *  tcoords,
const bool  planar_hex 
) const
inline

Get the simplest possible decomposition of a 3D cell into tets.

◆ dual_cell_centroid()

template<typename BasicMesh>
template<int D>
void Wonton::AuxMeshTopology< BasicMesh >::dual_cell_centroid ( int  nodeid,
Point< D > *  centroid 
) const
inline

Centroid of a dual cell.

◆ dual_cell_get_coordinates() [1/2]

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::dual_cell_get_coordinates ( int const  nodeid,
std::vector< Point< 2 >> *  pplist 
) const
inline

2D version of coords of nodes of a dual cell

◆ dual_cell_get_coordinates() [2/2]

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::dual_cell_get_coordinates ( int const  nodeid,
std::vector< Point< 3 >> *  pplist 
) const
inline

3D version of coords of nodes of a dual cell

◆ dual_cell_get_facetization()

template<typename BasicMesh >
void Wonton::AuxMeshTopology< BasicMesh >::dual_cell_get_facetization ( int const  nodeid,
std::vector< std::vector< int >> *  facetpoints,
std::vector< Point< 3 >> *  points 
) const

Get a triangular facetization of boundary of dual cell (or in other words, control volume) corresponding to a node

◆ dual_cell_get_node_adj_cells()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::dual_cell_get_node_adj_cells ( int const  nodeid,
Entity_type const  ptype,
std::vector< int > *  adjnodes 
) const
inline

Get adjacent "dual cells" of a given "dual cell".

◆ dual_cell_volume()

template<typename BasicMesh>
double Wonton::AuxMeshTopology< BasicMesh >::dual_cell_volume ( int const  nodeid) const
inline

Get the volume of dual cell by finding the corners that attach to the node.

◆ dual_wedges_get_coordinates()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::dual_wedges_get_coordinates ( int  nodeid,
std::vector< std::array< Point< 3 >, 4 >> *  wcoords 
) const
inline

◆ end()

template<typename BasicMesh>
counting_iterator Wonton::AuxMeshTopology< BasicMesh >::end ( Entity_kind const  entity,
Entity_type const  etype = Entity_type::ALL 
) const
inline

Iterator on mesh entity - end.

◆ face_centroid()

template<typename BasicMesh>
template<int D>
void Wonton::AuxMeshTopology< BasicMesh >::face_centroid ( int const  faceid,
Point< D > *  fcen 
) const
inline

Centroid of a face.

◆ face_get_cells()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::face_get_cells ( int const  faceid,
Entity_type const  etype,
std::vector< int > *  cells 
) const
inline

Get cells of given Entity_type connected to face (in no particular order)

◆ node_get_cell_adj_nodes()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::node_get_cell_adj_nodes ( int const  nodeid,
Entity_type const  ptype,
std::vector< int > *  adjnodes 
) const
inline

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_corners()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::node_get_corners ( int const  nodeid,
Entity_type const  type,
std::vector< int > *  cornerids 
) const
inline

Get corners connected to a node.

◆ node_get_wedges()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::node_get_wedges ( int const  nodeid,
Entity_type const  type,
std::vector< int > *  wedgeids 
) const
inline

Get wedges at a node.

◆ num_entities()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::num_entities ( Entity_kind const  entity,
Entity_type const  etype = Entity_type::ALL 
) const
inline

Number of items of given entity.

◆ num_ghost_corners()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::num_ghost_corners ( ) const
inline

Number of ghost corners in the mesh.

◆ num_ghost_sides()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::num_ghost_sides ( ) const
inline

Number of ghost sides in the mesh.

◆ num_ghost_wedges()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::num_ghost_wedges ( ) const
inline

Number of ghost wedges in the mesh.

◆ num_owned_corners()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::num_owned_corners ( ) const
inline

Number of owned corners in the mesh.

◆ num_owned_sides()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::num_owned_sides ( ) const
inline

Number of owned sides in the mesh.

◆ num_owned_wedges()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::num_owned_wedges ( ) const
inline

Number of owned wedges in the mesh.

◆ on_exterior_boundary()

template<typename BasicMesh>
bool Wonton::AuxMeshTopology< BasicMesh >::on_exterior_boundary ( Entity_kind const  entity,
int const  entity_id 
) const
inline

if entity is on exterior boundary

◆ order_wedges_ccw()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::order_wedges_ccw ( std::vector< int > *  wedgeids) const
inline

Order wedges around a node in ccw manner.

◆ side_get_cell()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::side_get_cell ( int const  sideid) const
inline

Cell of side.

◆ side_get_coordinates() [1/3]

template<typename BasicMesh >
void Wonton::AuxMeshTopology< BasicMesh >::side_get_coordinates ( int const  sideid,
std::array< Point< 3 >, 4 > *  scoords,
bool  posvol_order = false 
) const

side coordinates in 3D

Get coordinates of side in 3D

If posvol_order = true, then the coordinates will be returned in an order that will result in a positive volume (in 3D this assumes that the computation for volume is done as (V01 x V02).V03 where V0k is a vector from coordinate 0 to coordinate k of the tet). If posvol_order is false, the coordinates will be returned in a fixed order - in 3D, this is node point 0, node point 1, face center, cell center. By default the coordinates are returned in the natural order (posvol_order = false)

◆ side_get_coordinates() [2/3]

template<typename BasicMesh >
void Wonton::AuxMeshTopology< BasicMesh >::side_get_coordinates ( int const  sideid,
std::array< Point< 2 >, 3 > *  scoords,
bool  posvol_order = false 
) const

side coordinates in 2D

Get coordinates of side in 2D

If posvol_order = true, then the coordinates will be returned in an order that will result in a positive area (in 2D this assumes that the computation for area is done as (V01 x V02).V03 where V0k is a vector from coordinate 0 to coordinate k of the tri). If posvol_order is false, the coordinates will be returned in a fixed order - in 2D, this is node point 0, node point 1, cell center. By default the coordinates are returned in the natural order (posvol_order = false)

◆ side_get_coordinates() [3/3]

template<typename BasicMesh >
void Wonton::AuxMeshTopology< BasicMesh >::side_get_coordinates ( int const  sideid,
std::array< Point< 1 >, 2 > *  scoords,
bool  posvol_order = false 
) const

side coordinates in 1D

Get coordinates of side in 1D

If posvol_order = true, then the coordinates will be returned in an order that will result in a positive length. If posvol_order is false, the coordinates will be returned in a fixed order - in 1D, this is node point and cell center. By default the coordinates are returned in the natural order (posvol_order = false)

◆ side_get_face()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::side_get_face ( int const  sideid) const
inline

Face of side.

◆ side_get_node()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::side_get_node ( int const  sideid,
int const  inode 
) const
inline

Node of a side

Each side is tied to two mesh nodes in 2D and 3D and inode = 0 or 1 indicates which one to return. In 1D, the same node is returned whether inode = 0 or 1. In 2D and 3D, the node ordering is such that node 0, node 1 and the cell centroid form a positive area triangle and in 3D, node 0, node 1, the face centroid and cell centroid form a positive volume tet.

◆ side_get_opposite_side()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::side_get_opposite_side ( int const  sideid) const
inline

Opposite side in neighboring cell of a side.

The two sides share facet 0 of wedge comprised of nodes 0,1 of the common edge and center point of the common face in 3D, and nodes 0,1 of the common edge in 2D. At boundaries, this routine returns -1

◆ side_get_wedge()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::side_get_wedge ( int const  sideid,
int  iwedge 
) const
inline

Wedge of side

Each side points to two wedges - iwedge (0, 1) indicates which one to return; the wedge returned will be consistent with the node returned by side_get_node. So, side_get_node(s,i) = wedge_get_node(side_get_wedge(s,i))

◆ side_volume()

template<typename BasicMesh>
double Wonton::AuxMeshTopology< BasicMesh >::side_volume ( int const  sideid) const
inline

Volume of a side.

◆ sides_get_coordinates()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::sides_get_coordinates ( int  cellID,
std::vector< std::array< Point< 3 >, 4 >> *  scoords 
) const
inline

Get coordinates of side in 3D.

◆ wedge_get_adjacent_wedge()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::wedge_get_adjacent_wedge ( const int  wedgeid) const
inline

adjacent wedge along edge in the same cell.

The two wedges share facet 1 of wedge comprised of edge center, face center and zone center in 3D, and node and zone center in 2D

◆ wedge_get_cell()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::wedge_get_cell ( int const  wedgeid) const
inline

Cell of wedge.

◆ wedge_get_coordinates() [1/3]

template<typename BasicMesh >
void Wonton::AuxMeshTopology< BasicMesh >::wedge_get_coordinates ( int const  wedgeid,
std::array< Point< 3 >, 4 > *  wcoords,
bool  posvol_order = false 
) const

Wedge coordinates in 3D.

Get coordinates of wedge in 3D

If posvol_order = true, then the coordinates will be returned in an order that will result in a positive volume (in 3D this assumes that the computation for volume is done as (V01 x V02).V03 where V0k is a vector from coordinate 0 to coordinate k of the tet). If posvol_order is false, the coordinates will be returned in a fixed order - in 3D, this is node point, edge center, face center, cell center. By default the coordinates are returned in the natural order (posvol_order = false)

◆ wedge_get_coordinates() [2/3]

template<typename BasicMesh >
void Wonton::AuxMeshTopology< BasicMesh >::wedge_get_coordinates ( int const  wedgeid,
std::array< Point< 2 >, 3 > *  wcoords,
bool  posvol_order = false 
) const

Wedge coordinates in 2D.

Get coordinates of wedge in 2D

If posvol_order = true, then the coordinates will be returned in an order that will result in a positive area (in 2D this assumes that the computation for area is done as (V01 x V02).V03 where V0k is a vector from coordinate 0 to coordinate k of the tri). If posvol_order is false, the coordinates will be returned in a fixed order - in 2D, this is node point, face center, cell center. By default the coordinates are returned in the natural order (posvol_order = false)

◆ wedge_get_coordinates() [3/3]

template<typename BasicMesh >
void Wonton::AuxMeshTopology< BasicMesh >::wedge_get_coordinates ( int const  wedgeid,
std::array< Point< 1 >, 2 > *  wcoords,
bool  posvol_order = false 
) const

Wedge coordinates in 1D.

Get coordinates of wedge in 1D

If posvol_order = true, then the coordinates will be returned in an order that will result in a positive length. If posvol_order is false, the coordinates will be returned in a fixed order - in 1D, this is node point and cell center. By default the coordinates are returned in the natural order (posvol_order = false)

◆ wedge_get_corner()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::wedge_get_corner ( int const  wedgeid) const
inline

Corner of a wedge.

◆ wedge_get_face()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::wedge_get_face ( int const  wedgeid) const
inline

Face of wedge.

◆ wedge_get_node()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::wedge_get_node ( int const  wedgeid) const
inline

node of a wedge

◆ wedge_get_opposite_wedge()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::wedge_get_opposite_wedge ( const int  wedgeid) const
inline

Opposite wedge in neighboring cell of a wedge.

The two wedges share facet 0 of wedge comprised of the node, center point of the common edge and center point of the common face in 3D, and node and edge center in 2D. At boundaries, this routine returns -1

◆ wedge_get_side()

template<typename BasicMesh>
int Wonton::AuxMeshTopology< BasicMesh >::wedge_get_side ( int const  wedgeid) const
inline

Side of wedge.

◆ wedge_volume()

template<typename BasicMesh>
double Wonton::AuxMeshTopology< BasicMesh >::wedge_volume ( int const  wedgeid) const
inline

Volume of a wedge - half its side volume.

◆ wedges_get_coordinates()

template<typename BasicMesh>
void Wonton::AuxMeshTopology< BasicMesh >::wedges_get_coordinates ( int  cellID,
std::vector< std::array< Point< 3 >, 4 >> *  wcoords 
) const
inline

Get coordinates of wedge in 3D.

Friends And Related Function Documentation

◆ build_sides_1D

template<typename BasicMesh>
void build_sides_1D ( AuxMeshTopology< BasicMesh > &  mesh)
friend

◆ build_sides_2D

template<typename BasicMesh>
void build_sides_2D ( AuxMeshTopology< BasicMesh > &  mesh)
friend

◆ build_sides_3D

template<typename BasicMesh>
void build_sides_3D ( AuxMeshTopology< BasicMesh > &  mesh)
friend

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