Subgrids

Assume that x is a variable, Expr is an expression. Than, the statement

   x = Expr | subgrid;

is evaluated for every grid point of the grid corresponding to x.

To evaluate, only certain parts of the grid, we need an object of type Marker. An unstructured grid consists of edges, faces, hexahera, and points. A object of type Marker stores a boolian tag for each of these elements. For an object subgrid of type Marker, the following statement is only evaluated at the grid points of the elements with a tag true:

         x = Expr | subgrid;

There are two ways to generate an object of type marker:

  1. By the class Boundary_Marker : public Marker , we obtain an object, which marks the whole boundary. The corresponding constructor requires an object of type Unstructured_grid:

        Cylinder cylinder(2.0,1.0,4.0);
        Boundary_Marker boundary(&cylinder);

    This marker gives all boundary elements the tag true and all other elements the tag false .

  2. By the class Unstructured_grid_Marker : public Marker, it is possible to mark certain parts of an unstructured grid. To use this marker one has to apply the following member functions:

          Unstructured_grid_Marker::Unstructured_grid_Marker(Unstructured_grid* ug_);
          void Unstructured_grid_Marker::complement (Marker* marker);
          void Unstructured_grid_Marker::operator= (bool  (*Marker_formula)(double x, double y, double z));

a) Unstructured_grid_Marker::complement (Marker* marker) marks the complement elements of marker.

b) To mark parts of the unstructured grid in a flexible way one has to apply the member function

          void Unstructured_grid_Marker::operator= (bool  (*Marker_formula)(double x, double y, double z));

Here, the function

   bool (*mark_subboundary_S)(double x,double y,double z);

has to return the value true at the points (x,y,z) which has to be marked.









Handbook

Last modified: Fri Jun 1 11:41:25 PDT 2001