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...


Defines

#define VGRID_DIGITS   6
 Number of decimal places for comparisons and formatting.


Typedefs

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


Functions

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

VgridVgrid_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, double *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, double *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 $L_1$ norm of the data. This returns the integral:

\[ \| u \|_{L_1} = \int_\Omega | u(x) | dx \]

.

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

\[ \| u \|_{L_2} = \left( \int_\Omega | u(x) |^2 dx \right)^{1/2} \]

.

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

\[ \| u \|_{L_\infty} = \sup_{x \in \Omega} | u(x) | \]

.

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

\[ | u |_{H_1} = \left( \int_\Omega |\nabla u(x)|^2 dx \right)^{1/2} \]

.

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

\[ \| u \|_{H_1} = \left( \int_\Omega |\nabla u(x)|^2 dx + \int_\Omega |u(x)|^2 dx \right)^{1/2} \]

.


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

unsigned long 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 $H_1$ norm (or energy norm) of the data. This returns the integral:

\[ \| u \|_{H_1} = \left( \int_\Omega |\nabla u(x)|^2 dx + \int_\Omega |u(x)|^2 dx \right)^{1/2} \]

.

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

double Vgrid_normL1 Vgrid thee  ) 
 

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

\[ \| u \|_{L_1} = \int_\Omega | u(x) | dx \]

.

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

double Vgrid_normL2 Vgrid thee  ) 
 

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

\[ \| u \|_{L_2} = \left( \int_\Omega | u(x) |^2 dx \right)^{1/2} \]

.

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

double Vgrid_normLinf Vgrid thee  ) 
 

Get the $L_\infty$ norm of the data. This returns the integral:

\[ \| u \|_{L_\infty} = \sup_{x \in \Omega} | u(x) | \]

.

Author:
Nathan Baker
Parameters:
thee Vgrid object
Returns:
$L\infty$ 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 $H_1$ semi-norm of the data. This returns the integral:

\[ | u |_{H_1} = \left( \int_\Omega |\nabla u(x)|^2 dx \right)^{1/2} \]

.

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,
double *  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 weight ( if 1: point in current partition, if 0 point not in current partition if > 0 && < 1 point on/near boundary )

void Vgrid_writeUHBD Vgrid thee,
const char *  iodev,
const char *  iofmt,
const char *  thost,
const char *  fname,
char *  title,
double *  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 weight ( if 1: point in current partition, if 0 point not in current partition if > 0 && < 1 point on/near boundary )
Bug:
This routine does not respect partition information


Generated on Tue Dec 6 10:05:58 2005 for APBS by doxygen 1.3.5