MA.h
1 /******************************************************************************
2 
3  (c) 2004-2014 Scientific Computation Research Center,
4  Rensselaer Polytechnic Institute. All rights reserved.
5 
6  The LICENSE-SCOREC file included with this distribution describes the terms
7  of the SCOREC Non-Commercial License this program is distributed under.
8 
9 *******************************************************************************/
10 #ifndef H_MA
11 #define H_MA
12 
13 /* MA.h, Version 1.1 beta */
14 #include "pumi_mesh.h"
15 #include "MeshAdapt.h"
16 
17 #ifdef CURVE
18 #include "curveMesh.h"
19 #endif /* CURVE */
20 
21 #ifdef __cplusplus
22 extern "C"
23 {
24 #endif
25 
26 #ifdef __cplusplus
27 typedef class meshAdapt* pMAdapt;
28 #ifdef CURVE
29 typedef class curveMesh* pCrvMesh;
30 #endif /* CURVE */
31 #else
32 typedef struct meshAdapt* pMAdapt;
33 #ifdef CURVE
34 typedef struct curveMesh* pCrvMesh;
35 #endif /* CURVE */
36 #endif
37 
38 typedef pMAdapt pMSAdapt;
39 
48 void MA_Adapt(pMAdapt pMAdaptDrvr);
49 
50 
58 void MA_Del(pMAdapt pMAdaptDrvr);
59 
60 
70 void MA_NewMeshAdaptDrvr(pMAdapt &pMAdaptDrvr, pMeshMdl pMeshInstance, int iSizeFldType);
71 
72 
74 void MA_NewMeshAdaptDrvr_ModelType(pMAdapt &pMAdaptDrvr, pMeshMdl pMeshInstance, int iSizeFldType, int iModelType);
75 
76 
87 void MA_SetAnisoVtxSize(pMAdapt pMAdaptDrvr, pumi::pVertex pVertexVtx, double ddSize[3][3]);
88 
89 
100 void MA_SetCB(pMAdapt pMAdaptDrvr, CBFunction CB, void *userData);
101 
102 
113 void MA_SetIsoVtxSize(pMAdapt pMAdaptDrvr, pumi::pVertex pVertexVtx, double dSize);
114 
115 
124 void MA_SetNumIt(pMAdapt pMAdaptDrvr, int iNumIt);
125 
126 
136 void MA_SetPredLoadBal(pMAdapt pMAdaptDrvr, int iPredLoadBal);
137 
138 
149 void MA_SetRefLvl(pMAdapt pMAdaptDrvr, pumi::pEntity pEntityEnt, int iRefLvl);
150 
151 
162 void MA_GetRefLvl(pMAdapt pMAdaptDrvr, pumi::pEntity pEntityEnt, int &iRefLvl);
163 
164 
174 void MA_SetSizeFldFunc(pMAdapt pMAdaptDrvr, adaptSFunc SizeFldFunc);
175 
176 
189 void MA_SetSizeFldType(pMAdapt pMAdaptDrvr, int iSizeFldType);
190 
191 
201 int MA_AnisoSmooth(pMAdapt pMAdaptDrvr, double dBeta[3]);
202 
203 
213 int MA_Vtx_Size(pumi::pVertex pVertexVtx, double dAnisoSize[3][3]);
214 
215 
216 void MA_SetQualityThreshold(pMAdapt pMAdaptDrvr, double dQualThreshold);
217 
218 
230 void MA_SetFirstLayerThicknessFlag(pMAdapt pMAdaptDrvr, int isFirstLayerThicknessSet);
231 
232 
242 int MA_SetFirstLayerThickness(pMAdapt pMAdaptDrvr, pumi::pVertex pVertexVtx, double dFirstNodalSpacing);
243 
244 
256 int MA_SetAdaptiveDecompFlag(pMAdapt pMAdaptDrvr, int iFlag);
257 
258 
269 int MA_SetAdaptiveDecomp_AspectRatioLimit(pMAdapt pMAdaptDrvr, double dAspectRatioLimit);
270 
271 
273 int MA_TetrahedralizeBL(pMAdapt pMAdaptDrvr);
274 int MA_Mesh_TetrahedralizeBLs(pMeshMdl pMeshModel);
275 
277 int MA_DecompositionBL_AspectRatio(pMAdapt pMAdaptDrvr, double dAspectRatioLimit);
278 int MA_DecompositionBL_ForQuality(pMAdapt pMAdaptDrvr);
279 int MA_Mesh_DecompositionBL_ForQuality(pMeshMdl pMeshModel);
280 
281 
282 #ifdef CURVE
283 
295 int CMA_New(pCrvMesh &pcrv_mesh_obj, pMeshMdl pmesh_inst, int iSizeFldType, int iModelType);
296 
297 
305 int CMA_Del(pCrvMesh pcrv_mesh_obj);
306 
307 
316 int CMA_SetModelType(pCrvMesh pCrvMeshObj, int iModelType);
317 
318 
326 int CMA_Curve(pCrvMesh pCrvMeshObj);
327 
328 
336 int CMA_Untangle(pCrvMesh pCrvMeshObj);
337 
338 
344 int CMA_Linearize(pCrvMesh pcrv_mesh_obj);
345 
346 
353 int CMA_Optimize(pCrvMesh pCrvMeshObj);
354 
355 
360 int CMA_Adapt(pCrvMesh pcrv_mesh_obj);
361 
369 int CMA_SetQualityLimit(pCrvMesh pCrvMeshObj, double dThreshold);
370 
371 
377 int CMA_DisplayStats(pCrvMesh pCrvMeshObj);
378 
379 
385 int CMA_Check(pCrvMesh pcrv_mesh_obj);
386 
392 int CMA_GlobPtn(pCrvMesh pcrv_mesh_obj);
393 
394 #endif
395 
396 
397 #ifdef __cplusplus
398 }
399 #endif
400 
401 #endif
402 
int CMA_Optimize()
optimize a given valid curved mesh
Definition: CrvMesh.cc:409
int CMA_GlobPtn()
This function calls pumi mesh global partition API.
Definition: CrvMesh.cc:656
int CMA_Untangle()
untangle a given curved mesh with a number of invalid elements
Definition: CrvMesh.cc:503
The main driver class for curved mesh adaptation procedures.
Definition: curveMesh.h:41
int CMA_Linearize()
Make all mesh entities linear by removing edge nodes if there is any.
Definition: CrvMesh.cc:61