PPL Logo

FEM_AdaptL Class Reference

Provides primitive mesh modification functions (involves atomic locking/unlocking). More...

#include <fem_adapt_lock.h>

Inheritance diagram for FEM_AdaptL:

Inheritance graph
[legend]
Collaboration diagram for FEM_AdaptL:

Collaboration graph
[legend]

Public Member Functions

 FEM_AdaptL ()
 FEM_AdaptL (FEM_Mesh *m, femMeshModify *fm)
 Initialize FEM_Adapt with a chunk of the mesh.
int lockNodes (int *, int *, int, int *, int)
 lockrnodes and lockwnodes is the set of nodes that need to be locked with read and write locks respectively.
int unlockNodes (int *, int *, int, int *, int)
 Same as above, instead it unlocks the nodes.
int edge_flip (int n1, int n2)
 Perform a Delaunay flip of edge (n1, n2).
int edge_bisect (int n1, int n2)
 Bisect edge (n1, n2) and the two adjacent elements.
int vertex_remove (int n1, int n2)
 Remove the degree 4 vertex n1 without modifying degree of adj n2.
int edge_contraction (int n1, int n2)
 Given and edge e:(n1, n2), determine the two adjacent elements (n1,n2,n3) and (n1,n2,n4).
int edge_contraction_help (int *e1P, int *e2P, 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)
 FEM_AdaptL ()
 default constructor
 FEM_AdaptL (FEM_Mesh *m, femMeshModify *fm)
 Initialize FEM_Adapt with a chunk of the mesh.
 FEM_AdaptL (femMeshModify *fm)
 Initialize FEM_Adapt with the femMeshModify object.
void FEM_AdaptLSetMesh (FEM_Mesh *m)
 Initialize FEM_Adapt with the FEM_Mesh object.
void pup (PUP::er &p)
 Pup code for this class.
int lockNodes (int *gotlocks, int *lockrnodes, int numRNodes, int *lockwnodes, int numWNodes)
 Lock the following set of read and write nodes.
int unlockNodes (int *gotlocks, int *lockrnodes, int numRNodes, int *lockwnodes, int numWNodes)
 Lock the following set of read and write nodes.
int edge_flip (int n1, int n2)
 Perform a Delaunay flip of edge (n1, n2).
int edge_bisect (int n1, int n2)
 Bisect edge (n1, n2) and the two adjacent elements.
int vertex_remove (int n1, int n2)
 Remove the degree 4 vertex n1 without modifying degree of adj n2.
int edge_contraction (int n1, int n2)
 Contract edge (n1, n2) and the two adjacent elements.
