00001 00008 #ifndef _UIUC_CHARM_FEMREFINE_IMPL_H 00009 #define _UIUC_CHARM_FEMREFINE_IMPL_H 00010 00011 typedef void (*repeat_split_fn)(void *data); 00012 /*system attribute of an entity which marks whether a node is valid or not 00013 node and element width = 1 and type = FEM_BYTE 00014 */ 00015 #define FEM_VALID FEM_ATTRIB_TAG_MAX-1 00016 00017 #ifdef __cplusplus 00018 extern "C" { 00019 #endif 00020 00021 /*** 00022 * Create a new refinement object for this virtual processor. 00023 * Must be called exactly once at startup. 00024 */ 00025 00026 void FEM_REFINE2D_Init(); 00027 00028 00029 /* 00030 * Use this call to set up the refinement framework for 00031 * a new mesh. This must be called before the split call. 00032 meshID - mesh to refine 00033 nodeID - FEM_NODE +t .. which type of nodes to refine 00034 elemID - FEM_ELEM +t .. which type of element to refine 00035 nodeBoundary - nodeBoundary marks whether nodes have boundary flags 00036 */ 00037 00038 void FEM_REFINE2D_Newmesh(int meshID,int nodeID,int elemID,int nodeBoundary=0); 00039 00040 /* This function refines a mesh, to the desired degree and updates the FEM mesh. 00041 Arguments 00042 meshID - which mesh 00043 nodeID - FEM_NODE+t .. which type of nodes 00044 coord - the cordinate of each node in an array of doubles 00045 node i has its x,y cordinates in coord[2*i] and coord[2*i+1] 00046 elemID - FEM_ELEM+t .. type of element 00047 desiredAreas - desiredArea[i] gives the desired area of element i. 00048 */ 00049 00050 void FEM_REFINE2D_Split(int meshID,int nodeID,double *coord,int elemID,double *desiredAreas,int sparseID=-1); 00051 00052 void FEM_REFINE2D_Coarsen(int meshID,int nodeID,double *coord,int elemID,double *desiredAreas,int sparseID=-1); 00053 00054 00055 #ifdef __cplusplus 00056 }; 00057 #endif 00058 00059 00060 #endif