Visage_abstract_geometry works closely with two other classes: spatial_hash and brick_shape. Spatial_hash is used to perform searching operations while brick_shape computes coordinate transformation (i.e., Jacobian) matrices and interpolation functions. The interpolation functions are based on the isoparametric shape functions for linear eight-noded brick elements.
Most of the methods described below are used as internal methods by various algorithm objects (data_iso_surface, data_streamer, etc.) to access the data in an abstract fashion. For example, one method is "points_cells?" which returns the id's of all cells that use the current point.
Notes: geometry is assumed of a collection of 3D cells, each cell is topologically a eight-noded brick (i.e., hexahedron). These cells may be collapsed to other forms including the tetrahedron, wedge, triangle, etc. The geometric coordinate system is s combination of a geometry coordinate (i,j,k - structured forms, element id - unstructured forms) plus local cell coordinate. The cell coordinates run from (0 <= r,s,t <= 1). Hence the center of cell (2,54,67) in a structured grid would be (2.5,54.5,67.5) or in element 54 of an unstructured grid would be (54.5,54.5,54.5).
extent= (x1_min,x1_max, x2_min,x2_max, x3_min,x3_max) set the coordinate extents of the geometry.
point= id set the current point id.
point? get the current point id.
cell= id set the current cell id.
cell? get the current cell id.
number_cells= value set the number of cells in the geometry.
number_cells? set the number of cells in the geometry.
cell_points= (i,j,k,l,m,n,o,p) set the points of the current cell to the point id's i,j,k,l,m,n,o,p. These points are ordered depending upon the type of the cell.
cell_points? get the points id's of the current cell.
cell_coords= ( values) set the global point coordinates of the current cell. The values array is a series of 24 floating point values, (x,y,z for each point). These points are ordered depending upon the type of the cell.
cell_coords? get the points coordinates of the current cell. As a side effect will also set the cell_points values.
point_cells= (i,j,k,l,m,n,o,p) set the cells that use the current point.
point_cells? get the cells that use the current point.
location= (r,s,t) set the current location in the element coordinates of the cell.
location? get the current location in the cell coordinates.
position= (x,y,z) set the current position in global coordinates.
position? get the current position in global coordinates.
cell_shape_functions= (values) set the current cell shape functions.
cell_shape_functions? get the current cell shape functions.
cell_shape_derivatives= (values) set the current cell shape function derivatives.
cell_shape_derivatives? get the current cell shape function derivatives.
jacobian_inverse= (values) set the jacobian inverse for the current cell.
jacobian_inverse? get the jacobian inverse for the current cell.
closest_point! find the closest point (point id) to the current position.
location! find the current cell in cell coordinates of the current position.
parametric_coordinates! compute the parametric coordinates from the current cell and position.
position! find the position from the current cell id and parametric coordinates.
cell_shape_functions! compute the cell shape functions from the current cell.
cell_shape_derivatives! compute the cell shape function derivatives from the current cell.
jacobian_inverse! compute the inverse jacobian matrix for the current cell.
release! release all allocated memeory but don't free object.
create_spatial_hash! create a spatial_hash object for use by this object.
create_brick_shape! create a brick_shape object for use by this object.
share_memory! Allow the spatial_hash, brick_shape, and geometry object to share memory.