Next: Display Methods on Geom2d
Up: Geom2d
Previous: Geom2d
- (GEOM2D * ) GRAPE(Geom2d, "new-instance")(name)
- CLASS * Geom2d
char * name
Create an instance of class Geom2d with name name. This
method just allocates the structure and initializes some data, the vertex
and element lists have to allocated by "list-alloc". All
Geom2d instances get a default FE function f, the z height,
and a default interpol function which handles the refinement of the
boundary curves.
The display methods will not draw the boundary curves and parameter lines
unless the corresponding flag is set in the Geom2d flag. If
the user supplies normals, vertex colors or patch colors they will be
used by "display", if normals are supplied additionally the
GEOM2D_USERNORM flag has to be set.
-
- GEOM2D * geom
"free" deletes an instance of class Geom2d, for details
see 5.4.4.1. Since the boundary curves and parameter lines
reference the Geom2d instance they are part of, a
"zero-refs" method which determines the real number of references
has to be provided.
- GRAPE(geom, "skip-bnd-send")()
- GEOM2D * geom
Remove all boundaries which are not ACTIVE from the geom->
bnd_curve list and delete them. For example after merging two
Geom2d instances, "close-send" will only deactivate the
boundary lines which are identified, this method then can be used to
remove them.
- GRAPE(geom, "delete-lines-send")()
- GEOM2D * geom
If the parameter lines hor and ver were created, for example
by reading an description file for an explicit surface in project
Explicit, but are not needed they can (and should) be deleted with
this method. Especially if the surface is reflected these lines can take
up a large amount of memory (or disk space if the surface is written),
deleting them also makes many operations like interpolation much faster.
-
- GEOM2D * geom
int points, elements
Allocate or free memory lists for points points and elements
elements for a Geom2d instance. Memory for normals or colors will
only be allocated if the corresponding pointers are not NULL,
i.e. if this method is used to reallocate memory (see
5.4.4.2 for general information about the "list-alloc"
concept).
-
- GEOM2D * geom, * connect
int points
Allocate or free memory for all vertex lists, i.e. for coordinates,
normals and vertex colors. If connect is not NULL its
connectivity (vertex and neighbour) is also used for
geom.
In contrast to "list-alloc" "point-list-alloc" doesn't support
the reallocation concept. You should be aware than using the same
connectivity arrays for more than one instance can be dangerous since
these arrays don't have reference counters.
These methods are only provided for backward compatibility.
-
- GEOM2D * geom
"sort-points-send" removes all unused points (points whose indices
don't occur in the vertex list) from geom and corrects the
vertex indices of boundary curves and parameter lines. This is for
example useful after merging and closing several Geom2d instances
to remove former boundary points which are no longer used. The method was
rewritten and is much faster now, especially for large numbers of points.
"list-shrink-send" frees the unused space between
number_of_points/elements and
max_number_of_points/elements in the geom vertex and
element lists (by calling "list-alloc" with number_of_points
and number_of_elements as parameters). "list-shrink-send" is
also send to all boundary curves and parameter lines.
"optimize-mem-send" combines both methods to clean up geom.
First "sort-points-send" is called to remove unused points, then the
memory lists are shortened with "list-shrink-send".
-
- GEOM2D * geom, * copy
Create a copy of geom which its own vertex lists (all data is
copied) and return the pointer to it. "hardcopy" and
"softcopy" differ in two respects. While "hardcopy" creates an
identical copy of geom, "softcopy" only copies the memory
needed, i.e. upto number_of_points/elements. If copy
is NULL, "softcopy" creates a new Geom2d instance to
store the copy, otherwise copy is used.
-
- GEOM2D * geom, * copy
Same as "softcopy" but only the boundary curves bnd_curve
resp. the parameter lines hor and ver are copied. Of course
copy has to exist for these methods.
- GRAPE(geom, "copy-refine")(source)
- GEOM2D * geom, * source
Copy the refine array from source to geom. This method
is useful when several Geom2d instances with the same
connectivity have to be refined.
Next: Display Methods on Geom2d
Up: Geom2d
Previous: Geom2d
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.