APBS  1.5
smoothd.c
1 
50 #include "smoothd.h"
51 
52 VEXTERNC void Vsmooth(int *nx, int *ny, int *nz,
53  int *ipc, double *rpc,
54  double *ac, double *cc, double *fc,
55  double *x, double *w1, double *w2, double *r,
56  int *itmax, int *iters,
57  double *errtol, double *omega,
58  int *iresid, int *iadjoint, int *meth) {
59 
60  // Do in one step
61  if (*meth == 0) {
62  VABORT_MSG0( "wjac not yet translated" );
63  //wjac(nx,ny,nz,ipc,rpc,ac,cc,fc,x,w1,w2,r,itmax,iters,errtol,omega,iresid,iadjoint);
64  } else if (*meth == 1) {
65  Vgsrb(nx, ny, nz,
66  ipc, rpc,
67  ac, cc, fc,
68  x, w1, w2, r,
69  itmax, iters,
70  errtol, omega,
71  iresid, iadjoint);
72  } else if (*meth == 2) {
73  VABORT_MSG0( "sor not yet translated" );
74  //sor(nx,ny,nz,ipc,rpc,ac,cc,fc,x,w1,w2,r,itmax,iters,errtol,omega,iresid,iadjoint);
75  } else if (*meth == 3) {
76  VABORT_MSG0( "rich not yet translated" );
77  //rich(nx,ny,nz,ipc,rpc,ac,cc,fc,x,w1,w2,r,itmax,iters,errtol,omega,iresid,iadjoint);
78  } else if (*meth == 4) {
79  Vcghs(nx, ny, nz,
80  ipc, rpc,
81  ac, cc, fc,
82  x, w1, w2, r,
83  itmax, iters,
84  errtol, omega,
85  iresid, iadjoint);
86  } else {
87  VABORT_MSG1("Bad smoothing routine specified = %d", *meth);
88  }
89 }
90 
91 
92 VEXTERNC void Vnsmooth(int *nx, int *ny, int *nz,
93  int *ipc, double *rpc,
94  double *ac, double *cc, double *fc,
95  double *x, double *w1, double *w2, double *r,
96  int *itmax, int *iters,
97  double *errtol, double *omega,
98  int *iresid, int *iadjoint, int *meth) {
99 
100  WARN_UNTESTED;
101 
102  // Do in one step
103  if (*meth == 0) {
104  VABORT_MSG0( "nwjac not yet translated" );
105  //nwjac(nx,ny,nz,ipc,rpc,ac,cc,fc,x,w1,w2,r,itmax,iters,errtol,omega,iresid,iadjoint)
106  } else if (*meth == 1) {
107  VABORT_MSG0( "ngsrb not yet translated" );
108  //ngsrb(nx,ny,nz,ipc,rpc,ac,cc,fc,x,w1,w2,r,itmax,iters,errtol,omega,iresid,iadjoint)
109  } else if (*meth == 2) {
110  VABORT_MSG0( "nsor not yet translated" );
111  //nsor(nx,ny,nz,ipc,rpc,ac,cc,fc,x,w1,w2,r,itmax,iters,errtol,omega,iresid,iadjoint)
112  } else if (*meth == 3) {
113  VABORT_MSG0( "nrich not yet translated" );
114  //nrich(nx,ny,nz,ipc,rpc,ac,cc,fc,x,w1,w2,r,itmax,iters,errtol,omega,iresid,iadjoint)
115  } else {
116  VABORT_MSG1("Bad smoothing routine specified: %d", *meth );
117  }
118 }
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).
Definition: cgd.c:52
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.
Definition: smoothd.c:52
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.
Definition: gsd.c:52
int ny
Definition: vpmgp.h:84
int nx
Definition: vpmgp.h:83
int itmax
Definition: vpmgp.h:122
int meth
Definition: vpmgp.h:144
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.
Definition: smoothd.c:92
double errtol
Definition: vpmgp.h:121
int nz
Definition: vpmgp.h:85