APBS 3.0.0
Loading...
Searching...
No Matches
C translation of Holst group PMG code

C translation of Holst group PMG code. More...

Macros

#define HARMO2(a, b)   (2.0 * (a) * (b) / ((a) + (b)))
 Multigrid subroutines.
 
#define MAXIONS   50
 Specifies the PDE definition for PMG to solve.
 

Functions

VPUBLIC void VbuildA (int *nx, int *ny, int *nz, int *ipkey, int *mgdisc, int *numdia, int *ipc, double *rpc, double *ac, double *cc, double *fc, double *xf, double *yf, double *zf, double *gxcf, double *gycf, double *gzcf, double *a1cf, double *a2cf, double *a3cf, double *ccf, double *fcf)
 Build the Laplacian.
 
VPUBLIC void Vbuildband (int *key, int *nx, int *ny, int *nz, int *ipc, double *rpc, double *ac, int *ipcB, double *rpcB, double *acB)
 Banded matrix builder.
 
VEXTERNC void Vbuildband1_7 (int *nx, int *ny, int *nz, int *ipc, double *rpc, double *oC, double *oE, double *oN, double *uC, int *ipcB, double *rpcB, double *acB, int *n, int *m, int *lda)
 Build the operator in banded form given the 7-diagonal form.
 
VEXTERNC void Vbuildband1_27 (int *nx, int *ny, int *nz, int *ipc, double *rpc, double *oC, double *oE, double *oN, double *uC, double *oNE, double *oNW, double *uE, double *uW, double *uN, double *uS, double *uNE, double *uNW, double *uSE, double *uSW, int *ipcB, double *rpcB, double *acB, int *n, int *m, int *lda)
 Build the operator in banded form given the 27-diagonal form.
 
VPUBLIC void VbuildG (int *nxf, int *nyf, int *nzf, int *nxc, int *nyc, int *nzc, int *numdia, double *pcFF, double *acFF, double *ac)
 Build Galerkin matrix structures.
 
VEXTERNC void VbuildG_1 (int *nxf, int *nyf, int *nzf, int *nx, int *ny, int *nz, double *oPC, double *oPN, double *oPS, double *oPE, double *oPW, double *oPNE, double *oPNW, double *oPSE, double *oPSW, double *uPC, double *uPN, double *uPS, double *uPE, double *uPW, double *uPNE, double *uPNW, double *uPSE, double *uPSW, double *dPC, double *dPN, double *dPS, double *dPE, double *dPW, double *dPNE, double *dPNW, double *dPSE, double *dPSW, double *oC, double *XoC, double *XoE, double *XoN, double *XuC, double *XoNE, double *XoNW, double *XuE, double *XuW, double *XuN, double *XuS, double *XuNE, double *XuNW, double *XuSE, double *XuSW)
 Computes a 27-point galerkin coarse grid matrix from a 1-point (i.e., diagonal) fine grid matrix.
 
VEXTERNC void VbuildG_7 (int *nxf, int *nyf, int *nzf, int *nx, int *ny, int *nz, double *oPC, double *oPN, double *oPS, double *oPE, double *oPW, double *oPNE, double *oPNW, double *oPSE, double *oPSW, double *uPC, double *uPN, double *uPS, double *uPE, double *uPW, double *uPNE, double *uPNW, double *uPSE, double *uPSW, double *dPC, double *dPN, double *dPS, double *dPE, double *dPW, double *dPNE, double *dPNW, double *dPSE, double *dPSW, double *oC, double *oE, double *oN, double *uC, double *XoC, double *XoE, double *XoN, double *XuC, double *XoNE, double *XoNW, double *XuE, double *XuW, double *XuN, double *XuS, double *XuNE, double *XuNW, double *XuSE, double *XuSW)
 Computes a 27-point galerkin coarse grid matrix from a 7-point fine grid matrix.
 
VEXTERNC void VbuildG_27 (int *nxf, int *nyf, int *nzf, int *nx, int *ny, int *nz, double *oPC, double *oPN, double *oPS, double *oPE, double *oPW, double *oPNE, double *oPNW, double *oPSE, double *oPSW, double *uPC, double *uPN, double *uPS, double *uPE, double *uPW, double *uPNE, double *uPNW, double *uPSE, double *uPSW, double *dPC, double *dPN, double *dPS, double *dPE, double *dPW, double *dPNE, double *dPNW, double *dPSE, double *dPSW, double *oC, double *oE, double *oN, double *uC, double *oNE, double *oNW, double *uE, double *uW, double *uN, double *uS, double *uNE, double *uNW, double *uSE, double *uSW, double *XoC, double *XoE, double *XoN, double *XuC, double *XoNE, double *XoNW, double *XuE, double *XuW, double *XuN, double *XuS, double *XuNE, double *XuNW, double *XuSE, double *XuSW)
 Compute a 27-point galerkin coarse grid matrix from a 27-point fine grid matrix.
 
VPUBLIC void VbuildP (int *nxf, int *nyf, int *nzf, int *nxc, int *nyc, int *nzc, int *mgprol, int *ipc, double *rpc, double *pc, double *ac, double *xf, double *yf, double *zf)
 Builds prolongation matrix.
 
VPUBLIC void Vcghs (int *nx, int *ny, int *nz, int *ipc, double *rpc, double *ac, double *cc, double *fc, double *x, double *p, double *ap, double *r, int *itmax, int *iters, double *errtol, double *omega, int *iresid, int *iadjoint)
 A collection of useful low-level routines (timing, etc).
 
VPUBLIC void Vgsrb (int *nx, int *ny, int *nz, int *ipc, double *rpc, double *ac, double *cc, double *fc, double *x, double *w1, double *w2, double *r, int *itmax, int *iters, double *errtol, double *omega, int *iresid, int *iadjoint)
 Guass-Seidel solver.
 
VPUBLIC void Vmatvec (int *nx, int *ny, int *nz, int *ipc, double *rpc, double *ac, double *cc, double *x, double *y)
 Matrix-vector multiplication routines.
 
VEXTERNC void Vnmatvec (int *nx, int *ny, int *nz, int *ipc, double *rpc, double *ac, double *cc, double *x, double *y, double *w1)
 Break the matrix data-structure into diagonals and then call the matrix-vector routine.
 
VEXTERNC void Vmresid (int *nx, int *ny, int *nz, int *ipc, double *rpc, double *ac, double *cc, double *fc, double *x, double *r)
 Break the matrix data-structure into diagonals and then call the residual routine.
 
VEXTERNC void Vnmresid (int *nx, int *ny, int *nz, int *ipc, double *rpc, double *ac, double *cc, double *fc, double *x, double *r, double *w1)
 Break the matrix data-structure into diagonals and then call the residual routine.
 
VEXTERNC void Vrestrc (int *nxf, int *nyf, int *nzf, int *nxc, int *nyc, int *nzc, double *xin, double *xout, double *pc)
 Apply the restriction operator.
 
VEXTERNC void VinterpPMG (int *nxc, int *nyc, int *nzc, int *nxf, int *nyf, int *nzf, double *xin, double *xout, double *pc)
 Apply the prolongation operator.
 
VEXTERNC void Vextrac (int *nxf, int *nyf, int *nzf, int *nxc, int *ny, int *nzc, double *xin, double *xout)
 Simple injection of a fine grid function into coarse grid.
 
VEXTERNC void Vmvcs (int *nx, int *ny, int *nz, double *x, int *iz, double *w0, double *w1, double *w2, double *w3, int *istop, int *itmax, int *iters, int *ierror, int *nlev, int *ilev, int *nlev_real, int *mgsolv, int *iok, int *iinfo, double *epsiln, double *errtol, double *omega, int *nu1, int *nu2, int *mgsmoo, int *ipc, double *rpc, double *pc, double *ac, double *cc, double *fc, double *tru)
 MG helper functions.
 
VPUBLIC void Vmgdriv (int *iparm, double *rparm, int *iwork, double *rwork, double *u, double *xf, double *yf, double *zf, double *gxcf, double *gycf, double *gzcf, double *a1cf, double *a2cf, double *a3cf, double *ccf, double *fcf, double *tcf)
 Multilevel solver driver.
 
VEXTERNC void Vmgdriv2 (int *iparm, double *rparm, int *nx, int *ny, int *nz, double *u, int *iz, int *ipc, double *rpc, double *pc, double *ac, double *cc, double *fc, double *xf, double *yf, double *zf, double *gxcf, double *gycf, double *gzcf, double *a1cf, double *a2cf, double *a3cf, double *ccf, double *fcf, double *tcf)
 Solves the pde using the multi-grid method.
 
VEXTERNC void Vmgsz (int *mgcoar, int *mgdisc, int *mgsolv, int *nx, int *ny, int *nz, int *nlev, int *nxc, int *nyc, int *nzc, int *nf, int *nc, int *narr, int *narrc, int *n_rpc, int *n_iz, int *n_ipc, int *iretot, int *iintot)
 This routine computes the required sizes of the real and integer work arrays for the multigrid code. these two sizes are a (complicated) function of input parameters.
 
VPUBLIC void Vfmvfas (int *nx, int *ny, int *nz, double *x, int *iz, double *w0, double *w1, double *w2, double *w3, double *w4, int *istop, int *itmax, int *iters, int *ierror, int *nlev, int *ilev, int *nlev_real, int *mgsolv, int *iok, int *iinfo, double *epsiln, double *errtol, double *omega, int *nu1, int *nu2, int *mgsmoo, int *ipc, double *rpc, double *pc, double *ac, double *cc, double *fc, double *tru)
 Multigrid nonlinear solve iteration routine.
 
VEXTERNC void Vmvfas (int *nx, int *ny, int *nz, double *x, int *iz, double *w0, double *w1, double *w2, double *w3, double *w4, int *istop, int *itmax, int *iters, int *ierror, int *nlev, int *ilev, int *nlev_real, int *mgsolv, int *iok, int *iinfo, double *epsiln, double *errtol, double *omega, int *nu1, int *nu2, int *mgsmoo, int *ipc, double *rpc, double *pc, double *ac, double *cc, double *fc, double *tru)
 Nonlinear multilevel method.
 
