53 int *iparm,
double *rparm,
54 int *iwork,
double *rwork,
56 double *xf,
double *yf,
double *zf,
57 double *gxcf,
double *gycf,
double *gzcf,
58 double *a1cf,
double *a2cf,
double *a3cf,
59 double *ccf,
double *fcf,
double *tcf) {
102 nlev = VAT(iparm, 6);
105 VASSERT_MSG0(
nlev > 0,
"The nlev parameter must be positive");
106 VASSERT_MSG0(
nx > 0,
"The nx parameter must be positive");
107 VASSERT_MSG0(
ny > 0,
"The ny parameter must be positive");
108 VASSERT_MSG0(
nz > 0,
"The nz parameter must be positive");
112 VASSERT_MSG1(
nlev <= mxlv,
"Max lev for your grid size is: %d", mxlv);
129 iretot = iretot + 2 *
nf;
132 VASSERT_MSG1(
nrwk >= iretot,
"Real work space must be: %d", iretot );
133 VASSERT_MSG1(
niwk >= iintot,
"Integer work space must be: %d", iintot );
141 k_cc = k_rpc +
n_rpc;
146 k_ac = k_pc + 27 *
narrc;
153 RAT(rwork, k_w1), RAT(rwork, k_w2),
154 RAT(iwork, k_ipc), RAT(rwork, k_rpc),
155 RAT(rwork, k_pc), RAT(rwork, k_ac), RAT(rwork, k_cc), RAT(rwork, k_fc),
165 int *
nx,
int *
ny,
int *
nz,
167 double *w1,
double *w2,
168 int *ipc,
double *rpc,
169 double *pc,
double *ac,
double *cc,
double *fc,
170 double *xf,
double *yf,
double *zf,
171 double *gxcf,
double *gycf,
double *gzcf,
172 double *a1cf,
double *a2cf,
double *a3cf,
173 double *ccf,
double *fcf,
double *tcf) {
223 nlev = VAT(iparm, 6);
226 mgkey = VAT(iparm, 9);
227 itmax = VAT(iparm, 10);
228 istop = VAT(iparm, 11);
229 iinfo = VAT(iparm, 12);
230 ipkey = VAT(iparm, 14);
241 Vprtstp(0, -99, 0.0, 0.0, 0.0);
247 Vnm_tstart(30,
"Vnewdrv2: fine problem setup");
262 Vnm_tstop(30,
"Vnewdrv2: fine problem setup");
265 Vnm_tstart(30,
"Vnewdrv2: coarse problem setup");
280 Vnm_tstop(30,
"Vnewdrv2: coarse problem setup");
294 ipc, rpc, ac, cc, ccf, tcf, fc, fcf);
300 epsiln = Vnm_epsmac();
306 Vnm_tstart(30,
"Vnewdrv2: solve");
323 pc, ac, cc, fc, tcf);
324 }
else if (
mgkey == 1) {
326 u, iz, ccf, fcf, w1, w2,
334 pc, ac, cc, fc, tcf);
336 VABORT_MSG1(
"Bad mgkey given: %d",
mgkey);
340 Vnm_tstop(30,
"Vnewdrv2: solve");
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.
VPUBLIC void VfboundPMG00(int *nx, int *ny, int *nz, double *x)
Initialize a grid function to have a zero boundary value.
VPUBLIC 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....
VPUBLIC 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,.
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 co...
VPUBLIC void Vnewdriv2(int *iparm, double *rparm, int *nx, int *ny, int *nz, double *u, int *iz, double *w1, double *w2, int *ipc, double *rpc, double *pc, double *ac, double *cc, double *fc, double *xf, double *yf, double *zf, double *gxcf, double *gycf, double *gzcf, double *a1cf, double *a2cf, double *a3cf, double *ccf, double *fcf, double *tcf)
Solves using Newton's Method.
VPUBLIC void 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.
VPUBLIC void Vbuildstr(int *nx, int *ny, int *nz, int *nlev, int *iz)
Build the nexted operator framework in the array iz.
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.