00001
00002
00003
00004
00005
00006
00007 #ifndef _UIUC_CHARM_REFINE_IMPL_H
00008 #define _UIUC_CHARM_REFINE_IMPL_H
00009
00010 #ifdef __cplusplus
00011 extern "C" {
00012 #endif
00013
00014
00015
00016 void REFINE2D_Init(void);
00017
00044 void REFINE2D_NewMesh(int meshID, int nEl, int nGhost, int nnodes,
00045 const int *conn, const int *gid,
00046 const int *boundaries, const int *edgeBounds,
00047 const int *edgeConn, int nEdges);
00048
00060 class FEM_Refine_Operation_Data;
00061 void REFINE2D_Split(int nNode, double *coord, int nEl, double *desiredArea,FEM_Refine_Operation_Data *refine_data);
00062
00063 typedef struct{
00064 int tri,A,B,C,D, _new,origEdgeB, newEdge1B, newEdge2B;
00065 double frac;
00066 int flag;
00067 } refineData;
00068
00069
00070
00071 int REFINE2D_Get_Split_Length(void);
00072
00116 void REFINE2D_Get_Split(int splitNo, refineData *d);
00117
00118
00119
00120
00121 typedef struct {
00122 int elemID, nodeToKeep, nodeToDelete;
00123 double newX, newY;
00124 int flag;
00125 int boundaryFlag;
00126 double frac;
00127 } collapseData;
00128
00129
00130 typedef struct {
00131 int nodeID, boundaryFlag;
00132 double newX, newY;
00133 } updateData;
00134
00135
00136 typedef struct {
00137 int elemID, relnodeID, oldNodeID, newNodeID;
00138 } replacedeleteData;
00139
00140
00141
00142 enum {INVALID=0,COLLAPSE,UPDATE,REPLACE};
00143 typedef struct {
00144 int type;
00145 union {
00146 collapseData cdata;
00147 updateData udata;
00148 replacedeleteData rddata;
00149 } data;
00150 } coarsenData;
00151
00152 class FEM_Operation_Data;
00153 void REFINE2D_Coarsen(int nNode, double *coord, int nEl, double *desiredArea,
00154 FEM_Operation_Data *data);
00155
00156
00157
00158 void REFINE2D_Get_Collapse(int i, coarsenData *output);
00159 int REFINE2D_Get_Collapse_Length();
00160
00161
00162 void REFINE2D_Check(int nEle, const int *conn, int nNodes);
00163
00164 #ifdef __cplusplus
00165 };
00166 #endif
00167
00168 #endif
00169
00170