AMR::node_connectivity_t class

This class stores the connectivity of the node. Simply what this means is that it just a mapping of node ids to a unique index. The value of the map is the index, and the key is the two nodes the new node joins.

Public static functions

static auto face_list_opposite(face_list_t face_list, size_t opposite_index) -> size_t
function to calculate which node is opposite a tet face

Constructors, destructors, conversion operators

node_connectivity_t(size_t initial_size) explicit
Method to add initial nodes to the store.

Public functions

auto data() -> node_list_t&
auto size() -> size_t
Return size of node container – the number of nodes.
auto get(size_t id) -> node_pair_t
Getter into node storage VALUE
auto add(size_t A, size_t B) -> node_list_value_t
Add connectivity, unless it already exists.
void print()
Print connectivity a id: a-b.

Function documentation

static size_t AMR::node_connectivity_t::face_list_opposite(face_list_t face_list, size_t opposite_index)

function to calculate which node is opposite a tet face

Parameters
face_list A list of faces on the tet
opposite_index The index for the face you want to know the opposite node for
Returns An index (0-3) to tell you if A, B, C, or D (respectively) is opposite the given face_list_t

This function is tightly coupled (too coupled) to generate_face_lists

generate_face_lists generates the faces {ABC, ABD, ACD, BCD} in a fixed order. Opposite_index says the face from a face list we care about. This function returns a number in the range {0,3} to tell you which node is missing from that face.

I.e If opposite_index is 1, Node C is missing => 2.

AMR::node_connectivity_t::node_connectivity_t(size_t initial_size) explicit

Method to add initial nodes to the store.

Parameters
initial_size Size of the list to fill to

node_list_t& AMR::node_connectivity_t::data()

Returns All node pairs

Non-const-ref accessor to state

size_t AMR::node_connectivity_t::size()

Return size of node container – the number of nodes.

Returns Number of nodes

node_pair_t AMR::node_connectivity_t::get(size_t id)

Getter into node storage VALUE

Parameters
id VALUE of the node to get
Returns The node_pair at the given id

node_list_value_t AMR::node_connectivity_t::add(size_t A, size_t B)

Add connectivity, unless it already exists.

Parameters
A First node
B Second node
Returns Id/unique identifier of the node