#include <fem_adapt.h>
Public Member Functions | |
int | get_edge_index (int local_node1, int local_node2) |
Map a pair of element-local node numberings to an element-local edge numbering. | |
int | find_local_node_index (int e, int n) |
Find an element-local node numbering for a chunk-local node. | |
void | findAdjData (int n1, int n2, int *e1, int *e2, int *en1, int *en2, int *en3, int *n3, int *edge, int *nbr) |
void | findAdjData (int n1, int n2, int e2, int *en1, int *en2, int *en3, int *n4, int *edge, int *nbr) |
FEM_Adapt (FEM_Mesh *m) | |
Initialize FEM_Adapt with a chunk of the mesh. | |
FEM_Adapt (FEM_Mesh *m, int chunkId) | |
Initialize FEM_Adapt with a chunk of the mesh and the chunkId. | |
virtual int | edge_flip (int n1, int n2) |
Perform a Delaunay flip of edge (n1, n2). | |
virtual int | edge_flip_help (int e1, int e2, int n1, int n2, int e1_n1, int e1_n2, int e1_n3, int n3, int edge1, int e1nbr) |
Helper method to edge_flip. | |
virtual int | edge_bisect (int n1, int n2) |
Bisect edge (n1, n2) and the two adjacent elements. | |
virtual int | edge_bisect_help (int e1, int e2, int n1, int n2, int e1_n1, int e1_n2, int e1_n3, int n3, int edge1, int e1nbr) |
Helper method to edge_bisect. | |
void | localEdgeBisect (int n1, int n2, int e1, int e2, int e3, int e1n1, int e1n2, int e1n3, int e1nbr, int n3, int n5) |
virtual int | vertex_remove (int n1, int n2) |
Remove the degree 4 vertex n1 without modifying degree of adj n2. | |
virtual int | vertex_remove_help (int e1, int e2, int n1, int n2, int e1_n1, int e1_n2, int e1_n3, int n3, int edge1, int e1nbr) |
Helper method to vertex_remove. | |
virtual int | edge_contraction (int n1, int n2) |
Contract edge (n1, n2) and the two adjacent elements. | |
virtual int | edge_contraction (int e1, int n1, int n2) |
virtual int | edge_contraction_help (int e1, int e2, int n1, int n2, int e1_n1, int e1_n2) |
virtual int | vertex_split (int n, int n1, int n2) |
Split a node n into two nodes with an edge in between. | |
virtual int | vertex_split (int n, int n1, int n2, int e1, int e3) |
int | newNode () |
Perform a propagating bisection of element e1 according to marked nodes. | |
int | newElement () |
Add a new elem to the mesh, return the chunk-local numbering; -1 failure. | |
void | deleteNode (int n) |
Remove node from the mesh. | |
void | deleteElement (int e) |
Remove element from the mesh. | |
void | addSharedNodeInstance (int n, int someIdx, int someChunk) |
Modify information about another remote instance of a shared node to the local instance of the node. | |
void | removeSharedNodeInstance (int n, int someIdx, int someChunk) |
int | lookupSharedNodeInstance (int someIdx, int someChunk) |
int | newGhostNode () |
Mesh ghost entity modification operations. | |
int | newGhostNode (int remoteChunk, int remoteIdx) |
void | updateGhostNode (int n, int remoteChunk, int remoteIdx) |
void | deleteGhostNode (int n) |
int | newGhostElement () |
Add a ghost element if none exists already. | |
int | newGhostElement (int remoteChunk, int remoteIdx) |
void | updateGhostElement (int e, int remoteChunk, int remoteIdx) |
void | deleteGhostElement (int e) |
int | getRemoteChunkID (int e) |
int | getRemoteIndex (int e) |
int | isSharedNode (int n) |
Mesh entity tests. | |
int | isGhostNode (int n) |
int | isGhostElement (int e) |
int | getGhostNode (int remoteChunk, int remoteIdx) |
int | getGhostElement (int remoteChunk, int remoteIdx) |
int | get_edge_index (int local_node1, int local_node2) |
Map a pair of element-local node numberings to an element-local edge numbering. | |
int | find_local_node_index (int e, int n) |
Find an element-local node numbering for a chunk-local node. | |
int | findAdjData (int n1, int n2, int *e1, int *e2, int *e1n1, int *e1n2, int *e1n3, int *e2n1, int *e2n2, int *e2n3, int *n3, int *n4) |
Extract adjacency data relative to edge [n1,n2]. | |
int | e2n_getNot (int e, int n1, int n2) |
int | n2e_exists (int n, int e) |
int | findElementWithNodes (int n1, int n2, int n3) |
int | getSharedNodeIdxl (int n, int chk) |
int | getGhostNodeIdxl (int n, int chk) |
int | getGhostElementIdxl (int e, int chk) |
FEM_Adapt () | |
FEM_Adapt (FEM_Mesh *m, femMeshModify *fm) | |
Initialize FEM_Adapt with a chunk of the mesh. | |
int | edge_flip_help (int e1, int e2, int n1, int n2, int e1_n1, int e1_n2, int e1_n3, int n3, int n4, int *locknodes) |
Perform a Delaunay flip of edge (n1, n2). | |
int | edge_bisect_help (int e1, int e2, int n1, int n2, int e1_n1, int e1_n2, int e1_n3, int e2_n1, int e2_n2, int e2_n3, int n3, int n4) |
Bisect edge (n1, n2) and the two adjacent elements. | |
int | vertex_remove_help (int e1, int e2, int n1, int n2, int e1_n1, int e1_n2, int e1_n3, int e2_n1, int e2_n2, int e2_n3, int n3, int n4, int n5) |
Remove the degree 4 vertex n1 without modifying degree of adj n2. | |
virtual int | vertex_split (int n, int n1, int n2) |
Contract edge (n1, n2) and the two adjacent elements. | |
int | vertex_split_help (int n, int n1, int n2, int e1, int e3) |
virtual void | printAdjacencies (int *nodes, int numNodes, int *elems, int numElems) |
virtual bool | isFixedNode (int n1) |
virtual bool | isCorner (int n1) |
A node is a corner if it is connected to two different boundaries and it is on the boundary. | |
virtual bool | isEdgeBoundary (int n1, int n2) |
FEM_Adapt () | |
default constructor | |
FEM_Adapt (FEM_Mesh *m, femMeshModify *fm) | |
Initialize FEM_Adapt with a chunk of the mesh. | |
FEM_Adapt (femMeshModify *fm) | |
Initialize FEM_Adapt with the femMeshModify object. | |
void | FEM_AdaptSetMesh (FEM_Mesh *m) |
Initialize FEM_Adapt with the FEM_Mesh object. | |
void | pup (PUP::er &p) |
pup for this object | |
int | get_edge_index (int local_node1, int local_node2) |
Map a pair of element-local node numberings to an element-local edge numbering. | |
int | find_local_node_index (int e, int n) |
Find an element-local node numbering for a chunk-local node. | |
int | findAdjData (int n1, int n2, int *e1, int *e2, int *e1n1, int *e1n2, int *e1n3, int *e2n1, int *e2n2, int *e2n3, int *n3, int *n4) |
Extract adjacency data relative to edge [n1,n2]. | |
int | e2n_getNot (int e, int n1, int n2) |
Get the other node connectivity on this element. | |
int | n2e_exists (int n, int e) |
Verifies if n is a node connectivity of this element. | |
int | findElementWithNodes (int n1, int n2, int n3) |
Find the element with connectivity n1, n2, n3. | |
int | getSharedNodeIdxl (int n, int chk) |
Return the shared index for this node on this chunk. | |
int | getGhostNodeIdxl (int n, int chk) |
Return the ghost index for this node on this chunk. | |
int | getGhostElementIdxl (int e, int chk) |
Return the ghost index for this element on this chunk. | |
void | printAdjacencies (int *nodes, int numNodes, int *elems, int numElems) |
Print all the adjacencies of these nodes and elements. | |
bool | isFixedNode (int n1) |
Is Node 'n1' a fixed node (i.e. defines the shape). | |
bool | isCorner (int n1) |
Is node 'n1' a corner. | |
bool | isEdgeBoundary (int n1, int n2) |
Is the edge defined by (n1,n2) on the boundary of the mesh. | |
int | edge_flip_help (int e1, int e2, int n1, int n2, int e1_n1, int e1_n2, int e1_n3, int n3, int n4, int *locknodes) |
Helper function to perform a Delaunay flip of edge (n1, n2). | |
int | edge_bisect_help (int e1, int e2, int n1, int n2, int e1_n1, int e1_n2, int e1_n3, int e2_n1, int e2_n2, int e2_n3, int n3, int n4) |
Helper function to Bisect edge (n1, n2) and the two adjacent elements. | |
int | vertex_remove_help (int e1, int e2, int n1, int n2, int e1_n1, int e1_n2, int e1_n3, int e2_n1, int e2_n2, int e2_n3, int n3, int n4, int n5) |
Helper function to remove the degree 4 vertex n1 without modifying degree of adj n2. | |
int | vertex_split (int n, int n1, int n2) |
Split a node n into two nodes with an edge in between. | |
int | vertex_split_help (int n, int n1, int n2, int e1, int e3) |
Helper function to split a node n into two nodes with an edge in between. | |
Protected Member Functions | |
int | check_orientation (int e1, int e3, int n, int n1, int n2) |
Check if e1 and e3 are on the same side of edge path (n1, n, n2). | |
int | check_orientation (int e1, int e3, int n, int n1, int n2) |
Check if e1 and e3 are on the same side of edge path (n1, n, n2). | |
Protected Attributes | |
FEM_Mesh * | theMesh |
femMeshModify * | theMod |
FEM_Mesh * | theMesh |
cross-pointer to theMesh object on this chunk | |
femMeshModify * | theMod |
cross-pointer to the femMeshModify object on this chunk | |
Private Member Functions | |
FEM_DataAttribute * | validDataFor (int entityNumber) |
Return the valid data array for this particular type of entity. | |
int | check_orientation (int e1, int e3, int n, int n1, int n2) |
Check if e1 and e3 are on the same side of edge path (n1, n, n2). | |
void | adj_traverse (int n, int startNode, int stopNode, int startElem, int stopElem, int *nn, int *ne, int *nodeList, int *elemList) |
Build adjacency lists for vertex_split operation. | |
int | newSlot (FEM_DataAttribute *validData) |
Find out the first empty slot in a valid data array, mark it valid and return its index If there is no such slot, add one and set it to valid and return it. | |
void | invalidateSlot (FEM_DataAttribute *validData, int slotNumber) |
void | printValidArray (FEM_DataAttribute *validData) |
Private Attributes | |
FEM_Mesh * | theMesh |
int | cid |
The chunk id of the mesh chunk. | |
FEM_DataAttribute * | nodeValid |
Cached pointers to the FEM_IS_VALID arrays of the elements and nodes. | |
FEM_DataAttribute * | elemValid |
An adaptivity class which provides the primitive incremental mesh modification operations. These operations are edge_bisect, edge_flip and edge_contract.
Definition at line 15 of file fem_adapt.h.
FEM_Adapt::FEM_Adapt | ( | FEM_Mesh * | m | ) | [inline] |
Initialize FEM_Adapt with a chunk of the mesh.
Definition at line 65 of file fem_adapt.h.
References cid, elemValid, nodeValid, theMesh, and validDataFor().
Initialize FEM_Adapt with a chunk of the mesh and the chunkId.
Definition at line 72 of file fem_adapt.h.
References cid, elemValid, nodeValid, theMesh, and validDataFor().
FEM_Adapt::FEM_Adapt | ( | ) | [inline] |
FEM_Adapt::FEM_Adapt | ( | FEM_Mesh * | m, | |
femMeshModify * | fm | |||
) | [inline] |
FEM_Adapt::FEM_Adapt | ( | ) | [inline] |
FEM_Adapt::FEM_Adapt | ( | FEM_Mesh * | m, | |
femMeshModify * | fm | |||
) | [inline] |
FEM_Adapt::FEM_Adapt | ( | femMeshModify * | fm | ) | [inline] |
FEM_DataAttribute * FEM_Adapt::validDataFor | ( | int | entityNumber | ) | [private] |
Return the valid data array for this particular type of entity.
Definition at line 488 of file fem_adapt.C.
References entity, FEM_Entity::lookup(), FEM_Mesh::lookup(), and theMesh.
Referenced by FEM_Adapt().
Check if e1 and e3 are on the same side of edge path (n1, n, n2).
Makes use of ordering of nodes in e1 to check is e3 is on the same side of the path of edges (n1, n) and (n, n2).
Makes use of ordering of nodes in e1 to check is e3 is on the same side of the path of edges (n1, n) and (n, n2)
Definition at line 518 of file fem_adapt.C.
References find_local_node_index().
Referenced by vertex_split(), and vertex_split_help().
void FEM_Adapt::adj_traverse | ( | int | n, | |
int | startNode, | |||
int | stopNode, | |||
int | startElem, | |||
int | stopElem, | |||
int * | nn, | |||
int * | ne, | |||
int * | nodeList, | |||
int * | elemList | |||
) | [private] |
Build adjacency lists for vertex_split operation.
When splitting a node, the adjacency lists for the old and new nodes need to be reconstructed from scratch. In case of gap in mesh, traversal is attempted from both sides of the arc. Arc goes around node n starting at node startNode and element startElem, and ends at stopElem. Resulting counts for nodes and elements are stored in nn and ne respectively, and actual nodes and elements are stored in nodeList and elemList respectively
Definition at line 531 of file fem_adapt.C.
References FEM_Mesh::e2e_getNbr(), FEM_Mesh::e2n_getNode(), find_local_node_index(), get_edge_index(), and theMesh.
Referenced by vertex_split().
int FEM_Adapt::newSlot | ( | FEM_DataAttribute * | validData | ) | [private] |
Find out the first empty slot in a valid data array, mark it valid and return its index If there is no such slot, add one and set it to valid and return it.
Definition at line 419 of file fem_adapt.C.
References entity, length, and FEM_Entity::setLength().
Referenced by newElement(), and newNode().
void FEM_Adapt::invalidateSlot | ( | FEM_DataAttribute * | validData, | |
int | slotNumber | |||
) | [private] |
Definition at line 442 of file fem_adapt.C.
Referenced by deleteElement(), and deleteNode().
void FEM_Adapt::printValidArray | ( | FEM_DataAttribute * | validData | ) | [private] |
Definition at line 475 of file fem_adapt.C.
References entity, FEM_Entity::getMax(), and length.
Map a pair of element-local node numberings to an element-local edge numbering.
Given two element-local node numberings (i.e.
Given two element-local node numberings (i.e. 0, 1, 2 for triangular elements), calculate an element-local edge numbering (also 0, 1, or 2 for triangular elements)
0, 1, 2 for triangular elements), calculate an element-local edge numbering (also 0, 1, or 2 for triangular elements)
Definition at line 494 of file fem_adapt.C.
Referenced by adj_traverse(), edge_contraction(), edge_contraction_help(), edge_flip_help(), findAdjData(), localEdgeBisect(), vertex_remove_help(), vertex_split(), and vertex_split_help().
Find an element-local node numbering for a chunk-local node.
Given a chunk-local element number e and a chunk-local node number n, determine the element-local node numbering for node n on element e.
Given a chunk-local element number e and a chunk-local node number n, determine the element-local node numbering for node n on element e
Definition at line 509 of file fem_adapt.C.
References FEM_Mesh::e2n_getIndex(), and theMesh.
Referenced by adj_traverse(), check_orientation(), edge_contraction(), edge_contraction_help(), edge_flip_help(), findAdjData(), vertex_remove_help(), vertex_split(), and vertex_split_help().
void FEM_Adapt::findAdjData | ( | int | n1, | |
int | n2, | |||
int * | e1, | |||
int * | e2, | |||
int * | en1, | |||
int * | en2, | |||
int * | en3, | |||
int * | n3, | |||
int * | edge, | |||
int * | nbr | |||
) |
Definition at line 570 of file fem_adapt.C.
References FEM_Mesh::e2e_getNbr(), FEM_Mesh::e2n_getNode(), find_local_node_index(), get_edge_index(), FEM_Mesh::getElementOnEdge(), and theMesh.
Referenced by FEM_AdaptL::edge_bisect(), edge_bisect(), edge_bisect_help(), FEM_AdaptL::edge_contraction(), FEM_AdaptL::edge_flip(), edge_flip(), FEM_AdaptL::vertex_remove(), and vertex_remove().
void FEM_Adapt::findAdjData | ( | int | n1, | |
int | n2, | |||
int | e2, | |||
int * | en1, | |||
int * | en2, | |||
int * | en3, | |||
int * | n4, | |||
int * | edge, | |||
int * | nbr | |||
) |
Definition at line 584 of file fem_adapt.C.
References FEM_Mesh::e2e_getNbr(), FEM_Mesh::e2n_getNode(), find_local_node_index(), get_edge_index(), and theMesh.
Perform a Delaunay flip of edge (n1, n2).
Perform a Delaunay flip of the edge (n1, n2) returning 1 if successful, 0 if not (likely due to the edge being on a boundary). The convexity of the quadrilateral formed by two faces incident to edge (n1, n2) is assumed. n1 and n2 are assumed to be local to this chunk. An adjacency test is performed on n1 and n2 by searching for an element with edge [n1,n2].
Reimplemented in FEM_AdaptL, and FEM_AdaptL.
Definition at line 15 of file fem_adapt.C.
References e1, edge_flip_help(), and findAdjData().
int FEM_Adapt::edge_flip_help | ( | int | e1, | |
int | e2, | |||
int | n1, | |||
int | n2, | |||
int | e1_n1, | |||
int | e1_n2, | |||
int | e1_n3, | |||
int | n3, | |||
int | edge1, | |||
int | e1nbr | |||
) | [virtual] |
Helper method to edge_flip.
Definition at line 22 of file fem_adapt.C.
References FEM_Mesh::e2e_getNbr(), FEM_Mesh::e2e_replace(), FEM_Mesh::e2e_setIndex(), FEM_Mesh::e2n_getNode(), FEM_Mesh::e2n_setIndex(), find_local_node_index(), get_edge_index(), FEM_Mesh::n2e_add(), FEM_Mesh::n2e_remove(), FEM_Mesh::n2n_add(), FEM_Mesh::n2n_remove(), and theMesh.
Referenced by FEM_AdaptL::edge_flip(), and edge_flip().
Bisect edge (n1, n2) and the two adjacent elements.
Given edge e:(n1, n2), determing the two elements e1:(n1,n2,n3) and e2:(n2,n1,n4) adjacent to e, and bisect e, e1 and e2 by adding a node n5 to edge e. e1 becomes (n1,n5,n3) and we add e3:(n5,n2,n3), e2 becomes (n5,n1,n4) and we add e4:(n2,n5,n4); returns new node n5
Reimplemented in FEM_AdaptL, and FEM_AdaptL.
Definition at line 78 of file fem_adapt.C.
References e1, edge_bisect_help(), and findAdjData().
int FEM_Adapt::edge_bisect_help | ( | int | e1, | |
int | e2, | |||
int | n1, | |||
int | n2, | |||
int | e1_n1, | |||
int | e1_n2, | |||
int | e1_n3, | |||
int | n3, | |||
int | edge1, | |||
int | e1nbr | |||
) | [virtual] |
Helper method to edge_bisect.
Definition at line 84 of file fem_adapt.C.
References FEM_Mesh::e2e_replace(), findAdjData(), localEdgeBisect(), FEM_Mesh::n2n_remove(), newElement(), newNode(), and theMesh.
Referenced by FEM_AdaptL::edge_bisect(), and edge_bisect().
void FEM_Adapt::localEdgeBisect | ( | int | n1, | |
int | n2, | |||
int | e1, | |||
int | e2, | |||
int | e3, | |||
int | e1n1, | |||
int | e1n2, | |||
int | e1n3, | |||
int | e1nbr, | |||
int | n3, | |||
int | n5 | |||
) |
Definition at line 106 of file fem_adapt.C.
References FEM_Mesh::e2e_replace(), FEM_Mesh::e2e_setAll(), FEM_Mesh::e2n_setIndex(), get_edge_index(), FEM_Mesh::n2e_add(), FEM_Mesh::n2e_replace(), FEM_Mesh::n2n_add(), FEM_Mesh::n2n_replace(), and theMesh.
Referenced by edge_bisect_help().
Remove the degree 4 vertex n1 without modifying degree of adj n2.
Inverse of edge bisect, this removes a degree 4 vertex n1 and 2 of its adjacent elements. n2 indicates that the two elements removed are adjacent to edge [n1,n2]. This could be performed with edge_contraction, but this is a simpler operation.
Reimplemented in FEM_AdaptL, and FEM_AdaptL.
Definition at line 143 of file fem_adapt.C.
References e1, findAdjData(), and vertex_remove_help().
int FEM_Adapt::vertex_remove_help | ( | int | e1, | |
int | e2, | |||
int | n1, | |||
int | n2, | |||
int | e1_n1, | |||
int | e1_n2, | |||
int | e1_n3, | |||
int | n3, | |||
int | edge1, | |||
int | e1nbr | |||
) | [virtual] |
Helper method to vertex_remove.
Definition at line 149 of file fem_adapt.C.
References deleteElement(), deleteNode(), FEM_Mesh::e2e_getNbr(), FEM_Mesh::e2e_replace(), FEM_Mesh::e2n_getNode(), FEM_Mesh::e2n_replace(), find_local_node_index(), get_edge_index(), FEM_Mesh::n2e_remove(), FEM_Mesh::n2e_replace(), FEM_Mesh::n2n_getAll(), FEM_Mesh::n2n_remove(), FEM_Mesh::n2n_replace(), and theMesh.
Referenced by FEM_AdaptL::vertex_remove(), and vertex_remove().
Contract edge (n1, n2) and the two adjacent elements.
Given and edge e:(n1, n2), determine the two adjacent elements e1:(n1,n2,n3) and e2:(n1,n2,n4). Contract edge e by collapsing node n2 to n1, removing edge e, node n2, elements e1 & e2; return 1 if successful, 0 if not
Reimplemented in FEM_AdaptL, and FEM_AdaptL.
Definition at line 202 of file fem_adapt.C.
References e1, FEM_Mesh::getElementOnEdge(), and theMesh.
Definition at line 211 of file fem_adapt.C.
References FEM_Mesh::e2e_getNbr(), edge_contraction_help(), find_local_node_index(), get_edge_index(), and theMesh.
int FEM_Adapt::edge_contraction_help | ( | int | e1, | |
int | e2, | |||
int | n1, | |||
int | n2, | |||
int | e1_n1, | |||
int | e1_n2 | |||
) | [virtual] |
Definition at line 219 of file fem_adapt.C.
References deleteElement(), deleteNode(), FEM_Mesh::e2e_getNbr(), FEM_Mesh::e2e_replace(), FEM_Mesh::e2n_getNode(), FEM_Mesh::e2n_replace(), find_local_node_index(), get_edge_index(), FEM_Mesh::n2e_add(), FEM_Mesh::n2e_getAll(), FEM_Mesh::n2e_remove(), FEM_Mesh::n2n_add(), FEM_Mesh::n2n_getAll(), FEM_Mesh::n2n_remove(), FEM_Mesh::n2n_replace(), and theMesh.
Referenced by edge_contraction().
Split a node n into two nodes with an edge in between.
Given a node n and two adjacent nodes n1 and n2, split n into two nodes n and np such that the edges to the neighbors n1 and n2 expand into two new elements (n, np, n1) and (np, n, n2); return the id of the newly created node np.
Given a node n and two adjacent nodes n1 and n2, split n into two nodes n and newNode such that the edges to the neighbors n1 and n2 expand into two new elements (n, newNode, n1) and (newNode, n, n2); return the id of the newly created node newNode
n1 n1 o o | / \ | / \ \ | / \ / \ / \|/ \ / \ / o n n o---------o np /|\ / \ / \ / | \ / \ / \ | \ / | \ / o o n2 n2
Definition at line 292 of file fem_adapt.C.
References e1, FEM_Mesh::getElementOnEdge(), and theMesh.
Definition at line 306 of file fem_adapt.C.
References adj_traverse(), check_orientation(), FEM_Mesh::e2e_getNbr(), FEM_Mesh::e2e_replace(), FEM_Mesh::e2e_setAll(), FEM_Mesh::e2n_replace(), FEM_Mesh::e2n_setAll(), find_local_node_index(), get_edge_index(), FEM_Mesh::n2e_add(), FEM_Mesh::n2e_remove(), FEM_Mesh::n2n_add(), FEM_Mesh::n2n_remove(), newElement(), newNode(), and theMesh.
int FEM_Adapt::newNode | ( | ) |
Perform a propagating bisection of element e1 according to marked nodes.
Given and element e1, determined n, e1's marked node, and bisect the edge opposite to n, propagating and bisecting the neighboring element in a similar fashion virtual void element_bisect(int e1); Mesh entity modification operations Add a new node to the mesh, return the chunk-local numbering; -1 failure.
Definition at line 447 of file fem_adapt.C.
References newSlot(), FEM_Mesh::node, nodeValid, FEM_Entity::size(), and theMesh.
Referenced by edge_bisect_help(), edge_flip_help(), and vertex_split().
int FEM_Adapt::newElement | ( | ) |
Add a new elem to the mesh, return the chunk-local numbering; -1 failure.
Definition at line 455 of file fem_adapt.C.
References elem, elemValid, FEM_Mesh::lookup(), newSlot(), FEM_Entity::size(), and theMesh.
Referenced by edge_bisect_help(), and vertex_split().
void FEM_Adapt::deleteNode | ( | int | n | ) |
Remove node from the mesh.
Definition at line 464 of file fem_adapt.C.
References invalidateSlot(), FEM_Mesh::n2e_removeAll(), FEM_Mesh::n2n_removeAll(), nodeValid, and theMesh.
Referenced by edge_contraction_help(), and vertex_remove_help().
void FEM_Adapt::deleteElement | ( | int | e | ) |
Remove element from the mesh.
Definition at line 470 of file fem_adapt.C.
References FEM_Mesh::e2e_removeAll(), elemValid, invalidateSlot(), and theMesh.
Referenced by edge_contraction_help(), and vertex_remove_help().
Modify information about another remote instance of a shared node to the local instance of the node.
Add information about a shared node instance I'm not sure what the parameters should be just yet; n is the index of a node on the local chunk, and the rest is some data about a remote instance of that node somewhere else.
Definition at line 162 of file fem_adapt.h.
Definition at line 163 of file fem_adapt.h.
Definition at line 164 of file fem_adapt.h.
int FEM_Adapt::newGhostNode | ( | ) | [inline] |
Mesh ghost entity modification operations.
Add a ghost node if none exists already
Definition at line 168 of file fem_adapt.h.
Definition at line 169 of file fem_adapt.h.
Definition at line 170 of file fem_adapt.h.
void FEM_Adapt::deleteGhostNode | ( | int | n | ) | [inline] |
Definition at line 171 of file fem_adapt.h.
int FEM_Adapt::newGhostElement | ( | ) | [inline] |
Definition at line 174 of file fem_adapt.h.
Definition at line 175 of file fem_adapt.h.
void FEM_Adapt::deleteGhostElement | ( | int | e | ) | [inline] |
Definition at line 176 of file fem_adapt.h.
Definition at line 177 of file fem_adapt.h.
Definition at line 178 of file fem_adapt.h.
Definition at line 182 of file fem_adapt.h.
Definition at line 183 of file fem_adapt.h.
Definition at line 184 of file fem_adapt.h.
Definition at line 185 of file fem_adapt.h.
Check if e1 and e3 are on the same side of edge path (n1, n, n2).
Makes use of ordering of nodes in e1 to check is e3 is on the same side of the path of edges (n1, n) and (n, n2)
int FEM_Adapt::findAdjData | ( | int | n1, | |
int | n2, | |||
int * | e1, | |||
int * | e2, | |||
int * | e1n1, | |||
int * | e1n2, | |||
int * | e1n3, | |||
int * | e2n1, | |||
int * | e2n2, | |||
int * | e2n3, | |||
int * | n3, | |||
int * | n4 | |||
) |
Extract adjacency data relative to edge [n1,n2].
Extract elements adjacent to edge [n1,n2] along with element-local node numberings and nodes opposite input edge.
Extract elements adjacent to edge [n1,n2] along with element-local node numberings and nodes opposite input edge
Definition at line 730 of file fem_adapt_new.C.
References FEM_Mesh::e2e_getNbr(), FEM_Mesh::e2n_getNode(), find_local_node_index(), get_edge_index(), FEM_Mesh::getElementOnEdge(), femMeshModify::idx, FEM_Entity::is_valid(), FEM_Mesh::n2n_exists(), FEM_Mesh::node, theMesh, and theMod.
Definition at line 45 of file fem_adapt_new.h.
References FEM_Mesh::e2n_getAll(), and theMesh.
Referenced by FEM_Adapt_Algs::refine_element_leb().
Definition at line 52 of file fem_adapt_new.h.
References free(), FEM_Mesh::n2e_getAll(), and theMesh.
Referenced by findElementWithNodes().
Definition at line 64 of file fem_adapt_new.h.
References free(), n2e_exists(), FEM_Mesh::n2e_getAll(), and theMesh.
Referenced by FEM_Adapt_Algs::refine_element_leb(), and FEM_Adapt_Algs::refine_flip_element_leb().
Definition at line 769 of file fem_adapt_new.C.
References FEM_MUtil::exists_in_IDXL(), femMeshModify::getfmUtil(), theMesh, and theMod.
Referenced by FEM_Adapt_Algs::refine_element_leb().
Definition at line 772 of file fem_adapt_new.C.
References FEM_MUtil::exists_in_IDXL(), femMeshModify::getfmUtil(), theMesh, and theMod.
Referenced by FEM_Adapt_Algs::refine_element_leb().
Definition at line 775 of file fem_adapt_new.C.
References FEM_MUtil::exists_in_IDXL(), femMeshModify::getfmUtil(), theMesh, and theMod.
Referenced by FEM_Adapt_Algs::refine_element_leb().
int FEM_Adapt::edge_flip_help | ( | int | e1, | |
int | e2, | |||
int | n1, | |||
int | n2, | |||
int | e1_n1, | |||
int | e1_n2, | |||
int | e1_n3, | |||
int | n3, | |||
int | n4, | |||
int * | locknodes | |||
) |
Perform a Delaunay flip of edge (n1, n2).
Perform a Delaunay flip of the edge (n1, n2) returning 1 if successful, 0 if not (likely due to the edge being on a boundary).
Perform a Delaunay flip of edge (n1, n2) returning 1 if successful, 0 if not (likely due to the edge being on a boundary). The convexity of the quadrilateral formed by two faces incident to edge (n1, n2) is assumed. n1 and n2 are assumed to be local to this chunk. An adjacency test is performed on n1 and n2 by searching for an element with edge [n1,n2].
The convexity of the quadrilateral formed by two faces incident to edge (n1, n2) is assumed. n1 and n2 are assumed to be local to this chunk. An adjacency test is performed on n1 and n2 by searching for an element with edge [n1,n2].
n3 n3 o o / \ /|\ / \ / | \ / \ / | \ / \ / | \ n1 o---------o n2 n1 o | o n2 \ / \ | / \ / \ | / \ / \ | / \ / \|/ o o n4 n4
Definition at line 32 of file fem_adapt_new.C.
References verifyghostsendMsg::chunks, findgsMsg::chunks, conn, FEM_MUtil::copyElemData(), FEM_Mesh::elem, FEM_add_element(), FEM_purge_element(), FEM_remove_element(), FEM_MUtil::findGhostSend(), femMeshModify::fmUtil, free(), CkVec< T >::free(), verifyghostsendMsg::fromChk, femMeshModify::getfmUtil(), FEM_MUtil::getIdx(), femMeshModify::getIdx(), IDXL_Side::getRec(), index, PUP::l, malloc(), meshMod, newNode(), FEM_Mesh::node, verifyghostsendMsg::numchks, findgsMsg::numchks, CkVec< T >::push_back(), FEM_Node::shared, verifyghostsendMsg::sharedIdx, CkVec< T >::size(), theMesh, theMod, and FEM_MUtil::UpdateGhostSend().
int FEM_Adapt::edge_bisect_help | ( | int | e1, | |
int | e2, | |||
int | n1, | |||
int | n2, | |||
int | e1_n1, | |||
int | e1_n2, | |||
int | e1_n3, | |||
int | e2_n1, | |||
int | e2_n2, | |||
int | e2_n3, | |||
int | n3, | |||
int | n4 | |||
) |
Bisect edge (n1, n2) and the two adjacent elements.
Given edge e:(n1, n2), remove the two elements (n1,n2,n3) and (n2,n1,n4) adjacent to e, and bisect e by adding node n5.
Given edge e:(n1, n2), remove the two elements (n1,n2,n3) and (n2,n1,n4) adjacent to e, and bisect e by adding node n5. Add elements (n1,n5,n3), (n5,n2,n3), (n5,n1,n4) and (n2,n5,n4); returns new node n5.
Add elements (n1,n5,n3), (n5,n2,n3), (n5,n1,n4) and (n2,n5,n4); returns new node n5.
n3 n3 o o / \ /|\ / \ / | \ / \ / | \ / \ / |n5 \ n1 o---------o n2 n1 o----o----o n2 \ / \ | / \ / \ | / \ / \ | / \ / \|/ o o n4 n4
Definition at line 253 of file fem_adapt_new.C.
References verifyghostsendMsg::chunks, findgsMsg::chunks, conn, FEM_MUtil::copyElemData(), FEM_Mesh::elem, FEM_add_element(), FEM_add_node(), FEM_Modify_LockN(), FEM_Modify_UnlockN(), FEM_purge_element(), FEM_remove_element(), FEM_MUtil::findGhostSend(), femMeshModify::fmUtil, free(), CkVec< T >::free(), verifyghostsendMsg::fromChk, femMeshModify::getfmUtil(), FEM_MUtil::getIdx(), femMeshModify::getIdx(), IDXL_Side::getRec(), index, PUP::l, malloc(), meshMod, FEM_Mesh::node, verifyghostsendMsg::numchks, findgsMsg::numchks, CkVec< T >::push_back(), FEM_Node::shared, verifyghostsendMsg::sharedIdx, CkVec< T >::size(), theMesh, theMod, and FEM_MUtil::UpdateGhostSend().
int FEM_Adapt::vertex_remove_help | ( | int | e1, | |
int | e2, | |||
int | n1, | |||
int | n2, | |||
int | e1_n1, | |||
int | e1_n2, | |||
int | e1_n3, | |||
int | e2_n1, | |||
int | e2_n2, | |||
int | e2_n3, | |||
int | n3, | |||
int | n4, | |||
int | n5 | |||
) |
Remove the degree 4 vertex n1 without modifying degree of adj n2.
Inverse of edge bisect, this removes a degree 4 vertex n1 and 2 of its adjacent elements.
Inverse of edge bisect, this removes a degree 4 vertex n1 and 2 of its adjacent elements. n2 indicates that the two elements removed are adjacent to edge [n1,n2]. This could be performed with edge_contraction, but this is a simpler operation.
n2 indicates that the two elements removed are adjacent to edge [n1,n2]. This could be performed with edge_contraction, but this is a simpler operation.
n3 n3 o o /|\ / \ / | \ / \ / | \ / \ / |n1 \ / \ n5 o----o----o n2 n5 o---------o n2 \ | / \ / \ | / \ / \ | / \ / \|/ \ / o o n4 n4
Definition at line 479 of file fem_adapt_new.C.
References conn, FEM_Mesh::e2e_getNbr(), FEM_add_element(), FEM_remove_element(), FEM_remove_node(), free(), get_edge_index(), femMeshModify::getfmUtil(), FEM_MUtil::getIdx(), femMeshModify::getIdx(), index, malloc(), theMesh, and theMod.
Contract edge (n1, n2) and the two adjacent elements.
Given and edge e:(n1, n2), determine the two adjacent elements (n1,n2,n3) and (n1,n2,n4). Contract edge e by creating node n5, removing all elements incident on n1 xor n2 and reinserting with incidence on n5, removing the two elements (n1,n2,n3) and (n1,n2,n4) adjacent to e, and finally removing nodes n1 and n2; return 1 if successful, 0 if not Split a node n into two nodes with an edge in between Given a node n and two adjacent nodes n1 and n2, split n into two nodes n and np such that the edges to the neighbors n1 and n2 expand into two new elements (n, np, n1) and (np, n, n2); return the id of the newly created node np
Definition at line 598 of file fem_adapt_new.C.
References check_orientation(), conn, FEM_Mesh::e2e_getNbr(), FEM_Mesh::e2n_getNode(), FEM_add_element(), FEM_add_node(), FEM_remove_element(), find_local_node_index(), free(), get_edge_index(), femMeshModify::getfmUtil(), FEM_MUtil::getIdx(), malloc(), theMesh, and theMod.
Definition at line 779 of file fem_adapt_new.C.
References FEM_MUtil::FEM_Print_e2e(), FEM_MUtil::FEM_Print_e2n(), FEM_MUtil::FEM_Print_n2e(), FEM_MUtil::FEM_Print_n2n(), femMeshModify::getfmUtil(), theMesh, and theMod.
Definition at line 795 of file fem_adapt_new.C.
References femMeshModify::fmfixedNodes, CkVec< T >::size(), and theMod.
Referenced by FEM_AdaptL::edge_contraction_help(), and FEM_Interpolate::FEM_InterpolateNodeOnEdge().
A node is a corner if it is connected to two different boundaries and it is on the boundary.
Definition at line 802 of file fem_adapt_new.C.
References abs(), IDXL_Share::chk, FEM_MUtil::exists_in_IDXL(), FEM_Mesh_dataP(), femMeshModify::fmUtil, FEM_MUtil::getChunkNos(), intMsg::i, femMeshModify::idx, index, isEdgeBoundary(), meshMod, FEM_Mesh::n2n_getAll(), theMesh, and theMod.
Referenced by femMeshModify::setFemMesh().
Definition at line 838 of file fem_adapt_new.C.
References FEM_Mesh::n2e_getAll(), and theMesh.
Referenced by FEM_AdaptL::edge_contraction_help(), FEM_Interpolate::FEM_InterpolateNodeOnEdge(), and isCorner().
Check if e1 and e3 are on the same side of edge path (n1, n, n2).
void FEM_Adapt::FEM_AdaptSetMesh | ( | FEM_Mesh * | m | ) | [inline] |
Initialize FEM_Adapt with the FEM_Mesh object.
Definition at line 40 of file ParFUM_Adapt.h.
References theMesh.
Referenced by femMeshModify::setPointersAfterMigrate().
void FEM_Adapt::pup | ( | PUP::er & | p | ) | [inline] |
pup for this object
Reimplemented in FEM_AdaptL.
Definition at line 42 of file ParFUM_Adapt.h.
Referenced by femMeshModify::pup().
int FEM_Adapt::findAdjData | ( | int | n1, | |
int | n2, | |||
int * | e1, | |||
int * | e2, | |||
int * | e1n1, | |||
int * | e1n2, | |||
int * | e1n3, | |||
int * | e2n1, | |||
int * | e2n2, | |||
int * | e2n3, | |||
int * | n3, | |||
int * | n4 | |||
) |
Extract adjacency data relative to edge [n1,n2].
Find the element with connectivity n1, n2, n3.
Print all the adjacencies of these nodes and elements.
Is the edge defined by (n1,n2) on the boundary of the mesh.
int FEM_Adapt::edge_flip_help | ( | int | e1, | |
int | e2, | |||
int | n1, | |||
int | n2, | |||
int | e1_n1, | |||
int | e1_n2, | |||
int | e1_n3, | |||
int | n3, | |||
int | n4, | |||
int * | locknodes | |||
) |
Helper function to perform a Delaunay flip of edge (n1, n2).
Perform a Delaunay flip of edge (n1, n2) returning 1 if successful, 0 if not (likely due to the edge being on a boundary). The convexity of the quadrilateral formed by two faces incident to edge (n1, n2) is verified. n1 and n2 are assumed to be local/shared to this chunk. An adjacency test is performed on n1 and n2 by searching for an element with edge [n1,n2].
int FEM_Adapt::vertex_remove_help | ( | int | e1, | |
int | e2, | |||
int | n1, | |||
int | n2, | |||
int | e1_n1, | |||
int | e1_n2, | |||
int | e1_n3, | |||
int | e2_n1, | |||
int | e2_n2, | |||
int | e2_n3, | |||
int | n3, | |||
int | n4, | |||
int | n5 | |||
) |
Helper function to remove the degree 4 vertex n1 without modifying degree of adj n2.
Inverse of edge bisect, this removes a degree 4 vertex n1 and 2 of its adjacent elements. n2 indicates that the two elements removed are adjacent to edge [n1,n2]. This could be performed with edge_contraction, but this is a simpler operation. Warning: This function was never tested!! It definitely needs work!
Split a node n into two nodes with an edge in between.
Given a node n and two adjacent nodes n1 and n2, split n into two nodes n and np such that the edges to the neighbors n1 and n2 expand into two new elements (n, np, n1) and (np, n, n2); return the id of the newly created node 'np'. Warning: This function was never tested!! It definitely needs work!
FEM_Mesh* FEM_Adapt::theMesh [private] |
Definition at line 16 of file fem_adapt.h.
Referenced by adj_traverse(), deleteElement(), deleteNode(), e2n_getNot(), edge_bisect_help(), FEM_AdaptL::edge_contraction(), edge_contraction(), FEM_AdaptL::edge_contraction_help(), edge_contraction_help(), edge_flip_help(), FEM_Adapt(), FEM_AdaptL::FEM_AdaptL(), FEM_AdaptL::FEM_AdaptLSetMesh(), FEM_AdaptSetMesh(), find_local_node_index(), findAdjData(), findElementWithNodes(), getGhostElementIdxl(), getGhostNodeIdxl(), getSharedNodeIdxl(), isCorner(), isEdgeBoundary(), localEdgeBisect(), FEM_AdaptL::lockNodes(), n2e_exists(), newElement(), newNode(), printAdjacencies(), FEM_AdaptL::unlockNodes(), validDataFor(), FEM_AdaptL::vertex_remove(), vertex_remove_help(), vertex_split(), and vertex_split_help().
int FEM_Adapt::cid [private] |
The chunk id of the mesh chunk.
Definition at line 18 of file fem_adapt.h.
Referenced by FEM_Adapt().
FEM_DataAttribute* FEM_Adapt::nodeValid [private] |
Cached pointers to the FEM_IS_VALID arrays of the elements and nodes.
Definition at line 20 of file fem_adapt.h.
Referenced by deleteNode(), FEM_Adapt(), and newNode().
FEM_DataAttribute * FEM_Adapt::elemValid [private] |
Definition at line 20 of file fem_adapt.h.
Referenced by deleteElement(), FEM_Adapt(), and newElement().
FEM_Mesh* FEM_Adapt::theMesh [protected] |
Definition at line 21 of file fem_adapt_new.h.
femMeshModify* FEM_Adapt::theMod [protected] |
Definition at line 22 of file fem_adapt_new.h.
Referenced by FEM_AdaptL::eatIntoElement(), edge_bisect_help(), FEM_AdaptL::edge_contraction_help(), edge_flip_help(), FEM_Adapt(), FEM_AdaptL::FEM_AdaptL(), findAdjData(), getGhostElementIdxl(), getGhostNodeIdxl(), getSharedNodeIdxl(), isCorner(), isFixedNode(), FEM_AdaptL::lockNodes(), printAdjacencies(), FEM_AdaptL::residualLockTest(), FEM_AdaptL::structureTest(), FEM_AdaptL::unlockAll(), FEM_AdaptL::unlockNodes(), vertex_remove_help(), and vertex_split_help().
FEM_Mesh* FEM_Adapt::theMesh [protected] |
femMeshModify* FEM_Adapt::theMod [protected] |
cross-pointer to the femMeshModify object on this chunk
Definition at line 23 of file ParFUM_Adapt.h.