ParFUM is the name for the latest version of FEM. ParFUM includes additional features including parallel mesh modification and adaptivity (geometrical). ParFUM also contains functions which generate additional topological adjacency information. ParFUM cannot be built separate from CHARM++ since it uses various messaging mechanisms that MPI does not readily support. It is important to note that ParFUM adaptivity at the moment has some limitations. It works only for meshes which are two-dimensional. The other limitation is that the mesh on which it works on must have one layer of node-deep ghosts. Most applications reqire no or one layer ghosts, so it is really not a limitation, but for applications that need multiple layers of ghost information, the adaptivity operations cannot be used.
void FEM_ADAPT_Init(int meshID)
Initializes the mesh defined by meshID for the mesh
adaptivity operations.
void FEM_ADAPT_SetElementSizeField(int meshID, int elem, double size);
For the mesh specified by meshID, for the element elem,
we set the desired size for each element to be size.
void FEM_ADAPT_SetElementSizeField(int meshID, double *sizes);
For the mesh specified by meshID, for the element elem,
we set the desired size for each element from the corresonponding entry in
the sizes array.
void FEM_ADAPT_SetReferenceMesh(int meshID);
For each element int this mesh defined by meshID
set its size to the average edge length of the corresponding element.
void FEM_ADAPT_GradateMesh(int meshID, double smoothness);
Resize mesh elements to avoid jumps in element size.
i.e. avoid discontinuities in the desired sizes for elements of a mesh
by smoothing them out.
Algorithm based on h-shock correction, described in
Mesh Gradation Control, Borouchaki et al.
void FEM_ADAPT_Refine(int meshID, int qm, int method, double factor,double *sizes);
Perform refinements on the mesh specified by meshId.
Tries to maintain/improve element quality by refining the mesh
as specified by a quality measure qm.
If method = 0, refine areas with size larger than factor down to factor
If method = 1, refine elements down to sizes specified in the sizes array.
In this array each entry corresponds to the corresponding element.
Negative entries in sizes array indicate no refinement.
void FEM_ADAPT_Coarsen(int meshID, int qm, int method, double factor,double *sizes);
Perform refinements on the mesh specified by meshId.
Tries to maintain/improve element quality by coarsening the mesh
as specified by a quality measure qm.
If method = 0, coarsen areas with size smaller than factor down to factor
If method = 1, coarsen elements up to sizes specified in the sizes array.
In this array each entry corresponds to the corresponding element.
Negative entries in sizes array indicate no coarsening.
void FEM_ADAPT_AdaptMesh(int meshID, int qm, int method, double factor,double *sizes);
It has the same set of arguments as required by the previous two operations,
namely refine and coarsen. This function keeps using the above two functions till
we have all elements in the mesh with as close to the desired quality. Apart from
using the above two operations, it also performs a mesh repair operation where it
gets rid of some bad quality elements by delauney flip or coarsening as the
geometry in the area demands.
int FEM_ADAPT_SimpleRefineMesh(int meshID, double targetA, double xmin, double ymin, double xmax, double ymax);
A region is defined by (xmax, xmin, ymax, ymin)
and the target area to be achieved for all elements in this region
in the mesh specified by meshID is given by targetA.
This function only performs a series of refinements on the elements in this region.
If the area is larger, then no coarsening is done.
int FEM_ADAPT_SimpleCoarsenMesh(int meshID, double targetA, double xmin, double ymin, double xmax, double ymax);
A region is defined by (xmax, xmin, ymax, ymin)
and the target area to be achieved for all elements in this region
in the mesh specified by meshID is given by targetA.
This function only performs a series of coarsenings on the elements in this region.
If the area is smaller, then no refinement is done.
void FEM_ADAPT_TestMesh(int meshID);
This provides a series of tests to determine the consistency of the
mesh specified by meshID.
These four simple steps define what needs to be used by a program that wishes to use the adaptivity features of ParFUM.
November 23, 2009
FEM Homepage
Charm Homepage