Grid_Rect, Grid_Cyl_Rect, Grid_Spher_Rect
Synopsis
Grid_Rect , Grid_Cyl_Rect , and Grid_Spher_Rect contain coordinate information for rectilinear mesh fields.
Grid_Struct Grid_Rect {
grid_type = 2;
int npoints => sum(dims);
coordinates.values => get_coords_rect(ndim, dims, nspace,
points);
coordinates.min => cache(min_array(magnitude(points), 0, 0));
coordinates.max => cache(max_array(magnitude(points), 0, 0));
coordinates.min_vec[veclen] => cache(min_array(points, 0, 0));
coordinates.max_vec[veclen] => cache(max_array(points, 0, 0));
};
Description
Grid_Rect tailors the definition of Grid_Struct to be applicable to rectilinear mesh fields. Grid_Cyl_Rect is a sub-class of Grid_Struct where XYZ coordinates of grid nodes are calculated using Cylindrical transformation. Grid_Spher_Rect is a sub-class of Grid_Struct where XYZ coordinates of grid nodes are calculated using Spherical transformation.
Subobjects
grid_type = 2
Sets the integer grid_type first defined in Grid_Struct to 2, flagging this as a rectilinear field.
See FLDget_grid_type
npoints => sum(dims)
Sets the integer npoints first defined in Grid_Struct to sum(dims), defining the number of points necessary to specify the extents of a rectilinear field.
See FLDget_npoints
points[npoints][nspace]
Array that specifies the boundary of a rectilinear field first in I, then in J and finally in K direction of computational grid. For Grid_Rect these are Cartesian coordinates x, y, z; for Grid_Cyl_Rect they are cylindrical coordinates: Radius and Angle (in radians); for Grid_Sher_Unif they are Latitude (in radians), Longitude (in radians) and Radius.
coordinates.values => get_coords_rect (ndim, dims, nspace, points)
A function that calculates the Grid's coordinates array.
coordinates.values => get_coords_cyl_rect (ndim, dims, nspace, points)
A function that calculates the Grid_Cyl's coordinates array.
coordinates.values => get_coords_spher_rect (ndim, dims, nspace, points)
A function that calculates the Grid_Spher's coordinates array.
See FLDget_coord
coordinates.min => cache(min_array(magnitude(points), 0, 0));
coordinates.max => cache(max_array(magnitude(points), 0, 0));
A function that sets the Grid's coordinate array min and max values to those appropriate to rectilinear fields.
coordinates.min_vec[veclen] => cache(min_array(points, 0, 0));
coordinates.max_vec[veclen] => cache(max_array(points, 0, 0));
A function that sets the Grid's coordinate array min_vec and max_vec (the extents) equal to the minimum and maximum of the points array.
Files
v/fld.v