VPUBLIC void Vbuildops (int *nx, int *ny, int *nz, int *nlev, int *ipkey, int *iinfo, int *ido, int *iz, int *mgprol, int *mgcoar, int *mgsolv, int *mgdisc, int *ipc, double *rpc, double *pc, double *ac, double *cc, double *fc, double *xf, double *yf, double *zf, double *gxcf, double *gycf, double *gzcf, double *a1cf, double *a2cf, double *a3cf, double *ccf, double *fcf, double *tcf)
 Build operators, boundary arrays, modify affine vectors ido==0: do only fine level ido==1: do only coarse levels (including second op at coarsest) ido==2: do all levels ido==3: rebuild the second operator at the coarsest level.
 
VEXTERNC void Vbuildstr (int *nx, int *ny, int *nz, int *nlev, int *iz)
 Build the nexted operator framework in the array iz.
 
VEXTERNC void Vbuildgaler0 (int *nxf, int *nyf, int *nzf, int *nxc, int *nyc, int *nzc, int *ipkey, int *numdia, double *pcFF, int *ipcFF, double *rpcFF, double *acFF, double *ccFF, double *fcFF, int *ipc, double *rpc, double *ac, double *cc, double *fc)
 Form the Galerkin coarse grid system.
 
VPUBLIC void Vxcopy (int *nx, int *ny, int *nz, double *x, double *y)
 A collection of useful low-level routines (timing, etc).
 
VEXTERNC void Vxcopy_small (int *nx, int *ny, int *nz, double *x, double *y)
 Copy operation for a grid function with boundary values. Quite simply copies one 3d matrix to another.
 
VEXTERNC void Vxcopy_large (int *nx, int *ny, int *nz, double *x, double *y)
 Copy operation for a grid function with boundary values. Quite simply copies one 3d matrix to another.
 
VEXTERNC void Vxaxpy (int *nx, int *ny, int *nz, double *alpha, double *x, double *y)
 saxpy operation for a grid function with boundary values.
 
VEXTERNC double Vxnrm1 (int *nx, int *ny, int *nz, double *x)
 Norm operation for a grid function with boundary values.
 
VEXTERNC double Vxnrm2 (int *nx, int *ny, int *nz, double *x)
 Norm operation for a grid function with boundary values.
 
VEXTERNC double Vxdot (int *nx, int *ny, int *nz, double *x, double *y)
 Inner product operation for a grid function with boundary values.
 
VEXTERNC void Vazeros (int *nx, int *ny, int *nz, double *x)
 Zero out operation for a grid function, including boundary values.
 
VEXTERNC void VfboundPMG (int *ibound, int *nx, int *ny, int *nz, double *x, double *gxc, double *gyc, double *gzc)
 Initialize a grid function to have a certain boundary value,.
 
VEXTERNC void VfboundPMG00 (int *nx, int *ny, int *nz, double *x)
 Initialize a grid function to have a zero boundary value.
 
VEXTERNC void Vaxrand (int *nx, int *ny, int *nz, double *x)
 Fill grid function with random values, including boundary values.
 
VEXTERNC void Vxscal (int *nx, int *ny, int *nz, double *fac, double *x)
 Scale operation for a grid function with boundary values.
 
VEXTERNC void Vprtmatd (int *nx, int *ny, int *nz, int *ipc, double *rpc, double *ac)
 
VPUBLIC void Vdpbsl (double *abd, int *lda, int *n, int *m, double *b)
 LINPACK interface.
 
VPUBLIC void Vmypdefinitlpbe (int *tnion, double *tcharge, double *tsconc)
 Set up the ionic species to be used in later calculations. This must be called before any other of the routines in this file.
 
VEXTERNC void Vmypdefinitnpbe (int *tnion, double *tcharge, double *tsconc)
 Set up the ionic species to be used in later calculations. This must be called before any other of the routines in this file.
 
VEXTERNC void Vmypdefinitsmpbe (int *tnion, double *tcharge, double *tsconc, double *smvolume, double *smsize)
 Set up the ionic species to be used in later calculations. This must be called before any other of the routines in this file.
 
VEXTERNC void Vc_vec (double *coef, double *uin, double *uout, int *nx, int *ny, int *nz, int *ipkey)
 Define the nonlinearity (vector version)
 
VEXTERNC void Vdc_vec (double *coef, double *uin, double *uout, int *nx, int *ny, int *nz, int *ipkey)
 Define the derivative of the nonlinearity (vector version)
 
VEXTERNC void Vc_vecpmg (double *coef, double *uin, double *uout, int *nx, int *ny, int *nz, int *ipkey)
 Define the nonlinearity (vector version)
 
VEXTERNC void Vc_vecsmpbe (double *coef, double *uin, double *uout, int *nx, int *ny, int *nz, int *ipkey)
 Define the nonlinearity (vector version)
 
VEXTERNC void Vnewdriv (int *iparm, double *rparm, int *iwork, double *rwork, double *u, double *xf, double *yf, double *zf, double *gxcf, double *gycf, double *gzcf, double *a1cf, double *a2cf, double *a3cf, double *ccf, double *fcf, double *tcf)
 Driver for the Newton Solver.
 
VEXTERNC void Vnewdriv2 (int *iparm, double *rparm, int *nx, int *ny, int *nz, double *u, int *iz, double *w1, double *w2, int *ipc, double *rpc, double *pc, double *ac, double *cc, double *fc, double *xf, double *yf, double *zf, double *gxcf, double *gycf, double *gzcf, double *a1cf, double *a2cf, double *a3cf, double *ccf, double *fcf, double *tcf)
 Solves using Newton's Method.
 
VPUBLIC void Vfnewton (int *nx, int *ny, int *nz, double *x, int *iz, double *w0, double *w1, double *w2, double *w3, int *istop, int *itmax, int *iters, int *ierror, int *nlev, int *ilev, int *nlev_real, int *mgsolv, int *iok, int *iinfo, double *epsiln, double *errtol, double *omega, int *nu1, int *nu2, int *mgsmoo, double *cprime, double *rhs, double *xtmp, int *ipc, double *rpc, double *pc, double *ac, double *cc, double *fc, double *tru)
 Driver routines for the Newton method.
 
VEXTERNC void Vnewton (int *nx, int *ny, int *nz, double *x, int *iz, double *w0, double *w1, double *w2, double *w3, int *istop, int *itmax, int *iters, int *ierror, int *nlev, int *ilev, int *nlev_real, int *mgsolv, int *iok, int *iinfo, double *epsiln, double *errtol, double *omega, int *nu1, int *nu2, int *mgsmoo, double *cprime, double *rhs, double *xtmp, int *ipc, double *rpc, double *pc, double *ac, double *cc, double *fc, double *tru)
 Inexact-newton-multilevel method.
 
VEXTERNC void Vgetjac (int *nx, int *ny, int *nz, int *nlev_real, int *iz, int *lev, int *ipkey, double *x, double *r, double *cprime, double *rhs, double *cc, double *pc)
 Form the jacobian system.
 
VPUBLIC void Vpower (int *nx, int *ny, int *nz, int *iz, int *ilev, int *ipc, double *rpc, double *ac, double *cc, double *w1, double *w2, double *w3, double *w4, double *eigmax, double *eigmax_model, double *tol, int *itmax, int *iters, int *iinfo)
 Power methods for eigenvalue estimation.
 
VEXTERNC void Vipower (int *nx, int *ny, int *nz, double *u, int *iz, double *w0, double *w1, double *w2, double *w3, double *w4, double *eigmin, double *eigmin_model, double *tol, int *itmax, int *iters, int *nlev, int *ilev, int *nlev_real, int *mgsolv, int *iok, int *iinfo, double *epsiln, double *errtol, double *omega, int *nu1, int *nu2, int *mgsmoo, int *ipc, double *rpc, double *pc, double *ac, double *cc, double *tru)
 Standard inverse power method for minimum eigenvalue estimation.
 
VEXTERNC void Vsmooth (int *nx, int *ny, int *nz, int *ipc, double *rpc, double *ac, double *cc, double *fc, double *x, double *w1, double *w2, double *r, int *itmax, int *iters, double *errtol, double *omega, int *iresid, int *iadjoint, int *meth)
 Multigrid smoothing functions.
 
VEXTERNC void Vnsmooth (int *nx, int *ny, int *nz, int *ipc, double *rpc, double *ac, double *cc, double *fc, double *x, double *w1, double *w2, double *r, int *itmax, int *iters, double *errtol, double *omega, int *iresid, int *iadjoint, int *meth)
 call the appropriate non-linear smoothing routine.
 

Detailed Description

C translation of Holst group PMG code.

Macro Definition Documentation

◆ HARMO2

#define HARMO2 ( a,
b )   (2.0 * (a) * (b) / ((a) + (b)))

Multigrid subroutines.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 

Definition at line 65 of file mgsubd.h.

◆ MAXIONS

#define MAXIONS   50

Specifies the PDE definition for PMG to solve.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 

Definition at line 62 of file mypdec.h.

Function Documentation

◆ Vaxrand()

VEXTERNC void Vaxrand ( int * nx,
int * ny,
int * nz,
double * x )

Fill grid function with random values, including boundary values.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces axrand from mikpckd.f
Parameters
nxThe size of the x dimension of the 3d matrix
nyThe size of the y dimension of the 3d matrix
nzThe size of the z dimension of the 3d matrix
xThe 3d matrix to fill

Definition at line 291 of file mikpckd.c.

◆ Vazeros()

VEXTERNC void Vazeros ( int * nx,
int * ny,
int * nz,
double * x )

