next up previous contents index
Next: Geom2d Up: Adapt2d Previous: I/O Methods on Adapt2d

Other Methods on Adapt2d

 

                       

GRAPE(ad2d, "refine-global-send")()
GRAPE(ad2d, "refine-local")()
GRAPE(ad2d, "coarsen-global-send")()
GRAPE(ad2d, "coarsen-local")()
GRAPE(ad2d, "set-rfc-field")(element)
GRAPE(ad2d, "set-rfc-field-send")()
ADAPT2D *ad2d;
int element;

We use a refinement algorithm due to Bänsch, who has developed a corresponding algorithm in 3D, too. A similar approach by Rivara is restricted to the 2D case.

In this algorithm the refining / coarsening a triangulation means to reverse previously executed refinements. Therefore it is necessary to store additional information for each triangle. To accomplish this we enlarge the FE2D data structure by the structure REFINE2D (see 6.3.3). This structure includes the flag to refine or to coarse with possible values 0, G_REFINE or G_COARSE, the refine edge and the level of refining. In the macro triangulation, where no triangle is refined, edge is the local number of the edge to refine (in general the longest edge) in each triangle and level is zero. In the situations that can be coarsened all triangles must have the same refinement level. Using this additional information in the REFINE2D structure a unique coarsening is possible.

In this context it is important to mention, that . Before refining the triangulation the first time, it is also possible to set the refine edge. In general the initialization is done by using "set-rfc-field-send" which allocates the memory for the REFINE2D structure and sets the refine edge on the longest one.

"refine-global-send" bisects all triangles (including the in general necessary correction) in the triangulation according to their refinement edge. If no refine structure is set, "set-rfc-field-send" is executed at first.

"refine-local" bisects all with G_REFINE in the refine flag marked triangles according to their refinement edge and makes the necessary corrections. The refine flag in the REFINE2D structure is not initialized after the local refining and can be used again or must be reset to 0 before starting "refine-local" again.

"coarsen-global-send" coarsens all refined triangles if possible. In most cases "coarsen-global-send" must be used several times to reverse all previously executed refinements.

"coarsen-local" coarsens all with G_COARSE in the refine flag marked triangles if they are the result of a previously executed refinement. The refine flag in the REFINE2D structure is not initialized after the local coarsening and can be used again or must be reset to 0 before starting "coarsen-local" again.

If boundary segments are refined which belong to a boundary curve stored in the structure BND_FUNCTION, "fit-bndfunctions-send" (see 6.3.3.4) is executed automatically.

To handle the data on the triangulation there are four functions, which may be defined by setting the corresponding function pointer in the ADAPT2D structure. They are executed during the refining and coarsening:

interpol
(ADAPT2D *ad2d, int oldtriangle, int oldpoint1, int oldpoint2, int newpoint, int newtriang1, int newtriang2), where oldpoint1 and oldpoint2 are the global points of the divided edge and newpoint is the global number of the new (added) point. In this function the user can interpolate his own data and do the memory management for this. It is executed in every refinement.
restrict
(ADAPT2D *ad2d, int deletriang1, int deletriang2, int deletpoint, int newtriang, int makropoint1, int makropoint2), where deletpoint is the global number of the deleted point, makropoint1 and makropoint2 are the global points of the coarsened edge in the new triangle. This function is executed in every coarsening.

The following two functions are necessary because during the coarsening, gaps in the triangulation-arrays have to be filled by moving elements or points.
element_compress
(ADAPT2D *ad2d, int old_element_number, int new_element_number).
point_compress
(ADAPT2D *ad2d, int old_point_number, int new_point_number).

     

GRAPE(ad2d, "fit-bndfunctions-send")()
ADAPT2D *ad2d;

The boundary nodes which belong to a boundary curve g stored in the structure BND_FUNCTION can be projected using this method to their boundary curves. This is done by solving tex2html_wrap_inline44190 , where tex2html_wrap_inline44192 is the point to project on the boundary curve and tex2html_wrap_inline44194 is the normal of the secant tex2html_wrap_inline44192 belongs to, using an Iteration in tex2html_wrap_inline44198 .    
GRAPE(ad2d, "get-info")(list)
ADAPT2D *ad2d;
XLIST *list;
Create info list entries for a Adapt2d instance. There are two additional entries which do not appear in the list of the method "get-info" on Fe2d. These are the number and maximum number of boundary functions.


next up previous contents index
Next: Geom2d Up: Adapt2d Previous: I/O Methods on Adapt2d

SFB 256 Universität Bonn and IAM Universität Freiburg

Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.