PPL Logo

libs/ck-libs/TMRC2D/refine.C File Reference

Go to the source code of this file.

Data Structures

class  refineResults
class  resultsRefineClient
class  coarsenResults
class  resultsCoarsenClient

Functions

CLINKAGE void REFINE2D_Init (void)
 Create a new refinement object for this virtual processor.
FLINKAGE void FTN_NAME (REFINE2D_INIT, refine2d_init)
CLINKAGE void REFINE2D_NewMesh (int meshID, int nEl, int nGhost, int nnodes, const int *conn, const int *gid, const int *boundaries, const int *edgeBounds, const int *edgeConn, int nEdges)
 Push a new mesh into the refinement system.
void FEM_Modify_IDXL (FEM_Refine_Operation_Data *data, refineData &d)
void FEM_Coarsen_Operation (FEM_Operation_Data *coarsen_data, coarsenData &operation)
CLINKAGE void REFINE2D_Split (int nNode, double *coord, int nEl, double *desiredArea, FEM_Refine_Operation_Data *refine_data)
CLINKAGE void REFINE2D_Coarsen (int nNode, double *coord, int nEl, double *desiredArea, FEM_Operation_Data *data)
FLINKAGE void FTN_NAME (REFINE2D_SPLIT, refine2d_split)
static refineResultsgetResults (void)
CLINKAGE int REFINE2D_Get_Split_Length (void)
 Get the number of split triangles.
FLINKAGE int FTN_NAME (REFINE2D_GET_SPLIT_LENGTH, refine2d_get_split_length)
CLINKAGE void REFINE2D_Get_Split (int splitNo, refineData *d)
 Return one split triangle.
FLINKAGE void FTN_NAME (REFINE2D_GET_SPLIT, refine2d_get_split)
static coarsenResultsgetCoarsenResults (void)
CLINKAGE int REFINE2D_Get_Collapse_Length ()
CLINKAGE void REFINE2D_Get_Collapse (int i, coarsenData *output)
static int checkElement (chunk *C, const element &e, const int *uc, int idxBase)
static void checkConn (int nEl, const int *conn, int idxBase, int nNode)
CLINKAGE void REFINE2D_Check (int nEl, const int *conn, int nNodes)
 Check to make sure our connectivity and the refine connectivity agree.
FLINKAGE void FTN_NAME (REFINE2D_CHECK, refine2d_check)


Function Documentation

CLINKAGE void REFINE2D_Init ( void   ) 

Create a new refinement object for this virtual processor.

Must be called exactly once at startup.

Definition at line 16 of file refine.C.

References CkArrayOptions::bindTo(), comm, TCharm::get(), TCharm::getNumElements(), TCharm::getProxy(), mesh, MPI_Bcast, MPI_Comm_rank, chunkMsg::myThreads, chunkMsg::nChunks, rank, and TCharm::suspend().

Here is the call graph for this function:

FLINKAGE void FTN_NAME ( REFINE2D_INIT  ,
refine2d_init   
)

Definition at line 40 of file refine.C.

References REFINE2D_Init().

Here is the call graph for this function:

CLINKAGE void REFINE2D_NewMesh ( int  meshID,
int  nEl,
int  nGhost,
int  nnodes,
const int conn,
const int gid,
const int boundaries,
const int edgeBounds,
const int edgeConn,
int  nEdges 
)

Push a new mesh into the refinement system.

This is the first call user programs make into the refinement system. This call need *not* be repeated when the refinement system changes the mesh; only when the user changes the mesh (e.g., to coarsen it).

Conn is row-major, and maps an element number to three node numbers. Hence conn[i*3+j] gives the local number of node j of element i. Because of shared nodes, every node of every local element will be local. Ghost elements may not have the complete set of nodes-- some of their nodes may have the invalid number -1.

Elements with numbers between 0 and nEl-1 (inclusive) are local. Elements with numbers between nEl and nGhost-1 (inclusive) are "ghosts"-- elements that are actually local on another processor. There are guaranteed to be enough ghosts that every local element's non-boundary edge will face a ghost element.

gid maps an element number to a chunk number and local number on that chunk. These are stored at gid[i*2+0] (chunk number) and gid[i*2+1] (local number).

boundaries is the boundary flags for nodes. boundaries may be null, if the user doesnt specify boundary flags. nnodes specifies the number of nodes

Definition at line 46 of file refine.C.

References CkWaitQD(), and MPI_Barrier.

Here is the call graph for this function:

void FEM_Modify_IDXL ( FEM_Refine_Operation_Data data,
refineData d 
)

Definition at line 261 of file femrefine.C.

References refineData::A, refineData::B, between(), refineData::D, FEM_Refine_Operation_Data::node, FEM_Node::shared, and splitEntity().

Referenced by resultsRefineClient::split().

Here is the call graph for this function:

Here is the caller graph for this function:

void FEM_Coarsen_Operation ( FEM_Operation_Data coarsen_data,
coarsenData operation 
)