Zero out operation for a grid function, including boundary values.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces azeros from mikpckd.f
Parameters
nxThe size of the x dimension of the 3d matrix
nyThe size of the x dimension of the 3d matrix
nzThe size of the x dimension of the 3d matrix
xThe matrix to zero out

Definition at line 195 of file mikpckd.c.

◆ VbuildA()

VEXTERNC void VbuildA ( int * nx,
int * ny,
int * nz,
int * ipkey,
int * mgdisc,
int * numdia,
int * ipc,
double * rpc,
double * ac,
double * cc,
double * fc,
double * xf,
double * yf,
double * zf,
double * gxcf,
double * gycf,
double * gzcf,
double * a1cf,
double * a2cf,
double * a3cf,
double * ccf,
double * fcf )

Build the Laplacian.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute.
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.
* Portions Copyright (c) 2002-2010, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Mike Holst [original], Tucker Beck [translation]
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 

Break the matrix data-structure into diagonals and then call the matrix build routine

Author
Tucker Beck [C Translation], Michael Holst [Original]
Parameters
nx
ny
nz
ipkey
mgdisc
numdia
ipc
rpc
ac
cc
fc
xf
yf
zf
gxcf
gycf
gzcf
a1cf
a2cf
a3cf
ccf
fcf

Definition at line 57 of file buildAd.c.

◆ Vbuildband()

VEXTERNC void Vbuildband ( int * key,
int * nx,
int * ny,
int * nz,
int * ipc,
double * rpc,
double * ac,
int * ipcB,
double * rpcB,
double * acB )

Banded matrix builder.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.
* Copyright (c) 2010-2020 Battelle Memorial Institute.
* Portions Copyright (c) 2002-2010, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Mike Holst and Steve Bond [original], Tucker Beck [translation]
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 

Build and factor a banded matrix given a matrix in diagonal form.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces buildband from buildBd.f
Parameters
key
nx
ny
nz
ipc
rpc
ac
ipcB
rpcB
acB

Definition at line 57 of file buildBd.c.

◆ Vbuildband1_27()

VEXTERNC void Vbuildband1_27 ( int * nx,
int * ny,
int * nz,
int * ipc,
double * rpc,
double * oC,
double * oE,
double * oN,
double * uC,
double * oNE,
double * oNW,
double * uE,
double * uW,
double * uN,
double * uS,
double * uNE,
double * uNW,
double * uSE,
double * uSW,
int * ipcB,
double * rpcB,
double * acB,
int * n,
int * m,
int * lda )

Build the operator in banded form given the 27-diagonal form.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces buildband1_7 from buildBd.f
Parameters
nx
ny
nz
ipc
rpc
oC
oE
oN
uC
oNE
oNW
uE
uW
uN
uS
uNE
uNW
uSE
uSW
ipcB
rpcB
acB
n
m
lda

Definition at line 183 of file buildBd.c.

◆ Vbuildband1_7()

VEXTERNC void Vbuildband1_7 ( int * nx,
int * ny,
int * nz,
int * ipc,
double * rpc,
double * oC,
double * oE,
double * oN,
double * uC,
int * ipcB,
double * rpcB,
double * acB,
int * n,
int * m,
int * lda )

Build the operator in banded form given the 7-diagonal form.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces buildband1_7 from buildBd.f
Parameters
nx
ny
nz
ipc
rpc
oC
oE
oN
uC
ipcB
rpcB
acB
n
m
lda

Definition at line 119 of file buildBd.c.

◆ VbuildG()

VEXTERNC void VbuildG ( int * nxf,
int * nyf,
int * nzf,
int * nxc,
int * nyc,
int * nzc,
int * numdia,
double * pcFF,
double * acFF,
double * ac )

Build Galerkin matrix structures.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute.
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.
* Portions Copyright (c) 2002-2010, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.  
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Parameters
nxf
nyf
nzf
nxc
nyc
nzc
numdia
pcFF
acFF
ac

Definition at line 57 of file buildGd.c.

◆ VbuildG_1()

VEXTERNC void VbuildG_1 ( int * nxf,
int * nyf,
int * nzf,
int * nx,
int * ny,
int * nz,
double * oPC,
double * oPN,
double * oPS,
double * oPE,
double * oPW,
double * oPNE,
double * oPNW,
double * oPSE,
double * oPSW,
double * uPC,
double * uPN,
double * uPS,
double * uPE,
double * uPW,
double * uPNE,
double * uPNW,
double * uPSE,
double * uPSW,
double * dPC,
double * dPN,
double * dPS,
double * dPE,
double * dPW,
double * dPNE,
double * dPNW,
double * dPSE,
double * dPSW,
double * oC,
double * XoC,
double * XoE,
double * XoN,
double * XuC,
double * XoNE,
double * XoNW,
double * XuE,
double * XuW,
double * XuN,
double * XuS,
double * XuNE,
double * XuNW,
double * XuSE,
double * XuSW )

Computes a 27-point galerkin coarse grid matrix from a 1-point (i.e., diagonal) fine grid matrix.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces buildG_1 from buildGd.f

Expressions for the galerkin coarse grid stencil XA in terms of the fine grid matrix stencil A and the interpolation operator stencil P. these stencils have the form:

XA := array([

matrix([ [ -XdNW(i,j,k), -XdN(i,j,k), -XdNE(i,j,k) ], [ -XdW(i,j,k), -XdC(i,j,k), -XdE(i,j,k) ], [ -XdSW(i,j,k), -XdS(i,j,k), -XdSE(i,j,k) ] ]),

matrix([ [ -XoNW(i,j,k), -XoN(i,j,k), -XoNE(i,j,k) ], [ -XoW(i,j,k), XoC(i,j,k), -XoE(i,j,k) ], [ -XoSW(i,j,k), -XoS(i,j,k), -XoSE(i,j,k) ] ]),

matrix([ [ -XuNW(i,j,k), -XuN(i,j,k), -XuNE(i,j,k) ], [ -XuW(i,j,k), -XuC(i,j,k), -XuE(i,j,k) ], [ -XuSW(i,j,k), -XuS(i,j,k), -XuSE(i,j,k) ] ]) ]):

