[cig-commits] r14028 - mc/3D/CitcomS/trunk/lib
tan2 at geodynamics.org
tan2 at geodynamics.org
Fri Feb 6 11:51:18 PST 2009
Author: tan2
Date: 2009-02-06 11:51:18 -0800 (Fri, 06 Feb 2009)
New Revision: 14028
Modified:
mc/3D/CitcomS/trunk/lib/Instructions.c
mc/3D/CitcomS/trunk/lib/Stokes_flow_Incomp.c
Log:
Emit the warning message from a different place to get rid of static variables.
Also, the macros TRUE and FALSE are undefined unless configured with GMT.
Modified: mc/3D/CitcomS/trunk/lib/Instructions.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Instructions.c 2009-02-06 19:16:53 UTC (rev 14027)
+++ mc/3D/CitcomS/trunk/lib/Instructions.c 2009-02-06 19:51:18 UTC (rev 14028)
@@ -780,6 +780,10 @@
myerror(E, "number of multigrid levels out of bound\n");
}
+ if((E->parallel.me == 0) && (E->control.only_check_vel_convergence)) {
+ fprintf(stderr,"solve_Ahat_p_fhat: WARNING: overriding pressure and div check\n");
+ }
+
return;
}
Modified: mc/3D/CitcomS/trunk/lib/Stokes_flow_Incomp.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Stokes_flow_Incomp.c 2009-02-06 19:16:53 UTC (rev 14027)
+++ mc/3D/CitcomS/trunk/lib/Stokes_flow_Incomp.c 2009-02-06 19:51:18 UTC (rev 14028)
@@ -207,7 +207,6 @@
double v_norm, p_norm;
double dvelocity, dpressure;
int converging;
- static int warned = FALSE;
void assemble_c_u();
void assemble_div_u();
void assemble_del2_u();
@@ -216,11 +215,6 @@
int solve_del2_u();
void parallel_process_termination();
- if((E->parallel.me == 0) && (E->control.only_check_vel_convergence) && (!warned)){
- fprintf(stderr,"solve_Ahat_p_fhat_BiCG: WARNING: overriding pressure and div check\n");
- warned = TRUE;
- }
-
npno = E->lmesh.npno;
neq = E->lmesh.neq;
lev = E->mesh.levmax;
@@ -461,8 +455,6 @@
double global_v_norm2(), global_p_norm2(), global_div_norm2();
double CPU_time0();
- static int warned = FALSE;
-
int npno, neq;
int m, j, count, lev;
int valid;
@@ -481,11 +473,6 @@
double time0, v_res;
- if((E->parallel.me == 0) && (E->control.only_check_vel_convergence) && (!warned)){
- fprintf(stderr,"solve_Ahat_p_fhat_BiCG: WARNING: overriding pressure and div check\n");
- warned = TRUE;
- }
-
npno = E->lmesh.npno;
neq = E->lmesh.neq;
lev = E->mesh.levmax;
@@ -760,7 +747,6 @@
double relative_err_v, relative_err_p;
double *old_v[NCS], *old_p[NCS],*diff_v[NCS],*diff_p[NCS];
double div_res;
- static int warned = FALSE;
const int npno = E->lmesh.npno;
const int neq = E->lmesh.neq;
const int lev = E->mesh.levmax;
@@ -768,10 +754,6 @@
double global_v_norm2(),global_p_norm2();
double global_div_norm2();
void assemble_div_rho_u();
- if((E->parallel.me == 0) && (E->control.only_check_vel_convergence) && (!warned)){
- fprintf(stderr,"solve_Ahat_p_fhat_iterCG: WARNING: overriding pressure and div check\n");
- warned = TRUE;
- }
for (m=1;m<=E->sphere.caps_per_proc;m++) {
old_v[m] = (double *)malloc(neq*sizeof(double));
More information about the CIG-COMMITS
mailing list