#include <GridScatPt.h>
Inheritance diagram for GridScatPt::

Public Methods | |
| GridScatPt () | |
| ~GridScatPt () | |
| bool | redim (int nsd, int npoints) |
| bool | ok () const |
| virtual void | scan (Is is) |
| Ptv(real) | getPt (int i) const |
| void | setPt (int i, const Ptv(real) ptcoor) |
| virtual void | print (Os os) const |
| virtual int | nearestPoint (const Ptv(real) &point, real &distance, bool &exact) |
| virtual int | getNoPoints () const |
| virtual void | startIterator () |
| virtual bool | nextPt (Ptv(real) &x) |
| virtual int | getNoSpaceDim () const |
| virtual void | getMinMaxCoord (Ptv(real) &mincoord, Ptv(real) &maxcoord) const |
| virtual void | scale () |
| virtual void | unscale () |
NAME: GridScatPt - grid consisting of arbitrary discrete points
DESCRIPTION:
The class represents a collection of scattered points in space. Together with class "FieldScatPt" the grid is used to represent fields over scattered points.
The application of the class is not limited to fields over scattered points. If one needs to specify a set of ""arbitrary"" points, e.g., chosen by the user at run time, "GridScatPt" can read and hold the point data. For example, it is used in class "Store4Plotting" for reading and holding at set of spatial points at which the time evolution of fields are to be plotted.
|
|
The constructor takes no arguments. To initialize the object it is necessary to call "redim" and give the proper number of scattered points that make up the grid. After "redim" is called, "ok" will return a true value. The coordinates of the points are read by the "scan" function in a compact format. |
|
|
|
|
|
returns the hypercube (with respect to the Cartesian coordinate system where the grid coordinates are defined) that encloses the grid. This function is only meaningful if the grid represents some kind of geometry in the problem. Reimplemented from GridWithPts. |
|
|
Reimplemented from GridWithPts. |
|
|
returns the number of space dimensions associated with the grid. Reimplemented from GridWithPts. |
|
|
returns the coordinates of a grid point. The point is given by its point number. |
|
|
computes the grid point that is nearest to an arbitrarily given point. The input argument is the specified point, while the output arguments are the distance to the point and a boolean variable indicating if the given point coincides with one of the grid points. If the boolean value is true, the distance to the point is zero. The return value is the point number of the point that is nearest to the specified point. There are some overloaded versions of "nearestPoint". These are aimed at various search algorithms required by "valuePt" in finite element meshes. Reimplemented from GridWithPts. |
|
|
gives the coordinates of the next point in the grid. The return value is false when there are no more points in the grid. Here is an example on iteration over the grid points:
grid.startIterator();
while (grid.nextPt(p))
{ .... }
Reimplemented from GridWithPts. |
|
|
|
|
|
prints the grid (usually in ascii format). Reimplemented from Grid. |
|
|
redimensions the internal data structure. The argument reflects the number of points in the grid. |
|
|
Reimplemented from GridWithPts. |
|
|
reads the coordinates of the grid points. The input syntax is as follows. First "d=2" is given to indicate the number of space dimensions ("d=2" imply 2D points). Then the number of grid points is given as "n=4". Thereafter each grid point is given in the standard "Ptv(real)" scan format. Here is a possible string:
d=3 n=2 (1,-1,0) (8,1.1,-9)
Reimplemented from Grid. |
|
|
assigns coordinates to a grid point. See "getPt". |
|
|
initializes an iteration over the grid points. Reimplemented from GridWithPts. |
|
|
Reimplemented from GridWithPts. |