[cig-commits] r17193 - mc/3D/CitcomS/trunk/lib

becker at geodynamics.org becker at geodynamics.org
Wed Sep 15 03:36:58 PDT 2010


Author: becker
Date: 2010-09-15 03:36:58 -0700 (Wed, 15 Sep 2010)
New Revision: 17193

Added:
   mc/3D/CitcomS/trunk/lib/prototypes.h
Modified:
   mc/3D/CitcomS/trunk/lib/Anisotropic_viscosity.c
   mc/3D/CitcomS/trunk/lib/BC_util.c
   mc/3D/CitcomS/trunk/lib/Convection.c
   mc/3D/CitcomS/trunk/lib/Element_calculations.c
   mc/3D/CitcomS/trunk/lib/General_matrix_functions.c
   mc/3D/CitcomS/trunk/lib/Instructions.c
   mc/3D/CitcomS/trunk/lib/Obsolete.c
   mc/3D/CitcomS/trunk/lib/Output.c
   mc/3D/CitcomS/trunk/lib/Size_does_matter.c
   mc/3D/CitcomS/trunk/lib/Solver_multigrid.c
   mc/3D/CitcomS/trunk/lib/Topo_gravity.c
   mc/3D/CitcomS/trunk/lib/anisotropic_viscosity.h
   mc/3D/CitcomS/trunk/lib/global_defs.h
Log:
Suggested use of general prototypes

Retired N>3 matrix determinant functions (because they caused compile problems) 



Modified: mc/3D/CitcomS/trunk/lib/Anisotropic_viscosity.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Anisotropic_viscosity.c	2010-09-14 04:08:05 UTC (rev 17192)
+++ mc/3D/CitcomS/trunk/lib/Anisotropic_viscosity.c	2010-09-15 10:36:58 UTC (rev 17193)
@@ -30,7 +30,7 @@
 
 /* 
 
-   anisotropic viscosity following Muehlhaus, Moresi, Hobbs and Dufour
+   orthotropic viscosity following Muehlhaus, Moresi, Hobbs and Dufour
    (PAGEOPH, 159, 2311, 2002)
 
    tranverse isotropy following Han and Wahr (PEPI, 102, 33, 1997)
@@ -53,10 +53,10 @@
 
 void get_constitutive(double D[6][6], int lev, int m, 
 		      int off, double theta, double phi, 
+		      int convert_to_spherical,
 		      struct All_variables *E)
 {
   double n[3];
-  const int convert_to_spherical = TRUE; 
   if(E->viscosity.allow_anisotropic_viscosity){
     if((E->monitor.solution_cycles == 0)&&
        (E->viscosity.anivisc_start_from_iso)&&(E->monitor.visc_iter_count == 0))

Modified: mc/3D/CitcomS/trunk/lib/BC_util.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/BC_util.c	2010-09-14 04:08:05 UTC (rev 17192)
+++ mc/3D/CitcomS/trunk/lib/BC_util.c	2010-09-15 10:36:58 UTC (rev 17193)
@@ -32,6 +32,8 @@
 void myerror(struct All_variables *,char *);
 int layers(struct All_variables *,int,int);
 
+
+
 /* 
 
 assign boundary conditions to a horizontal layer of nodes on top and

Modified: mc/3D/CitcomS/trunk/lib/Convection.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Convection.c	2010-09-14 04:08:05 UTC (rev 17192)
+++ mc/3D/CitcomS/trunk/lib/Convection.c	2010-09-15 10:36:58 UTC (rev 17193)
@@ -34,6 +34,7 @@
 void set_convection_defaults(E)
      struct All_variables *E;
 {
+  /*
     void PG_timestep();
     void PG_timestep_init();
     void read_convection_settings();
@@ -42,7 +43,7 @@
     void convection_boundary_conditions();
     void convection_initial_fields();
     void twiddle_thumbs();
-
+  */
     E->control.CONVECTION = 1;
 
     E->advection.timestep = 0.0;

Modified: mc/3D/CitcomS/trunk/lib/Element_calculations.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Element_calculations.c	2010-09-14 04:08:05 UTC (rev 17192)
+++ mc/3D/CitcomS/trunk/lib/Element_calculations.c	2010-09-15 10:36:58 UTC (rev 17193)
@@ -320,7 +320,7 @@
       W[k]=g_point[k].weight[dims-1]*E->GDA[lev][m][el].vpt[k]*E->EVI[lev][m][off];
 #ifdef CITCOM_ALLOW_ANISOTROPIC_VISC
       /* allow for a possibly anisotropic viscosity */
-      get_constitutive(D[k],lev,m,off,rtf[1][k],rtf[2][k],E);
+      get_constitutive(D[k],lev,m,off,rtf[1][k],rtf[2][k],TRUE,E);
 #endif
     }
     

Modified: mc/3D/CitcomS/trunk/lib/General_matrix_functions.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/General_matrix_functions.c	2010-09-14 04:08:05 UTC (rev 17192)
+++ mc/3D/CitcomS/trunk/lib/General_matrix_functions.c	2010-09-15 10:36:58 UTC (rev 17193)
@@ -757,38 +757,6 @@
 }
 #endif /* !USE_CUDA */
 
-
-double cofactor(A,i,j,n)
-     double A[4][4];
-     int i,j,n;
-
-{ int k,l,p,q;
-  double determinant();
-
-  double B[4][4]; /* because of recursive behaviour of det/cofac, need to use
-			       new copy of B at each 'n' level of this routine */
-
-  if (n>3) printf("Error, no cofactors for matrix more than 3x3\n");
-
-  p=q=1;
-
-  for(k=1;k<=n;k++)    {
-     if(k==i) continue;
-     for(l=1;l<=n;l++)      {
-	   if (l==j) continue;
-           B[p][q]=A[k][l];
-	   q++ ;
-	   }
-     q=1;p++;
-     }
-
-
-  return(epsilon[i][j]*determinant(B,n-1));
-
-
-}
-
-
 /* Fast (conditional) determinant for 3x3 or 2x2 ... otherwise calls general routine */
 
 double determinant(A,n)
@@ -813,28 +781,7 @@
 }
 
 
