AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Represents a collection of neighbor relations between vertices. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.7.0/src/axom/primal/geometry/Polyhedron.hpp>
Public Types | |
using | VertexNbrs = axom::StackArray< axom::int8, MAX_NBRS_PER_VERT > |
Public Member Functions | |
AXOM_HOST_DEVICE | NeighborCollection () |
Constructs an empty NeighborCollection. More... | |
AXOM_HOST_DEVICE void | clear () |
Clears the set of neighbors. More... | |
AXOM_HOST_DEVICE int | getNumNeighbors (int vtx) const |
Returns the number of neighbors of a given vertex. More... | |
AXOM_HOST_DEVICE const VertexNbrs & | operator[] (int vtx) const |
Gets the array of neighbors for a given vertex index vtx. More... | |
AXOM_HOST_DEVICE VertexNbrs & | operator[] (int vtx) |
Gets the array of neighbors for a given vertex index vtx. More... | |
AXOM_HOST_DEVICE const VertexNbrs & | getNeighbors (int vtx) const |
Gets the array of neighbors for a given vertex index vtx. More... | |
AXOM_HOST_DEVICE VertexNbrs & | getNeighbors (int vtx) |
Gets the array of neighbors for a given vertex index vtx. More... | |
AXOM_HOST_DEVICE void | addNeighbors (axom::int8 vtx, std::initializer_list< axom::int8 > nbrIds) |
Adds a set of neighbors to a given vertex. More... | |
AXOM_HOST_DEVICE void | addNeighbors (axom::int8 vtx, axom::int8 nbrId) |
Adds a single neighbor to a given vertex. More... | |
AXOM_HOST_DEVICE void | insertNeighborAtPos (axom::int8 vtx, axom::int8 nbr, axom::int8 pos) |
Inserts a new neighbor for a vertex at a given index in the neighbor list. More... | |
AXOM_HOST_DEVICE void | pruneNeighbors () |
Compacts all neighbor sets by removing neighbors with index -1. More... | |
Static Public Attributes | |
static constexpr int | MAX_VERTS = 32 |
static constexpr int | MAX_NBRS_PER_VERT = 8 |
Represents a collection of neighbor relations between vertices.
using axom::primal::NeighborCollection::VertexNbrs = axom::StackArray<axom::int8, MAX_NBRS_PER_VERT> |
|
inline |
Constructs an empty NeighborCollection.
|
inline |
Clears the set of neighbors.
References MAX_VERTS.
|
inline |
Returns the number of neighbors of a given vertex.
[in] | vtx | index of the vertex to check. |
References SLIC_ASSERT.
|
inline |
Gets the array of neighbors for a given vertex index vtx.
References getNeighbors(), and SLIC_ASSERT.
|
inline |
Gets the array of neighbors for a given vertex index vtx.
References getNeighbors(), and SLIC_ASSERT.
|
inline |
Gets the array of neighbors for a given vertex index vtx.
References SLIC_ASSERT.
|
inline |
Gets the array of neighbors for a given vertex index vtx.
References SLIC_ASSERT.
|
inline |
Adds a set of neighbors to a given vertex.
[in] | vtx | the index of the vertex to add new neighbors to |
[in] | nbr | a set of indices of neighboring vertices |
References MAX_NBRS_PER_VERT, and SLIC_ASSERT.
|
inline |
Adds a single neighbor to a given vertex.
[in] | vtx | the index of the vertex to add the new neighbor to |
[in] | nbr | an index of a neighboring vertex |
References SLIC_ASSERT.
|
inline |
Inserts a new neighbor for a vertex at a given index in the neighbor list.
[in] | vtx | the index of the vertex to add a new neighbor to |
[in] | nbr | the index of the neighboring vertex |
[in] | pos | the position in the neighbor list to insert into |
References MAX_NBRS_PER_VERT, and SLIC_ASSERT.
|
inline |
Compacts all neighbor sets by removing neighbors with index -1.
References MAX_VERTS.
|
static |
|
static |