APBS  1.5
mgsubd.h
1 
50 #ifndef _MGSUBD_H_
51 #define _MGSUBD_H_
52 
53 #include "apbscfg.h"
54 
55 #include "maloc/maloc.h"
56 
57 #include "generic/vhal.h"
58 #include "generic/vmatrix.h"
59 #include "pmgc/matvecd.h"
60 #include "pmgc/buildAd.h"
61 #include "pmgc/buildPd.h"
62 #include "pmgc/buildBd.h"
63 #include "pmgc/buildGd.h"
64 
65 #define HARMO2(a, b) (2.0 * (a) * (b) / ((a) + (b)))
66 #define HARMO4(a, b, c, d) (1.0 / ( 0.25 * ( 1.0/(a) + 1.0/(b) + 1.0/(c) + 1.0/(d))))
67 #define ARITH2(a, b) (((a) + (b)) / 2.0)
68 #define ARITH4(a, b, c, d) (((a) + (b) + (c) + (d)) / 4.0)
69 #define ARITH6(a, b, c, d, e, f) (((a) + (b) + (c) + (d) + (e) + (f)) / 6.0)
70 #define ARITH8(a, b, c, d, e, f, g, h) (((a) + (b) + (c) + (d) + (e) + (f) + (g) + (h)) / 8.0)
71 
84 VEXTERNC void Vbuildops(
85  int *nx,
86  int *ny,
87  int *nz,
88  int *nlev,
89  int *ipkey,
90  int *iinfo,
91  int *ido,
92  int *iz,
93  int *mgprol,
94  int *mgcoar,
95  int *mgsolv,
96  int *mgdisc,
97  int *ipc,
98  double *rpc,
99  double *pc,
100  double *ac,
101  double *cc,
102  double *fc,
103  double *xf,
104  double *yf,
105  double *zf,
106  double *gxcf,
107  double *gycf,
108  double *gzcf,
109  double *a1cf,
110  double *a2cf,
111  double *a3cf,
112  double *ccf,
113  double *fcf,
114  double *tcf
115  );
116 
136 VEXTERNC void Vbuildstr(
137  int *nx,
138  int *ny,
139  int *nz,
140  int *nlev,
141  int *iz
142  );
143 
152 VEXTERNC void Vbuildgaler0(
153  int *nxf,
154  int *nyf,
155  int *nzf,
156  int *nxc,
157  int *nyc,
158  int *nzc,
159  int *ipkey,
160  int *numdia,
161  double *pcFF,
162  int *ipcFF,
163  double *rpcFF,
164  double *acFF,
165  double *ccFF,
166  double *fcFF,
167  int *ipc,
168  double *rpc,
169  double *ac,
170  double *cc,
171  double *fc
172  );
173 
174 
175 
182 VEXTERNC void Vmkcors(
183  int *numlev,
184  int *nxold,
185  int *nyold,
186  int *nzold,
187  int *nxnew,
188  int *nynew,
189  int *nznew
190  );
191 
198 VEXTERNC void Vcorsr(
199  int *nold,
200  int *nnew
201  );
202 
203 
204 
211 VEXTERNC void Vmkfine(
212  int *numlev,
213  int *nxold,
214  int *nyold,
215  int *nzold,
216  int *nxnew,
217  int *nynew,
218  int *nznew
219  );
220 
227 VEXTERNC void Vfiner(
228  int *nold,
229  int *nnew
230  );
231 
232 
233 
240 VEXTERNC int Vivariv(
241  int *nu,
242  int *level
243  );
244 
250 VEXTERNC int Vmaxlev(
251  int n1,
252  int n2,
253  int n3
254  );
255 
256 
258 double bf, oh, cputme;
259 
264 VEXTERNC void Vprtstp(
265  int iok,
266  int iters,
267  double rsnrm,
268  double rsden,
269  double orsnrm
270  );
271 
272 
273 
280 VEXTERNC void Vpackmg(
281  int *iparm,
282  double *rparm,
283  size_t *nrwk,
284  int *niwk,
285  int *nx,
286  int *ny,
287  int *nz,
288  int *nlev,
289  int *nu1,
290  int *nu2,
291  int *mgkey,
292  int *itmax,
293  int *istop,
294  int *ipcon,
295  int *nonlin,
296  int *mgsmoo,
297  int *mgprol,
298  int *mgcoar,
299  int *mgsolv,
300  int *mgdisc,
301  int *iinfo,
302  double *errtol,
303  int *ipkey,
304  double *omegal,
305  double *omegan,
306  int *irite,
307  int *iperf
308  );
309 
310 
311 
317 VEXTERNC void Vbuildharm0(
318  int *nx,
319  int *ny,
320  int *nz,
321  int *nxf,
322  int *nyf,
323  int *nzf,
324  double *xc,
325  double *yc,
326  double *zc,
327  double *gxc,
328  double *gyc,
329  double *gzc,
330  double *a1c,
331  double *a2c,
332  double *a3c,
333  double *cc,
334  double *fc,
335  double *tc,
336  double *xf,
337  double *yf,
338  double *zf,
339  double *gxcf,
340  double *gycf,
341  double *gzcf,
342  double *a1cf,
343  double *a2cf,
344  double *a3cf,
345  double *ccf,
346  double *fcf,
347  double *tcf
348  );
349 
350 
351 
357 VEXTERNC void Vbuildcopy0(
358  int *nx,
359  int *ny,
360  int *nz,
361  int *nxf,
362  int *nyf,
363  int *nzf,
364  double *xc,
365  double *yc,
366  double *zc,
367  double *gxc,
368  double *gyc,
369  double *gzc,
370  double *a1c,
371  double *a2c,
372  double *a3c,
373  double *cc,
374  double *fc,
375  double *tc,
376  double *xf,
377  double *yf,
378  double *zf,
379  double *gxcf,
380  double *gycf,
381  double *gzcf,
382  double *a1cf,
383  double *a2cf,
384  double *a3cf,
385  double *ccf,
386  double *fcf,
387  double *tcf
388  );
389 
390 
391 
397 VEXTERNC void Vbuildalg(
398  int *nx,
399  int *ny,
400  int *nz,
401  int *mode,
402  int *nlev,
403  int *iz,
404  int *ipc,
405  double *rpc,
406  double *ac,
407  double *cc,
408  double *fc,
409  double *x,
410  double *y,
411  double *tmp
412 );
413 
414 
415 
416 #endif // _MGSUBD_H_
int ipcon
Definition: vpmgp.h:183
int nonlin
Definition: vpmgp.h:90
int mgsolv
Definition: vpmgp.h:174
int iinfo
Definition: vpmgp.h:130
int irite
Definition: vpmgp.h:182
int nzc
Definition: vpmgp.h:98
int nxc
Definition: vpmgp.h:96
int ipkey
Definition: vpmgp.h:109
int mgcoar
Definition: vpmgp.h:170
size_t nrwk
Definition: vpmgp.h:106
int mgdisc
Definition: vpmgp.h:177
int mgsmoo
Definition: vpmgp.h:160
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...
Definition: mgsubd.c:52
int nu1
Definition: vpmgp.h:158
VEXTERNC void Vpackmg(int *iparm, double *rparm, size_t *nrwk, int *niwk, int *nx, int *ny, int *nz, int *nlev, int *nu1, int *nu2, int *mgkey, int *itmax, int *istop, int *ipcon, int *nonlin, int *mgsmoo, int *mgprol, int *mgcoar, int *mgsolv, int *mgdisc, int *iinfo, double *errtol, int *ipkey, double *omegal, double *omegan, int *irite, int *iperf)
Print out a column-compressed sparse matrix in Harwell-Boeing format.
Definition: mgsubd.c:550
int niwk
Definition: vpmgp.h:107
int iperf
Definition: vpmgp.h:139
Contains generic macro definitions for APBS.
int nyc
Definition: vpmgp.h:97
int istop
Definition: vpmgp.h:123
int ny
Definition: vpmgp.h:84
int mgprol
Definition: vpmgp.h:166
int nx
Definition: vpmgp.h:83
double omegan
Definition: vpmgp.h:181
int nu2
Definition: vpmgp.h:159
int itmax
Definition: vpmgp.h:122
double omegal
Definition: vpmgp.h:180
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.
Definition: mgsubd.c:336
VEXTERNC void Vbuildstr(int *nx, int *ny, int *nz, int *nlev, int *iz)
Build the nexted operator framework in the array iz.
Definition: mgsubd.c:252
int mgkey
Definition: vpmgp.h:155
int nlev
Definition: vpmgp.h:86
double errtol
Definition: vpmgp.h:121
Contains inclusions for matrix data wrappers.
int nz
Definition: vpmgp.h:85