-/* recursive function to determine matrix determinant */
 
-double gen_determinant(A,n)
-     double **A;
-     int n;
-
-{ double det;
-  double cofactor();
-
-  int i;
-
-
-  if(n==1) return(A[1][1]); /* need a way to break the recursion */
-
-  det=0.0;
-  for(i=1;i<=n;i++)
-    det += A[1][i]*cofactor(A,1,i,n);
-
-  return(det);
-}
-
-
 long double lg_pow(long double a, int n)
 {
     /* compute the value of "a" raised to the power of "n" */

Modified: mc/3D/CitcomS/trunk/lib/Instructions.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Instructions.c	2010-09-14 04:08:05 UTC (rev 17192)
+++ mc/3D/CitcomS/trunk/lib/Instructions.c	2010-09-15 10:36:58 UTC (rev 17193)
@@ -1762,7 +1762,7 @@
             fprintf(stderr, "wrong output_format, must be 'ascii', 'hdf5', 'ascii-gz' or 'vtk'\n");
             fprintf(E->fp, "wrong output_format, must be  'ascii', 'hdf5' 'ascii-gz', or 'vtk'\n");
         }
-        parallel_process_termination(E);
+        parallel_process_termination();
     }
 #else
     else {
@@ -1771,7 +1771,7 @@
             fprintf(stderr, "wrong output_format, must be 'ascii', 'hdf5', or 'vtk' (USE_GZDIR undefined)\n");
             fprintf(E->fp, "wrong output_format, must be 'ascii', 'hdf5', or 'vtk' (USE_GZDIR undefined)\n");
         }
-        parallel_process_termination(E);
+        parallel_process_termination();
     }
 #endif
 

Modified: mc/3D/CitcomS/trunk/lib/Obsolete.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Obsolete.c	2010-09-14 04:08:05 UTC (rev 17192)
+++ mc/3D/CitcomS/trunk/lib/Obsolete.c	2010-09-15 10:36:58 UTC (rev 17193)
@@ -1666,7 +1666,60 @@
 
     }
 
+/* recursive function to determine matrix determinant */
 
+double gen_determinant(A,n)
+     double **A;
+     int n;
+
+{ double det;
+
+  int i;
+
+
+  if(n==1) return(A[1][1]); /* need a way to break the recursion */
+
+  det=0.0;
+  for(i=1;i<=n;i++)
+    det += A[1][i]*cofactor(A,1,i,n);
+
+  return(det);
+}
+
+
+
+
+double cofactor(A,i,j,n)
+     double A[4][4];
+     int i,j,n;
+
+{ int k,l,p,q;
+  double determinant();
+
+  double B[4][4]; /* because of recursive behaviour of det/cofac, need to use
+			       new copy of B at each 'n' level of this routine */
+
+  if (n>3) printf("Error, no cofactors for matrix more than 3x3\n");
+
+  p=q=1;
+
+  for(k=1;k<=n;k++)    {
+     if(k==i) continue;
+     for(l=1;l<=n;l++)      {
+	   if (l==j) continue;
+           B[p][q]=A[k][l];
+	   q++ ;
+	   }
+     q=1;p++;
+     }
+
+
+  return(epsilon[i][j]*determinant(B,n-1));
+
+
+}
+
+
 /* version */
 /* $Id$ */
 

