chunk Class Reference

#include <chunk.h>

Inheritance diagram for chunk:

Inheritance graph
[legend]
Collaboration diagram for chunk:

Collaboration graph
[legend]

Public Member Functions

 chunk (int nChunks)
 chunk (CkMigrateMessage *)
void refineElement (int idx, double volume)
void refineElement (int idx)
void refiningElements ()
void coarsenElement (int idx, double volume)
void coarseningElements ()
void improveMesh ()
void relocatePoints ()
void flippingElements ()
intMsglockChunk (int lh, double prio)
void unlockChunk (int lh)
int lockLocalChunk (int lh, double prio)
void unlockLocalChunk (int lh)
void removeLock (int lh)
void insertLock (int lh, double prio)
void print ()
void out_print ()
nodeMsggetNode (int n)
void updateNodeCoord (nodeMsg *)
void relocationVote (nodeVoteMsg *)
doubleMsggetVolume (intMsg *im)
void setTargetVolume (doubleMsg *)
void resetTargetVolume (doubleMsg *)
elemRef findNeighbor (nodeRef nr1, nodeRef nr2, nodeRef nr3, int lidx)
refMsgfindRemoteNeighbor (threeNodeMsg *)
intMsgcheckFace (int idx, elemRef face)
intMsgcheckFace (int idx, node n1, node n2, node n3, elemRef nbr)
intMsglockLF (int idx, node n1, node n2, node n3, node n4, elemRef requester, double prio)
splitResponsesplitLF (int idx, node in1, node in2, node in3, node in4, elemRef requester)
LEsplitResultLEsplit (LEsplitMsg *)
lockResultlockArc (lockArcMsg *lm)
void unlockArc1 (int idx, int prio, elemRef parentRef, elemRef destRef, node aNode, node bNode)
void unlockArc2 (int idx, int prio, elemRef parentRef, elemRef destRef, node aNode, node bNode)
void updateFace (int idx, int rcid, int ridx)
void updateFace (int idx, elemRef oldElem, elemRef newElem)
flip23responseflip23remote (flip23request *)
flip32responseflip32remote (flip32request *fr)
flip32responseremove32element (flip32request *fr)
void debug_print (int c)
void splitAll (nodeRef le1, nodeRef le2, nodeRef mid, int elemId)
nodeRef findNode (node n)
int nodeOnSurface (int n)
int edgeOnSurface (int n1, int n2)
int faceOnSurface (int n1, int n2, int n2)
void updateFace (int n1, int n2, int n3, int oldNode, int newNode)
void addFace (int n1, int n2, int n3)
void removeFace (int n1, int n2, int n3)
void simpleAddFace (int n1, int n2, int n3)
void simpleUpdateFace (int n1, int n2, int n3, int newNode)
void simpleRemoveFace (int n1, int n2, int n3)
void printSurface ()
void printEdgeLists ()
void getAccessLock ()
void forcedGetAccessLock ()
void releaseAccessLock ()
void getAdjustLock ()
void releaseAdjustLock ()
void allocMesh (int nEl)
void adjustMesh ()
nodeRef addNode (node &n)
elemRef addElement (nodeRef &nr1, nodeRef &nr2, nodeRef &nr3, nodeRef &nr4)
void removeNode (intMsg *)
void removeElement (intMsg *)
void newMesh (int nEl, int nGhost, const int *conn_, const int *gid_, int *surface, int nSurFaces, int idxOffset)
void updateNodeCoords (int nNode, double *coord, int nEl, int nFx, int *fixed)
void deriveFaces ()
void refine (double *desiredVolume, refineClient *client)
void coarsen (double *desiredVolume, refineClient *client)
void improve (refineClient *client)
void newMesh (meshMsg *)
void updateNodeCoords (coordMsg *)
void refine ()
void start ()
void improve ()
void finalizeImprovements ()
void checkRefine ()
 chunk (chunkMsg *)
 chunk (CkMigrateMessage *m)
