APBS
1.4.1
|
C translation of Holst group PMG code. More...
Macros | |
#define | HARMO2(a, b) (2.0 * (a) * (b) / ((a) + (b))) |
Multigrid subroutines. More... | |
#define | MAXIONS 50 |
Specifies the PDE definition for PMG to solve. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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). More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
VEXTERNC void | Vbuildstr (int *nx, int *ny, int *nz, int *nlev, int *iz) |
Build the nexted operator framework in the array iz. More... | |
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. More... | |
VPUBLIC void | Vxcopy (int *nx, int *ny, int *nz, double *x, double *y) |
A collection of useful low-level routines (timing, etc). More... | |
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. More... | |
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. More... | |
VEXTERNC void | Vxaxpy (int *nx, int *ny, int *nz, double *alpha, double *x, double *y) |
saxpy operation for a grid function with boundary values. More... | |
VEXTERNC double | Vxnrm1 (int *nx, int *ny, int *nz, double *x) |
Norm operation for a grid function with boundary values. More... | |
VEXTERNC double | Vxnrm2 (int *nx, int *ny, int *nz, double *x) |
Norm operation for a grid function with boundary values. More... | |
VEXTERNC double | Vxdot (int *nx, int *ny, int *nz, double *x, double *y) |
Inner product operation for a grid function with boundary values. More... | |
VEXTERNC void | Vazeros (int *nx, int *ny, int *nz, double *x) |
Zero out operation for a grid function, including boundary values. More... | |
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,. More... | |
VEXTERNC void | VfboundPMG00 (int *nx, int *ny, int *nz, double *x) |
Initialize a grid function to have a zero boundary value. More... | |
VEXTERNC void | Vaxrand (int *nx, int *ny, int *nz, double *x) |
Fill grid function with random values, including boundary values. More... | |
VEXTERNC void | Vxscal (int *nx, int *ny, int *nz, double *fac, double *x) |
Scale operation for a grid function with boundary values. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
VEXTERNC void | Vc_vec (double *coef, double *uin, double *uout, int *nx, int *ny, int *nz, int *ipkey) |
Define the nonlinearity (vector version) More... | |
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) More... | |
VEXTERNC void | Vc_vecpmg (double *coef, double *uin, double *uout, int *nx, int *ny, int *nz, int *ipkey) |
Define the nonlinearity (vector version) More... | |
VEXTERNC void | Vc_vecsmpbe (double *coef, double *uin, double *uout, int *nx, int *ny, int *nz, int *ipkey) |
Define the nonlinearity (vector version) More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
C translation of Holst group PMG code.
#define HARMO2 | ( | a, | |
b | |||
) | (2.0 * (a) * (b) / ((a) + (b))) |
Multigrid subroutines.
* * 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-2012 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. * *
#define MAXIONS 50 |
Specifies the PDE definition for PMG to solve.
* * 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-2012 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. * *
VEXTERNC void Vaxrand | ( | int * | nx, |
int * | ny, | ||
int * | nz, | ||
double * | x | ||
) |
Fill grid function with random values, including boundary values.
nx | The size of the x dimension of the 3d matrix |
ny | The size of the y dimension of the 3d matrix |
nz | The size of the z dimension of the 3d matrix |
x | The 3d matrix to fill |
VEXTERNC void Vazeros | ( | int * | nx, |
int * | ny, | ||
int * | nz, | ||
double * | x | ||
) |
Zero out operation for a grid function, including boundary values.
nx | The size of the x dimension of the 3d matrix |
ny | The size of the x dimension of the 3d matrix |
nz | The size of the x dimension of the 3d matrix |
x | The matrix to zero out |
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.
* * 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-2012 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. * *
* * 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-2012 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
nx | |
ny | |
nz | |
ipkey | |
mgdisc | |
numdia | |
ipc | |
rpc | |
ac | |
cc | |
fc | |
xf | |
yf | |
zf | |
gxcf | |
gycf | |
gzcf | |
a1cf | |
a2cf | |
a3cf | |
ccf | |
fcf |
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.
* * 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-2012 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. * *
* * 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-2012 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.
key | |
nx | |
ny | |
nz | |
ipc | |
rpc | |
ac | |
ipcB | |
rpcB | |
acB |
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 | ||
) |
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 | ||
) |
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.
* * 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-2012 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. * *
* * 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-2012 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. * *
nxf | |
nyf | |
nzf | |
nxc | |
nyc | |
nzc | |
numdia | |
pcFF | |
acFF | |
ac |
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.
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) ] ]) ]):
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 |
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.
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:
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 |
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.
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:
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 |
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.
nxf | |
nyf | |
nzf | |
nxc | |
nyc | |
nzc | |
ipkey | |
numdia | |
pcFF | |
ipcFF | |
rpcFF | |
acFF | |
ccFF | |
fcFF | |
ipc | |
rpc | |
ac | |
cc | |
fc |
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.
* * 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-2012 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. * *
Replaces buildops from mgsubd.f
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 |
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.
* * 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-2012 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. * *
nxf | |
nyf | |
nzf | |
nxc | |
nyc | |
nzc | |
mgprol | |
ipc | |
rpc | |
pc | |
ac | |
xf | |
yf | |
zf |
VEXTERNC void Vbuildstr | ( | int * | nx, |
int * | ny, | ||
int * | nz, | ||
int * | nlev, | ||
int * | iz | ||
) |
Build the nexted operator framework in the array iz.
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))
nx | |
ny | |
nz | |
nlev | |
iz |
VEXTERNC void Vc_vec | ( | double * | coef, |
double * | uin, | ||
double * | uout, | ||
int * | nx, | ||
int * | ny, | ||
int * | nz, | ||
int * | ipkey | ||
) |
VEXTERNC void Vc_vecpmg | ( | double * | coef, |
double * | uin, | ||
double * | uout, | ||
int * | nx, | ||
int * | ny, | ||
int * | nz, | ||
int * | ipkey | ||
) |
VEXTERNC void Vc_vecsmpbe | ( | double * | coef, |
double * | uin, | ||
double * | uout, | ||
int * | nx, | ||
int * | ny, | ||
int * | nz, | ||
int * | ipkey | ||
) |
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).
* * 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-2012 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. * *
nx | |
ny | |
nz | |
ipc | |
rpc | |
ac | |
cc | |
fc | |
x | |
p | |
ap | |
r | |
itmax | |
iters | |
errtol | |
omega | |
iresid | |
iadjoint |
VEXTERNC void Vdc_vec | ( | double * | coef, |
double * | uin, | ||
double * | uout, | ||
int * | nx, | ||
int * | ny, | ||
int * | nz, | ||
int * | ipkey | ||
) |
VEXTERNC void Vdpbsl | ( | double * | abd, |
int * | lda, | ||
int * | n, | ||
int * | m, | ||
double * | b | ||
) |
LINPACK interface.
* * 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-2012 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. * *
* * 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-2012 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
abd | The output from dpbco or dpbfa |
lda | The leading dimension of the array abd |
n | The order of the matrix a |
m | The number of diagonals above the main diagonal |
b | The right hand side vector |
Definition at line 52 of file mlinpckd.c.
VEXTERNC void Vextrac | ( | int * | nxf, |
int * | nyf, | ||
int * | nzf, | ||
int * | nxc, | ||
int * | ny, | ||
int * | nzc, | ||
double * | xin, | ||
double * | xout | ||
) |
VEXTERNC void VfboundPMG | ( | int * | ibound, |
int * | nx, | ||
int * | ny, | ||
int * | nz, | ||
double * | x, | ||
double * | gxc, | ||
double * | gyc, | ||
double * | gzc | ||
) |
VEXTERNC void VfboundPMG00 | ( | int * | nx, |
int * | ny, | ||
int * | nz, | ||
double * | x | ||
) |
Initialize a grid function to have a zero boundary value.
nx | The size of the x dimension of the 3d matrix |
ny | The size of the y dimension of the 3d matrix |
nz | The size of the z dimension of the 3d matrix |
x | The 3d matrix to initialize |
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.
* * 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-2012 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. * *
* * 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-2012 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.
Replaces fmvfas from mgfasd.f
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 |
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.
* * 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-2012 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. * *
* * 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-2012 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.
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 |
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 | ||
) |
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.
* * 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-2012 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. * *
* * 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-2012 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.
nx | |
ny | |
nz | |
ipc | |
rpc | |
ac | |
cc | |
fc | |
x | |
w1 | |
w2 | |
r | |
itmax | |
iters | |
errtol | |
omega | |
iresid | |
iadjoint |
VEXTERNC void VinterpPMG | ( | int * | nxc, |
int * | nyc, | ||
int * | nzc, | ||
int * | nxf, | ||
int * | nyf, | ||
int * | nzf, | ||
double * | xin, | ||
double * | xout, | ||
double * | pc | ||
) |
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.
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))
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 |
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.
* * 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-2012 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. * *
* * 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-2012 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.
nx | |
ny | |
nz | |
ipc | |
rpc | |
ac | |
cc | |
x | |
y |
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.
* * 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-2012 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. * *
* * 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-2012 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. * *
Replaces mgdriv from mgdrvd.f
iparm | |
rparm | |
iwork | |
rwork | |
u | |
xf | |
yf | |
zf | |
gxcf | |
gycf | |
gzcf | |
a1cf | |
a2cf | |
a3cf | |
ccf | |
fcf | |
tcf |
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.
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.
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 |
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)
Replaces mgsz from mgdrvd.f
mgcoar | |
mgdisc | |
mgsolv | |
nx | |
ny | |
nz | |
nlev | |
nxc | |
nyc | |
nzc | |
nf | |
nc | |
narr | |
narrc | |
n_rpc | |
n_iz | |
n_ipc | |
iretot | |
iintot |
VEXTERNC void Vmresid | ( | int * | nx, |
int * | ny, | ||
int * | nz, | ||
int * | ipc, | ||
double * | rpc, | ||
double * | ac, | ||
double * | cc, | ||
double * | fc, | ||
double * | x, | ||
double * | r | ||
) |
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.
* * 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-2012 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. * *
* * 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-2012 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.
New grid size
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 |
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.
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.
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 |
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.
* * 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-2012 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. * *
tnion | The number if ionic species |
tcharge | The charge in electrons |
tsconc | Prefactor for conterion Bolzmann distribution terms. Basically a scaled concentration -(ion concentration/bulkIonicStrength)/2 |
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.
tnion | The number if ionic species |
tcharge | The charge in electrons |
tsconc | Prefactor for conterion Bolzmann distribution terms. Basically a scaled concentration -(ion concentration/bulkIonicStrength)/2 |
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.
tnion | The number if ionic species |
tcharge | The charge in electrons |
tsconc | Prefactor for conterion Bolzmann distribution terms. Basically a scaled concentration -(ion concentration/bulkIonicStrength)/2 |
smvolume | |
smsize |
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.
* * 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-2012 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. * *
* * 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-2012 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.
iparm | |
rparm | |
iwork | |
rwork | |
u | |
xf | |
yf | |
zf | |
gxcf | |
gycf | |
gzcf | |
a1cf | |
a2cf | |
a3cf | |
ccf | |
fcf | |
tcf |
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.
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.
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 |
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 | ||
) |
VEXTERNC void Vnmatvec | ( | int * | nx, |
int * | ny, | ||
int * | nz, | ||
int * | ipc, | ||
double * | rpc, | ||
double * | ac, | ||
double * | cc, | ||
double * | x, | ||
double * | y, | ||
double * | w1 | ||
) |
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 | ||
) |
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 | ||
) |
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.
* * 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-2012 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. * *
* * 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-2012 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*
@author Tucker Beck [C Translation], Michael Holst [Original] @note Replaces power from powerd.f @note Vpower is yet untested as a call stack including it hasn't been found
nx | |
ny | |
nz | |
iz | |
ilev | |
ipc | |
rpc | |
ac | |
cc | |
w1 | |
w2 | |
w3 | |
w4 | |
eigmax | |
eigmax_model | |
tol | |
itmax | |
iters | |
iinfo |
VEXTERNC void Vprtmatd | ( | int * | nx, |
int * | ny, | ||
int * | nz, | ||
int * | ipc, | ||
double * | rpc, | ||
double * | ac | ||
) |
VEXTERNC void Vrestrc | ( | int * | nxf, |
int * | nyf, | ||
int * | nzf, | ||
int * | nxc, | ||
int * | nyc, | ||
int * | nzc, | ||
double * | xin, | ||
double * | xout, | ||
double * | pc | ||
) |
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.
* * 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-2012 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. * *
* * 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-2012 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.
nx | |
ny | |
nz | |
ipc | |
rpc | |
ac | |
cc | |
fc | |
x | |
w1 | |
w2 | |
r | |
itmax | |
iters | |
errtol | |
omega | |
iresid | |
iadjoint | |
meth |
VEXTERNC void Vxaxpy | ( | int * | nx, |
int * | ny, | ||
int * | nz, | ||
double * | alpha, | ||
double * | x, | ||
double * | y | ||
) |
saxpy operation for a grid function with boundary values.
nx | The size of the x dimension of the 3d matrix |
ny | The size of the y dimension of the 3d matrix |
nz | The size of the z dimension of the 3d matrix |
alpha | |
x | The source matrix from which to copy data |
y | The destination matrix to receive copied data |
VEXTERNC void Vxcopy | ( | int * | nx, |
int * | ny, | ||
int * | nz, | ||
double * | x, | ||
double * | y | ||
) |
A collection of useful low-level routines (timing, etc).
* * 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-2012 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. * *
* * 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-2012 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
nx | The size of the x dimension of the 3d matrix |
ny | The size of the y dimension of the 3d matrix |
nz | The size of the z dimension of the 3d matrix |
x | The source matrix from which to copy data |
y | The destination matrix to receive copied data |
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.
nx | The size of the x dimension of the 3d matrix |
ny | The size of the y dimension of the 3d matrix |
nz | The size of the z dimension of the 3d matrix |
x | The source matrix from which to copy data |
y | The destination matrix to receive copied data |
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.
nx | The size of the x dimension of the 3d matrix |
ny | The size of the y dimension of the 3d matrix |
nz | The size of the z dimension of the 3d matrix |
x | The source matrix from which to copy data |
y | The destination matrix to receive copied data |
VEXTERNC double Vxdot | ( | int * | nx, |
int * | ny, | ||
int * | nz, | ||
double * | x, | ||
double * | y | ||
) |
Inner product operation for a grid function with boundary values.
nx | The size of the x dimension of the 3d matrix |
ny | The size of the y dimension of the 3d matrix |
nz | The size of the z dimension of the 3d matrix |
x | The first vector |
y | The second vector |
VEXTERNC double Vxnrm1 | ( | int * | nx, |
int * | ny, | ||
int * | nz, | ||
double * | x | ||
) |
Norm operation for a grid function with boundary values.
< Accumulates the calculated normal value
nx | The size of the x dimension of the 3d matrix |
ny | The size of the y dimension of the 3d matrix |
nz | The size of the z dimension of the 3d matrix |
x | The matrix to normalize |
VEXTERNC double Vxnrm2 | ( | int * | nx, |
int * | ny, | ||
int * | nz, | ||
double * | x | ||
) |
Norm operation for a grid function with boundary values.
< Accumulates the calculated normal value
nx | The size of the x dimension of the 3d matrix |
ny | The size of the y dimension of the 3d matrix |
nz | The size of the z dimension of the 3d matrix |
x | The matrix to normalize |
VEXTERNC void Vxscal | ( | int * | nx, |
int * | ny, | ||
int * | nz, | ||
double * | fac, | ||
double * | x | ||
) |
Scale operation for a grid function with boundary values.
nx | The size of the x dimension of the 3d matrix |
ny | The size of the y dimension of the 3d matrix |
nz | The size of the z dimension of the 3d matrix |
fac | The scaling factor |
x | The 3d matrix to scale |