Modified: mc/3D/CitcomS/trunk/lib/Output.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Output.c	2010-09-14 04:08:05 UTC (rev 17192)
+++ mc/3D/CitcomS/trunk/lib/Output.c	2010-09-15 10:36:58 UTC (rev 17193)
@@ -552,7 +552,8 @@
 void output_seismic(struct All_variables *E, int cycles)
 {
     void get_prem(double, double*, double*, double*);
-    void compute_seismic_model(const struct All_variables*, double*, double*, double*);
+    void compute_seismic_model(struct All_variables*, 
+			       double*, double*, double*);
 
     char output_file[255];
     FILE* fp;

Modified: mc/3D/CitcomS/trunk/lib/Size_does_matter.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Size_does_matter.c	2010-09-14 04:08:05 UTC (rev 17192)
+++ mc/3D/CitcomS/trunk/lib/Size_does_matter.c	2010-09-15 10:36:58 UTC (rev 17193)
@@ -34,9 +34,9 @@
 double theta_g(double , struct All_variables *);
 #endif
 
-void twiddle_thumbs(yawn,scratch_groin)
+void twiddle_thumbs(yawn)
      struct All_variables *yawn;
-     int scratch_groin;
+     //     int scratch_groin;
 
 { /* Do nothing, just sit back and relax.
      Take it easy for a while, maybe size

Modified: mc/3D/CitcomS/trunk/lib/Solver_multigrid.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Solver_multigrid.c	2010-09-14 04:08:05 UTC (rev 17192)
+++ mc/3D/CitcomS/trunk/lib/Solver_multigrid.c	2010-09-15 10:36:58 UTC (rev 17193)
@@ -266,7 +266,6 @@
 	visc_from_gint_to_nodes(E,E->EVIn1[lv],viscU,lv);project_scalar(E,lv,viscU,viscD);visc_from_nodes_to_gint(E,viscD,E->EVIn1[sl_minus],sl_minus);
 	visc_from_gint_to_nodes(E,E->EVIn2[lv],viscU,lv);project_scalar(E,lv,viscU,viscD);visc_from_nodes_to_gint(E,viscD,E->EVIn2[sl_minus],sl_minus);
 	visc_from_gint_to_nodes(E,E->EVIn3[lv],viscU,lv);project_scalar(E,lv,viscU,viscD);visc_from_nodes_to_gint(E,viscD,E->EVIn3[sl_minus],sl_minus);
-	normalize_director_at_gint(E,E->EVIn1[sl_minus],E->EVIn2[sl_minus],E->EVIn3[sl_minus],sl_minus);
       }
       else if (E->viscosity.smooth_cycles==2)   {
 	visc_from_gint_to_ele(E,E->EVI[lv],viscU,lv); /* isotropic */
@@ -276,7 +275,6 @@
 	visc_from_gint_to_ele(E,E->EVIn1[lv],viscU,lv);inject_scalar_e(E,lv,viscU,E->EVIn1[sl_minus]);
 	visc_from_gint_to_ele(E,E->EVIn2[lv],viscU,lv);inject_scalar_e(E,lv,viscU,E->EVIn2[sl_minus]);
 	visc_from_gint_to_ele(E,E->EVIn3[lv],viscU,lv);inject_scalar_e(E,lv,viscU,E->EVIn3[sl_minus]);
-	normalize_director_at_gint(E,E->EVIn1[sl_minus],E->EVIn2[sl_minus],E->EVIn3[sl_minus],sl_minus);
       }
       else if (E->viscosity.smooth_cycles==3)   {
 	visc_from_gint_to_ele(E,E->EVI[lv],viscU,lv);/* isotropic */
@@ -287,7 +285,6 @@
 	visc_from_gint_to_ele(E,E->EVIn1[lv],viscU,lv);project_scalar_e(E,lv,viscU,viscD);visc_from_ele_to_gint(E,viscD,E->EVIn1[sl_minus],sl_minus);
 	visc_from_gint_to_ele(E,E->EVIn2[lv],viscU,lv);project_scalar_e(E,lv,viscU,viscD);visc_from_ele_to_gint(E,viscD,E->EVIn2[sl_minus],sl_minus);
 	visc_from_gint_to_ele(E,E->EVIn3[lv],viscU,lv);project_scalar_e(E,lv,viscU,viscD);visc_from_ele_to_gint(E,viscD,E->EVIn3[sl_minus],sl_minus);
-	normalize_director_at_gint(E,E->EVIn1[sl_minus],E->EVIn2[sl_minus],E->EVIn3[sl_minus],sl_minus);
       }
       else if (E->viscosity.smooth_cycles==0)  {
 	inject_scalar(E,lv,E->VI[lv],E->VI[sl_minus]);/* isotropic */
@@ -297,8 +294,8 @@
 	inject_scalar(E,lv,E->VIn1[lv],E->VIn1[sl_minus]);visc_from_nodes_to_gint(E,E->VIn1[sl_minus],E->EVIn1[sl_minus],sl_minus);
 	inject_scalar(E,lv,E->VIn2[lv],E->VIn2[sl_minus]);visc_from_nodes_to_gint(E,E->VIn2[sl_minus],E->EVIn2[sl_minus],sl_minus);
 	inject_scalar(E,lv,E->VIn3[lv],E->VIn3[sl_minus]);visc_from_nodes_to_gint(E,E->VIn3[sl_minus],E->EVIn3[sl_minus],sl_minus);
-	normalize_director_at_gint(E,E->EVIn1[sl_minus],E->EVIn2[sl_minus],E->EVIn3[sl_minus],sl_minus);
       }
+      normalize_director_at_gint(E,E->EVIn1[sl_minus],E->EVIn2[sl_minus],E->EVIn3[sl_minus],sl_minus);      
     }
   }else{
 #endif

Modified: mc/3D/CitcomS/trunk/lib/Topo_gravity.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Topo_gravity.c	2010-09-14 04:08:05 UTC (rev 17192)
+++ mc/3D/CitcomS/trunk/lib/Topo_gravity.c	2010-09-15 10:36:58 UTC (rev 17193)
@@ -30,7 +30,7 @@
 #include "element_definitions.h"
 #include "global_defs.h"
 
-void myerror(char *,struct All_variables *);
+void myerror(struct All_variables *, char *);
 void sphere_expansion(struct All_variables *, float **, float *, float *);
 void sum_across_depth_sph1(struct All_variables *, float *, float *);
 void broadcast_vertical(struct All_variables *, float *, float *, int);
@@ -367,48 +367,50 @@
       }
 #ifdef CITCOM_ALLOW_ANISOTROPIC_VISC
     if(E->viscosity.allow_anisotropic_viscosity){ /* general anisotropic */
-      for(j=1;j <= vpts;j++)   {
-	l1 = (e-1)*vpts+j;
+      for(i=1;i <= vpts;i++)   {
+	l1 = (e-1)*vpts+i;
 	/* 
 	   get viscosity matrix and convert to spherical system in
 	   CitcomS convection
 
 	*/
-	get_constitutive(D,E->mesh.levmax,m,l1,rtf[1][j],rtf[2][j],E);
+	get_constitutive(D,E->mesh.levmax,m,l1,rtf[1][i],rtf[2][i],TRUE,E);
 	
 	/* deviatoric stress, pressure will be added later */
-	eps[0] = Vxyz[1][j] - dilation[j]; /* strain-rates */
-	eps[1] = Vxyz[2][j] - dilation[j];
-	eps[2] = Vxyz[3][j] - dilation[j];
-	eps[3] = Vxyz[4][j];eps[4] = Vxyz[5][j];eps[5] = Vxyz[5][j];
+	eps[0] = Vxyz[1][i] - dilation[i]; /* strain-rates */
+	eps[1] = Vxyz[2][i] - dilation[i];
+	eps[2] = Vxyz[3][i] - dilation[i];
+	eps[3] = Vxyz[4][i];
+	eps[4] = Vxyz[5][i];
+	eps[5] = Vxyz[5][i];
 	for(l1=0;l1 < 6;l1++){	
 	  str[l1]=0.0;
 	  for(l2=0;l2 < 6;l2++)
 	    str[l1] += D[l1][l2] * eps[l2];
 	}
-	Sxx += pre[j] * str[0];
-	Syy += pre[j] * str[1];
-	Szz += pre[j] * str[2];
-	Sxy += pre[j] * str[3];
-	Sxz += pre[j] * str[4];
-	Szy += pre[j] * str[5];
+	Sxx += pre[i] * str[0];
+	Syy += pre[i] * str[1];
+	Szz += pre[i] * str[2];
+	Sxy += pre[i] * str[3];
+	Sxz += pre[i] * str[4];
+	Szy += pre[i] * str[5];
 	
-	div += Vxyz[7][j]*dOmega->vpt[j]; /* divergence */
-	vor += Vxyz[8][j]*dOmega->vpt[j]; /* vorticity */
+	div += Vxyz[7][i]*dOmega->vpt[i]; /* divergence */
+	vor += Vxyz[8][i]*dOmega->vpt[i]; /* vorticity */
       }
 
     }else{
 #endif
-      for(j=1;j <= vpts;j++)   {
+      for(i=1;i <= vpts;i++)   {
 	/* deviatoric stress, pressure will be added later */
-          Sxx += 2.0 * pre[j] * (Vxyz[1][j] - dilation[j]); /*  */
-          Syy += 2.0 * pre[j] * (Vxyz[2][j] - dilation[j]);
-          Szz += 2.0 * pre[j] * (Vxyz[3][j] - dilation[j]);
-          Sxy += pre[j] * Vxyz[4][j]; /*  */
-          Sxz += pre[j] * Vxyz[5][j];
-          Szy += pre[j] * Vxyz[6][j];
-          div += Vxyz[7][j]*dOmega->vpt[j]; /* divergence */
-          vor += Vxyz[8][j]*dOmega->vpt[j]; /* vorticity */
+          Sxx += 2.0 * pre[i] * (Vxyz[1][i] - dilation[i]); /*  */
+          Syy += 2.0 * pre[i] * (Vxyz[2][i] - dilation[i]);
+          Szz += 2.0 * pre[i] * (Vxyz[3][i] - dilation[i]);
+          Sxy += pre[i] * Vxyz[4][i]; /*  */
+          Sxz += pre[i] * Vxyz[5][i];
+          Szy += pre[i] * Vxyz[6][i];
+          div += Vxyz[7][i]*dOmega->vpt[i]; /* divergence */
+          vor += Vxyz[8][i]*dOmega->vpt[i]; /* vorticity */
       }
 #ifdef CITCOM_ALLOW_ANISOTROPIC_VISC
     }

Modified: mc/3D/CitcomS/trunk/lib/anisotropic_viscosity.h
===================================================================
--- mc/3D/CitcomS/trunk/lib/anisotropic_viscosity.h	2010-09-14 04:08:05 UTC (rev 17192)
+++ mc/3D/CitcomS/trunk/lib/anisotropic_viscosity.h	2010-09-15 10:36:58 UTC (rev 17193)
@@ -28,7 +28,7 @@
 void cross_product(double [3],double [3],double [3]);
 void get_constitutive_isotropic(double [6][6]);
 void get_constitutive(double [6][6], int , int , int , double , double , 
-		      struct All_variables *);
+		      int,struct All_variables *);
 
 #define __CITCOM_READ_ANIVISC_HEADER__
 #endif

Modified: mc/3D/CitcomS/trunk/lib/global_defs.h
===================================================================
--- mc/3D/CitcomS/trunk/lib/global_defs.h	2010-09-14 04:08:05 UTC (rev 17192)
+++ mc/3D/CitcomS/trunk/lib/global_defs.h	2010-09-15 10:36:58 UTC (rev 17193)
@@ -818,27 +818,27 @@
     struct Shape_function1_dx Lx;
     struct Shape_function_dx NMx;
 
-    void (* build_forcing_term)(void*);
-    void (* iterative_solver)(void*);
-    void (* next_buoyancy_field)(void*);
-    void (* next_buoyancy_field_init)(void*);
-    void (* obtain_gravity)(void*);
-    void (* problem_settings)(void*);
-    void (* problem_derived_values)(void*);
-    void (* problem_allocate_vars)(void*);
-    void (* problem_boundary_conds)(void*);
-    void (* problem_update_node_positions)(void*);
-    void (* problem_initial_fields)(void*);
-    void (* problem_tracer_setup)(void*);
-    void (* problem_tracer_output)(void*, int);
-    void (* problem_update_bcs)(void*);
-    void (* special_process_new_velocity)(void*);
-    void (* special_process_new_buoyancy)(void*);
-    void (* solve_stokes_problem)(void*);
-    void (* solver_allocate_vars)(void*);
-    void (* transform)(void*);
+    void (* build_forcing_term)(struct All_variables *);
+    void (* iterative_solver)(struct All_variables *);
+    void (* next_buoyancy_field)(struct All_variables *);
+    void (* next_buoyancy_field_init)(struct All_variables *);
+    void (* obtain_gravity)(struct All_variables *);
+    void (* problem_settings)(struct All_variables *);
+    void (* problem_derived_values)(struct All_variables *);
+    void (* problem_allocate_vars)(struct All_variables *);
+    void (* problem_boundary_conds)(struct All_variables *);
+    void (* problem_update_node_positions)(struct All_variables *);
+    void (* problem_initial_fields)(struct All_variables *);
+    void (* problem_tracer_setup)(struct All_variables *);
+    void (* problem_tracer_output)(struct All_variables *, int);
+    void (* problem_update_bcs)(struct All_variables *);
+    void (* spec68ial_process_new_velocity)(struct All_variables *);
+    void (* special_process_new_buoyancy)(struct All_variables *);
+    void (* solve_stokes_problem)(struct All_variables *);
+    void (* solver_allocate_vars)(struct All_variables *);
+    void (* transform)(struct All_variables *);
 
-    float (* node_space_function[3])(void*);
+    float (* node_space_function[3])(struct All_variables *);
 
     /* function pointer for choosing between various output routines */
     void (* problem_output)(struct All_variables *, int);
@@ -846,7 +846,7 @@
   /* the following function pointers are for exchanger */
   void (* exchange_node_d)(struct All_variables *, double**, int);
   void (* exchange_node_f)(struct All_variables *, float**, int);
-  void (* temperatures_conform_bcs)(void*);
+  void (* temperatures_conform_bcs)(struct All_variables *);
 
 };
 