void sanityCheck (void)
void setupThreadPrivate (CthThread forThread)
void refineElement (int i, double area)
void refiningElements ()
void updateElement (int i, objRef oldval, objRef newval)
void specialRequest (int reqestee, elemRef requester)
void specialRequestResponse (int i, double newNodeX, double newNodeY, double otherNodeX, double otherNodeY, edgeRef newLongEdgeRef)
doubleMsggetArea (int i)
intMsglock (int i)
void unlock (int i)
intMsglocked (int i)
intMsgcheckElement (objRef oR, int i)
refMsggetNeighbor (objRef oR, int i)
void setTargetArea (int i, double area)
void updateEdges (int i, edgeRef e0, edgeRef e1, edgeRef e2)
void unsetDependency (int i)
void setDependent (objRef oR, int i)
intMsghasDependent (int i)
void accessLock ()
void releaseLock ()
void adjustFlag ()
void adjustLock ()
void adjustRelease ()
void print ()
void updateNodeCoords (int nNode, double *coord, int nEl)
void multipleRefine (double *desiredArea, refineClient *client)
void newMesh (int nEl, int nGhost, const int *conn_, const int *gid_, int idxOffset)
void addRemoteEdge (int elem, int localEdge, edgeRef er)
void setModified ()
int isModified ()
void setRefining ()
int isRefining ()
void allocMesh (int nEl)
void adjustMesh ()
int addNode (node n)
edgeRef addEdge ()
elemRef addElement (int n1, int n2, int n3)
elemRef addElement (int n1, int n2, int n3, edgeRef er1, edgeRef er2, edgeRef er3)
void debug_print (int c)
void out_print ()
 chunk (chunkMsg *)
 chunk (CkMigrateMessage *m)
void sanityCheck (void)
void validCheck (void)
void deriveBoundaries (int *conn, int *gid)
void tweakMesh ()
void improveChunk ()
void improve ()
void deriveEdges (int *conn, int *gid, const int *edgeBounds, const int *edgeConn, int nEdges)
void refineElement (int idx, double area)
void refiningElements ()
void coarsenElement (int idx, double area)
void coarseningElements ()
intMsgsafeToMoveNode (int idx, double x, double y)
splitOutMsgsplit (int idx, elemRef e, int oIdx, int fIdx)
void collapse (int idx, elemRef e, int kIdx, int dIdx, elemRef kNbr, elemRef dNbr, edgeRef kEdge, edgeRef dEdge, node newN, double frac)
splitOutMsgflipPreventE (int idx, elemRef e, int kIdx, int dIdx, elemRef kNbr, elemRef dNbr, edgeRef kEdge, edgeRef dEdge, node newN)
void nodeReplaceDelete (int kIdx, int dIdx, node nn, int shared, int *chk, int *idx)
boolMsgflipPrevent (int kIdx, int dIdx, node nn, int shared, int *chk, int *idx)
intMsgisPending (int idx, objRef e)
void checkPending (int idx, objRef aRef)
void checkPending (int idx, objRef aRef1, objRef aRef2)
void updateElement (int idx, objRef oldval, objRef newval, int b)
void updateElementEdge (int idx, objRef oldval, objRef newval)
void updateReferences (int idx, objRef oldval, objRef newval)
doubleMsggetArea (int n)
void resetEdge (int n)
refMsggetNbr (int idx, objRef aRef)
void setTargetArea (int idx, double aDouble)
void resetTargetArea (int idx, double aDouble)
void reportPos (int idx, double x, double y)
void accessLock ()
void releaseLock ()
void adjustFlag ()
void adjustLock ()
void adjustRelease ()
void print ()
void newMesh (int meshID_, int nEl, int nGhost, const int *conn_, const int *gid_, int nnodes, const int *boundaries, int nEdges, const int *edgeConn, const int *edgeBounds, int idxOffset)
void multipleRefine (double *desiredArea, refineClient *client)
void multipleCoarsen (double *desiredArea, refineClient *client)
void updateNodeCoords (int nNode, double *coord, int nEl)
void addRemoteEdge (int elem, int localEdge, edgeRef er)
void setRefining ()
int isRefining ()
void allocMesh (int nEl)
void adjustMesh ()
intMsgaddNode (node n, int b1, int b2, int internal)
edgeRef addEdge (int n1, int n2, int b)
edgeRef addEdge (int n1, int n2, const int *edgeBounds, const int *edgeConn, int nEdges)
elemRef addElement (int n1, int n2, int n3)
elemRef addElement (int n1, int n2, int n3, edgeRef er1, edgeRef er2, edgeRef er3)
void removeNode (int n)
void removeEdge (int n)
void removeElement (int n)
void debug_print (int c)
void out_print ()
void dump ()
intMsglockChunk (int lhc, int lhi, double prio)
void unlockChunk (int lhc, int lhi)
int lockLocalChunk (int lhc, int lhi, double prio)
void unlockLocalChunk (int lhc, int lhi)
void removeLock (int lhc, int lhi)
void insertLock (int lhc, int lhi, double prio)
void fixNode (int nIdx, int chkid)
int joinCommLists (int nIdx, int shd, int *chk, int *idx, int *rChk, int *rIdx)
void addToStack (int eIdx, double len, int cFlag)
void rebubble (int cFlag)
void Insert (int elID, double len, int cFlag)
int Delete_Min (int cFlag)
intMsggetBoundary (int edgeIdx)
void incnonCoarsen (int idx)
void resetnonCoarsen (int idx)
intMsgneighboring (int idx, elemRef e)
intMsgsafeToCoarsen (int idx, edgeRef e)

