RCS Header: /cvsroot/petscgraphics/petsc.c,v 1.8 2003/05/20 13:58:11 hazelsct Exp
This is the petsc.c main file. It has all of the PETSc-dependent functions.
Included Files
- #include </usr/lib/petsc/include/petscda.h>
Preprocessor definitions
#define __FUNCT__ "DATriangulate"
#define __FUNCT__ "DATriangulateLocal"
#define __FUNCT__ "IllErrorHandler"
Calculate vertices of isoquant triangles in a 3-D distributed array. This
takes a PETSc DA object, does some sanity checks, calculates array sizes,
gets the local vector and array, and then calls
DATriangulateLocal()
to do the rest. Note that global array access (i.e. this function) is
necessary for using default isoquant values, since we need to be able to
calculate the maximum and minimum on the global array.
int DATriangulate ( DA theda, Vec globalX, int this, PetscScalar* minmax, int n_quants, PetscScalar* isoquants, PetscScalar* colors )
- int DATriangulate
- Returns 0 or an error code.
- DA theda
- The PETSc distributed array object.
- Vec globalX
- PETSc global vector object associated with the DA with data we'd
like to graph.
- int this
- Index of the field we'd like to draw.
- PetscScalar* minmax
- Position of block corners: xmin, xmax, ymin, ymax, zmin,
zmax.
- int n_quants
- Number of isoquant surfaces to draw (isoquant values), or
PETSC_DECIDE
to use red, yellow, green, blue at 0.2, 0.4, 0.6 and 0.8 between the vector's
global minimum and maximum values.
- PetscScalar* isoquants
- Array of function values at which to draw isoquants,
or PETSC\_NULL if n_quants=PETSC\_DECIDE.
- PetscScalar* colors
- Array of color R,G,B,A quads for each isoquant, or
PETSC\_NULL if n_quants=PETSC\_DECIDE.
Calculate vertices of isoquant triangles in a 3-D distributed array. This
takes a PETSc DA object, does some sanity checks, calculates array sizes, and
then gets array and passes it to Draw3DBlock for triangulation.
int DATriangulateLocal ( DA theda, Vec localX, int this, PetscScalar* minmax, int n_quants, PetscScalar* isoquants, PetscScalar* colors )
- int DATriangulateLocal
- Returns 0 or an error code.
- DA theda
- The PETSc distributed array object.
- Vec localX
- PETSc local vector object associated with the DA with data we'd
like to graph.
- int this
- Index of the field we'd like to draw.
- PetscScalar* minmax
- Position of block corners: xmin, xmax, ymin, ymax, zmin,
zmax.
- int n_quants
- Number of isoquant surfaces to draw (isoquant values). Note
PETSC\_DECIDE
is not a valid option here, because it's impossible to know the global
maximum and minimum and have consistent contours without user-supplied
information.
- PetscScalar* isoquants
- Array of function values at which to draw isoquants.
- PetscScalar* colors
- Array of color R,G,B,A quads for each isoquant.
Handle errors, in this case the PETSc way.
int IllErrorHandler ( int id, char* message )
- int IllErrorHandler
- Returns the error code supplied.
- int id
- Index of the error, defined in petscerror.h.
- char* message
- Text of the error message.