@@ -856,5 +856,5 @@
 
 
 
-
+#include "prototypes.h"
 #endif

Added: mc/3D/CitcomS/trunk/lib/prototypes.h
===================================================================
--- mc/3D/CitcomS/trunk/lib/prototypes.h	                        (rev 0)
+++ mc/3D/CitcomS/trunk/lib/prototypes.h	2010-09-15 10:36:58 UTC (rev 17193)
@@ -0,0 +1,439 @@
+/* Advection_diffusion.c */
+void advection_diffusion_parameters(struct All_variables *);
+void advection_diffusion_allocate_memory(struct All_variables *);
+void PG_timestep_init(struct All_variables *);
+void PG_timestep(struct All_variables *);
+void std_timestep(struct All_variables *);
+void PG_timestep_solve(struct All_variables *);
+/* Anisotropic_viscosity.c */
+/* BC_util.c */
+void horizontal_bc(struct All_variables *, float *[], int, int, float, unsigned int, char, int, int);
+void internal_horizontal_bc(struct All_variables *, float *[], int, int, float, unsigned int, char, int, int);
+void strip_bcs_from_residual(struct All_variables *, double **, int);
+void temperatures_conform_bcs(struct All_variables *);
+void temperatures_conform_bcs2(struct All_variables *);
+void velocities_conform_bcs(struct All_variables *, double **);
+void assign_internal_bc(struct All_variables *, int);
+/* Checkpoints.c */
+void output_checkpoint(struct All_variables *);
+void read_checkpoint(struct All_variables *);
+/* Citcom_init.c */
+void citcom_finalize(struct All_variables *, int);
+/* Composition_related.c */
+void composition_input(struct All_variables *);
+void composition_setup(struct All_variables *);
+void write_composition_instructions(struct All_variables *);
+void fill_composition(struct All_variables *);
+void init_composition(struct All_variables *);
+void map_composition_to_nodes(struct All_variables *);
+void get_bulk_composition(struct All_variables *);
+/* Construct_arrays.c */
+void construct_ien(struct All_variables *);
+void construct_surface(struct All_variables *);
+void construct_id(struct All_variables *);
+void get_bcs_id_for_residual(struct All_variables *, int, int);
+void construct_lm(struct All_variables *);
+void construct_node_maps(struct All_variables *);
+void construct_node_ks(struct All_variables *);
+void rebuild_BI_on_boundary(struct All_variables *);
+void construct_masks(struct All_variables *);
+void construct_sub_element(struct All_variables *);
+void construct_elt_ks(struct All_variables *);
+void construct_elt_gs(struct All_variables *);
+void construct_elt_cs(struct All_variables *);
+void construct_stiffness_B_matrix(struct All_variables *);
+int layers_r(struct All_variables *, float);
+int layers(struct All_variables *, int, int);
+void construct_mat_group(struct All_variables *);
+/* Convection.c */
+void set_convection_defaults(struct All_variables *);
+void read_convection_settings(struct All_variables *);
+void convection_derived_values(struct All_variables *);
+void convection_allocate_memory(struct All_variables *);
+void convection_initial_fields(struct All_variables *);
+void convection_boundary_conditions(struct All_variables *);
+/* Determine_net_rotation.c */
+double determine_model_net_rotation(struct All_variables *, double *);
+double determine_netr_tp(float, float, float, float, float, int, double *, double *);
+void sub_netr(float, float, float, float *, float *, double *);
+/* Drive_solvers.c */
+void general_stokes_solver_setup(struct All_variables *);
+void general_stokes_solver(struct All_variables *);
+int need_visc_update(struct All_variables *);
+int need_to_iterate(struct All_variables *);
+void general_stokes_solver_pseudo_surf(struct All_variables *);
+/* Element_calculations.c */
+void assemble_forces(struct All_variables *, int);
+void get_ba(struct Shape_function *, struct Shape_function_dx *, struct CC *, struct CCX *, double [4][9], int, double [9][9][4][7]);
+void get_ba_p(struct Shape_function *, struct Shape_function_dx *, struct CC *, struct CCX *, double [4][9], int, double [9][9][4][7]);
+void get_elt_k(struct All_variables *, int, double [24*24], int, int, int);
+void assemble_del2_u(struct All_variables *, double **, double **, int, int);
+void e_assemble_del2_u(struct All_variables *, double **, double **, int, int);
+void n_assemble_del2_u(struct All_variables *, double **, double **, int, int);
+void build_diagonal_of_K(struct All_variables *, int, double [24*24], int, int);
+void build_diagonal_of_Ahat(struct All_variables *);
+void assemble_c_u(struct All_variables *, double **, double **, int);
+void assemble_div_rho_u(struct All_variables *, double **, double **, int);
+void assemble_div_u(struct All_variables *, double **, double **, int);
+void assemble_grad_p(struct All_variables *, double **, double **, int);
+double assemble_dAhatp_entry(struct All_variables *, int, int, int);
+void get_elt_c(struct All_variables *, int, higher_precision [24][1], int, int);
+void get_elt_g(struct All_variables *, int, higher_precision [24][1], int, int);
+void get_elt_f(struct All_variables *, int, double [24], int, int);
+void get_aug_k(struct All_variables *, int, double [24*24], int, int);
+/* Full_boundary_conditions.c */
+void full_velocity_boundary_conditions(struct All_variables *);
+void full_temperature_boundary_conditions(struct All_variables *);
+/* Full_geometry_cartesian.c */
+void full_set_2dc_defaults(struct All_variables *);
+void full_set_2pt5dc_defaults(struct All_variables *);
+void full_set_3dc_defaults(struct All_variables *);
+void full_set_3dsphere_defaults(struct All_variables *);
+/* Full_lith_age_read_files.c */
+void full_lith_age_read_files(struct All_variables *, int);
+/* Full_parallel_related.c */
+void full_parallel_processor_setup(struct All_variables *);
+void full_parallel_domain_decomp0(struct All_variables *);
+void full_parallel_domain_boundary_nodes(struct All_variables *);
+void full_parallel_communication_routs_v(struct All_variables *);
+void full_parallel_communication_routs_s(struct All_variables *);
+void full_exchange_id_d(struct All_variables *, double **, int);
+void full_exchange_snode_f(struct All_variables *, float **, float **, int);
+/* Full_read_input_from_files.c */
+void full_read_input_files_for_timesteps(struct All_variables *, int, int);
+/* Full_solver.c */
+void full_solver_init(struct All_variables *);
+/* Full_sphere_related.c */
+void spherical_to_uv2(double [2], int, double *, double *, double *, double *);
+void uv_to_spherical(double [2], int, double *, double *, double *, double *);
+void full_coord_of_cap(struct All_variables *, int, int);
+/* Full_tracer_advection.c */
+void full_tracer_input(struct All_variables *);
+void full_tracer_setup(struct All_variables *);
+void full_lost_souls(struct All_variables *);
+void full_get_shape_functions(struct All_variables *, double [9], int, double, double, double);
+double full_interpolate_data(struct All_variables *, double [9], double [9]);
+void full_get_velocity(struct All_variables *, int, int, double, double, double, double *);
+int full_icheck_cap(struct All_variables *, int, double, double, double, double);
+int full_iget_element(struct All_variables *, int, int, double, double, double, double, double, double);
+void full_keep_within_bounds(struct All_variables *, double *, double *, double *, double *, double *, double *);
+void analytical_test(struct All_variables *);
+void analytical_runge_kutte(struct All_variables *, int, double, double *, double *, double *, double *, double *);
+void analytical_test_function(struct All_variables *, double, double, double, double *, double *);
+void pdebug(struct All_variables *, int);
+/* Full_version_dependent.c */
+void full_node_locations(struct All_variables *);
+void full_construct_boundary(struct All_variables *);
+/* General_matrix_functions.c */
+int solve_del2_u(struct All_variables *, double **, double **, double, int);
+double multi_grid(struct All_variables *, double **, double **, double, int);
+double conj_grad(struct All_variables *, double **, double **, double, int *, int);
+void element_gauss_seidel(struct All_variables *, double **, double **, double **, double, int *, int, int);
+void gauss_seidel(struct All_variables *, double **, double **, double **, double, int *, int, int);
+
+double determinant(double [4][4], int);
+long double lg_pow(long double, int);
+/* Ggrd_handling.c */
+/* Global_operations.c */
+void remove_horiz_ave(struct All_variables *, double **, double *, int);
+void remove_horiz_ave2(struct All_variables *, double **);
+void return_horiz_ave(struct All_variables *, double **, double *);
+void return_horiz_ave_f(struct All_variables *, float **, float *);
+void return_elementwise_horiz_ave(struct All_variables *, double **, double *);
+float return_bulk_value(struct All_variables *, float **, int);
+double return_bulk_value_d(struct All_variables *, double **, int);
+float find_max_horizontal(struct All_variables *, double);
+void sum_across_surface(struct All_variables *, float *, int);
+void sum_across_surf_sph1(struct All_variables *, float *, float *);
+float global_fvdot(struct All_variables *, float **, float **, int);
+double kineticE_radial(struct All_variables *, double **, int);
+double global_vdot(struct All_variables *, double **, double **, int);
+double global_pdot(struct All_variables *, double **, double **, int);
+double global_v_norm2(struct All_variables *, double **);
+double global_p_norm2(struct All_variables *, double **);
+double global_div_norm2(struct All_variables *, double **);
+double global_tdot_d(struct All_variables *, double **, double **, int);
+float global_tdot(struct All_variables *, float **, float **, int);
+float global_fmin(struct All_variables *, double);
+double global_dmax(struct All_variables *, double);
+float global_fmax(struct All_variables *, double);
+double Tmaxd(struct All_variables *, double **);
+float Tmax(struct All_variables *, float **);
+double vnorm_nonnewt(struct All_variables *, double **, double **, int);
+void sum_across_depth_sph1(struct All_variables *, float *, float *);
+void broadcast_vertical(struct All_variables *, float *, float *, int);
+void remove_rigid_rot(struct All_variables *);
+/* Initial_temperature.c */
+void tic_input(struct All_variables *);
+void convection_initial_temperature(struct All_variables *);
+/* Instructions.c */
+void initial_mesh_solver_setup(struct All_variables *);
+void read_instructions(struct All_variables *, char *);
+void initial_setup(struct All_variables *);
+void initialize_material(struct All_variables *);
+void initial_conditions(struct All_variables *);
+void read_initial_settings(struct All_variables *);
+void check_settings_consistency(struct All_variables *);
+void global_derived_values(struct All_variables *);
+void allocate_common_vars(struct All_variables *);
+void allocate_velocity_vars(struct All_variables *);
+void global_default_values(struct All_variables *);
+void check_bc_consistency(struct All_variables *);
+void set_up_nonmg_aliases(struct All_variables *, int);
+void report(struct All_variables *, char *);
+void record(struct All_variables *, char *);
+void common_initial_fields(struct All_variables *);
+void initial_pressure(struct All_variables *);
+void initial_velocity(struct All_variables *);
+void open_qfiles(struct All_variables *);
+void mkdatadir(const char *);
+void output_init(struct All_variables *);
+void output_finalize(struct All_variables *);
+char *strip(char *);
+/* Interuption.c */
+void interuption(int);
+void set_signal(void);
+/* Lith_age.c */
+void lith_age_input(struct All_variables *);
+void lith_age_init(struct All_variables *);
+void lith_age_construct_tic(struct All_variables *);
+void lith_age_update_tbc(struct All_variables *);
+void lith_age_temperature_bound_adj(struct All_variables *, int);
+void lith_age_conform_tbc(struct All_variables *);
+void assimilate_lith_conform_bcs(struct All_variables *);
+/* Material_properties.c */
+void mat_prop_allocate(struct All_variables *);
+void reference_state(struct All_variables *);
+/* Mineral_physics_models.c */
+void get_prem(double, double *, double *, double *);
+void compute_seismic_model(struct All_variables *, double *, double *, double *);
+/* Nodal_mesh.c */
+void v_from_vector(struct All_variables *);
+void assign_v_to_vector(struct All_variables *);
+void v_from_vector_pseudo_surf(struct All_variables *);
+void velo_from_element(struct All_variables *, float [4][9], int, int, int);
+void velo_from_element_d(struct All_variables *, double [4][9], int, int, int);
+void p_to_nodes(struct All_variables *, double **, float **, int);
+void visc_from_gint_to_nodes(struct All_variables *, float **, float **, int);
+void visc_from_nodes_to_gint(struct All_variables *, float **, float **, int);
+void visc_from_gint_to_ele(struct All_variables *, float **, float **, int);
+void visc_from_ele_to_gint(struct All_variables *, float **, float **, int);
+
+
+/* Output.c */
+void output_common_input(struct All_variables *);
+void output(struct All_variables *, int);
+FILE *output_open(char *, char *);
+void output_coord(struct All_variables *);
+void output_domain(struct All_variables *);
+void output_coord_bin(struct All_variables *);
+void output_visc(struct All_variables *, int);
+void output_velo(struct All_variables *, int);
+void output_surf_botm(struct All_variables *, int);
+void output_geoid(struct All_variables *, int);
+void output_stress(struct All_variables *, int);
+void output_horiz_avg(struct All_variables *, int);
+void output_seismic(struct All_variables *, int);
+void output_mat(struct All_variables *);
+void output_pressure(struct All_variables *, int);
+void output_tracer(struct All_variables *, int);
+void output_comp_nd(struct All_variables *, int);
+void output_comp_el(struct All_variables *, int);
+void output_heating(struct All_variables *, int);
+void output_time(struct All_variables *, int);
+/* Output_gzdir.c */
+/* Output_h5.c */
+void h5output_allocate_memory(struct All_variables *);
+void h5output(struct All_variables *, int);
+void h5input_params(struct All_variables *);
+/* Output_vtk.c */
+void vtk_output(struct All_variables *, int);
+/* Pan_problem_misc_functions.c */
+int get_process_identifier(void);
+void unique_copy_file(struct All_variables *, char *, char *);
+void apply_side_sbc(struct All_variables *);
+void get_buoyancy(struct All_variables *, double **);
+int read_double_vector(FILE *, int, double *);
+void read_visc_param_from_file(struct All_variables *, const char *, float *, FILE *);
+double myatan(double, double);
+double return1_test(void);
+void rtp2xyzd(double, double, double, double *);
+void rtp2xyz(float, float, float, float *);
+void xyz2rtp(float, float, float, float *);
+void xyz2rtpd(float, float, float, double *);
+void calc_cbase_at_tp(float, float, float *);
+void calc_cbase_at_tp_d(double, double, double *);
+void calc_cbase_at_node(int, int, float *, struct All_variables *);
+void convert_pvec_to_cvec(float, float, float, float *, float *);
+void convert_pvec_to_cvec_d(double, double, double, double *, double *);
+void *safe_malloc(size_t);
+void myerror(struct All_variables *, char *);
+void get_r_spacing_fine(double *, struct All_variables *);
+void get_r_spacing_at_levels(double *, struct All_variables *);
+/* Parallel_util.c */
+void parallel_process_finalize(void);
+void parallel_process_termination(void);
+void parallel_process_sync(struct All_variables *);
+double CPU_time0(void);
+/* Parsing.c */
+void setup_parser(struct All_variables *, char *);
+void shutdown_parser(struct All_variables *);
+void add_to_parameter_list(char *, char *);
+int compute_parameter_hash_table(char *);
+int input_int(char *, int *, char *, int);
+int input_string(char *, char *, char *, int);
+int input_boolean(char *, int *, char *, int);
+int input_float(char *, float *, char *, int);
+int input_double(char *, double *, char *, int);
+int input_int_vector(char *, int, int *, int);
+int input_char_vector(char *, int, char *, int);
+int input_float_vector(char *, int, float *, int);
+int input_double_vector(char *, int, double *, int);
+int interpret_control_string(char *, int *, double *, double *, double *);
+/* Phase_change.c */
+void phase_change_allocate(struct All_variables *);
+void phase_change_input(struct All_variables *);
+void phase_change_apply_410(struct All_variables *, double **);
+void phase_change_apply_670(struct All_variables *, double **);
+void phase_change_apply_cmb(struct All_variables *, double **);
+/* Problem_related.c */
+void read_velocity_boundary_from_file(struct All_variables *);
+void read_mat_from_file(struct All_variables *);
+void read_temperature_boundary_from_file(struct All_variables *);
+void get_initial_elapsed_time(struct All_variables *);
+void set_elapsed_time(struct All_variables *);
+void set_starting_age(struct All_variables *);
+float find_age_in_MY(struct All_variables *);
+/* Process_buoyancy.c */
+void post_processing(struct All_variables *);
+void heat_flux(struct All_variables *);
+void compute_horiz_avg(struct All_variables *);
+/* Regional_boundary_conditions.c */
+void regional_velocity_boundary_conditions(struct All_variables *);
+void regional_temperature_boundary_conditions(struct All_variables *);
+/* Regional_geometry_cartesian.c */
+void regional_set_2dc_defaults(struct All_variables *);
+void regional_set_2pt5dc_defaults(struct All_variables *);
+void regional_set_3dc_defaults(struct All_variables *);
+void regional_set_3dsphere_defaults(struct All_variables *);
+/* Regional_lith_age_read_files.c */
+void regional_lith_age_read_files(struct All_variables *, int);
+
+/* Regional_parallel_related.c */
+void regional_parallel_processor_setup(struct All_variables *);
+void regional_parallel_domain_decomp0(struct All_variables *);
+void regional_parallel_domain_boundary_nodes(struct All_variables *);
+void regional_parallel_communication_routs_v(struct All_variables *);
+void regional_parallel_communication_routs_s(struct All_variables *);
+void regional_exchange_id_d(struct All_variables *, double **, int);
+void regional_exchange_snode_f(struct All_variables *, float **, float **, int);
+/* Regional_read_input_from_files.c */
+void regional_read_input_files_for_timesteps(struct All_variables *, int, int);
+/* Regional_solver.c */
+void regional_solver_init(struct All_variables *);
+/* Regional_sphere_related.c */
+void regional_coord_of_cap(struct All_variables *, int, int);
+/* Regional_tracer_advection.c */
+void regional_tracer_setup(struct All_variables *);
+int regional_iget_element(struct All_variables *, int, int, double, double, double, double, double, double);
+int isearch_all(double *, int, double);
+int isearch_neighbors(double *, int, double, int);
+int regional_icheck_cap(struct All_variables *, int, double, double, double, double);
+void regional_get_shape_functions(struct All_variables *, double [9], int, double, double, double);
+double regional_interpolate_data(struct All_variables *, double [9], double [9]);
+void regional_get_velocity(struct All_variables *, int, int, double, double, double, double *);
+void regional_keep_within_bounds(struct All_variables *, double *, double *, double *, double *, double *, double *);
+void regional_lost_souls(struct All_variables *);
+/* Regional_version_dependent.c */
+void regional_node_locations(struct All_variables *);
+void regional_construct_boundary(struct All_variables *);
+/* Shape_functions.c */
+void construct_shape_functions(struct All_variables *);
+double lpoly(int, double);
+double lpolydash(int, double);
+/* Size_does_matter.c */
+void twiddle_thumbs(struct All_variables *);
+void construct_shape_function_derivatives(struct All_variables *);
+void get_rtf_at_vpts(struct All_variables *, int, int, int, double [4][9]);
+void get_rtf_at_ppts(struct All_variables *, int, int, int, double [4][9]);
+void get_side_x_cart(struct All_variables *, double [4][5], int, int, int);
+void construct_surf_det(struct All_variables *);
+void construct_bdry_det(struct All_variables *);
+void get_global_1d_shape_fn(struct All_variables *, int, struct Shape_function1 *, struct Shape_function1_dA *, int, int);
+void get_global_1d_shape_fn_L(struct All_variables *, int, struct Shape_function1 *, struct Shape_function1_dA *, int, int);
+void get_global_side_1d_shape_fn(struct All_variables *, int, struct Shape_function1 *, struct Shape_function1_dx *, struct Shape_function_side_dA *, int, int);
+void construct_c3x3matrix_el(struct All_variables *, int, struct CC *, struct CCX *, int, int, int);
+void construct_side_c3x3matrix_el(struct All_variables *, int, struct CC *, struct CCX *, int, int, int, int);
+void construct_c3x3matrix(struct All_variables *);
+void mass_matrix(struct All_variables *);
+/* Solver_conj_grad.c */
+void set_cg_defaults(struct All_variables *);
+void cg_allocate_vars(struct All_variables *);
+void assemble_forces_iterative(struct All_variables *);
+/* Solver_multigrid.c */
+void set_mg_defaults(struct All_variables *);
+void mg_allocate_vars(struct All_variables *);
+void inject_scalar(struct All_variables *, int, float **, float **);
+void inject_vector(struct All_variables *, int, double **, double **);
+void un_inject_vector(struct All_variables *, int, double **, double **);
+void interp_vector(struct All_variables *, int, double **, double **);
+void project_viscosity(struct All_variables *);
+void inject_scalar_e(struct All_variables *, int, float **, float **);
+void project_scalar_e(struct All_variables *, int, float **, float **);
+void project_scalar(struct All_variables *, int, float **, float **);
+void project_vector(struct All_variables *, int, double **, double **, int);
+void from_xyz_to_rtf(struct All_variables *, int, double **, double **);
+void from_rtf_to_xyz(struct All_variables *, int, double **, double **);
+void fill_in_gaps(struct All_variables *, double **, int);
+/* Sphere_harmonics.c */
+void set_sphere_harmonics(struct All_variables *);
+double modified_plgndr_a(int, int, double);
+void sphere_expansion(struct All_variables *, float **, float *, float *);
+void debug_sphere_expansion(struct All_variables *);
+/* Sphere_util.c */
+void even_divide_arc12(int, double, double, double, double, double, double, double *, double *);
+void compute_angle_surf_area(struct All_variables *);
+double area_sphere_cap(double [6]);
+double area_of_sphere_triag(double, double, double);
+double area_of_5points(struct All_variables *, int, int, int, double [4], int);
+void get_angle_sphere_cap(double [4][5], double [6]);
+double get_angle(double [4], double [4]);
+/* Stokes_flow_Incomp.c */
+void solve_constrained_flow_iterative(struct All_variables *);
+/* Topo_gravity.c */
+void get_STD_topo(struct All_variables *, float **, float **, float **, float **, int);
+void get_STD_freesurf(struct All_variables *, float **);
+void allocate_STD_mem(struct All_variables *, float **, float **, float **, float **, float **, float **, float **, float **);
+void free_STD_mem(struct All_variables *, float **, float **, float **, float **, float **, float **, float **, float **);
+void compute_nodal_stress(struct All_variables *, float **, float **, float **, float **, float **, float **, float **, float **);
+void stress_conform_bcs(struct All_variables *);
+void compute_geoid(struct All_variables *);
+void get_CBF_topo(struct All_variables *, float **, float **);
+/* Tracer_setup.c */
+void tracer_input(struct All_variables *);
+void tracer_initial_settings(struct All_variables *);
+void tracer_advection(struct All_variables *);
+void tracer_post_processing(struct All_variables *);
+void count_tracers_of_flavors(struct All_variables *);
+void initialize_tracers(struct All_variables *);
+void cart_to_sphere(struct All_variables *, double, double, double, double *, double *, double *);
+void sphere_to_cart(struct All_variables *, double, double, double, double *, double *, double *);
+void get_neighboring_caps(struct All_variables *);
+void allocate_tracer_arrays(struct All_variables *, int, int);
+void expand_tracer_arrays(struct All_variables *, int);
+void expand_later_array(struct All_variables *, int);
+int icheck_processor_shell(struct All_variables *, int, double);
+int icheck_that_processor_shell(struct All_variables *, int, int, double);
+/* Viscosity_structures.c */
+void viscosity_system_input(struct All_variables *);
+void viscosity_input(struct All_variables *);
+void allocate_visc_vars(struct All_variables *);
+void get_system_viscosity(struct All_variables *, int, float **, float **);
+void initial_viscosity(struct All_variables *);
+void visc_from_mat(struct All_variables *, float **);
+void read_visc_layer_file(struct All_variables *);
+void visc_from_T(struct All_variables *, float **, int);
+void visc_from_S(struct All_variables *, float **, int);
+void visc_from_P(struct All_variables *, float **);
+void visc_from_C(struct All_variables *, float **);
+void strain_rate_2_inv(struct All_variables *, int, float *, int);



More information about the CIG-COMMITS mailing list