Data Fields

int lock
int lockHolder
int lockCount
double lockPrio
double smoothness
prioLockRequests lockList
std::vector< elementtheElements
std::vector< nodetheNodes
std::vector< std::vector<
int > > 
theSurface
refineClienttheClient
refineResultsrefineResultsStorage
refineResultsrefineResultsStorage
int numEdges
int numGhosts
std::vector< elementtheElements
std::vector< edgetheEdges
std::vector< nodetheNodes
refineClienttheClient
int meshID
FEM_MeshmeshPtr
refineResultsrefineResultsStorage
coarsenResultscoarsenResultsStorage
std::vector< elementtheElements
std::vector< edgetheEdges
std::vector< nodetheNodes
refineClienttheClient
int elementSlots
int edgeSlots
int nodeSlots
int lockHolderIdx
int lockHolderCid

Private Member Functions

void deriveNodes ()
int edgeLocal (elemRef e1, elemRef e2)
int findEdge (int n1, int n2)
int addNewEdge ()
int getNbrRefOnEdge (int n1, int n2, int *conn, int nGhost, int *gid, int idx, elemRef *er)
int hasEdge (int n1, int n2, int *conn, int idx)
void setupThreadPrivate (CthThread forThread)
void deriveNodes ()
int edgeLocal (elemRef e1, elemRef e2)
int getNbrRefOnEdge (int n1, int n2, int *conn, int nGhost, int *gid, int idx, elemRef *er)
int hasEdge (int n1, int n2, int *conn, int idx)

Private Attributes

int cid
int numElements
int numNodes
int numChunks
int sizeElements
int sizeNodes
int additions
int coordsRecvd
int debug_counter
int refineInProgress
int coarsenInProgress
int modified
int accessLock
int adjustLock
int sizeEdges
int meshLock
int meshExpandFlag
int firstFreeElement
int firstFreeEdge
int firstFreeNode
int edgesSent
int edgesRecvd
int first
elemHeapcoarsenElements
elemHeaprefineElements
elemHeaprefineStack
int refineTop
int refineHeapSize
int coarsenHeapSize
intconn
intgid

Data Structures

struct  elemHeap

Detailed Description

Definition at line 50 of file chunk.h.


Constructor & Destructor Documentation

chunk::chunk ( int  nChunks  ) 

Definition at line 19 of file chunk.C.

References cid, numChunks, refineResultsStorage, and ArrayElementT< T >::thisIndex.

Referenced by joinCommLists().

chunk::chunk ( CkMigrateMessage  )  [inline]

Definition at line 84 of file chunk.h.

chunk::chunk ( chunkMsg  ) 

Definition at line 834 of file tri.C.

References cid, CkFreeMsg(), chunkMsg::nChunks, numChunks, refineResultsStorage, TCharm::resume(), TCharmClient1D::tcharmClientInit(), ArrayElementT< T >::thisIndex, and TCharmClient1D::thread.

chunk::chunk ( CkMigrateMessage m  )  [inline]

Definition at line 487 of file tri.h.

chunk::chunk ( chunkMsg  ) 

chunk::chunk ( CkMigrateMessage m  )  [inline]

Definition at line 192 of file tri.h.


Member Function Documentation

void chunk::refineElement ( int  idx,
double  volume 
)

Definition at line 33 of file chunk.C.

References cid, mesh, modified, numElements, refineInProgress, and theElements.

void chunk::refineElement ( int  idx  ) 

Definition at line 48 of file chunk.C.

References cid, getVolume(), mesh, modified, numElements, refineInProgress, and theElements.

void chunk::refiningElements (  ) 

Definition at line 63 of file chunk.C.

References adjustMesh(), cid, Converse::CkMyPe(), CthYield(), getVolume(), mesh, modified, numChunks, numElements, print(), refineInProgress, and theElements.

void chunk::coarsenElement ( int  idx,
double  volume 
)

Definition at line 98 of file chunk.C.

References cid, coarsenInProgress, mesh, modified, numElements, and theElements.

void chunk::coarseningElements (  ) 

Definition at line 113 of file chunk.C.

References Converse::CkMyPe(), coarsenInProgress, CthYield(), getVolume(), mesh, modified, numElements, print(), and theElements.

void chunk::improveMesh (  ) 

Definition at line 136 of file chunk.C.

References numElements, and theElements.

