Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

Vgrid class

Oracle for Cartesian mesh data. More...


Files

file  vgrid.h
 Potential oracle for Cartesian mesh data.


Data Structures

struct  sVgrid
 Electrostatic potential oracle for Cartesian mesh data. More...


Typedefs

typedef sVgrid Vgrid
 Declaration of the Vgrid class as the sVgrid structure.


Functions

int Vgrid_memChk (Vgrid *thee)
 Return the memory used by this structure (and its contents) in bytes.

Vgrid * Vgrid_ctor (int nx, int ny, int nz, double hx, double hy, double hzed, double xmin, double ymin, double zmin, double *data)
 Construct Vgrid object with values obtained from Vpmg_readDX (for example).

int Vgrid_ctor2 (Vgrid *thee, int nx, int ny, int nz, double hx, double hy, double hzed, double xmin, double ymin, double zmin, double *data)
 Initialize Vgrid object with values obtained from Vpmg_readDX (for example).

int Vgrid_value (Vgrid *thee, double x[3], double *value)
 Get potential value (from mesh or approximation) at a point.

void Vgrid_dtor (Vgrid **thee)
 Object destructor.

void Vgrid_dtor2 (Vgrid *thee)
 FORTRAN stub object destructor.

int Vgrid_curvature (Vgrid *thee, double pt[3], int cflag, double *curv)
 Get second derivative values at a point.

int Vgrid_gradient (Vgrid *thee, double pt[3], double grad[3])
 Get first derivative values at a point.

void Vgrid_writeUHBD (Vgrid *thee, const char *iodev, const char *iofmt, const char *thost, const char *fname, char *title, int *pvec)
 Write out the data in UHBD grid format.

void Vgrid_writeDX (Vgrid *thee, const char *iodev, const char *iofmt, const char *thost, const char *fname, char *title, int *pvec)
 Write out the data in OpenDX grid format.

int Vgrid_readDX (Vgrid *thee, const char *iodev, const char *iofmt, const char *thost, const char *fname)
 Read in data in OpenDX grid format.

double Vgrid_integrate (Vgrid *thee)
 Get the integral of the data.

double Vgrid_normL1 (Vgrid *thee)
 Get the norm of the data. This returns the integral:

.

double Vgrid_normL2 (Vgrid *thee)
 Get the norm of the data. This returns the integral:

.

double Vgrid_normLinf (Vgrid *thee)
 Get the norm of the data. This returns the integral:

.

double Vgrid_seminormH1 (Vgrid *thee)
 Get the semi-norm of the data. This returns the integral:

.

double Vgrid_normH1 (Vgrid *thee)
 Get the norm (or energy norm) of the data. This returns the integral:

.


Detailed Description

Oracle for Cartesian mesh data.


Function Documentation

Vgrid* Vgrid_ctor int    nx,
int    ny,
int    nz,
double    hx,
double    hy,
double    hzed,
double    xmin,
double    ymin,
double    zmin,
double *    data
 

Construct Vgrid object with values obtained from Vpmg_readDX (for example).

Author:
Nathan Baker
Parameters:
nx  Number grid points in x direction
ny  Number grid points in y direction
nz  Number grid points in z direction
hx  Grid spacing in x direction
hy  Grid spacing in y direction
hzed  Grid spacing in z direction
xmin  x coordinate of lower grid corner
ymin  y coordinate of lower grid corner
zmin  z coordinate of lower grid corner
data  nx*ny*nz array of data. This can be VNULL if you are planning to read in data later with one of the read routines
Returns:
Newly allocated and initialized Vgrid object

int Vgrid_ctor2 Vgrid   thee,
int    nx,
int    ny,
int    nz,
double    hx,
double    hy,
double    hzed,
double    xmin,
double    ymin,
double    zmin,
double *    data
 

Initialize Vgrid object with values obtained from Vpmg_readDX (for example).

Author:
Nathan Baker
Parameters:
thee  Pointer to newly allocated Vgrid object
nx  Number grid points in x direction
ny  Number grid points in y direction
nz  Number grid points in z direction
hx  Grid spacing in x direction
hy  Grid spacing in y direction
hzed  Grid spacing in z direction
xmin  x coordinate of lower grid corner
ymin  y coordinate of lower grid corner
zmin  z coordinate of lower grid corner
data  nx*ny*nz array of data. This can be VNULL if you are planning to read in data later with one of the read routines
Returns:
Newly allocated and initialized Vgrid object

int Vgrid_curvature Vgrid   thee,
double    pt[3],
int    cflag,
double *    curv
 

Get second derivative values at a point.

