Figure 8.7: The layout of the project grid-edit (without tr2d-edit)
The project grid-edit was developed for ADAPT2D data. All additional methods which were collected in this project only work on ADAPT2D. The basic differences between ADAPT2D and TRIANG2D are the REFINE2D structure for each triangle and the structure BND_FUNCTION. With information of the REFINE2D structure the mesh can be coarsened after refinement. The structure BND_FUNCTION allows to store information about the boundary curves.
The Handling of the Boundary Curves
For meshes whose boundaries can be described in an implicit form their shape is stored in the structure
typedef struct bnd_function { double (*g)(); void *par; } BND_FUNCTION; .
Where g(x,y,z,bnd_function par) = 0.0 is the implicit function describing the boundary curve with parameter par.
For instance to get a ball, the function g and parameter par are defined as follows:
typedef struct ball_parm_2_type {double cx,cy,cz,r;} BALL_PARM_2; static double ball(x,y,z,var) double x,y,z; BALL_PARM_2 *var; { double ret; ret = (x-var->cx)*(x-var->cx) + (y-var->cy)*(y-var->cy) + (z-var->cz)*(z-var->cz) - (var->r*var->r); if (var->r < 0.0) ret = - ret; return(ret); } .The function ball returns the distance between the 3D point (x,y,z) and the ball with its center (var->cx,var->cy,var->cz) and radius var->r. If the point (x,y,z) lies on the ball the function returns the value zero and if the point lies inside (outside) the ball, a negative (positive) value will be returned.
In GRAPE boundary curves describing a ball, ellipse or plane are supported by appropriate predefined functions.
The boundary nodes which belong to a boundary curve stored in the structure BND_FUNCTION can be projected on the boundary curve with the method fit_bndfunctions at any time to this boundary curve. It can be activated by pressing the button fit-boundary. Thereafter the nodes on all boundary curves stored in boundary functions are moved onto the corresponding boundary curves.
The Handling of the Mesh Adaption Tools
The grid adaption (refining by dividing in half, coarsening) on an ADAPT2D triangulation can be done in a global or local manner. The two global methods with the corresponding buttons refine all/coarsen refine/coarsen the whole mesh. After pressing the button refine all all triangles of the mesh are divided in half with regard to their refinement edges. With coarsen all the simply refined situations are coarsened. Mostly we have to press this button two or three times to dissolve back to the starting triangulation. With the methods refine pick and coarsen pick we can pick the triangle we want to refine or to coarsen. These local operations are carried out immediately.
To refine only a border segment, instead of using refine pick and picking all triangles along the boundary, the button ref border can be activated. It works similarly to set in the boundary treatment layer. We have to mark the boundary segment with the left mouse button. With the middle mouse button the marked segment will be refined applying the refinement technique described above.
The large red button init refine field is very important.
After all grid modifications:
Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.