[cig-commits] r4437 - mc/3D/CitcomS/trunk/lib
tan2 at geodynamics.org
tan2 at geodynamics.org
Fri Aug 25 17:49:07 PDT 2006
Author: tan2
Date: 2006-08-25 17:49:06 -0700 (Fri, 25 Aug 2006)
New Revision: 4437
Modified:
mc/3D/CitcomS/trunk/lib/Full_boundary_conditions.c
mc/3D/CitcomS/trunk/lib/Full_parallel_related.c
mc/3D/CitcomS/trunk/lib/Full_version_dependent.c
mc/3D/CitcomS/trunk/lib/Phase_change.c
mc/3D/CitcomS/trunk/lib/Process_buoyancy.c
mc/3D/CitcomS/trunk/lib/Regional_boundary_conditions.c
mc/3D/CitcomS/trunk/lib/Regional_parallel_related.c
mc/3D/CitcomS/trunk/lib/Regional_version_dependent.c
mc/3D/CitcomS/trunk/lib/Size_does_matter.c
mc/3D/CitcomS/trunk/lib/Viscosity_structures.c
Log:
Flushed debugging output
Modified: mc/3D/CitcomS/trunk/lib/Full_boundary_conditions.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Full_boundary_conditions.c 2006-08-25 23:15:12 UTC (rev 4436)
+++ mc/3D/CitcomS/trunk/lib/Full_boundary_conditions.c 2006-08-26 00:49:06 UTC (rev 4437)
@@ -1,6 +1,6 @@
/*
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
+ *
*<LicenseText>
*
* CitcomS by Louis Moresi, Shijie Zhong, Lijie Han, Eh Tan,
@@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*</LicenseText>
- *
+ *
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
#include "element_definitions.h"
@@ -94,10 +94,12 @@
if(E->control.side_sbcs)
apply_side_sbc(E);
-/* if(E->control.verbose) */
+/* if(E->control.verbose) { */
/* for (j=1;j<=E->sphere.caps_per_proc;j++) */
/* for (node=1;node<=E->lmesh.nno;node++) */
/* fprintf(E->fp_out,"m=%d VB== %d %g %g %g flag %u %u %u\n",j,node,E->sphere.cap[j].VB[1][node],E->sphere.cap[j].VB[2][node],E->sphere.cap[j].VB[3][node],E->node[j][node]&VBX,E->node[j][node]&VBY,E->node[j][node]&VBZ); */
+/* fflush(E->fp_out); */
+/* } */
/* If any imposed internal velocity structure it goes here */
Modified: mc/3D/CitcomS/trunk/lib/Full_parallel_related.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Full_parallel_related.c 2006-08-25 23:15:12 UTC (rev 4436)
+++ mc/3D/CitcomS/trunk/lib/Full_parallel_related.c 2006-08-26 00:49:06 UTC (rev 4437)
@@ -1,6 +1,6 @@
/*
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
+ *
*<LicenseText>
*
* CitcomS by Louis Moresi, Shijie Zhong, Lijie Han, Eh Tan,
@@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*</LicenseText>
- *
+ *
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/* Routines here are for intel paragon with MPI */
@@ -516,8 +516,8 @@
lnode++;
fprintf(E->fp_out,"skip %d %d \n",lnode,node);
}
- fflush(E->fp_out);
}
+ fflush(E->fp_out);
}
Modified: mc/3D/CitcomS/trunk/lib/Full_version_dependent.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Full_version_dependent.c 2006-08-25 23:15:12 UTC (rev 4436)
+++ mc/3D/CitcomS/trunk/lib/Full_version_dependent.c 2006-08-26 00:49:06 UTC (rev 4437)
@@ -1,6 +1,6 @@
/*
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
+ *
*<LicenseText>
*
* CitcomS by Louis Moresi, Shijie Zhong, Lijie Han, Eh Tan,
@@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*</LicenseText>
- *
+ *
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
#include <math.h>
@@ -235,7 +235,7 @@
}
/*
-if (E->control.verbose)
+if (E->control.verbose) {
for (lev=E->mesh.levmin;lev<=E->mesh.levmax;lev++) {
fprintf(E->fp_out,"output_coordinates after rotation %d \n",lev);
for (j=1;j<=E->sphere.caps_per_proc;j++)
@@ -243,6 +243,8 @@
if(i%E->lmesh.NOZ[lev]==1)
fprintf(E->fp_out,"%d %d %g %g %g\n",j,i,E->SX[lev][j][1][i],E->SX[lev][j][2][i],E->SX[lev][j][3][i]);
}
+ fflush(E->fp_out);
+}
*/
Modified: mc/3D/CitcomS/trunk/lib/Phase_change.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Phase_change.c 2006-08-25 23:15:12 UTC (rev 4436)
+++ mc/3D/CitcomS/trunk/lib/Phase_change.c 2006-08-26 00:49:06 UTC (rev 4437)
@@ -1,6 +1,6 @@
/*
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
+ *
*<LicenseText>
*
* CitcomS by Louis Moresi, Shijie Zhong, Lijie Han, Eh Tan,
@@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*</LicenseText>
- *
+ *
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
#include <stdio.h>
@@ -36,7 +36,7 @@
float **B, float **B_b,
float Ra, float clapeyron,
float depth, float transT, float width);
-void calc_phase_change(struct All_variables *E,
+void calc_phase_change(struct All_variables *E,
float **B, float **B_b,
float Ra, float clapeyron,
float depth, float transT, float width);
@@ -92,8 +92,8 @@
if (E->control.widthcmb!=0.0)
E->control.widthcmb = 1.0/E->control.widthcmb;
-
+
return;
}
@@ -145,13 +145,14 @@
fprintf(E->fp_out, "Ra=%f, clapeyron=%f, depth=%f, transT=%f, width=%f\n",
Ra, clapeyron, depth, transT, width);
debug_phase_change(E,B);
+ fflush(E->fp_out);
}
return;
}
-void calc_phase_change(struct All_variables *E,
+void calc_phase_change(struct All_variables *E,
float **B, float **B_b,
float Ra, float clapeyron,
float depth, float transT, float width)
@@ -166,7 +167,7 @@
for(i=1;i<=E->lmesh.nno;i++) {
e_pressure = (E->sphere.ro-E->sx[m][3][i]) - depth
- clapeyron*(E->T[m][i]-transT);
-
+
B[m][i] = pt5*(one+tanh(width*e_pressure));
}
@@ -182,7 +183,7 @@
}
}
}
-
+
return;
}
Modified: mc/3D/CitcomS/trunk/lib/Process_buoyancy.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Process_buoyancy.c 2006-08-25 23:15:12 UTC (rev 4436)
+++ mc/3D/CitcomS/trunk/lib/Process_buoyancy.c 2006-08-26 00:49:06 UTC (rev 4437)
@@ -1,6 +1,6 @@
/*
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
+ *
*<LicenseText>
*
* CitcomS by Louis Moresi, Shijie Zhong, Lijie Han, Eh Tan,
@@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*</LicenseText>
- *
+ *
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/* Here are the routines which process the results of each buoyancy solution, and call
@@ -159,7 +159,10 @@
if (E->parallel.me_loc[3]==E->parallel.nprocz-1) {
sum_h[0] = sum_h[0]/sum_h[1];
-/* if (E->control.verbose && E->parallel.me==E->parallel.nprocz-1) fprintf(E->fp_out,"surface heat flux= %f %f\n",sum_h[0],E->monitor.elapsed_time); */
+ /* if (E->control.verbose && E->parallel.me==E->parallel.nprocz-1) {
+ fprintf(E->fp_out,"surface heat flux= %f %f\n",sum_h[0],E->monitor.elapsed_time);
+ fflush(E->fp_out);
+ } */
if (E->parallel.me==E->parallel.nprocz-1) {
fprintf(stderr,"surface heat flux= %f\n",sum_h[0]);
//fprintf(E->fp,"surface heat flux= %f\n",sum_h[0]);
Modified: mc/3D/CitcomS/trunk/lib/Regional_boundary_conditions.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Regional_boundary_conditions.c 2006-08-25 23:15:12 UTC (rev 4436)
+++ mc/3D/CitcomS/trunk/lib/Regional_boundary_conditions.c 2006-08-26 00:49:06 UTC (rev 4437)
@@ -1,6 +1,6 @@
/*
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
+ *
*<LicenseText>
*
* CitcomS by Louis Moresi, Shijie Zhong, Lijie Han, Eh Tan,
@@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*</LicenseText>
- *
+ *
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
#include "element_definitions.h"
@@ -110,11 +110,12 @@
if(E->control.side_sbcs)
apply_side_sbc(E);
- if(E->control.verbose)
+ if(E->control.verbose) {
for (j=1;j<=E->sphere.caps_per_proc;j++)
for (node=1;node<=E->lmesh.nno;node++)
fprintf(E->fp_out,"m=%d VB== %d %g %g %g flag %u %u %u\n",j,node,E->sphere.cap[j].VB[1][node],E->sphere.cap[j].VB[2][node],E->sphere.cap[j].VB[3][node],E->node[j][node]&VBX,E->node[j][node]&VBY,E->node[j][node]&VBZ);
-
+ fflush(E->fp_out);
+ }
/* If any imposed internal velocity structure it goes here */
Modified: mc/3D/CitcomS/trunk/lib/Regional_parallel_related.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Regional_parallel_related.c 2006-08-25 23:15:12 UTC (rev 4436)
+++ mc/3D/CitcomS/trunk/lib/Regional_parallel_related.c 2006-08-26 00:49:06 UTC (rev 4437)
@@ -1,6 +1,6 @@
/*
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
+ *
*<LicenseText>
*
* CitcomS by Louis Moresi, Shijie Zhong, Lijie Han, Eh Tan,
@@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*</LicenseText>
- *
+ *
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
#include <mpi.h>
@@ -459,9 +459,9 @@
lnode++;
fprintf(E->fp_out,"skip %d %d \n",lnode,node);
}
- fflush(E->fp_out);
}
- }
+ fflush(E->fp_out);
+ }
Modified: mc/3D/CitcomS/trunk/lib/Regional_version_dependent.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Regional_version_dependent.c 2006-08-25 23:15:12 UTC (rev 4436)
+++ mc/3D/CitcomS/trunk/lib/Regional_version_dependent.c 2006-08-26 00:49:06 UTC (rev 4437)
@@ -1,6 +1,6 @@
/*
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
+ *
*<LicenseText>
*
* CitcomS by Louis Moresi, Shijie Zhong, Lijie Han, Eh Tan,
@@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*</LicenseText>
- *
+ *
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
#include <math.h>
@@ -244,7 +244,7 @@
}
-if (E->control.verbose)
+ if (E->control.verbose) {
for (lev=E->mesh.levmin;lev<=E->mesh.levmax;lev++) {
fprintf(E->fp_out,"output_coordinates before rotation %d \n",lev);
for (j=1;j<=E->sphere.caps_per_proc;j++) {
@@ -254,7 +254,8 @@
fprintf(E->fp_out,"%d %d %g %g %g\n",j,i,E->SX[lev][j][1][i],E->SX[lev][j][2][i],E->SX[lev][j][3][i]);
}
}
-
+ fflush(E->fp_out);
+ }
/* rotate the mesh to avoid two poles on mesh points */
/*
for (j=1;j<=E->sphere.caps_per_proc;j++) {
@@ -307,7 +308,7 @@
*/
-if (E->control.verbose)
+ if (E->control.verbose) {
for (lev=E->mesh.levmin;lev<=E->mesh.levmax;lev++) {
fprintf(E->fp_out,"output_coordinates after rotation %d \n",lev);
for (j=1;j<=E->sphere.caps_per_proc;j++)
@@ -315,7 +316,8 @@
if(i%E->lmesh.NOZ[lev]==1)
fprintf(E->fp_out,"%d %d %g %g %g\n",j,i,E->SX[lev][j][1][i],E->SX[lev][j][2][i],E->SX[lev][j][3][i]);
}
-
+ fflush(E->fp_out);
+ }
free((void *)rr);
free((void *)RR);
Modified: mc/3D/CitcomS/trunk/lib/Size_does_matter.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Size_does_matter.c 2006-08-25 23:15:12 UTC (rev 4436)
+++ mc/3D/CitcomS/trunk/lib/Size_does_matter.c 2006-08-26 00:49:06 UTC (rev 4437)
@@ -1,6 +1,6 @@
/*
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
+ *
*<LicenseText>
*
* CitcomS by Louis Moresi, Shijie Zhong, Lijie Han, Eh Tan,
@@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*</LicenseText>
- *
+ *
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
#include <math.h>
@@ -983,7 +983,7 @@
fprintf(E->fp_out,"Mass[%d]= %g \n",node,E->MASS[lev][m][node]);
}
}
-
+ fflush(E->fp_out);
}
return;
Modified: mc/3D/CitcomS/trunk/lib/Viscosity_structures.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Viscosity_structures.c 2006-08-25 23:15:12 UTC (rev 4436)
+++ mc/3D/CitcomS/trunk/lib/Viscosity_structures.c 2006-08-26 00:49:06 UTC (rev 4437)
@@ -1,6 +1,6 @@
/*
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
+ *
*<LicenseText>
*
* CitcomS by Louis Moresi, Shijie Zhong, Lijie Han, Eh Tan,
@@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*</LicenseText>
- *
+ *
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/* Functions relating to the determination of viscosity field either
@@ -157,6 +157,7 @@
for(i=1;i<=E->lmesh.nel;i++)
fprintf(E->fp_out,"%d %d %f %f\n",i,E->mat[m][i],evisc[m][(i-1)*vpts+1],evisc[m][(i-1)*vpts+7]);
}
+ fflush(E->fp_out);
}
*/
@@ -265,18 +266,18 @@
break;
case 4:
-
+
for(m=1;m<=E->sphere.caps_per_proc;m++)
for(i=1;i<=nel;i++) {
l = E->mat[m][i];
tempa = E->viscosity.N0[l-1];
j = 0;
-
+
for(kk=1;kk<=ends;kk++) {
TT[kk] = E->T[m][E->ien[m][i].node[kk]];
zz[kk] = (1.-E->sx[m][3][E->ien[m][i].node[kk]]);
}
-
+
for(jj=1;jj<=vpts;jj++) {
temp=0.0;
zzz=0.0;
@@ -285,28 +286,28 @@
temp += min(TT[kk],one) * E->N.vpt[GNVINDEX(kk,jj)];
zzz += zz[kk] * E->N.vpt[GNVINDEX(kk,jj)];
}
-
-/* The viscosity formulation (dimensional) is: visc=visc0*exp[(Ea+p*Va)/R*T]
- Typical values for dry upper mantle are: Ea = 300 KJ/mol ; Va = 1.e-5 m^3/mol
- T=T0+DT*T'; where DT - temperature contrast (from Rayleigh number)
- T' - nondimensional temperature; T0 - surface tempereture (273 K)
- T=DT*[(T0/DT) + T'] => visc=visc0*exp{(Ea+p*Va)/R*DT*[(T0/DT) + T']}
- visc=visc0*exp{[(Ea/R*DT) + (p*Va/R*DT)]/[(T0/DT) + T']}
- so: E->viscosity.E = Ea/R*DT ; E->viscosity.Z = Va/R*DT
+
+/* The viscosity formulation (dimensional) is: visc=visc0*exp[(Ea+p*Va)/R*T]
+ Typical values for dry upper mantle are: Ea = 300 KJ/mol ; Va = 1.e-5 m^3/mol
+ T=T0+DT*T'; where DT - temperature contrast (from Rayleigh number)
+ T' - nondimensional temperature; T0 - surface tempereture (273 K)
+ T=DT*[(T0/DT) + T'] => visc=visc0*exp{(Ea+p*Va)/R*DT*[(T0/DT) + T']}
+ visc=visc0*exp{[(Ea/R*DT) + (p*Va/R*DT)]/[(T0/DT) + T']}
+ so: E->viscosity.E = Ea/R*DT ; E->viscosity.Z = Va/R*DT
p = zzz and E->viscosity.T = T0/DT */
-
+
if(E->control.mat_control==0)
EEta[m][ (i-1)*vpts + jj ] = tempa*
exp( (E->viscosity.E[l-1] + E->viscosity.Z[l-1]*zzz )
/ (E->viscosity.T[l-1]+temp) );
-
-
+
+
if(E->control.mat_control==1)
EEta[m][ (i-1)*vpts + jj ] = tempa*E->VIP[m][i]*
exp( (E->viscosity.E[l-1] + E->viscosity.Z[l-1]*zzz )
- / (E->viscosity.T[l-1]+temp) );
+ / (E->viscosity.T[l-1]+temp) );
}
}
More information about the cig-commits
mailing list