Author:
Steve Bond and Nathan Baker
Parameters:
thee  Pointer to Vgrid object
pt  Location to evaluate second derivative
cflag 
  • 0: Reduced Maximal Curvature
  • 1: Mean Curvature (Laplace)
  • 2: Gauss Curvature
  • 3: True Maximal Curvature
curv  Specified curvature value
Returns:
1 if successful, 0 if off grid

void Vgrid_dtor Vgrid **    thee
 

Object destructor.

Author:
Nathan Baker
Parameters:
thee  Pointer to memory location of object to be destroyed

void Vgrid_dtor2 Vgrid   thee
 

FORTRAN stub object destructor.

Author:
Nathan Baker
Parameters:
thee  Pointer to object to be destroyed

int Vgrid_gradient Vgrid   thee,
double    pt[3],
double    grad[3]
 

Get first derivative values at a point.

Author:
Nathan Baker and Steve Bond
Parameters:
thee  Pointer to Vgrid object
pt  Location to evaluate gradient
grad  Gradient
Returns:
1 if successful, 0 if off grid

double Vgrid_integrate Vgrid   thee
 

Get the integral of the data.

Author:
Nathan Baker
Parameters:
thee  Vgrid object
Returns:
Integral of data

int Vgrid_memChk Vgrid   thee
 

Return the memory used by this structure (and its contents) in bytes.

Author:
Nathan Baker
Parameters:
thee  Vgrid object
Returns:
The memory used by this structure and its contents in bytes

double Vgrid_normH1 Vgrid   thee
 

Get the norm (or energy norm) of the data. This returns the integral:

.

Author:
Nathan Baker
Parameters:
thee  Vgrid object
Returns:
Integral of data

double Vgrid_normL1 Vgrid   thee
 

Get the norm of the data. This returns the integral:

.

Author:
Nathan Baker
Parameters:
thee  Vgrid object
Returns:
norm of data

double Vgrid_normL2 Vgrid   thee
 

Get the norm of the data. This returns the integral:

.

Author:
Nathan Baker
Parameters:
thee  Vgrid object
Returns:
norm of data

double Vgrid_normLinf Vgrid   thee
 

Get the norm of the data. This returns the integral:

.

Author:
Nathan Baker
Parameters:
thee  Vgrid object
Returns:
norm of data

int Vgrid_readDX Vgrid   thee,
const char *    iodev,
const char *    iofmt,
const char *    thost,
const char *    fname
 

Read in data in OpenDX grid format.

Note:
All dimension information is given in order: z, y, x
Author:
Nathan Baker
Parameters:
thee  Vgrid object
iodev  Input device type (FILE/BUFF/UNIX/INET)
iofmt  Input device format (ASCII/XDR)
thost  Input hostname (for sockets)
fname  Input FILE/BUFF/UNIX/INET name
Returns:
1 if sucessful, 0 otherwise

double Vgrid_seminormH1 Vgrid   thee
 

Get the semi-norm of the data. This returns the integral:

.

Author:
Nathan Baker
Parameters:
thee  Vgrid object
Returns:
Integral of data

int Vgrid_value Vgrid   thee,
double    x[3],
double *    value
 

Get potential value (from mesh or approximation) at a point.

Author:
Nathan Baker
Parameters:
thee  Vgrid obejct
x  Point at which to evaluate potential
value  Value of data at point x
Returns:
1 if successful, 0 if off grid

void Vgrid_writeDX Vgrid   thee,
const char *    iodev,
const char *    iofmt,
const char *    thost,
const char *    fname,
char *    title,
int *    pvec
 

Write out the data in OpenDX grid format.

Author:
Nathan Baker
Parameters:
thee  Grid object
iodev  Output device type (FILE/BUFF/UNIX/INET)
iofmt  Output device format (ASCII/XDR)
thost  Output hostname (for sockets)
fname  Output FILE/BUFF/UNIX/INET name
title  Title to be inserted in grid file
pvec  Partition information (1=>point in current partition, 0=>point not in current partition)
Bug:
This routine does not respect partition information

void Vgrid_writeUHBD Vgrid   thee,
const char *    iodev,
const char *    iofmt,
const char *    thost,
const char *    fname,
char *    title,
int *    pvec
 

Write out the data in UHBD grid format.

Note:
  • The mesh spacing should be uniform
  • Format changed from %12.6E to %12.5E
Author:
Nathan Baker
Parameters:
thee  Grid object
iodev  Output device type (FILE/BUFF/UNIX/INET)
iofmt  Output device format (ASCII/XDR)
thost  Output hostname (for sockets)
fname  Output FILE/BUFF/UNIX/INET name
title  Title to be inserted in grid file
pvec  Partition information (1=>point in current partition, 0=>point not in current partition)
Bug:
This routine does not respect partition information


Generated on Tue Feb 17 09:27:30 2004 for APBS by doxygen1.2.18