CLINKAGE void REFINE2D_Split ( int  nNode,
double *  coord,
int  nEl,
double *  desiredArea,
FEM_Refine_Operation_Data refine_data 
)

Definition at line 244 of file refine.C.

References C, chunk::multipleRefine(), chunk::refineResultsStorage, and chunk::updateNodeCoords().

Here is the call graph for this function:

CLINKAGE void REFINE2D_Coarsen ( int  nNode,
double *  coord,
int  nEl,
double *  desiredArea,
FEM_Operation_Data data 
)

Definition at line 257 of file refine.C.

References C, chunk::coarsenResultsStorage, chunk::multipleCoarsen(), and chunk::updateNodeCoords().

Referenced by FEM_REFINE2D_Coarsen().

Here is the call graph for this function:

Here is the caller graph for this function:

FLINKAGE void FTN_NAME ( REFINE2D_SPLIT  ,
refine2d_split   
)

Definition at line 272 of file refine.C.

References data, and REFINE2D_Split().

Here is the call graph for this function:

static refineResults* getResults ( void   )  [static]

Definition at line 278 of file refine.C.

References C, and chunk::refineResultsStorage.

CLINKAGE int REFINE2D_Get_Split_Length ( void   ) 

Get the number of split triangles.

Definition at line 288 of file refine.C.

References refineResults::countResults(), and getResults().

Here is the call graph for this function:

FLINKAGE int FTN_NAME ( REFINE2D_GET_SPLIT_LENGTH  ,
refine2d_get_split_length   
)

Definition at line 293 of file refine.C.

References REFINE2D_Get_Split_Length().

Here is the call graph for this function:

CLINKAGE void REFINE2D_Get_Split ( int  splitNo,
refineData d 
)

Return one split triangle.

A and B are the nodes along the splitting edge:

C C / \ /|\ / \ / | \ / \ => / | \ / tri \ / | \ / \ /tri | new\ B --------- A B --- D --- A

The original triangle's node A should be replaced by D; while a new triangle should be inserted with nodes CAD.

The new node D's location should equal A*(1-frac)+B*frac. For a simple splitter, frac will always be 0.5.

If nodes A and B are shared with some other processor, that processor will also receive a "split" call for the same edge. If nodes A and B are shared by some other local triangle, that triangle will immediately receive a "split" call for the same edge.

Parameters: -splitNo is the number of this split. Pass splitNo in increasing order from 0 to REFINE2D_Get_Split_Length()-1. -conn is the triangle connectivity array, used to look up the node numbers A, B, and C. This array is *not* modified. -tri returns the number of the old triangle being split; as labelled above. -A,B,C returns the numbers of the nodes in the above diagram. -frac returns the weighting for D between A and B; for now, this is always 0.5.

Client's responsibilities: -Add the new node D. Since both sides of a shared local edge will receive a "split" call, you must ensure the node is not added twice; you can do this by checking this split's nodes A and B against the previous split. -Update connectivity for source triangle -Add new triangle.

Definition at line 299 of file refine.C.

References refineResults::extract(), getResults(), and r.

Here is the call graph for this function:

FLINKAGE void FTN_NAME ( REFINE2D_GET_SPLIT  ,
refine2d_get_split   
)

Definition at line 305 of file refine.C.

References refineResults::extract(), getResults(), and r.

Here is the call graph for this function:

static coarsenResults* getCoarsenResults ( void   )  [static]

Definition at line 313 of file refine.C.

References C, and chunk::coarsenResultsStorage.

Referenced by REFINE2D_Get_Collapse(), and REFINE2D_Get_Collapse_Length().

Here is the caller graph for this function:

CLINKAGE int REFINE2D_Get_Collapse_Length (  ) 

Definition at line 324 of file refine.C.

References coarsenResults::countResults(), and getCoarsenResults().

Referenced by FEM_REFINE2D_Coarsen().

Here is the call graph for this function:

Here is the caller graph for this function:

CLINKAGE void REFINE2D_Get_Collapse ( int  i,
coarsenData output 
)

Definition at line 332 of file refine.C.

References coarsenResults::extract(), and getCoarsenResults().

Here is the call graph for this function:

static int checkElement ( chunk C,
const element e,
const int uc,
int  idxBase 
) [static]

Definition at line 337 of file refine.C.

static void checkConn ( int  nEl,
const int conn,
int  idxBase,
int  nNode 
) [static]

Definition at line 354 of file refine.C.

References C, checkElement(), chunk::cid, chunk::numElements, chunk::numNodes, and chunk::theElements.

Here is the call graph for this function:

CLINKAGE void REFINE2D_Check ( int  nEl,
const int conn,
int  nNodes 
)

Check to make sure our connectivity and the refine connectivity agree.

Definition at line 388 of file refine.C.

References checkConn().

Here is the call graph for this function:

FLINKAGE void FTN_NAME ( REFINE2D_CHECK  ,
refine2d_check   
)

Definition at line 391 of file refine.C.

References checkConn().

Here is the call graph for this function:


Generated on Mon Sep 21 08:11:24 2020 for Charm++ by  doxygen 1.5.5