
Go to the source code of this file.
Data Structures | |
| class | refineResults |
| class | refineResults::resRec |
| class | resultsRefineClient |
Functions | |
| CDECL void | REFINE2D_Init (void) |
| Create a new refinement object for this virtual processor. | |
| FDECL void | FTN_NAME (REFINE2D_INIT, refine2d_init) |
| CDECL void | REFINE2D_NewMesh (int nEl, int nGhost, const int *conn, const int *gid) |
| Push a new mesh into the refinement system. | |
| FDECL void | FTN_NAME (REFINE2D_NEWMESH, refine2d_newmesh) |
| CDECL void | REFINE2D_Split (int nNode, double *coord, int nEl, double *desiredArea) |
| Refine the mesh so each element has, at most, the given desired area. | |
| FDECL void | FTN_NAME (REFINE2D_SPLIT, refine2d_split) |
| static refineResults * | getResults (void) |
| CDECL int | REFINE2D_Get_Split_Length (void) |
| Get the number of split triangles. | |
| FDECL int | FTN_NAME (REFINE2D_GET_SPLIT_LENGTH, refine2d_get_split_length) |
| CDECL void | REFINE2D_Get_Split (int splitNo, const int *conn, int *triDest, int *A, int *B, int *C, double *fracDest, int *flags) |
| Return one split triangle. | |
| FDECL void | FTN_NAME (REFINE2D_GET_SPLIT, refine2d_get_split) |
| 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) |
| CDECL void | REFINE2D_Check (int nEl, const int *conn, int nNodes) |
| Check to make sure our connectivity and the refine connectivity agree. | |
| FDECL void | FTN_NAME (REFINE2D_CHECK, refine2d_check) |
| CDECL void REFINE2D_Init | ( | void | ) |
Create a new refinement object for this virtual processor.
Must be called exactly once at startup.
Definition at line 18 of file refine.C.
Referenced by FEM_REFINE2D_Init(), and FTN_NAME().
| FDECL void FTN_NAME | ( | REFINE2D_INIT | , | |
| refine2d_init | ||||
| ) |
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).
Definition at line 48 of file refine.C.
References CkWaitQD(), MPI_Barrier(), and MPI_COMM_WORLD.
Referenced by FEM_REFINE2D_Newmesh().
| FDECL void FTN_NAME | ( | REFINE2D_NEWMESH | , | |
| refine2d_newmesh | ||||
| ) |
Refine the mesh so each element has, at most, the given desired area.
Coord gives the (x,y) coordinates of nodes 0..nNode-1. coord[2*j+0] is the x coordinate of node j coord[2*j+1] is the y coordinate of node j
desiredArea[i] gives the desired area of element i. nEl must be equal to the "nEl" value passed in via REFINE_NewMesh plus the number of "split" calls received during earlier refinements.
Definition at line 147 of file refine.C.
References C, CkWaitQD(), chunk::multipleRefine(), chunk::refineResultsStorage, and chunk::updateNodeCoords().
Referenced by FEM_REFINE2D_Split(), and FTN_NAME().
| FDECL void FTN_NAME | ( | REFINE2D_SPLIT | , | |
| refine2d_split | ||||
| ) |
| static refineResults* getResults | ( | void | ) | [static] |
Definition at line 166 of file refine.C.
References C, and chunk::refineResultsStorage.
Referenced by FTN_NAME(), REFINE2D_Get_Split(), and REFINE2D_Get_Split_Length().
| CDECL int REFINE2D_Get_Split_Length | ( | void | ) |
Get the number of split triangles.
Definition at line 176 of file refine.C.
Referenced by FEM_REFINE2D_Split(), and FTN_NAME().
| FDECL int FTN_NAME | ( | REFINE2D_GET_SPLIT_LENGTH | , | |
| refine2d_get_split_length | ||||
| ) |
| CDECL void REFINE2D_Get_Split | ( | int | splitNo, | |
| const int * | conn, | |||
| int * | tri, | |||
| int * | A, | |||
| int * | B, | |||
| int * | C, | |||
| double * | frac, | |||
| int * | flags | |||
| ) |
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 187 of file refine.C.
References refineResults::extract(), and getResults().
Referenced by FEM_REFINE2D_Split().
| FDECL void FTN_NAME | ( | REFINE2D_GET_SPLIT | , | |
| refine2d_get_split | ||||
| ) |
Definition at line 219 of file refine.C.
References checkElement(), chunk::cid, chunk::numElements, chunk::numNodes, chunk::sanityCheck(), and chunk::theElements.
Referenced by FTN_NAME(), and REFINE2D_Check().
| FDECL void FTN_NAME | ( | REFINE2D_CHECK | , | |
| refine2d_check | ||||
| ) |
1.5.5