void chunk::relocatePoints (  ) 

Definition at line 142 of file chunk.C.

References numNodes, and theNodes.

void chunk::flippingElements (  ) 

Definition at line 148 of file chunk.C.

References cid, and theElements.

intMsg * chunk::lockChunk ( int  lh,
double  prio 
)

Definition at line 157 of file chunk.C.

References intMsg::anInt, and lockLocalChunk().

void chunk::unlockChunk ( int  lh  ) 

Definition at line 262 of file chunk.C.

References unlockLocalChunk().

int chunk::lockLocalChunk ( int  lh,
double  prio 
)

Definition at line 164 of file chunk.C.

References free(), prioLockStruct::holder, insertLock(), lock, lockCount, lockHolder, lockList, lockPrio, prioLockStruct::next, prioLockStruct::prio, and removeLock().

Referenced by edge::buildLockingCloud(), edge::flipPrevent(), lockChunk(), element::lockLF(), element::refineCP(), element::refineLE(), and element::refineLF().

void chunk::unlockLocalChunk ( int  lh  ) 

Definition at line 267 of file chunk.C.

References lock, lockCount, lockHolder, and lockPrio.

Referenced by edge::buildLockingCloud(), edge::flipPrevent(), element::lockArc(), element::lockLF(), element::refineCP(), element::refineLE(), element::refineLF(), element::unlockArc1(), element::unlockArc2(), unlockChunk(), and edge::unlockCloudRemoveEdge().

void chunk::removeLock ( int  lh  ) 

Definition at line 243 of file chunk.C.

References free(), prioLockStruct::holder, lockList, and prioLockStruct::next.

Referenced by lockLocalChunk().

void chunk::insertLock ( int  lh,
double  prio 
)

Definition at line 213 of file chunk.C.

References prioLockStruct::holder, lockList, malloc(), prioLockStruct::next, and prioLockStruct::prio.

Referenced by lockLocalChunk().

void chunk::print (  ) 

Definition at line 282 of file chunk.C.

References debug_counter, debug_print(), getAccessLock(), and releaseAccessLock().

Referenced by coarseningElements(), and refiningElements().

void chunk::out_print (  ) 

Definition at line 290 of file chunk.C.

References cid, nodes, numChunks, numElements, numNodes, theElements, and theNodes.

Referenced by multipleRefine().

nodeMsg * chunk::getNode ( int  n  ) 

Definition at line 318 of file chunk.C.

References nodeMsg::coord, n, numNodes, and theNodes.

void chunk::updateNodeCoord ( nodeMsg  ) 

Definition at line 328 of file chunk.C.

References CkFreeMsg(), nodeMsg::coord, nodeMsg::idx, numNodes, and theNodes.

void chunk::relocationVote ( nodeVoteMsg  ) 

Definition at line 335 of file chunk.C.

References CkFreeMsg(), nodeVoteMsg::newCoord, numNodes, nodeVoteMsg::oldCoord, and theNodes.

doubleMsg * chunk::getVolume ( intMsg im  ) 

Definition at line 349 of file chunk.C.

References doubleMsg::aDouble, intMsg::anInt, CkFreeMsg(), numElements, and theElements.

Referenced by checkRefine(), coarseningElements(), refine(), refineElement(), and refiningElements().

void chunk::setTargetVolume ( doubleMsg  ) 

Definition at line 358 of file chunk.C.

References doubleMsg::aDouble, cid, CkFreeMsg(), doubleMsg::idx, mesh, modified, numElements, refineInProgress, and theElements.

Referenced by refine().

void chunk::resetTargetVolume ( doubleMsg  ) 

Definition at line 371 of file chunk.C.

References doubleMsg::aDouble, CkFreeMsg(), doubleMsg::idx, modified, numElements, and theElements.

elemRef chunk::findNeighbor ( nodeRef  nr1,
nodeRef  nr2,
nodeRef  nr3,
int  lidx 
)

Definition at line 473 of file chunk.C.

References refMsg::cid, cid, objRef::cid, faceOnSurface(), refMsg::idx, objRef::idx, mesh, numChunks, numElements, theElements, and theNodes.

Referenced by deriveFaces().

refMsg * chunk::findRemoteNeighbor ( threeNodeMsg  ) 

Definition at line 511 of file chunk.C.

References cid, refMsg::cid, CkFreeMsg(), threeNodeMsg::coords, refMsg::idx, numElements, and theElements.

intMsg * chunk::checkFace ( int  idx,
elemRef  face 
)

Definition at line 410 of file chunk.C.

References intMsg::anInt, getAccessLock(), releaseAccessLock(), and theElements.