A := array([

matrix([ [ 0, 0, 0 ], [ 0, 0, 0 ], [ 0, 0, 0 ] ]),

matrix([ [ 0, 0, 0 ], [ 0, oC(i,j,k), 0 ], [ 0, 0, 0 ] ]),

matrix([ [ 0, 0, 0 ], [ 0, 0, 0 ], [ 0, 0, 0 ] ])

P := array([

matrix([ [ dPNW(i,j,k), dPN(i,j,k), dPNE(i,j,k) ], [ dPW(i,j,k), dPC(i,j,k), dPE(i,j,k) ], [ dPSW(i,j,k), dPS(i,j,k), dPSE(i,j,k) ] ]),

matrix([ [ oPNW(i,j,k), oPN(i,j,k), oPNE(i,j,k) ], [ oPW(i,j,k), oPC(i,j,k), oPE(i,j,k) ], [ oPSW(i,j,k), oPS(i,j,k), oPSE(i,j,k) ] ]),

matrix([ [ uPNW(i,j,k), uPN(i,j,k), uPNE(i,j,k) ], [ uPW(i,j,k), uPC(i,j,k), uPE(i,j,k) ], [ uPSW(i,j,k), uPS(i,j,k), uPSE(i,j,k) ] ]) ]):

Parameters
nxf
nyf
nzf
nx
ny
nz
oPC
oPN
oPS
oPE
oPW
oPNE
oPNW
oPSE
oPSW
uPC
uPN
uPS
uPE
uPW
uPNE
uPNW
uPSE
uPSW
dPC
dPN
dPS
dPE
dPW
dPNE
dPNW
dPSE
dPSW
oC
XoC
XoE
XoN
XuC
XoNE
XoNW
XuE
XuW
XuN
XuS
XuNE
XuNW
XuSE
XuSW

Definition at line 145 of file buildGd.c.

◆ VbuildG_27()

VEXTERNC void VbuildG_27 ( int * nxf,
int * nyf,
int * nzf,
int * nx,
int * ny,
int * nz,
double * oPC,
double * oPN,
double * oPS,
double * oPE,
double * oPW,
double * oPNE,
double * oPNW,
double * oPSE,
double * oPSW,
double * uPC,
double * uPN,
double * uPS,
double * uPE,
double * uPW,
double * uPNE,
double * uPNW,
double * uPSE,
double * uPSW,
double * dPC,
double * dPN,
double * dPS,
double * dPE,
double * dPW,
double * dPNE,
double * dPNW,
double * dPSE,
double * dPSW,
double * oC,
double * oE,
double * oN,
double * uC,
double * oNE,
double * oNW,
double * uE,
double * uW,
double * uN,
double * uS,
double * uNE,
double * uNW,
double * uSE,
double * uSW,
double * XoC,
double * XoE,
double * XoN,
double * XuC,
double * XoNE,
double * XoNW,
double * XuE,
double * XuW,
double * XuN,
double * XuS,
double * XuNE,
double * XuNW,
double * XuSE,
double * XuSW )

Compute a 27-point galerkin coarse grid matrix from a 27-point fine grid matrix.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces buildG_27 from buildGd.f

Expressions for the galerkin coarse grid stencil XA in terms of the fine grid matrix stencil A and the interpolation operator stencil P. these stencils have the form:

XA := array([

matrix([ [ -XdNW(i,j,k), -XdN(i,j,k), -XdNE(i,j,k) ], [ -XdW(i,j,k), -XdC(i,j,k), -XdE(i,j,k) ], [ -XdSW(i,j,k), -XdS(i,j,k), -XdSE(i,j,k) ] ]),

matrix([ [ -XoNW(i,j,k), -XoN(i,j,k), -XoNE(i,j,k) ], [ -XoW(i,j,k), XoC(i,j,k), -XoE(i,j,k) ], [ -XoSW(i,j,k), -XoS(i,j,k), -XoSE(i,j,k) ] ]),

matrix([ [ -XuNW(i,j,k), -XuN(i,j,k), -XuNE(i,j,k) ], [ -XuW(i,j,k), -XuC(i,j,k), -XuE(i,j,k) ], [ -XuSW(i,j,k), -XuS(i,j,k), -XuSE(i,j,k) ] ]) ]):

A := array([

matrix([ [ -dNW(i,j,k), -dN(i,j,k), -dNE(i,j,k) ], [ -dW(i,j,k), -dC(i,j,k), -dE(i,j,k) ], [ -dSW(i,j,k), -dS(i,j,k), -dSE(i,j,k) ] ]),

matrix([ [ -oNW(i,j,k), -oN(i,j,k), -oNE(i,j,k) ], [ -oW(i,j,k), oC(i,j,k), -oE(i,j,k) ], [ -oSW(i,j,k), -oS(i,j,k), -oSE(i,j,k) ] ]),

matrix([ [ -uNW(i,j,k), -uN(i,j,k), -uNE(i,j,k) ], [ -uW(i,j,k), -uC(i,j,k), -uE(i,j,k) ], [ -uSW(i,j,k), -uS(i,j,k), -uSE(i,j,k) ] ]) ]):

P := array([

matrix([ [ dPNW(i,j,k), dPN(i,j,k), dPNE(i,j,k) ], [ dPW(i,j,k), dPC(i,j,k), dPE(i,j,k) ], [ dPSW(i,j,k), dPS(i,j,k), dPSE(i,j,k) ] ]),

matrix([ [ oPNW(i,j,k), oPN(i,j,k), oPNE(i,j,k) ], [ oPW(i,j,k), oPC(i,j,k), oPE(i,j,k) ], [ oPSW(i,j,k), oPS(i,j,k), oPSE(i,j,k) ] ]),

matrix([ [ uPNW(i,j,k), uPN(i,j,k), uPNE(i,j,k) ], [ uPW(i,j,k), uPC(i,j,k), uPE(i,j,k) ], [ uPSW(i,j,k), uPS(i,j,k), uPSE(i,j,k) ] ]) ]):

in addition, A is assumed to be symmetric so that:

oS := proc(x,y,z) RETURN( oN(x,y-1,z) ): end: oW := proc(x,y,z) RETURN( oE(x-1,y,z) ): end: oSE := proc(x,y,z) RETURN( oNW(x+1,y-1,z) ): end: oSW := proc(x,y,z) RETURN( oNE(x-1,y-1,z) ): end:

dC := proc(x,y,z) RETURN( uC(x,y,z-1) ): end: dW := proc(x,y,z) RETURN( uE(x-1,y,z-1) ): end: dE := proc(x,y,z) RETURN( uW(x+1,y,z-1) ): end:

dN := proc(x,y,z) RETURN( uS(x,y+1,z-1) ): end: dNW := proc(x,y,z) RETURN( uSE(x-1,y+1,z-1) ): end: dNE := proc(x,y,z) RETURN( uSW(x+1,y+1,z-1) ): end:

dS := proc(x,y,z) RETURN( uN(x,y-1,z-1) ): end: dSW := proc(x,y,z) RETURN( uNE(x-1,y-1,z-1) ): end: dSE := proc(x,y,z) RETURN( uNW(x+1,y-1,z-1) ): end:

Parameters
nxf
nyf
nzf
nx
ny
nz
oPC
oPN
oPS
oPE
oPW
oPNE
oPNW
oPSE
oPSW
uPC
uPN
uPS
uPE
uPW
uPNE
uPNW
uPSE
uPSW
dPC
dPN
dPS
dPE
dPW
dPNE
dPNW
dPSE
dPSW
oC
oE
oN
uC
oNE
oNW
uE
uW
uN
uS
uNE
uNW
uSE
uSW
XoC
XoE
XoN
XuC
XoNE
XoNW
XuE
XuW
XuN
XuS
XuNE
XuNW
XuSE
XuSW

Definition at line 1252 of file buildGd.c.

◆ VbuildG_7()

VEXTERNC void VbuildG_7 ( int * nxf,
int * nyf,
int * nzf,
int * nx,
int * ny,
int * nz,
double * oPC,
double * oPN,
double * oPS,
double * oPE,
double * oPW,
double * oPNE,
double * oPNW,
double * oPSE,
double * oPSW,
double * uPC,
double * uPN,
double * uPS,
double * uPE,
double * uPW,
double * uPNE,
double * uPNW,
double * uPSE,
double * uPSW,
double * dPC,
double * dPN,
double * dPS,
double * dPE,
double * dPW,
double * dPNE,
double * dPNW,
double * dPSE,
double * dPSW,
double * oC,
double * oE,
double * oN,
double * uC,
double * XoC,
double * XoE,
double * XoN,
double * XuC,
double * XoNE,
double * XoNW,
double * XuE,
double * XuW,
double * XuN,
double * XuS,
double * XuNE,
double * XuNW,
double * XuSE,
double * XuSW )

Computes a 27-point galerkin coarse grid matrix from a 7-point fine grid matrix.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces buildG_7 from buildGd.f

Expressions for the galerkin coarse grid stencil XA in terms of the fine grid matrix stencil A and the interpolation operator stencil P. these stencils have the form:

XA := array([

matrix([ [ -XdNW(i,j,k), -XdN(i,j,k), -XdNE(i,j,k) ], [ -XdW(i,j,k), -XdC(i,j,k), -XdE(i,j,k) ], [ -XdSW(i,j,k), -XdS(i,j,k), -XdSE(i,j,k) ] ]),

matrix([ [ -XoNW(i,j,k), -XoN(i,j,k), -XoNE(i,j,k) ], [ -XoW(i,j,k), XoC(i,j,k), -XoE(i,j,k) ], [ -XoSW(i,j,k), -XoS(i,j,k), -XoSE(i,j,k) ] ]),

matrix([ [ -XuNW(i,j,k), -XuN(i,j,k), -XuNE(i,j,k) ], [ -XuW(i,j,k), -XuC(i,j,k), -XuE(i,j,k) ], [ -XuSW(i,j,k), -XuS(i,j,k), -XuSE(i,j,k) ] ]) ]):

A := array([

matrix([ [ 0, 0, 0 ], [ 0, -dC(i,j,k), 0 ], [ 0, 0, 0 ] ]),

matrix([ [ 0, -oN(i,j,k), 0 ], [ -oW(i,j,k), oC(i,j,k), -oE(i,j,k) ], [ 0, -oS(i,j,k), 0 ] ]),

matrix([ [ 0, 0, 0 ], [ 0, -uC(i,j,k), 0 ], [ 0, 0, 0 ] ])

P := array([

matrix([ [ dPNW(i,j,k), dPN(i,j,k), dPNE(i,j,k) ], [ dPW(i,j,k), dPC(i,j,k), dPE(i,j,k) ], [ dPSW(i,j,k), dPS(i,j,k), dPSE(i,j,k) ] ]),

matrix([ [ oPNW(i,j,k), oPN(i,j,k), oPNE(i,j,k) ], [ oPW(i,j,k), oPC(i,j,k), oPE(i,j,k) ], [ oPSW(i,j,k), oPS(i,j,k), oPSE(i,j,k) ] ]),

matrix([ [ uPNW(i,j,k), uPN(i,j,k), uPNE(i,j,k) ], [ uPW(i,j,k), uPC(i,j,k), uPE(i,j,k) ], [ uPSW(i,j,k), uPS(i,j,k), uPSE(i,j,k) ] ]) ]):

in addition, A is assumed to be symmetric so that:

oS := proc(x,y,z) RETURN( oN(x,y-1,z) ): end: oW := proc(x,y,z) RETURN( oE(x-1,y,z) ): end: dC := proc(x,y,z) RETURN( uC(x,y,z-1) ): end:

Parameters
nxf
nyf
nzf
nx
ny
nz
oPC
oPN
oPS
oPE
oPW
oPNE
oPNW
oPSE
oPSW
uPC
uPN
uPS
uPE
uPW
uPNE
uPNW
uPSE
uPSW
dPC
dPN
dPS
dPE
dPW
dPNE
dPNW
dPSE
dPSW
oC
oE
oN
uC
XoC
XoE
XoN
XuC
XoNE
XoNW
XuE
XuW
XuN
XuS
XuNE
XuNW
XuSE
XuSW

Definition at line 450 of file buildGd.c.

◆ Vbuildgaler0()

VEXTERNC void Vbuildgaler0 ( int * nxf,
int * nyf,
int * nzf,
int * nxc,
int * nyc,
int * nzc,
int * ipkey,
int * numdia,
double * pcFF,
int * ipcFF,
double * rpcFF,
double * acFF,
double * ccFF,
double * fcFF,
int * ipc,
double * rpc,
double * ac,
double * cc,
double * fc )

Form the Galerkin coarse grid system.

Note
Although the fine grid matrix may be 7 or 27 diagonal, the coarse grid matrix is always 27 diagonal. (only 14 stored due to symmetry.)
Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces buildgaler0 from mgsubd.f
Parameters
nxf
nyf
nzf
nxc
nyc
nzc
ipkey
numdia
pcFF
ipcFF
rpcFF
acFF
ccFF
fcFF
ipc
rpc
ac
cc
fc

Definition at line 341 of file mgsubd.c.

◆ Vbuildops()

VEXTERNC void Vbuildops ( int * nx,
int * ny,
int * nz,
int * nlev,
int * ipkey,
int * iinfo,
int * ido,
int * iz,
int * mgprol,
int * mgcoar,
int * mgsolv,
int * mgdisc,
int * ipc,
double * rpc,
double * pc,
double * ac,
double * cc,
double * fc,
double * xf,
double * yf,
double * zf,
double * gxcf,
double * gycf,
double * gzcf,
double * a1cf,
double * a2cf,
double * a3cf,
double * ccf,
double * fcf,
double * tcf )

Build operators, boundary arrays, modify affine vectors ido==0: do only fine level ido==1: do only coarse levels (including second op at coarsest) ido==2: do all levels ido==3: rebuild the second operator at the coarsest level.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute.
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.
* Portions Copyright (c) 2002-2010, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.  
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Note
The fine level must be build before any coarse levels.
Author
Tucker Beck [C Translation], Michael Holst [Original]

Replaces buildops from mgsubd.f

Parameters
nx
ny
nz
nlev
ipkey
iinfo
ido
iz
mgprol
mgcoar
mgsolv
mgdisc
ipc
rpc
pc
ac
cc
fc
xf
yf
zf
gxcf
gycf
gzcf
a1cf
a2cf
a3cf
ccf
fcf
tcf

Definition at line 57 of file mgsubd.c.

◆ VbuildP()

VEXTERNC void VbuildP ( int * nxf,
int * nyf,
int * nzf,
int * nxc,
int * nyc,
int * nzc,
int * mgprol,
int * ipc,
double * rpc,
double * pc,
double * ac,
double * xf,
double * yf,
double * zf )

Builds prolongation matrix.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute.
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.
* Portions Copyright (c) 2002-2010, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.  
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Parameters
nxf
nyf
nzf
nxc
nyc
nzc
mgprol
ipc
rpc
pc
ac
xf
yf
zf

Definition at line 57 of file buildPd.c.

◆ Vbuildstr()

VEXTERNC void Vbuildstr ( int * nx,
int * ny,
int * nz,
int * nlev,
int * iz )

Build the nexted operator framework in the array iz.

Note
iz(50,i) indexes into the gridfcn arrays for each level i=(1,...,nlev+1) as follows:

fun(i) = fun (iz(1,i)) bndx(i) = bndx(iz(2,i)) bndy(i) = bndy(iz(3,i)) bndz(i) = bndz(iz(4,i)) ipc(i) = ipc(iz(5,i)) rpc(i) = rpc(iz(6,i)) oper(i) = oper(iz(7,i)) grdx(i) = brdx(iz(8,i)) grdy(i) = brdy(iz(9,i)) grdz(i) = brdz(iz(10,i))

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces buildstr from mgsubd.f
Parameters
nx
ny
nz
nlev
iz

Definition at line 257 of file mgsubd.c.

◆ Vc_vec()

VEXTERNC void Vc_vec ( double * coef,
double * uin,
double * uout,
int * nx,
int * ny,
int * nz,
int * ipkey )

Define the nonlinearity (vector version)

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces c_vec from mypde.f
Parameters
coef
uin
uout
nx
ny
nz
ipkey

Definition at line 121 of file mypdec.c.

◆ Vc_vecpmg()

VEXTERNC void Vc_vecpmg ( double * coef,
double * uin,
double * uout,
int * nx,
int * ny,
int * nz,
int * ipkey )

Define the nonlinearity (vector version)

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces c_vecpmg from mypde.f
Parameters
coef
uin
uout
nx
ny
nz
ipkey

Definition at line 133 of file mypdec.c.

◆ Vc_vecsmpbe()

VEXTERNC void Vc_vecsmpbe ( double * coef,
double * uin,
double * uout,
int * nx,
int * ny,
int * nz,
int * ipkey )

Define the nonlinearity (vector version)

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces c_vecpmg from mypde.f
Parameters
coef
uin
uout
nx
ny
nz
ipkey

Definition at line 213 of file mypdec.c.

◆ Vcghs()

VEXTERNC void Vcghs ( int * nx,
int * ny,
int * nz,
int * ipc,
double * rpc,
double * ac,
double * cc,
double * fc,
double * x,
double * p,
double * ap,
double * r,
int * itmax,
int * iters,
double * errtol,
double * omega,
int * iresid,
int * iadjoint )

A collection of useful low-level routines (timing, etc).

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute.
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.
* Portions Copyright (c) 2002-2010, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Parameters
nx
ny
nz
ipc
rpc
ac
cc
fc
x
p
ap
r
itmax
iters
errtol
omega
iresid
iadjoint

Definition at line 57 of file cgd.c.

◆ Vdc_vec()

VEXTERNC void Vdc_vec ( double * coef,
double * uin,
double * uout,
int * nx,
int * ny,
int * nz,
int * ipkey )

Define the derivative of the nonlinearity (vector version)

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces dc_vec from mypde.f
Parameters
coef
uin
uout
nx
ny
nz
ipkey

Definition at line 341 of file mypdec.c.

◆ Vdpbsl()

VEXTERNC void Vdpbsl ( double * abd,
int * lda,
int * n,
int * m,
double * b )

LINPACK interface.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute.
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.
* Portions Copyright (c) 2002-2010, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.  
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 

Solves the double precision symmetric positive definite band system A*X = B using the factors computed by dpbco or dpbfa

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
A division by zero will occur if the input factor contains a zero on the diagonal. Technically this indicates singularity, but it is usually caused by imporper subroutine arugments. It will not occur if the subroutines are called correctly and info == 0
Replaces dpbsl from mgsubd.f
Parameters
abdThe output from dpbco or dpbfa
ldaThe leading dimension of the array abd
nThe order of the matrix a
mThe number of diagonals above the main diagonal
bThe right hand side vector

Definition at line 57 of file mlinpckd.c.

◆ Vextrac()

VEXTERNC void Vextrac ( int * nxf,
int * nyf,
int * nzf,
int * nxc,
int * ny,
int * nzc,
double * xin,
double * xout )

Simple injection of a fine grid function into coarse grid.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces extrac from matvecd.f
Parameters
nxf
nyf
nzf
nxc
ny
nzc
xin
xout

Definition at line 1078 of file matvecd.c.

◆ VfboundPMG()

VEXTERNC void VfboundPMG ( int * ibound,
int * nx,
int * ny,
int * nz,
double * x,
double * gxc,
double * gyc,
double * gzc )

Initialize a grid function to have a certain boundary value,.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces fboundPMG from mikpckd.f
Parameters
ibound
nx
ny
nz
x
gxc
gyc
gzc

Definition at line 209 of file mikpckd.c.

◆ VfboundPMG00()

VEXTERNC void VfboundPMG00 ( int * nx,
int * ny,
int * nz,
double * x )

Initialize a grid function to have a zero boundary value.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces fboundPMG00 from mikpckd.f
Parameters
nxThe size of the x dimension of the 3d matrix
nyThe size of the y dimension of the 3d matrix
nzThe size of the z dimension of the 3d matrix
xThe 3d matrix to initialize

Definition at line 258 of file mikpckd.c.

◆ Vfmvfas()

VEXTERNC void Vfmvfas ( int * nx,
int * ny,
int * nz,
double * x,
int * iz,
double * w0,
double * w1,
double * w2,
double * w3,
double * w4,
int * istop,
int * itmax,
int * iters,
int * ierror,
int * nlev,
int * ilev,
int * nlev_real,
int * mgsolv,
int * iok,
int * iinfo,
double * epsiln,
double * errtol,
double * omega,
int * nu1,
int * nu2,
int * mgsmoo,
int * ipc,
double * rpc,
double * pc,
double * ac,
double * cc,
double * fc,
double * tru )

Multigrid nonlinear solve iteration routine.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute.
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.
* Portions Copyright (c) 2002-2010, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.  
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 

Nested iteration for a nonlinear multilevel method. Algorithm: nonlinear multigrid iteration (fas)

this routine is the full multigrid front-end for a multigrid v-cycle solver. in other words, at repeatedly calls the v-cycle multigrid solver on successively finer and finer grids.

Note
Author
Tucker Beck [C Translation], Michael Holst [Original]

Replaces fmvfas from mgfasd.f

Parameters
nx
ny
nz
x
iz
w0
w1
w2
w3
w4
istop
itmax
iters
ierror
nlev
ilev
nlev_real
mgsolv
iok
iinfo
epsiln
errtol
omega
nu1
nu2
mgsmoo
ipc
rpc
pc
ac
cc
fc
tru

Definition at line 57 of file mgfasd.c.

◆ Vfnewton()

VPUBLIC void Vfnewton ( int * nx,
int * ny,
int * nz,
double * x,
int * iz,
double * w0,
double * w1,
double * w2,
double * w3,
int * istop,
int * itmax,
int * iters,
int * ierror,
int * nlev,
int * ilev,
int * nlev_real,
int * mgsolv,
int * iok,
int * iinfo,
double * epsiln,
double * errtol,
double * omega,
int * nu1,
int * nu2,
int * mgsmoo,
double * cprime,
double * rhs,
double * xtmp,
int * ipc,
double * rpc,
double * pc,
double * ac,
double * cc,
double * fc,
double * tru )

Driver routines for the Newton method.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific
* Northwest National Laboratory, operated by Battelle Memorial Institute,
* Pacific Northwest Division for the U.S. Department Energy.  Portions
* Copyright (c) 2002-2010, Washington University in St. Louis.  Portions
* Copyright (c) 2002-2020, Nathan A. Baker.  Portions Copyright (c) 1999-2002,
* The Regents of the University of California. Portions Copyright (c) 1995,
* Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 

Nested iteration for an inexact-newton-multilevel method.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces fnewton from newtond.f
Parameters
nx
ny
nz
x
iz
w0
w1
w2
w3
istop
itmax
iters
ierror
nlev
ilev
nlev_real
mgsolv
iok
iinfo
epsiln
errtol
omega
nu1
nu2
mgsmoo
cprime
rhs
xtmp
ipc
rpc
pc
ac
cc
fc
tru

Definition at line 58 of file newtond.c.

◆ Vgetjac()

VEXTERNC void Vgetjac ( int * nx,
int * ny,
int * nz,
int * nlev_real,
int * iz,
int * lev,
int * ipkey,
double * x,
double * r,
double * cprime,
double * rhs,
double * cc,
double * pc )

Form the jacobian system.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces getjac from newtond.f
Parameters
nx
ny
nz
nlev_real
iz
lev
ipkey
x
r
cprime
rhs
cc
pc

Definition at line 550 of file newtond.c.

◆ Vgsrb()

VEXTERNC void Vgsrb ( int * nx,
int * ny,
int * nz,
int * ipc,
double * rpc,
double * ac,
double * cc,
double * fc,
double * x,
double * w1,
double * w2,
double * r,
int * itmax,
int * iters,
double * errtol,
double * omega,
int * iresid,
int * iadjoint )

Guass-Seidel solver.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute.
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.
* Portions Copyright (c) 2002-2010, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.  
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 

Call the fast diagonal iterative method.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces gsrb from gsd.f
Parameters
nx
ny
nz
ipc
rpc
ac
cc
fc
x
w1
w2
r
itmax
iters
errtol
omega
iresid
iadjoint

Definition at line 57 of file gsd.c.

◆ VinterpPMG()

VEXTERNC void VinterpPMG ( int * nxc,
int * nyc,
int * nzc,
int * nxf,
int * nyf,
int * nzf,
double * xin,
double * xout,
double * pc )

Apply the prolongation operator.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces interpPMG from matvecd.f
Parameters
nxc
nyc
nzc
nxf
nyf
nzf
xin
xout
pc

Definition at line 915 of file matvecd.c.

◆ Vipower()

VEXTERNC void Vipower ( int * nx,
int * ny,
int * nz,
double * u,
int * iz,
double * w0,
double * w1,
double * w2,
double * w3,
double * w4,
double * eigmin,
double * eigmin_model,
double * tol,
int * itmax,
int * iters,
int * nlev,
int * ilev,
int * nlev_real,
int * mgsolv,
int * iok,
int * iinfo,
double * epsiln,
double * errtol,
double * omega,
int * nu1,
int * nu2,
int * mgsmoo,
int * ipc,
double * rpc,
double * pc,
double * ac,
double * cc,
double * tru )

Standard inverse power method for minimum eigenvalue estimation.

Note
To test, note that the 3d laplacean has min/max eigenvalues:
 lambda_min = 6 - 2*dcos(pi/(nx-1))
                - 2*dcos(pi/(ny-1))
                - 2*dcos(pi/(nz-1))

 lambda_max = 6 - 2*dcos((nx-2)*pi/(nx-1))
                - 2*dcos((ny-2)*pi/(ny-1))
                - 2*dcos((nz-2)*pi/(nz-1))
Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces ipower from powerd.f
Parameters
nx
ny
nz
u
iz
w0
w1
w2
w3
w4
eigmin
eigmin_model
tol
itmax
iters
nlev
ilev
nlev_real
mgsolv
iok
iinfo
epsiln
errtol
omega
nu1
nu2
mgsmoo
ipc
rpc
pc
ac
cc
tru

Definition at line 165 of file powerd.c.

◆ Vmatvec()

VEXTERNC void Vmatvec ( int * nx,
int * ny,
int * nz,
int * ipc,
double * rpc,
double * ac,
double * cc,
double * x,
double * y )

Matrix-vector multiplication routines.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute.
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.
* Portions Copyright (c) 2002-2010, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.  
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 

Break the matrix data-structure into diagonals and then call the matrix-vector routine.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces matvec from matvecd.f
Parameters
nx
ny
nz
ipc
rpc
ac
cc
x
y

Definition at line 57 of file matvecd.c.

◆ Vmgdriv()

VEXTERNC void Vmgdriv ( int * iparm,
double * rparm,
int * iwork,
double * rwork,
double * u,
double * xf,
double * yf,
double * zf,
double * gxcf,
double * gycf,
double * gzcf,
double * a1cf,
double * a2cf,
double * a3cf,
double * ccf,
double * fcf,
double * tcf )

Multilevel solver driver.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute.
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.
* Portions Copyright (c) 2002-2012, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.  
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Tucker Beck [C Translation], Michael Holst [Original]

Replaces mgdriv from mgdrvd.f

Parameters
iparm
rparm
iwork
rwork
u
xf
yf
zf
gxcf
gycf
gzcf
a1cf
a2cf
a3cf
ccf
fcf
tcf

Definition at line 57 of file mgdrvd.c.

◆ Vmgdriv2()

VEXTERNC void Vmgdriv2 ( int * iparm,
double * rparm,
int * nx,
int * ny,
int * nz,
double * u,
int * iz,
int * ipc,
double * rpc,
double * pc,
double * ac,
double * cc,
double * fc,
double * xf,
double * yf,
double * zf,
double * gxcf,
double * gycf,
double * gzcf,
double * a1cf,
double * a2cf,
double * a3cf,
double * ccf,
double * fcf,
double * tcf )

Solves the pde using the multi-grid method.

Author
Tucker Beck [C Translation], Michael Holst [Original]

Replaces mgdriv2 from mgdrvd.f

This routine uses a multigrid method to solve the following three-dimensional, 2nd order elliptic partial differential equation:

 lu = f, u in omega
  u = g, u on boundary of omega

where

 omega = [xmin,xmax]x[ymin,ymax]x[zmin,zmax]

the multigrid code requires the operator in the form:

 - \nabla \cdot (a \nabla u) + c(u) = f

with

a(x,y,z),f(x,y,z), scalar functions (possibly discontinuous)
on omega.  (discontinuities must be along fine grid lines).
boundary function g(x,y,z) is smooth on boundary of omega.

the function c(u) is a possibly nonlinear function of the
unknown u, and varies (possibly discontinuously) with the
spatial position also.

user inputs:

the user must provide the coefficients of the differential
operator, some initial parameter settings in an integer and a
real parameter array, and various work arrays.
Parameters
iparm
rparm
nx
ny
nz
u
iz
ipc
rpc
pc
ac
cc
fc
xf
yf
zf
gxcf
gycf
gzcf
a1cf
a2cf
a3cf
ccf
fcf
tcf

Definition at line 190 of file mgdrvd.c.

◆ Vmgsz()

VEXTERNC void Vmgsz ( int * mgcoar,
int * mgdisc,
int * mgsolv,
int * nx,
int * ny,
int * nz,
int * nlev,
int * nxc,
int * nyc,
int * nzc,
int * nf,
int * nc,
int * narr,
int * narrc,
int * n_rpc,
int * n_iz,
int * n_ipc,
int * iretot,
int * iintot )

This routine computes the required sizes of the real and integer work arrays for the multigrid code. these two sizes are a (complicated) function of input parameters.

The work arrays must have been declared in the calling program as:

double precision rwork(iretot)
integer          iwork(iintot)

where:

iretot   = function_of(mgcoar,mgdisc,mgsolv,nx,ny,nz,nlev)
iintot   = function_of(mgcoar,mgdisc,mgsolv,nx,ny,nz,nlev)

mgcoar   = coarsening technique:
           0=standard discretization
           1=averaged coefficient + standard discretization
           2=algebraic galerkin coarsening

mgdisc   = discretization technique:
           0=box method
           1=fem method

mgsolv   = coarse grid solver:
           0=conjugate gradients
           1=symmetric banded linpack solver

nx,ny,nz = grid dimensions in each direction,
           including boundary points

nlev     = the number of multigrid levels desired for the
           method.

other parameters:

nf       = number of unknowns on the finest mesh
         = nx * ny * nz

nc       = number of unknowns on the coarsest mesh

narr     = storage for one vector on all the meshes

narrc    = storage for one vector on all the meshes but the finest

the work arrays rwork and iwork will be chopped into smaller pieces according to:

double precision ac(STORE)         (system operators on all levels)
double precision pc(27*narrc)      (prol. opers for coarse levels)
double precision cc(narr),fc(narr) (helmholtz term, rhs -- all levels)
double precision rpc(100*(nlev+1)) (real info for all levels)
integer          ipc(100*(nlev+1)) (integer info for all levels)
integer          iz(50,nlev+1),    (pointers into ac,pc,cc,fc,etc.)

where STORE depends on the discretization, coarsening, and coarse grid solver:

STORE =  4*nf +  4*narrc + NBAND*nc (mgdisc=box, mgcoar=stan/harm)
   or =  4*nf + 14*narrc + NBAND*nc (mgdisc=box, mgcoar=gal)
   or = 14*nf + 14*narrc + NBAND*nc (mgdisc=fem, mgcoar=stan/harm/gal)

NBAND = 0                           (mgsolv=iterative)
   or = 1+(nxc-2)*(nyc-2)           (mgsolv=7-pt banded linpack)
   or = 1+(nxc-2)*(nyc-2)+(nxc-2)+1 (mgsolv=27-pt banded linpack)
Author
Tucker Beck [C Translation], Michael Holst [Original]

Replaces mgsz from mgdrvd.f

Parameters
mgcoar
mgdisc
mgsolv
nx
ny
nz
nlev
nxc
nyc
nzc
nf
nc
narr
narrc
n_rpc
n_iz
n_ipc
iretot
iintot

Definition at line 562 of file mgdrvd.c.

◆ Vmresid()

VEXTERNC void Vmresid ( int * nx,
int * ny,
int * nz,
int * ipc,
double * rpc,
double * ac,
double * cc,
double * fc,
double * x,
double * r )

Break the matrix data-structure into diagonals and then call the residual routine.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces mresid from matvecd.f
Parameters
nx
ny
nz
ipc
rpc
ac
cc
fc
x
r

Definition at line 426 of file matvecd.c.

◆ Vmvcs()

VEXTERNC void Vmvcs ( int * nx,
int * ny,
int * nz,
double * x,
int * iz,
double * w0,
double * w1,
double * w2,
double * w3,
int * istop,
int * itmax,
int * iters,
int * ierror,
int * nlev,
int * ilev,
int * nlev_real,
int * mgsolv,
int * iok,
int * iinfo,
double * epsiln,
double * errtol,
double * omega,
int * nu1,
int * nu2,
int * mgsmoo,
int * ipc,
double * rpc,
double * pc,
double * ac,
double * cc,
double * fc,
double * tru )

MG helper functions.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. 
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.
* Portions Copyright (c) 2002-2010, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 

Screaming linear multilevel method.

algorithm: linear multigrid iteration (cs)

multigrid v-cycle solver.

input: (1) fine and coarse grid discrete linear operators: L_h, L_H (2) fine grid source function: f_h (3) fine grid approximate solution: u_h

output: (1) fine grid improved solution: u_h

the two-grid algorithm is: (1) pre-smooth: u1_h = smooth(L_h,f_h,u_h) (2) restrict defect: d_H = r(L_h(u1_h) - f_h) (3) solve for correction: c_H = L_H^{-1}(d_H) (4) prolongate and correct: u2_h = u1_h - p(c_H) (5) post-smooth: u_h = smooth(L_h,f_h,u2_h)

(of course, c_H is determined with another two-grid algorithm)

implementation notes: (0) "u1_h" must be kept on each level until "c_H" is computed, and then both are used to compute "u2_h". (1) "u_h" (and then "u1_h") on all levels is stored in the "x" array. (2) "d_H" is identically "f_h" for f_h on the next coarser grid. (3) "c_h" is identically "u_h" for u_h on the next coarser grid. (4) "d_H" is stored in the "r" array (must be kept for post-smooth). (5) "f_h" is stored in the "fc" array. (6) "L_h" on all levels is stored in the "ac" array. (7) signs may be reveresed; i.e., residual is used in place of the defect in places, etc.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces mvcs from mgcsd.f

New grid size

Parameters
nx
ny
nz
x
iz
w0
w1
w2
w3
istop
itmax
iters
ierror
nlev
ilev
nlev_real
mgsolv
iok
iinfo
epsiln
errtol
omega
nu1
nu2
mgsmoo
ipc
rpc
pc
ac
cc
fc
tru

Definition at line 57 of file mgcsd.c.

◆ Vmvfas()

VEXTERNC void Vmvfas ( int * nx,
int * ny,
int * nz,
double * x,
int * iz,
double * w0,
double * w1,
double * w2,
double * w3,
double * w4,
int * istop,
int * itmax,
int * iters,
int * ierror,
int * nlev,
int * ilev,
int * nlev_real,
int * mgsolv,
int * iok,
int * iinfo,
double * epsiln,
double * errtol,
double * omega,
int * nu1,
int * nu2,
int * mgsmoo,
int * ipc,
double * rpc,
double * pc,
double * ac,
double * cc,
double * fc,
double * tru )

Nonlinear multilevel method.

Note
Replaces mvfas from mgfasd.f
Author
Tucker Beck [C Translation], Michael Holst [Original]

Algorithm: nonlinear multigrid iteration (fas)

multigrid v-cycle solver.

input: (1) fine and coarse grid discrete nonlinear operators: L_h, L_H (2) fine grid source function: f_h (3) fine grid approximate solution: u_h

output: (1) fine grid improved solution: u_h

the two-grid algorithm is: (1) pre-smooth: u1_h = smooth(L_h,f_h,u_h) (2) restrict defect: d_H = r(L_h(u1_h) - f_h) restrict solution: u_H = r(u1_h) (3) form coarse grid rhs: f_H = L_H(u_H) - d_H solve for correction: c_H = L_H^{-1}(f_H) (4) prolongate and correct: u2_h = u1_h - p(c_H - u_H) (5) post-smooth: u_h = smooth(L_h,f_h,u2_h)

(of course, c_H is determined with another two-grid algorithm)

implementation notes: (0) "u1_h" and "u_H" must be kept on each level until "c_H" is computed, and then all three are used to compute "u2_h". (1) "u_h" (and then "u1_h") on all levels is stored in the "x" array. (2) "u_H" on all levels is stored in the "e" array. (3) "c_h" is identically "u_h" for u_h on the next coarser grid. (4) "d_H" is stored in the "r" array. (5) "f_h" and "f_H" are stored in the "fc" array. (6) "L_h" on all levels is stored in the "ac" array. (7) signs may be reveresed; i.e., residual is used in place of the defect in places, etc.

Parameters
nx
ny
nz
x
iz
w0
w1
w2
w3
w4
istop
itmax
iters
ierror
nlev
ilev
nlev_real
mgsolv
iok
iinfo
epsiln
errtol
omega
nu1
nu2
mgsmoo
ipc
rpc
pc
ac
cc
fc
tru

Definition at line 157 of file mgfasd.c.

◆ Vmypdefinitlpbe()

VEXTERNC void Vmypdefinitlpbe ( int * tnion,
double * tcharge,
double * tsconc )

Set up the ionic species to be used in later calculations. This must be called before any other of the routines in this file.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute.
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.
* Portions Copyright (c) 2002-2010, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.  
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Tucker Beck [C Translation], Nathan Baker [Original]
Note
Replaces mypdefinitlpbe from mypde.f
Parameters
tnionThe number if ionic species
tchargeThe charge in electrons
tsconcPrefactor for conterion Bolzmann distribution terms. Basically a scaled concentration -(ion concentration/bulkIonicStrength)/2

Definition at line 57 of file mypdec.c.

◆ Vmypdefinitnpbe()

VEXTERNC void Vmypdefinitnpbe ( int * tnion,
double * tcharge,
double * tsconc )

Set up the ionic species to be used in later calculations. This must be called before any other of the routines in this file.

Author
Tucker Beck [C Translation], Nathan Baker [Original]
Note
Replaces mypdefinitnpbe from mypde.f
Parameters
tnionThe number if ionic species
tchargeThe charge in electrons
tsconcPrefactor for conterion Bolzmann distribution terms. Basically a scaled concentration -(ion concentration/bulkIonicStrength)/2

Definition at line 75 of file mypdec.c.

◆ Vmypdefinitsmpbe()

VEXTERNC void Vmypdefinitsmpbe ( int * tnion,
double * tcharge,
double * tsconc,
double * smvolume,
double * smsize )

Set up the ionic species to be used in later calculations. This must be called before any other of the routines in this file.

Author
Tucker Beck [C Translation], Nathan Baker [Original]
Note
Replaces mypdefinitsmpbe from mypde.f
Parameters
tnionThe number if ionic species
tchargeThe charge in electrons
tsconcPrefactor for conterion Bolzmann distribution terms. Basically a scaled concentration -(ion concentration/bulkIonicStrength)/2
smvolume
smsize

Definition at line 93 of file mypdec.c.

◆ Vnewdriv()

VEXTERNC void Vnewdriv ( int * iparm,
double * rparm,
int * iwork,
double * rwork,
double * u,
double * xf,
double * yf,
double * zf,
double * gxcf,
double * gycf,
double * gzcf,
double * a1cf,
double * a2cf,
double * a3cf,
double * ccf,
double * fcf,
double * tcf )

Driver for the Newton Solver.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute.
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.
* Portions Copyright (c) 2002-2010, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.  
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 

Driver for a screaming inexact-newton-multilevel solver.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces newdriv from newdrvd.f
Parameters
iparm
rparm
iwork
rwork
u
xf
yf
zf
gxcf
gycf
gzcf
a1cf
a2cf
a3cf
ccf
fcf
tcf

Definition at line 57 of file newdrvd.c.

◆ Vnewdriv2()

VEXTERNC void Vnewdriv2 ( int * iparm,
double * rparm,
int * nx,
int * ny,
int * nz,
double * u,
int * iz,
double * w1,
double * w2,
int * ipc,
double * rpc,
double * pc,
double * ac,
double * cc,
double * fc,
double * xf,
double * yf,
double * zf,
double * gxcf,
double * gycf,
double * gzcf,
double * a1cf,
double * a2cf,
double * a3cf,
double * ccf,
double * fcf,
double * tcf )

Solves using Newton's Method.

Author
Tucker Beck [C Translation], Michael Holst [Original]

This routine uses a newton's method, combined with a linear multigrid iteration, to solve the following three-dimensional, 2nd order elliptic partial differential equation:

 lu = f, u in omega
  u = g, u on boundary of omega

where

 omega = [xmin,xmax]x[ymin,ymax]x[zmin,zmax]

the multigrid code requires the operator in the form:

 - \nabla \cdot (a \nabla u) + c(u) = f

with

a(x,y,z),f(x,y,z), scalar functions (possibly discontinuous)
on omega.  (discontinuities must be along fine grid lines).
boundary function g(x,y,z) is smooth on boundary of omega.

the function c(u) is a possibly nonlinear function of the
unknown u, and varies (possibly discontinuously) with the
spatial position also.

User inputs:

the user must provide the coefficients of the differential operator, some initial parameter settings in an integer and a real parameter array, and various work arrays.

Note
Replaces newdriv2 from newdrvd.f
Parameters
iparm
rparm
nx
ny
nz
u
iz
w1
w2
ipc
rpc
pc
ac
cc
fc
xf
yf
zf
gxcf
gycf
gzcf
a1cf
a2cf
a3cf
ccf
fcf
tcf

Definition at line 169 of file newdrvd.c.

◆ Vnewton()

VEXTERNC void Vnewton ( int * nx,
int * ny,
int * nz,
double * x,
int * iz,
double * w0,
double * w1,
double * w2,
double * w3,
int * istop,
int * itmax,
int * iters,
int * ierror,
int * nlev,
int * ilev,
int * nlev_real,
int * mgsolv,
int * iok,
int * iinfo,
double * epsiln,
double * errtol,
double * omega,
int * nu1,
int * nu2,
int * mgsmoo,
double * cprime,
double * rhs,
double * xtmp,
int * ipc,
double * rpc,
double * pc,
double * ac,
double * cc,
double * fc,
double * tru )

Inexact-newton-multilevel method.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces newton from newtond.f
Parameters
nx
ny
nz
x
iz
w0
w1
w2
w3
istop
itmax
iters
ierror
nlev
ilev
nlev_real
mgsolv
iok
iinfo
epsiln
errtol
omega
nu1
nu2
mgsmoo
cprime
rhs
xtmp
ipc
rpc
pc
ac
cc
fc
tru

Definition at line 162 of file newtond.c.

◆ Vnmatvec()

VEXTERNC void Vnmatvec ( int * nx,
int * ny,
int * nz,
int * ipc,
double * rpc,
double * ac,
double * cc,
double * x,
double * y,
double * w1 )

Break the matrix data-structure into diagonals and then call the matrix-vector routine.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces nmatvec from matvecd.f
Parameters
nx
ny
nz
ipc
rpc
ac
cc
x
y
w1

Definition at line 232 of file matvecd.c.

◆ Vnmresid()

VEXTERNC void Vnmresid ( int * nx,
int * ny,
int * nz,
int * ipc,
double * rpc,
double * ac,
double * cc,
double * fc,
double * x,
double * r,
double * w1 )

Break the matrix data-structure into diagonals and then call the residual routine.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces nmresid from matvecd.f
Parameters
nx
ny
nz
ipc
rpc
ac
cc
fc
x
r
w1

Definition at line 598 of file matvecd.c.

◆ Vnsmooth()

VEXTERNC void Vnsmooth ( int * nx,
int * ny,
int * nz,
int * ipc,
double * rpc,
double * ac,
double * cc,
double * fc,
double * x,
double * w1,
double * w2,
double * r,
int * itmax,
int * iters,
double * errtol,
double * omega,
int * iresid,
int * iadjoint,
int * meth )

call the appropriate non-linear smoothing routine.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces nsmooth from nsmoothd.f
Parameters
nx
ny
nz
ipc
rpc
ac
cc
fc
x
w1
w2
r
itmax
iters
errtol
omega
iresid
iadjoint
meth

Definition at line 98 of file smoothd.c.

◆ Vpower()

VEXTERNC void Vpower ( int * nx,
int * ny,
int * nz,
int * iz,
int * ilev,
int * ipc,
double * rpc,
double * ac,
double * cc,
double * w1,
double * w2,
double * w3,
double * w4,
double * eigmax,
double * eigmax_model,
double * tol,
int * itmax,
int * iters,
int * iinfo )

Power methods for eigenvalue estimation.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute.
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.
* Portions Copyright (c) 2002-2010, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.  
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 

Standard power method for maximum eigenvalue estimation of a matrix c* c*

Note
To test, note that the 3d laplacean has min/max eigenvalues: c* c* lambda_min = 6 - 2*dcos(pi/(nx-1)) c* - 2*dcos(pi/(ny-1)) c* - 2*dcos(pi/(nz-1)) c* c* lambda_max = 6 - 2*dcos((nx-2)*pi/(nx-1)) c* - 2*dcos((ny-2)*pi/(ny-1)) c* - 2*dcos((nz-2)*pi/(nz-1))
Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces power from powerd.f
Vpower is yet untested as a call stack including it hasn't been found
Parameters
nx
ny
nz
iz
ilev
ipc
rpc
ac
cc
w1
w2
w3
w4
eigmax
eigmax_model
tol
itmax
iters
iinfo

Definition at line 57 of file powerd.c.

◆ Vprtmatd()

VEXTERNC void Vprtmatd ( int * nx,
int * ny,
int * nz,
int * ipc,
double * rpc,
double * ac )
Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces prtmatd from mikpckd.f
Parameters
nxThe size of the x dimension of the 3d matrix
nyThe size of the y dimension of the 3d matrix
nzThe size of the z dimension of the 3d matrix
ipcInteger parameters
rpcDouble parameters
ac

Definition at line 332 of file mikpckd.c.

◆ Vrestrc()

VEXTERNC void Vrestrc ( int * nxf,
int * nyf,
int * nzf,
int * nxc,
int * nyc,
int * nzc,
double * xin,
double * xout,
double * pc )

Apply the restriction operator.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces restrc from matvecd.f
Parameters
nxf
nyf
nzf
nxc
nyc
nzc
xin
xout
pc

Definition at line 782 of file matvecd.c.

◆ Vsmooth()

VEXTERNC void Vsmooth ( int * nx,
int * ny,
int * nz,
int * ipc,
double * rpc,
double * ac,
double * cc,
double * fc,
double * x,
double * w1,
double * w2,
double * r,
int * itmax,
int * iters,
double * errtol,
double * omega,
int * iresid,
int * iadjoint,
int * meth )

Multigrid smoothing functions.

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute.
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute,
* Pacific Northwest Division for the U.S. Department Energy.
* Portions Copyright (c) 2002-2010, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.  
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 

call the appropriate linear smoothing routine.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces smooth from smoothd.f
Parameters
nx
ny
nz
ipc
rpc
ac
cc
fc
x
w1
w2
r
itmax
iters
errtol
omega
iresid
iadjoint
meth

Definition at line 58 of file smoothd.c.

◆ Vxaxpy()

VEXTERNC void Vxaxpy ( int * nx,
int * ny,
int * nz,
double * alpha,
double * x,
double * y )

saxpy operation for a grid function with boundary values.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces xaxpy from mikpckd.f
Parameters
nxThe size of the x dimension of the 3d matrix
nyThe size of the y dimension of the 3d matrix
nzThe size of the z dimension of the 3d matrix
alpha
xThe source matrix from which to copy data
yThe destination matrix to receive copied data

Definition at line 112 of file mikpckd.c.

◆ Vxcopy()

VEXTERNC void Vxcopy ( int * nx,
int * ny,
int * nz,
double * x,
double * y )

A collection of useful low-level routines (timing, etc).

Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute.
* Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.
* Portions Copyright (c) 2002-2010, Washington University in St. Louis.
* Portions Copyright (c) 2002-2020, Nathan A. Baker.  
* Portions Copyright (c) 1999-2002, The Regents of the University of California.
* Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 
Author
Tucker Beck [fortran ->c translation], Michael Holst [original]
Version
$Id:
Attention
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contributing authors listed in the code documentation.
*
* Copyright (c) 2010-2020 Battelle Memorial Institute. Developed at the Pacific Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific Northwest Division for the U.S. Department Energy.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -  Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of Washington University in St. Louis nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 

Copy operation for a grid function with boundary values. Quite simply copies one 3d matrix to another

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces xcopy from mikpckd.f
Parameters
nxThe size of the x dimension of the 3d matrix
nyThe size of the y dimension of the 3d matrix
nzThe size of the z dimension of the 3d matrix
xThe source matrix from which to copy data
yThe destination matrix to receive copied data

Definition at line 57 of file mikpckd.c.

◆ Vxcopy_large()

VEXTERNC void Vxcopy_large ( int * nx,
int * ny,
int * nz,
double * x,
double * y )

Copy operation for a grid function with boundary values. Quite simply copies one 3d matrix to another.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces xcopy_large from mikpckd.f
Note
This function is exactly equivalent to calling xcopy_small with the matrix arguments reversed.
Parameters
nxThe size of the x dimension of the 3d matrix
nyThe size of the y dimension of the 3d matrix
nzThe size of the z dimension of the 3d matrix
xThe source matrix from which to copy data
yThe destination matrix to receive copied data

Definition at line 91 of file mikpckd.c.

◆ Vxcopy_small()

VEXTERNC void Vxcopy_small ( int * nx,
int * ny,
int * nz,
double * x,
double * y )

Copy operation for a grid function with boundary values. Quite simply copies one 3d matrix to another.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces xcopy_small from mikpckd.f
Parameters
nxThe size of the x dimension of the 3d matrix
nyThe size of the y dimension of the 3d matrix
nzThe size of the z dimension of the 3d matrix
xThe source matrix from which to copy data
yThe destination matrix to receive copied data

Definition at line 75 of file mikpckd.c.

◆ Vxdot()

VEXTERNC double Vxdot ( int * nx,
int * ny,
int * nz,
double * x,
double * y )

Inner product operation for a grid function with boundary values.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces xdot from mikpckd.f
Parameters
nxThe size of the x dimension of the 3d matrix
nyThe size of the y dimension of the 3d matrix
nzThe size of the z dimension of the 3d matrix
xThe first vector
yThe second vector

Definition at line 173 of file mikpckd.c.

◆ Vxnrm1()

VEXTERNC double Vxnrm1 ( int * nx,
int * ny,
int * nz,
double * x )

Norm operation for a grid function with boundary values.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces xnrm1 from mikpckd.f

< Accumulates the calculated normal value

Parameters
nxThe size of the x dimension of the 3d matrix
nyThe size of the y dimension of the 3d matrix
nzThe size of the z dimension of the 3d matrix
xThe matrix to normalize

Definition at line 131 of file mikpckd.c.

◆ Vxnrm2()

VEXTERNC double Vxnrm2 ( int * nx,
int * ny,
int * nz,
double * x )

Norm operation for a grid function with boundary values.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces xnrm2 from mikpckd.f

< Accumulates the calculated normal value

Parameters
nxThe size of the x dimension of the 3d matrix
nyThe size of the y dimension of the 3d matrix
nzThe size of the z dimension of the 3d matrix
xThe matrix to normalize

Definition at line 152 of file mikpckd.c.

◆ Vxscal()

VEXTERNC void Vxscal ( int * nx,
int * ny,
int * nz,
double * fac,
double * x )

Scale operation for a grid function with boundary values.

Author
Tucker Beck [C Translation], Michael Holst [Original]
Note
Replaces xscal from mikpckd.f
Parameters
nxThe size of the x dimension of the 3d matrix
nyThe size of the y dimension of the 3d matrix
nzThe size of the z dimension of the 3d matrix
facThe scaling factor
xThe 3d matrix to scale

Definition at line 318 of file mikpckd.c.