FronTier++
Softerware for front tracking method
 All Files Functions Groups
fapi.h
Go to the documentation of this file.
1 
23 #include <front/fdecs.h>
24 
25  /* Front IMPORTED Function Prototypes*/
26 
27 #if defined(c_plusplus) || defined(__cplusplus)
28 extern "C" {
29 #endif
30 
48  IMPORT void FT_Init(int argc,
49  char **argv,
50  F_BASIC_DATA *f_basic );
51 
61  IMPORT void FT_ReadSpaceDomain(char *in_name,
62  F_BASIC_DATA *f_basic);
63 
73  IMPORT void FT_ReadComparisonDomain(char *in_name,
74  F_BASIC_DATA *f_basic);
75 
84  IMPORT void FT_StartUp(Front* front ,
85  F_BASIC_DATA* f_basic );
86 
93  IMPORT void FT_InitDebug(char *inname );
94 
105  IMPORT void FT_InitIntfc(Front *front ,
106  LEVEL_FUNC_PACK *level_func_pack );
107 
113  IMPORT void FT_ClipIntfcToSubdomain(Front *front);
114 
124  IMPORT void FT_InitFrontVeloFunc(Front *front ,
125  VELO_FUNC_PACK *velo_func_pack );
126 
127 
136  IMPORT void FT_ReadTimeControl(char *in_name ,
137  Front *front );
138 
145  IMPORT void FT_ResetTime(Front *front );
146 
161  IMPORT POINTER *FT_CreateLevelHyperSurfs(
162  RECT_GRID *rgr,
163  INTERFACE *intfc,
164  int neg_comp,
165  int pos_comp,
166  double (*func)(POINTER,double*),
167  POINTER func_params,
168  int w_type,
169  int *num_hs);
170 
181  IMPORT void FT_Propagate(Front *front);
182 
191  IMPORT void FT_RedistMesh(Front *front);
192 
203  IMPORT void FT_OptimizeMesh(Front *front, SCALED_REDIST_PARAMS params);
204 
214  IMPORT boolean FT_OptimizeSurfMesh(Front *front, SURFACE *surf, SCALED_REDIST_PARAMS params);
215 
225  IMPORT boolean FT_OptimizeCurveMesh(Front *front, CURVE *curve, SCALED_REDIST_PARAMS params);
226 
235  IMPORT void FT_SetCurveSpacing(Front *front, double scaled_spacing);
236 
246  IMPORT void FT_OptimizeCurveMeshWithEqualBonds(Front *front, CURVE *curve);
247 
255  IMPORT void FT_SetTimeStep(Front *front );
256 
263  IMPORT void FT_SetOutputCounter(Front *front );
264 
272  IMPORT void FT_TimeControlFilter(Front *front );
273 
282  IMPORT boolean FT_IsSaveTime(Front *front );
283 
292  IMPORT boolean FT_IsDrawTime(Front *front );
293 
302  IMPORT boolean FT_TimeLimitReached(Front *front );
303 
315  IMPORT void FT_RecordMaxFrontSpeed(
316  int dir ,
317  double speed ,
318  POINTER state ,
319  double *coords ,
320  Front* front );
321 
328  IMPORT void FT_AddTimeStepToCounter(Front *front );
329 
337  IMPORT void FT_Save(Front *front);
338 
345  IMPORT void FT_Draw(Front *front);
346 
358  IMPORT void FT_XgraphSampleLine(char *dirname,
359  char *varname,
360  boolean data_in_domain,
361  int size,
362  double *x,
363  double *var);
364 
376  IMPORT void FT_MakeGridIntfc(Front *front );
377 
385  IMPORT void FT_FreeGridIntfc(Front *front );
386 
398  IMPORT void FT_MakeCompGridIntfc(Front *front );
399 
407  IMPORT void FT_FreeCompGridIntfc(Front *front );
408 
416  IMPORT void FT_FreeOldGridIntfc(Front *front );
417 
425  IMPORT void FT_FreeFront(Front *front );
426 
433  IMPORT void FT_FreeMainIntfc(Front *front );
434 
453  IMPORT boolean FT_NormalAtGridCrossing(Front *front ,
454  int *icoords ,
455  GRID_DIRECTION dir ,
456  int comp ,
457  double *nor ,
458  HYPER_SURF **hs ,
459  double *crx_coords );
460 
479  IMPORT boolean FT_StateStructAtGridCrossing(Front *front ,
480  INTERFACE *grid_intfc,
481  int *icoords,
482  GRID_DIRECTION dir,
483  int comp,
484  POINTER *state,
485  HYPER_SURF **hs,
486  double *crx_coords);
487 
506  IMPORT boolean FT_StateVarAtGridCrossing(Front *front ,
507  int *icoords ,
508  GRID_DIRECTION dir ,
509  int comp ,
510  double (*state_func)(Locstate) ,
511  double *ans ,
512  double *crx_coords );
513 
526  IMPORT HYPER_SURF *FT_HyperSurfAtGridCrossing(Front *front ,
527  int *icoords ,
528  GRID_DIRECTION dir,
529  int wave_type);
530 
547  IMPORT boolean FT_IntrpStateVarAtCoords(Front *front ,
548  int comp ,
549  double *coords ,
550  double *var_array ,
551  double (*state_func)(POINTER) ,
552  double *ans,
553  double *default_ans);
554 
572  IMPORT boolean FT_CompGridIntrpStateVarAtCoords(Front *front ,
573  int comp ,
574  double *coords ,
575  double *var_array ,
576  double (*state_func)(POINTER) ,
577  double *ans,
578  double *default_ans);
579 
593  IMPORT boolean FT_NearestRectGridVarInRange(Front *front ,
594  int comp ,
595  double *coords ,
596  double *var_array ,
597  int range,
598  double *ans);
599 
618  IMPORT boolean FT_FindNearestIntfcPointInRange(Front *front ,
619  int comp ,
620  double *coords ,
621  USE_BOUNDARIES bdry,
622  double *intfc_point ,
623  double *t ,
624  HYPER_SURF_ELEMENT **hse ,
625  HYPER_SURF **hs ,
626  int range );
627 
637  IMPORT void FT_NormalAtPoint(POINT *p ,
638  Front *front ,
639  double *normal ,
640  int comp );
641 
650  IMPORT void FT_CurvatureAtPoint(POINT *p ,
651  Front *front ,
652  double *curvature );
653 
654 
663  IMPORT double FT_GridSizeInDir(double *dir ,
664  Front *front );
665 
677  IMPORT Nor_stencil *FT_CreateNormalStencil(Front *front ,
678  POINT *p ,
679  int comp ,
680  int num_pts );
681 
697  IMPORT boolean FT_ReflectPointThroughBdry(
698  Front *front ,
699  HYPER_SURF *hs ,
700  double *coords ,
701  int comp ,
702  double *coords_bdry ,
703  double *coords_ref ,
704  double *normal );
705 
724  IMPORT void FT_SetDirichletBoundary(Front *front ,
725  void (*state_func)(double*,HYPER_SURF*,Front*,POINTER,POINTER) ,
726  const char *state_func_name ,
727  POINTER state_func_params ,
728  POINTER state ,
729  HYPER_SURF *hs );
730 
752  IMPORT void FT_InsertDirichletBoundary(Front *front ,
753  void (*state_func)(double*,HYPER_SURF*,Front*,POINTER,POINTER) ,
754  const char *state_func_name ,
755  POINTER state_func_params ,
756  POINTER state ,
757  HYPER_SURF *hs ,
758  int index);
759 
775  IMPORT HYPER_SURF **FT_MixedBoundaryHypSurfs(
776  INTERFACE *intfc,
777  int idir,
778  int nb,
779  int w_type,
780  int *num_hs);
781 
793  char *in_name,
794  Front *front);
795 
800  IMPORT int FT_Dimension();
801 
811  IMPORT int FT_RectBoundaryType(Front *front ,
812  int dir,
813  int side);
814 
823  IMPORT boolean FT_FrontContainWaveType(Front *front , int w_type);
824 
837  IMPORT HYPER_SURF *FT_RectBoundaryHypSurf(INTERFACE *intfc ,
838  int wave_type,
839  int dir,
840  int side);
841 
853  IMPORT HYPER_SURF **FT_InteriorHypSurfs(INTERFACE *intfc ,
854  int wave_type,
855  int *num_hs);
856 
866  IMPORT void FT_ParallelExchIntfcBuffer(Front* front );
867 
879  IMPORT void FT_ParallelExchGridArrayBuffer(double *grid_array ,
880  Front* front ,
881  int* symmetry);
882 
893  IMPORT void FT_ParallelExchGridIntArrayBuffer(int *iarray ,
894  Front* front);
895 
908  double **vec_grid_array ,
909  Front* front);
910 
922  IMPORT void FT_ParallelExchCompGridArrayBuffer(double *grid_array ,
923  Front* front ,
924  int* symmetry);
925 
937  IMPORT void FT_ParallelExchCellIndex(Front* front ,
938  int *lbuf,
939  int *ubuf,
940  POINTER ijk_to_I);
941 
953  IMPORT void FT_ParallelExchCompGridCellIndex(Front* front ,
954  int *lbuf,
955  int *ubuf,
956  POINTER ijk_to_I);
957 
970  IMPORT INTERFACE *FT_CollectHypersurfFromSubdomains(Front* front,
971  int *owner,
972  int w_type);
973 
986  IMPORT void FT_GetStatesAtPoint(POINT *p,
987  HYPER_SURF_ELEMENT *hse,
988  HYPER_SURF *hs,
989  POINTER *sl,
990  POINTER *sr);
991 
998  IMPORT void FT_ScalarMemoryAlloc(POINTER* a,
999  int size);
1000 
1008  IMPORT void FT_VectorMemoryAlloc(POINTER* a,
1009  int n1,
1010  int size);
1011 
1020  IMPORT void FT_MatrixMemoryAlloc(POINTER* a,
1021  int n1,
1022  int n2,
1023  int size);
1024 
1034  IMPORT void FT_TriArrayMemoryAlloc(POINTER* a,
1035  int n1,
1036  int n2,
1037  int n3,
1038  int size);
1039 
1050  IMPORT void FT_QuadArrayMemoryAlloc(POINTER* a,
1051  int n1,
1052  int n2,
1053  int n3,
1054  int n4,
1055  int size);
1056 
1068  IMPORT void FT_QuinArrayMemoryAlloc(POINTER* a,
1069  int n1,
1070  int n2,
1071  int n3,
1072  int n4,
1073  int n5,
1074  int size);
1075 
1088  IMPORT void FT_SexArrayMemoryAlloc(POINTER* a,
1089  int n1,
1090  int n2,
1091  int n3,
1092  int n4,
1093  int n5,
1094  int n6,
1095  int size);
1096 
1103  IMPORT void FT_SetGlobalIndex(Front *front);
1104 
1112  IMPORT void FT_FreeThese(int n,...);
1113 
1114 /*TMP will move when mature*/
1115 IMPORT boolean FT_StateStructAtGridCrossing2(Front *front ,
1116  int *icoords ,
1117  GRID_DIRECTION dir ,
1118  int comp ,
1119  POINTER *state ,
1120  HYPER_SURF **hs ,
1121  HYPER_SURF_ELEMENT **hse ,
1122  double *crx_coords );
1123 
1132  IMPORT double FT_ComputeTotalVolumeFraction(
1133  Front *front,
1134  COMPONENT comp_of_vol);
1135 
1147  IMPORT void FT_ComputeGridVolumeFraction(
1148  Front *front,
1149  COMPONENT comp_of_vol,
1150  POINTER *grid_vol_frac);
1151 
1164  IMPORT void FT_CurveSegLengthConstr(
1165  CURVE *c,
1166  BOND *bs,
1167  BOND *be,
1168  int nb,
1169  double seg_length,
1170  REDISTRIBUTION_DIRECTION dir);
1171 
1186  IMPORT CURVE *FT_MakeNodeArrayCurve(Front *front,int num_nodes,double **node_array,COMPONENT neg_comp,COMPONENT pos_comp,boolean is_closed_curve,double scale_factor, int w_type);
1187 
1201  IMPORT CURVE *FT_MakePointArrayCurve(Front *front,int num_points,double **point_array,COMPONENT neg_comp,COMPONENT pos_comp,boolean is_closed_curve,int w_type);
1202 
1218  IMPORT void FT_MakeEllipticSurf(Front *front,double *center,double *radius,COMPONENT neg_comp,COMPONENT pos_comp,int w_type,int refinement_level,SURFACE **surf);
1219 
1238  IMPORT void FT_MakeDumbBellSurf(Front *front,double x0,double x1,double y0,double z0,double R,double r,COMPONENT neg_comp,COMPONENT pos_comp,int w_type,SURFACE **surf);
1239 
1256  IMPORT void FT_MakeProjectileSurf(Front *front,double *center,double R,double r,double h,COMPONENT neg_comp,COMPONENT pos_comp,int w_type,SURFACE **surf);
1257 
1272  IMPORT CURVE *FT_MakeParametricCurve(Front *front, COMPONENT neg_comp, COMPONENT pos_comp, int w_type, boolean (*func)(POINTER,double,double*), POINTER func_params, int refinement_level, boolean is_closed);
1273 
1274 
1286  IMPORT void FT_RotateSurface(SURFACE *surf,double *center,double phi,double theta);
1287 
1301  IMPORT void FT_MakeCuboidSurf(Front *front,double *center,double *edge,COMPONENT neg_comp,COMPONENT pos_comp,int w_type,SURFACE **surf);
1302 
1317  IMPORT void FT_MakeCylinderSurf(Front *front,double *center,double radius, double height, COMPONENT neg_comp,COMPONENT pos_comp,int w_type,SURFACE **surf);
1318 
1333  IMPORT void FT_MakeConeSurf(Front *front,double *center,double slope, double height, COMPONENT neg_comp,COMPONENT pos_comp,int w_type,SURFACE **surf);
1334 
1348  IMPORT void FT_MakeTetrahedronSurf(Front *front,double *center,double radius,COMPONENT neg_comp,COMPONENT pos_comp,int w_type,SURFACE **surf);
1349 
1365  IMPORT void FT_MakePlaneSurf(Front *front,double *plane_nor,double *plane_pt,boolean reset_bdry_comp,COMPONENT neg_comp,COMPONENT pos_comp,int w_type,SURFACE **surf);
1366 
1376  IMPORT void FT_InstallSurfEdge(SURFACE *surf,int hsbdry_type);
1377 
1392  IMPORT void FT_CutSurfBdry(SURFACE *surf,boolean constr_func(POINTER,double*),POINTER func_params,double **insert_coords,int num_pts,int insert_idir);
1393 
1409  IMPORT void FT_MakeEllipticCurve(Front *front,double *center,double *radius,COMPONENT neg_comp,COMPONENT pos_comp,int w_type,int refinement_level,CURVE **curve);
1410 
1417  IMPORT void FT_PrintWaveType(int w_type);
1418 
1426  IMPORT void FT_PrintBoundaryType(int dir,int side);
1427 
1435  IMPORT int FT_BoundaryType(int dir,int side);
1436 
1443  IMPORT double *FT_GridIntfcTopL(Front*);
1444 
1451  IMPORT double *FT_GridIntfcTopU(Front*);
1452 
1459  IMPORT double *FT_GridIntfcToph(Front*);
1460 
1467  IMPORT COMPONENT *FT_GridIntfcTopComp(Front*);
1468 
1475  IMPORT COMPONENT *FT_GridIntfcTopGmax(Front*);
1476 
1483  IMPORT RECT_GRID *FT_GridIntfcTopGrid(Front*);
1484 
1508  IMPORT void FT_AddHdfMovieVariable(
1509  Front *front,
1510  boolean preset_bound,
1511  boolean untracked,
1512  COMPONENT obst_comp,
1513  const char *var_name,
1514  int idir,
1515  double *var_field,
1516  double (*getStateFunc)(POINTER),
1517  double max_var,
1518  double min_var);
1519 
1530  IMPORT void FT_AddVtkVectorMovieVariable(
1531  Front *front,
1532  const char *var_name,
1533  double **var_field);
1534 
1545  IMPORT void FT_AddVtkScalarMovieVariable(
1546  Front *front,
1547  const char *var_name,
1548  double *var_field);
1549 
1558  IMPORT void FT_AddVtkIntfcMovieVariable(
1559  Front *front,
1560  const char *var_name);
1561 
1576  IMPORT void FT_ResetDomainAndGrid(Front *front,
1577  double *L,
1578  double *U,
1579  int *gmax);
1580 
1588  IMPORT boolean FT_CoordsInSubdomain(Front* front,
1589  double *coords);
1590 
1598  IMPORT void FT_PrintTimeStamp(Front *front);
1599 
1616  IMPORT void FT_MakeCrossCylinderSurf(Front *front,
1617  double *center1,
1618  double *center2,
1619  double radius1,
1620  double radius2,
1621  double height1,
1622  double height2,
1623  COMPONENT neg_comp,
1624  COMPONENT pos_comp,
1625  int w_type,
1626  SURFACE **surf);
1627 
1644  IMPORT void FT_MakeBowlSurf(Front *front,
1645  double *center,
1646  double radius1,
1647  double radius2,
1648  double radius3,
1649  double height1,
1650  double height2,
1651  COMPONENT neg_comp,
1652  COMPONENT pos_comp,
1653  int w_type,
1654  SURFACE **surf);
1655 
1670  IMPORT void FT_MakePlatformSurf(Front *front,
1671  double *center,
1672  double radius,
1673  double height,
1674  double slope,
1675  COMPONENT neg_comp,
1676  COMPONENT pos_comp,
1677  int w_type,
1678  SURFACE **surf);
1679 
1693  IMPORT void FT_MakeStellatedOctahedronSurf(Front *front,
1694  double *center,
1695  double edge,
1696  COMPONENT neg_comp,
1697  COMPONENT pos_comp,
1698  int w_type,
1699  SURFACE **surf);
1700 
1710  IMPORT void FT_InitSurfVeloFunc(SURFACE *surf,
1711  POINTER vparams,
1712  int (*vfunc)(POINTER,Front*,POINT*,HYPER_SURF_ELEMENT*,HYPER_SURF*,double*));
1713 
1723  IMPORT void FT_InitCurveVeloFunc(CURVE *curve,
1724  POINTER vparams,
1725  int (*vfunc)(POINTER,Front*,POINT*,HYPER_SURF_ELEMENT*,HYPER_SURF*,double*));
1726 
1736  IMPORT void FT_InitNodeVeloFunc(NODE *node,
1737  POINTER vparams,
1738  int (*vfunc)(POINTER,Front*,POINT*,HYPER_SURF_ELEMENT*,HYPER_SURF*,double*));
1739 
1740 
1749  IMPORT boolean FT_CheckSurfCompConsistency(
1750  Front *front,
1751  SURFACE *surf);
1752 
1753 #if defined(c_plusplus) || defined(__cplusplus)
1754 }
1755 #endif