int edge_contraction_help (int *e1P, int *e2P, 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 for contract edge (n1, n2) and the two adjacent elements.
int eatIntoElement (int e, bool aggressive_node_removal=false)
 Acquire an element in our ghost layer, turning it into a local element.
void residualLockTest ()
 Test the adaptivity system to see if any nodes are locked.
void unlockAll ()
 Release all currently held locks on this partition.
void structureTest ()
 Test the mesh for corruption in connectivity/adjacency.

Detailed Description

Provides primitive mesh modification functions (involves atomic locking/unlocking).

An adaptivity class which provides the primitive incremental mesh modification operations. These operations are edge_bisect, edge_flip and edge_contract. It provides a lock for all the nodes involved in the operation, so that it does not interfere with any other operation.

Definition at line 17 of file fem_adapt_lock.h.


Constructor & Destructor Documentation

FEM_AdaptL::FEM_AdaptL (  )  [inline]

Definition at line 19 of file fem_adapt_lock.h.

References FEM_Adapt::theMesh, and FEM_Adapt::theMod.

FEM_AdaptL::FEM_AdaptL ( FEM_Mesh m,
femMeshModify fm 
) [inline]

Initialize FEM_Adapt with a chunk of the mesh.

Definition at line 24 of file fem_adapt_lock.h.

References FEM_Adapt::theMesh, and FEM_Adapt::theMod.

FEM_AdaptL::FEM_AdaptL (  )  [inline]

default constructor

Definition at line 126 of file ParFUM_Adapt.h.

References FEM_Adapt::theMesh, and FEM_Adapt::theMod.

FEM_AdaptL::FEM_AdaptL ( FEM_Mesh m,
femMeshModify fm 
) [inline]

Initialize FEM_Adapt with a chunk of the mesh.

Definition at line 130 of file ParFUM_Adapt.h.

References FEM_Adapt::theMesh, and FEM_Adapt::theMod.

FEM_AdaptL::FEM_AdaptL ( femMeshModify fm  )  [inline]

Initialize FEM_Adapt with the femMeshModify object.

Definition at line 132 of file ParFUM_Adapt.h.

References FEM_Adapt::theMesh, and FEM_Adapt::theMod.


Member Function Documentation

int FEM_AdaptL::lockNodes ( int gotlocks,
int lockrnodes,
int  numRNodes,
int lockwnodes,
int  numWNodes 
)

lockrnodes and lockwnodes is the set of nodes that need to be locked with read and write locks respectively.

gotlocks is an array of all the nodes which specifies if locks for each nodes has been acquired or not

Definition at line 13 of file fem_adapt_lock.C.

References CthYield(), FEM_Modify_LockN(), FEM_Entity::ghost, femMeshModify::idx, FEM_Entity::is_valid(), FEM_Mesh::node, FEM_Adapt::theMesh, and FEM_Adapt::theMod.

Referenced by edge_bisect(), edge_contraction(), edge_contraction_help(), edge_flip(), FEM_Modify_correctLockN(), and vertex_remove().

Here is the call graph for this function:

Here is the caller graph for this function:

int FEM_AdaptL::unlockNodes ( int gotlocks,
int lockrnodes,
int  numRNodes,
int lockwnodes,
int  numWNodes 
)

Same as above, instead it unlocks the nodes.

Definition at line 82 of file fem_adapt_lock.C.

References FEM_Modify_UnlockN(), free(), FEM_Entity::ghost, femMeshModify::idx, FEM_Entity::is_valid(), malloc(), FEM_Mesh::node, FEM_Adapt::theMesh, and FEM_Adapt::theMod.

Referenced by femMeshModify::eatIntoElement(), edge_bisect(), edge_contraction(), edge_contraction_help(), edge_flip(), and vertex_remove().

Here is the call graph for this function:

Here is the caller graph for this function:

int FEM_AdaptL::edge_flip ( int  n1,
int  n2 
) [virtual]

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 from FEM_Adapt.

Definition at line 147 of file fem_adapt_lock.C.

References CthYield(), CpuTopoDetails::done, e1, FEM_Adapt::edge_flip_help(), FEM_Adapt::findAdjData(), free(), lockNodes(), malloc(), unlockNodes(), and warned.

Referenced by FEM_Adapt_Algs::refine_flip_element_leb().

Here is the call graph for this function:

Here is the caller graph for this function:

int FEM_AdaptL::edge_bisect ( int  n1,
int  n2 
) [virtual]

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 from FEM_Adapt.

Definition at line 215 of file fem_adapt_lock.C.

References CthYield(), CpuTopoDetails::done, e1, FEM_Adapt::edge_bisect_help(), FEM_Adapt::findAdjData(), free(), lockNodes(), malloc(), unlockNodes(), and warned.

Referenced by FEM_Adapt_Algs::Refine(), and FEM_Adapt_Algs::refine_element_leb().

Here is the call graph for this function:

Here is the caller graph for this function:

int FEM_AdaptL::vertex_remove ( int  n1,
int  n2 
) [virtual]

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 from FEM_Adapt.

Definition at line 273 of file fem_adapt_lock.C.

References CthYield(), CpuTopoDetails::done, e1, FEM_Adapt::findAdjData(), free(), lockNodes(), malloc(), FEM_Mesh::n2n_getAll(), FEM_Adapt::theMesh, unlockNodes(), FEM_Adapt::vertex_remove_help(), and warned.

Here is the call graph for this function:

int FEM_AdaptL::edge_contraction ( int  n1,
int  n2 
) [virtual]

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

n3 n3 o o / \ | / \ | \ / \ / \ | / \ / \ / \|/ n1 o---------o n2 o n5 / \ / \ /|\ / \ / \ / | \ \ / | \ / | o o n4 n4

Reimplemented from FEM_Adapt.

Definition at line 399 of file fem_adapt_lock.C.

References CthYield(), CpuTopoDetails::done, e1, FEM_Mesh::e2n_getAll(), edge_contraction_help(), FEM_Adapt::findAdjData(), free(), FEM_Entity::is_valid(), lockNodes(), malloc(), FEM_Mesh::node, FEM_Adapt::theMesh, unlockNodes(), and warned.

Referenced by FEM_Adapt_Algs::Coarsen(), and FEM_Adapt_Algs::simple_coarsen().

Here is the call graph for this function:

Here is the caller graph for this function:

int FEM_AdaptL::edge_contraction_help ( int e1P,
int e2P,
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 
)

void FEM_AdaptL::FEM_AdaptLSetMesh ( FEM_Mesh m  )  [inline]

Initialize FEM_Adapt with the FEM_Mesh object.

Definition at line 134 of file ParFUM_Adapt.h.

References FEM_Adapt::theMesh.

Referenced by femMeshModify::setPointersAfterMigrate().

Here is the caller graph for this function:

void FEM_AdaptL::pup ( PUP::er p  )  [inline]

Pup code for this class.

Reimplemented from FEM_Adapt.

Definition at line 136 of file ParFUM_Adapt.h.

Referenced by femMeshModify::pup().

Here is the caller graph for this function:

int FEM_AdaptL::lockNodes ( int gotlocks,
int lockrnodes,
int  numRNodes,
int lockwnodes,
int  numWNodes 
)

Lock the following set of read and write nodes.

int FEM_AdaptL::unlockNodes ( int gotlocks,
int lockrnodes,
int  numRNodes,
int lockwnodes,
int  numWNodes 
)

Lock the following set of read and write nodes.

int FEM_AdaptL::edge_flip ( int  n1,
int  n2 
) [virtual]

Perform a Delaunay flip of edge (n1, n2).

Reimplemented from FEM_Adapt.

int FEM_AdaptL::edge_bisect ( int  n1,
int  n2 
) [virtual]

Bisect edge (n1, n2) and the two adjacent elements.

Reimplemented from FEM_Adapt.

int FEM_AdaptL::vertex_remove ( int  n1,
int  n2 
) [virtual]

Remove the degree 4 vertex n1 without modifying degree of adj n2.

Reimplemented from FEM_Adapt.

int FEM_AdaptL::edge_contraction ( int  n1,
int  n2 
) [virtual]

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

Reimplemented from FEM_Adapt.

int FEM_AdaptL::edge_contraction_help ( int e1P,
int e2P,
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 for contract edge (n1, n2) and the two adjacent elements.

int FEM_AdaptL::eatIntoElement ( int  e,
bool  aggressive_node_removal = false 
)

Acquire an element in our ghost layer, turning it into a local element.

Definition at line 840 of file adapt.C.

References FEM_MUtil::eatIntoElement(), femMeshModify::fmUtil, and FEM_Adapt::theMod.

Here is the call graph for this function:

void FEM_AdaptL::residualLockTest (  ) 

Test the adaptivity system to see if any nodes are locked.

Definition at line 846 of file adapt.C.

References femMeshModify::fmMesh, femMeshModify::fmUtil, FEM_MUtil::residualLockTest(), and FEM_Adapt::theMod.

Here is the call graph for this function:

void FEM_AdaptL::unlockAll (  ) 

Release all currently held locks on this partition.

Definition at line 852 of file adapt.C.

References femMeshModify::fmMesh, femMeshModify::fmUtil, FEM_Adapt::theMod, and FEM_MUtil::unlockAll().

Here is the call graph for this function:

void FEM_AdaptL::structureTest (  ) 

Test the mesh for corruption in connectivity/adjacency.

Definition at line 857 of file adapt.C.

References femMeshModify::fmMesh, femMeshModify::fmUtil, FEM_MUtil::StructureTest(), and FEM_Adapt::theMod.

Here is the call graph for this function:


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

Generated on Mon Sep 21 08:23:57 2020 for Charm++ by  doxygen 1.5.5