[cig-commits] r5881 - mc/3D/CitcomS/branches/compressible/lib
tan2 at geodynamics.org
tan2 at geodynamics.org
Tue Jan 23 18:17:11 PST 2007
Author: tan2
Date: 2007-01-23 18:17:10 -0800 (Tue, 23 Jan 2007)
New Revision: 5881
Modified:
mc/3D/CitcomS/branches/compressible/lib/Drive_solvers.c
mc/3D/CitcomS/branches/compressible/lib/Full_version_dependent.c
mc/3D/CitcomS/branches/compressible/lib/Instructions.c
mc/3D/CitcomS/branches/compressible/lib/Obsolete.c
mc/3D/CitcomS/branches/compressible/lib/Pan_problem_misc_functions.c
mc/3D/CitcomS/branches/compressible/lib/Regional_obsolete.c
mc/3D/CitcomS/branches/compressible/lib/Regional_version_dependent.c
mc/3D/CitcomS/branches/compressible/lib/global_defs.h
Log:
Removed unused functions and struct members
Modified: mc/3D/CitcomS/branches/compressible/lib/Drive_solvers.c
===================================================================
--- mc/3D/CitcomS/branches/compressible/lib/Drive_solvers.c 2007-01-24 01:10:13 UTC (rev 5880)
+++ mc/3D/CitcomS/branches/compressible/lib/Drive_solvers.c 2007-01-24 02:17:10 UTC (rev 5881)
@@ -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>
@@ -82,8 +82,6 @@
const int dims = E->mesh.nsd;
const int addi_dof = additional_dof[dims];
- E->monitor.elapsed_time_vsoln = E->monitor.elapsed_time;
-
velocities_conform_bcs(E,E->U);
assemble_forces(E,0);
@@ -172,8 +170,6 @@
const int dims = E->mesh.nsd;
const int addi_dof = additional_dof[dims];
- E->monitor.elapsed_time_vsoln = E->monitor.elapsed_time;
-
velocities_conform_bcs(E,E->U);
E->monitor.stop_topo_loop = 0;
Modified: mc/3D/CitcomS/branches/compressible/lib/Full_version_dependent.c
===================================================================
--- mc/3D/CitcomS/branches/compressible/lib/Full_version_dependent.c 2007-01-24 01:10:13 UTC (rev 5880)
+++ mc/3D/CitcomS/branches/compressible/lib/Full_version_dependent.c 2007-01-24 02:17:10 UTC (rev 5881)
@@ -61,16 +61,11 @@
if(E->mesh.nsd != 3)
E->mesh.noy = 1;
- E->mesh.nnx[1] = E->mesh.nox;
- E->mesh.nnx[2] = E->mesh.noy;
- E->mesh.nnx[3] = E->mesh.noz;
E->mesh.elx = E->mesh.nox-1;
E->mesh.ely = E->mesh.noy-1;
E->mesh.elz = E->mesh.noz-1;
- E->mesh.nno = E->sphere.caps;
- for(d=1;d<=E->mesh.nsd;d++)
- E->mesh.nno *= E->mesh.nnx[d];
+ E->mesh.nno = E->sphere.caps*E->mesh.nox*E->mesh.noy*E->mesh.noz;
E->mesh.nel = E->sphere.caps*E->mesh.elx*E->mesh.elz*E->mesh.ely;
Modified: mc/3D/CitcomS/branches/compressible/lib/Instructions.c
===================================================================
--- mc/3D/CitcomS/branches/compressible/lib/Instructions.c 2007-01-24 01:10:13 UTC (rev 5880)
+++ mc/3D/CitcomS/branches/compressible/lib/Instructions.c 2007-01-24 02:17:10 UTC (rev 5881)
@@ -720,9 +720,6 @@
E->control.CHEMISTRY_MODULE = 0;
E->control.GRID_TYPE=1;
- E->mesh.hwidth[1]=E->mesh.hwidth[2]=E->mesh.hwidth[3]=1.0; /* divide by this one ! */
- E->mesh.magnitude[1]=E->mesh.magnitude[2]=E->mesh.magnitude[3]=0.0;
- E->mesh.offset[1]=E->mesh.offset[2]=E->mesh.offset[3]=0.0;
E->parallel.nprocx=1; E->parallel.nprocz=1; E->parallel.nprocy=1;
Modified: mc/3D/CitcomS/branches/compressible/lib/Obsolete.c
===================================================================
--- mc/3D/CitcomS/branches/compressible/lib/Obsolete.c 2007-01-24 01:10:13 UTC (rev 5880)
+++ mc/3D/CitcomS/branches/compressible/lib/Obsolete.c 2007-01-24 02:17:10 UTC (rev 5881)
@@ -896,6 +896,75 @@
}
+
+/* ========================================================== */
+/* From Pan_problem_misc_functions.c */
+/* =========================================================== */
+
+double SIN_D(x)
+ double x;
+{
+#if defined(__osf__)
+ return sind(x);
+#else
+ return sin((x/180.0) * M_PI);
+#endif
+
+}
+
+double COT_D(x)
+ double x;
+{
+#if defined(__osf__)
+ return cotd(x);
+#else
+ return tan(((90.0-x)/180.0) * M_PI);
+#endif
+
+}
+
+
+/* non-runaway malloc */
+
+void * Malloc1(bytes,file,line)
+ int bytes;
+ char *file;
+ int line;
+{
+ void *ptr;
+
+ ptr = malloc((size_t)bytes);
+ if (ptr == (void *)NULL) {
+ fprintf(stderr,"Memory: cannot allocate another %d bytes \n(line %d of file %s)\n",bytes,line,file);
+ parallel_process_termination();
+ }
+
+ return(ptr);
+}
+
+
+/* returns the out of plane component of the cross product of
+ the two vectors assuming that one is looking AGAINST the
+ direction of the axis of D, anti-clockwise angles
+ are positive (are you sure ?), and the axes are ordered 2,3 or 1,3 or 1,2 */
+
+
+float cross2d(x11,x12,x21,x22,D)
+ float x11,x12,x21,x22;
+ int D;
+{
+ float temp;
+ if(1==D)
+ temp = ( x11*x22-x12*x21);
+ if(2==D)
+ temp = (-x11*x22+x12*x21);
+ if(3==D)
+ temp = ( x11*x22-x12*x21);
+
+ return(temp);
+}
+
+
/* version */
/* $Id$ */
Modified: mc/3D/CitcomS/branches/compressible/lib/Pan_problem_misc_functions.c
===================================================================
--- mc/3D/CitcomS/branches/compressible/lib/Pan_problem_misc_functions.c 2007-01-24 01:10:13 UTC (rev 5880)
+++ mc/3D/CitcomS/branches/compressible/lib/Pan_problem_misc_functions.c 2007-01-24 02:17:10 UTC (rev 5881)
@@ -137,6 +137,9 @@
for(m=1;m<=E->sphere.caps_per_proc;m++)
for(i=1;i<=E->lmesh.nno;i++) {
int nz = ((i-1) % E->lmesh.noz) + 1;
+ /* We don't need to substract adiabatic T profile from T here,
+ * since the horizontal average of buoy will be removed.
+ */
buoy[m][i] = temp * E->rho_ref[nz] * E->thermexp_ref[nz]
* E->T[m][i];
}
@@ -149,48 +152,7 @@
return;
}
-double SIN_D(x)
- double x;
-{
-#if defined(__osf__)
- return sind(x);
-#else
- return sin((x/180.0) * M_PI);
-#endif
-}
-
-double COT_D(x)
- double x;
-{
-#if defined(__osf__)
- return cotd(x);
-#else
- return tan(((90.0-x)/180.0) * M_PI);
-#endif
-
-}
-
-
-/* non-runaway malloc */
-
-void * Malloc1(bytes,file,line)
- int bytes;
- char *file;
- int line;
-{
- void *ptr;
-
- ptr = malloc((size_t)bytes);
- if (ptr == (void *)NULL) {
- fprintf(stderr,"Memory: cannot allocate another %d bytes \n(line %d of file %s)\n",bytes,line,file);
- parallel_process_termination();
- }
-
- return(ptr);
-}
-
-
/* Read in a file containing previous values of a field. The input in the parameter
file for this should look like: `previous_name_file=string' and `previous_name_column=int'
where `name' is substituted by the argument of the function.
@@ -214,8 +176,6 @@
{
int input_string();
- float cross2d();
-
char discard[5001];
char *token;
char *filename;
@@ -333,27 +293,6 @@
}
-/* returns the out of plane component of the cross product of
- the two vectors assuming that one is looking AGAINST the
- direction of the axis of D, anti-clockwise angles
- are positive (are you sure ?), and the axes are ordered 2,3 or 1,3 or 1,2 */
-
-
-float cross2d(x11,x12,x21,x22,D)
- float x11,x12,x21,x22;
- int D;
-{
- float temp;
- if(1==D)
- temp = ( x11*x22-x12*x21);
- if(2==D)
- temp = (-x11*x22+x12*x21);
- if(3==D)
- temp = ( x11*x22-x12*x21);
-
- return(temp);
-}
-
/* =================================================
my version of arc tan
=================================================*/
Modified: mc/3D/CitcomS/branches/compressible/lib/Regional_obsolete.c
===================================================================
--- mc/3D/CitcomS/branches/compressible/lib/Regional_obsolete.c 2007-01-24 01:10:13 UTC (rev 5880)
+++ mc/3D/CitcomS/branches/compressible/lib/Regional_obsolete.c 2007-01-24 02:17:10 UTC (rev 5881)
@@ -926,10 +926,6 @@
int m,i,it;
- E->monitor.length_scale = E->data.radius_km/E->mesh.layer[2]; /* km */
- E->monitor.time_scale = pow(E->data.radius_km*1000.0,2.0)/ /* Million years */
- (E->data.therm_diff*3600.0*24.0*365.25*1.0e6);
-
if ( (ii == 0) || ((ii % E->control.record_every) == 0)
|| E->control.DIRECTII) {
get_STD_topo(E,E->slice.tpg,E->slice.tpgb,E->slice.divg,E->slice.vort,ii);
Modified: mc/3D/CitcomS/branches/compressible/lib/Regional_version_dependent.c
===================================================================
--- mc/3D/CitcomS/branches/compressible/lib/Regional_version_dependent.c 2007-01-24 01:10:13 UTC (rev 5880)
+++ mc/3D/CitcomS/branches/compressible/lib/Regional_version_dependent.c 2007-01-24 02:17:10 UTC (rev 5881)
@@ -63,21 +63,13 @@
if(E->mesh.nsd != 3)
E->mesh.noy = 1;
- E->mesh.nnx[1] = E->mesh.nox;
- E->mesh.nnx[2] = E->mesh.noy;
- E->mesh.nnx[3] = E->mesh.noz;
E->mesh.elx = E->mesh.nox-1;
E->mesh.ely = E->mesh.noy-1;
E->mesh.elz = E->mesh.noz-1;
- E->mesh.nno = E->sphere.caps;
- for(d=1;d<=E->mesh.nsd;d++)
- E->mesh.nno *= E->mesh.nnx[d];
+ E->mesh.nno = E->sphere.caps*E->mesh.nox*E->mesh.noy*E->mesh.noz;
-/*
E->mesh.nel = E->sphere.caps*E->mesh.elx*E->mesh.elz*E->mesh.ely;
-*/
- E->mesh.nel = E->mesh.elx*E->mesh.elz*E->mesh.ely;
E->mesh.nnov = E->mesh.nno;
Modified: mc/3D/CitcomS/branches/compressible/lib/global_defs.h
===================================================================
--- mc/3D/CitcomS/branches/compressible/lib/global_defs.h 2007-01-24 01:10:13 UTC (rev 5880)
+++ mc/3D/CitcomS/branches/compressible/lib/global_defs.h 2007-01-24 02:17:10 UTC (rev 5881)
@@ -289,33 +289,24 @@
int NEQ[MAX_LEVELS];
int NNO[MAX_LEVELS];
int NNOV[MAX_LEVELS];
- int NLNO[MAX_LEVELS];
int NPNO[MAX_LEVELS];
int NEL[MAX_LEVELS];
int NOX[MAX_LEVELS];
int NOZ[MAX_LEVELS];
int NOY[MAX_LEVELS];
- int NMX[MAX_LEVELS];
int ELX[MAX_LEVELS];
int ELZ[MAX_LEVELS];
int ELY[MAX_LEVELS];
- int LNDS[MAX_LEVELS];
- int LELS[MAX_LEVELS];
int SNEL[MAX_LEVELS];
- int neqd;
int neq;
int nno;
int nnov;
- int nlno;
int npno;
int nel;
int snel;
int elx;
int elz;
int ely;
- int nnx[4]; /* general form of ... */
- int gnox;
- int gelx;
int nox;
int noz;
int noy;
@@ -331,7 +322,6 @@
int NXS[MAX_LEVELS];
int NYS[MAX_LEVELS];
int NZS[MAX_LEVELS];
- int nmx;
int nsf; /* nodes for surface observables */
int toptbc;
int bottbc;
@@ -339,25 +329,10 @@
int botvbc;
int sidevbc;
- char topvbc_file[100];
- char botvbc_file[100];
- char sidevbc_file[100];
- char gridfile[4][100];
-
int periodic_x;
int periodic_y;
float layer[4]; /* dimensionless dimensions */
- float lidz;
- float bl1width[4],bl2width[4],bl1mag[4],bl2mag[4];
- float hwidth[4],magnitude[4],offset[4],width[4]; /* grid compression information */
- int fnodal_malloc_size;
- int dnodal_malloc_size;
- int feqn_malloc_size;
- int deqn_malloc_size;
- int bandwidth;
- int null_source;
- int null_sink;
int matrix_size[MAX_LEVELS];
} ;
@@ -384,53 +359,20 @@
struct MONITOR {
- char node_output[100][6]; /* recording the format of the output data */
- char sobs_output[100][6]; /* recording the format of the output data */
- int node_output_cols;
- int sobs_output_cols;
-
int solution_cycles;
int solution_cycles_init;
int stop_topo_loop;
int topo_loop;
- float time_scale;
- float length_scale;
- float viscosity_scale;
- float geoscale;
- float tpgscale;
- float grvscale;
-
- float delta_v_last_soln;
float elapsed_time;
- float elapsed_time_vsoln;
- float elapsed_time_vsoln1;
- float reference_stress;
float incompressibility;
float vdotv;
- float nond_av_heat_fl;
- float nond_av_adv_hfl;
double cpu_time_at_start;
double cpu_time_at_last_cycle;
- float tpgkmag;
- float grvkmag;
- float Nusselt;
- float Vmax;
- float Vsrms;
- float Vrms;
- float Vrms_surface;
- float Vrms_base;
- float F_surface;
- float F_base;
- float Frat_surface;
- float Frat_base;
float T_interior;
float T_maxvaried;
- float Sigma_max;
- float Sigma_interior;
- float Vi_average;
};
More information about the cig-commits
mailing list