[cig-commits] r18786 - in mc/3D/CitcomS/branches/eheien_dev: . bin lib module visual

emheien at geodynamics.org emheien at geodynamics.org
Wed Jul 20 13:03:59 PDT 2011


Author: emheien
Date: 2011-07-20 13:03:59 -0700 (Wed, 20 Jul 2011)
New Revision: 18786

Modified:
   mc/3D/CitcomS/branches/eheien_dev/bin/Citcom.c
   mc/3D/CitcomS/branches/eheien_dev/configure.ac
   mc/3D/CitcomS/branches/eheien_dev/lib/Advection_diffusion.c
   mc/3D/CitcomS/branches/eheien_dev/lib/BC_util.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Construct_arrays.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Convection.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Element_calculations.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Full_boundary_conditions.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Full_geometry_cartesian.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Full_parallel_related.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Full_read_input_from_files.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Full_sphere_related.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Full_tracer_advection.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Full_version_dependent.c
   mc/3D/CitcomS/branches/eheien_dev/lib/General_matrix_functions.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Global_operations.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Instructions.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Mineral_physics_models.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Nodal_mesh.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Output.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Output_gzdir.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Output_vtk.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Pan_problem_misc_functions.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Parsing.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Problem_related.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Process_buoyancy.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Regional_boundary_conditions.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Regional_geometry_cartesian.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Regional_parallel_related.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Regional_read_input_from_files.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Regional_sphere_related.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Regional_version_dependent.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Shape_functions.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Size_does_matter.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Solver_conj_grad.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Solver_multigrid.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Sphere_harmonics.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Sphere_util.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Stokes_flow_Incomp.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Topo_gravity.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Tracer_setup.c
   mc/3D/CitcomS/branches/eheien_dev/lib/Viscosity_structures.c
   mc/3D/CitcomS/branches/eheien_dev/lib/advection_diffusion.h
   mc/3D/CitcomS/branches/eheien_dev/lib/citcom_init.h
   mc/3D/CitcomS/branches/eheien_dev/lib/drive_solvers.h
   mc/3D/CitcomS/branches/eheien_dev/lib/global_defs.h
   mc/3D/CitcomS/branches/eheien_dev/lib/output.h
   mc/3D/CitcomS/branches/eheien_dev/lib/output_h5.h
   mc/3D/CitcomS/branches/eheien_dev/lib/parallel_related.h
   mc/3D/CitcomS/branches/eheien_dev/lib/prototypes.h
   mc/3D/CitcomS/branches/eheien_dev/module/misc.c
   mc/3D/CitcomS/branches/eheien_dev/visual/project_geoid.c
Log:
Fixed C++ related compilation errors, confirmed code behaves like previous version


Modified: mc/3D/CitcomS/branches/eheien_dev/bin/Citcom.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/bin/Citcom.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/bin/Citcom.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -42,9 +42,7 @@
 
 void solver_init(struct All_variables *E);
 
-int main(argc,argv)
-     int argc;
-     char **argv;
+int main(int argc, char **argv)
 
 {	/* Functions called by main*/
   void general_stokes_solver();

Modified: mc/3D/CitcomS/branches/eheien_dev/configure.ac
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/configure.ac	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/configure.ac	2011-07-20 20:03:59 UTC (rev 18786)
@@ -71,6 +71,9 @@
 AC_PROG_CC([mpicc hcc mpcc mpcc_r mpxlc cmpicc gcc cc cl icc ecc pgcc xlc xlc_r])
 AC_PROG_CXX([mpicxx mpic++ mpiCC hcp mpCC mpxlC mpxlC_r cmpic++ g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlc++_r xlC_r xlC icpc ecpc pgCC])
 
+CC="$CXX"
+CFLAGS="$CXXFLAGS"
+
 # Checking a system header here so that CPP is always defined
 AC_CHECK_HEADERS([malloc.h])
 

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Advection_diffusion.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Advection_diffusion.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Advection_diffusion.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -143,7 +143,6 @@
 {
     int i,d,n,nel,el,node,m;
 
-    float global_fmin();
     void velo_from_element();
 
     float adv_timestep;
@@ -246,7 +245,7 @@
           process_heating(E, psc_pass);
 
         /* XXX: replace inputdiff with refstate.thermal_conductivity */
-	pg_solver(E,E->T,E->Tdot,DTdot,&(E->convection.heat_sources),E->control.inputdiff,1,E->node);
+	pg_solver(E,E->T,E->Tdot,DTdot,(SOURCES*)&(E->convection.heat_sources),E->control.inputdiff,1,E->node);
 	corrector(E,E->T,E->Tdot,DTdot);
 	temperatures_conform_bcs(E);
       }
@@ -320,8 +319,6 @@
   float diff_timestep, ts;
   int m, el, d;
 
-  float global_fmin();
-
   diff_timestep = 1.0e8;
   for(m=1;m<=E->sphere.caps_per_proc;m++)
     for(el=1;el<=E->lmesh.nel;el++)  {

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/BC_util.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/BC_util.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/BC_util.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -27,6 +27,8 @@
  */
 
 #include "global_defs.h"
+#include <math.h>
+
 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 myerror(struct All_variables *,char *);
@@ -86,10 +88,7 @@
 }
 
 
-void strip_bcs_from_residual(E,Res,level)
-    struct All_variables *E;
-    double **Res;
-    int level;
+void strip_bcs_from_residual(struct All_variables *E, double **Res, int level)
 {
     int m,i;
 
@@ -102,8 +101,7 @@
 }
 
 
-void temperatures_conform_bcs(E)
-     struct All_variables *E;
+void temperatures_conform_bcs(struct All_variables *E)
 {
   void temperatures_conform_bcs2(struct All_variables *);
   void assimilate_lith_conform_bcs2(struct All_variables *);
@@ -121,8 +119,7 @@
 }
 
 
-void temperatures_conform_bcs2(E)
-     struct All_variables *E;
+void temperatures_conform_bcs2(struct All_variables *E)
 {
   int j,node;
   unsigned int type;
@@ -166,9 +163,7 @@
 }
 
 
-void velocities_conform_bcs(E,U)
-    struct All_variables *E;
-    double **U;
+void velocities_conform_bcs(struct All_variables *E, double **U)
 {
     int node,m;
 

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Construct_arrays.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Construct_arrays.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Construct_arrays.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -42,8 +42,7 @@
   it should be done through a pre-calculated lookup table.
   ======================================================== */
 
-void construct_ien(E)
-     struct All_variables *E;
+void construct_ien(struct All_variables *E)
 
 {
   int lev,p,q,r,rr,j;
@@ -136,8 +135,7 @@
   Function to make the ID array for above case
   ============================================ */
 
-void construct_id(E)
-     struct All_variables *E;
+void construct_id(struct All_variables *E)
 {
     int i,j,k;
     int eqn_count,node,nno;
@@ -199,9 +197,7 @@
 
 
 
-void get_bcs_id_for_residual(E,level,m)
-    struct All_variables *E;
-    int level,m;
+void get_bcs_id_for_residual(struct All_variables *E, int level, int m)
   {
 
     int i,j;
@@ -233,8 +229,7 @@
   Function to construct  the LM array from the ID and IEN arrays
   ========================================================== */
 
-void construct_lm(E)
-     struct All_variables *E;
+void construct_lm(struct All_variables *E)
 {
   int i,j,a,e;
   int lev,eqn_no;
@@ -251,8 +246,7 @@
    Function to build the local node matrix indexing maps
    ===================================================== */
 
-void construct_node_maps(E)
-    struct All_variables *E;
+void construct_node_maps(struct All_variables *E)
 {
     double time1,CPU_time0();
 
@@ -328,8 +322,7 @@
 }
 
 
-void construct_node_ks(E)
-     struct All_variables *E;
+void construct_node_ks(struct All_variables *E)
 {
     int m,level,i,j,k,e;
     int node,node1,eqn1,eqn2,eqn3,loc0,loc1,loc2,loc3,found,element,index,pp,qq;
@@ -476,8 +469,7 @@
     return;
 }
 
-void rebuild_BI_on_boundary(E)
-     struct All_variables *E;
+void rebuild_BI_on_boundary(struct All_variables *E)
 {
     int m,level,i,j;
     int eqn1,eqn2,eqn3;
@@ -544,9 +536,8 @@
    Function to set up the boundary condition
    masks and other indicators.
    ============================================  */
-
-void construct_masks(E)		/* Add lid/edge masks/nodal weightings */
-     struct All_variables *E;
+/* Add lid/edge masks/nodal weightings */
+void construct_masks(struct All_variables *E)
 {
   int i,j,k,l,node,el,elt;
   int lev,elx,elz,ely,nno,nox,noz,noy;
@@ -595,9 +586,7 @@
      build the sub-element reference matrices
      ==========================================   */
 
-void construct_sub_element(E)
-     struct All_variables *E;
-
+void construct_sub_element(struct All_variables *E)
 {    int i,j,k,l,m;
      int lev,nox,noy,noz,nnn,elx,elz,ely,elzu,elxu,elt,eltu;
 
@@ -641,8 +630,7 @@
    }
 
 
-void construct_elt_ks(E)
-     struct All_variables *E;
+void construct_elt_ks(struct All_variables *E)
 {
     int e,el,lev,j,k,ii,m;
     void get_elt_k();
@@ -688,8 +676,7 @@
 
 
 
-void construct_elt_gs(E)
-     struct All_variables *E;
+void construct_elt_gs(struct All_variables *E)
 { int m,el,lev,a;
   void get_elt_g();
 
@@ -737,8 +724,7 @@
  routine for constructing stiffness and node_maps
  ============================================================== */
 
-void construct_stiffness_B_matrix(E)
-  struct All_variables *E;
+void construct_stiffness_B_matrix(struct All_variables *E)
 {
   void build_diagonal_of_K();
   void build_diagonal_of_Ahat();
@@ -818,8 +804,7 @@
 
 
  ============================================================== */
-void construct_mat_group(E)
-     struct All_variables *E;
+void construct_mat_group(struct All_variables *E)
 {
   int m,i,j,k,kk,el,lev,a,nodea,els,llayer;
   void read_visc_layer_file(struct All_variables *E);

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Convection.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Convection.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Convection.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -31,12 +31,10 @@
 
 #include "global_defs.h"
 
-void set_convection_defaults(E)
-     struct All_variables *E;
+void set_convection_defaults(struct All_variables *E)
 {
   /*
     void PG_timestep();
-    void PG_timestep_init();
     void read_convection_settings();
     void convection_derived_values();
     void convection_allocate_memory();
@@ -71,12 +69,8 @@
     return;
 }
 
-void read_convection_settings(E)
-     struct All_variables *E;
-
+void read_convection_settings(struct All_variables *E)
 {
-    void advection_diffusion_parameters();
-
     /* parameters */
 
     advection_diffusion_parameters(E);
@@ -88,16 +82,13 @@
    Any setup which relates only to the convection stuff goes in here
    ================================================================= */
 
-void convection_derived_values(E)
-     struct All_variables *E;
-
+void convection_derived_values(struct All_variables *E)
 {
 
   return;
 }
 
-void convection_allocate_memory(E)
-     struct All_variables *E;
+void convection_allocate_memory(struct All_variables *E)
 
 { void advection_diffusion_allocate_memory();
 
@@ -108,9 +99,7 @@
 
 /* ============================================ */
 
-void convection_initial_fields(E)
-     struct All_variables *E;
-
+void convection_initial_fields(struct All_variables *E)
 {
     void convection_initial_temperature();
 
@@ -120,9 +109,7 @@
 
 /* =========================================== */
 
-void convection_boundary_conditions(E)
-     struct All_variables *E;
-
+void convection_boundary_conditions(struct All_variables *E)
 {
     (E->solver.velocity_boundary_conditions)(E);      /* universal */
     (E->solver.temperature_boundary_conditions)(E);

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Element_calculations.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Element_calculations.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Element_calculations.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -76,9 +76,7 @@
    Function to get the global H vector (mixed method driving terms)
    ================================================================ */
 
-void assemble_forces(E,penalty)
-     struct All_variables *E;
-     int penalty;
+void assemble_forces(struct All_variables *E, int penalty)
 {
   double elt_f[24];
   int m,a,e,i;
@@ -278,11 +276,7 @@
   Function to supply the element k matrix for a given element e.
   ==============================================================  */
 
-void get_elt_k(E,el,elt_k,lev,m,iconv)
-     struct All_variables *E;
-     int el,m;
-     double elt_k[24*24];
-     int lev, iconv;
+void get_elt_k(struct All_variables *E, int el, double elt_k[24*24], int lev, int m, int iconv)
 {
     double bdbmu[4][4];
     int pn,qn,ad,bd,off;
@@ -424,11 +418,7 @@
    element or node by node.
    ============================================= */
 
-void assemble_del2_u(E,u,Au,level,strip_bcs)
-     struct All_variables *E;
-     double **u,**Au;
-     int level;
-     int strip_bcs;
+void assemble_del2_u(struct All_variables *E, double **u, double **Au, int level, int strip_bcs)
 {
   void e_assemble_del2_u();
   void n_assemble_del2_u();
@@ -445,12 +435,7 @@
    Assemble del_squared_u vector el by el
    ======================================   */
 
-void e_assemble_del2_u(E,u,Au,level,strip_bcs)
-  struct All_variables *E;
-  double **u,**Au;
-  int level;
-  int strip_bcs;
-
+void e_assemble_del2_u(struct All_variables *E, double **u, double **Au, int level, int strip_bcs)
 {
   int  e,i,a,b,a1,a2,a3,ii,m,nodeb;
   void strip_bcs_from_residual();
@@ -518,11 +503,7 @@
    Assemble Au using stored, nodal coefficients.
    ====================================================== */
 
-void n_assemble_del2_u(E,u,Au,level,strip_bcs)
-     struct All_variables *E;
-     double **u,**Au;
-     int level;
-     int strip_bcs;
+void n_assemble_del2_u(struct All_variables *E, double **u, double **Au, int level, int strip_bcs)
 {
     int m, e,i;
     int eqn1,eqn2,eqn3;
@@ -582,10 +563,7 @@
 }
 
 
-void build_diagonal_of_K(E,el,elt_k,level,m)
-     struct All_variables *E;
-     int level,el,m;
-     double elt_k[24*24];
+void build_diagonal_of_K(struct All_variables *E, int el, double elt_k[24*24], int level, int m)
 
 {
     int a,a1,a2,p,node;
@@ -615,8 +593,7 @@
   return;
 }
 
-void build_diagonal_of_Ahat(E)
-    struct All_variables *E;
+void build_diagonal_of_Ahat(struct All_variables *E)
 {
     double assemble_dAhatp_entry();
 
@@ -739,10 +716,7 @@
    Assemble a grad_P vector element by element
    ==========================================  */
 
-void assemble_grad_p(E,P,gradP,lev)
-     struct All_variables *E;
-     double **P,**gradP;
-     int lev;
+void assemble_grad_p(struct All_variables *E, double **P, double **gradP, int lev)
 
 {
   int m,e,i,j1,j2,j3,p,a,b,nel,neq;
@@ -787,9 +761,7 @@
 }
 
 
-double assemble_dAhatp_entry(E,e,level,m)
-     struct All_variables *E;
-     int e,level,m;
+double assemble_dAhatp_entry(struct All_variables *E, int e, int level, int m)
 
 {
     int i,j,p,a,b,node,npno;
@@ -915,11 +887,7 @@
   used for the divergence
   ==============================================================  */
 
-void get_elt_g(E,el,elt_del,lev,m)
-     struct All_variables *E;
-     int el,m;
-     higher_precision elt_del[24][1];
-     int lev;
+void get_elt_g(struct All_variables *E, int el, higher_precision elt_del[24][1], int lev, int m)
 
 {
    void get_rtf_at_ppts();
@@ -1017,12 +985,7 @@
   Function to create the element force vector (allowing for velocity b.c.'s)
   ================================================================= */
 
-void get_elt_f(E,el,elt_f,bcs,m)
-     struct All_variables *E;
-     int el,m;
-     double elt_f[24];
-     int bcs;
-
+void get_elt_f(struct All_variables *E, int el, double elt_f[24], int bcs, int m)
 {
 
   int i,p,a,b,j,k,q,es;
@@ -1290,11 +1253,7 @@
  subroutine to get augmented lagrange part of stiffness matrix
 ================================================================== */
 
-void get_aug_k(E,el,elt_k,level,m)
-     struct All_variables *E;
-     int el,m;
-     double elt_k[24*24];
-     int level;
+void get_aug_k(struct All_variables *E, int el, double elt_k[24*24], int level, int m)
 {
      int i,p[9],a,b,nodea,nodeb;
      double Visc;

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Full_boundary_conditions.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Full_boundary_conditions.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Full_boundary_conditions.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -44,8 +44,7 @@
 
 /* ========================================== */
 
-void full_velocity_boundary_conditions(E)
-     struct All_variables *E;
+void full_velocity_boundary_conditions(struct All_variables *E)
 {
   void velocity_imp_vert_bc();
   void velocity_apply_periodicapply_periodic_bcs();
@@ -131,11 +130,8 @@
 
 /* ========================================== */
 
-void full_temperature_boundary_conditions(E)
-     struct All_variables *E;
+void full_temperature_boundary_conditions(struct All_variables *E)
 {
-  void temperatures_conform_bcs();
-  void temperature_imposed_vert_bcs();
   int j,lev,noz;
 
   lev = E->mesh.levmax;
@@ -223,16 +219,14 @@
 }
 
 
-static void velocity_apply_periodic_bcs(E)
-    struct All_variables *E;
+static void velocity_apply_periodic_bcs(struct All_variables *E)
 {
   fprintf(E->fp,"Periodic boundary conditions\n");
 
   return;
   }
 
-static void temperature_apply_periodic_bcs(E)
-    struct All_variables *E;
+static void temperature_apply_periodic_bcs(struct All_variables *E)
 {
  fprintf(E->fp,"Periodic temperature boundary conditions\n");
 

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Full_geometry_cartesian.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Full_geometry_cartesian.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Full_geometry_cartesian.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -31,8 +31,7 @@
 #include "parsing.h"
 
 
-void full_set_2dc_defaults(E)
-     struct All_variables *E;
+void full_set_2dc_defaults(struct All_variables *E)
 {
 
   E->mesh.nsd = 2;
@@ -41,8 +40,7 @@
 }
 
 
-void full_set_2pt5dc_defaults(E)
-    struct All_variables *E;
+void full_set_2pt5dc_defaults(struct All_variables *E)
 {
 
   E->mesh.nsd = 2;
@@ -50,8 +48,7 @@
 
 }
 
-void full_set_3dc_defaults(E)
-     struct All_variables *E;
+void full_set_3dc_defaults(struct All_variables *E)
 {
 
   E->mesh.nsd = 3;
@@ -59,8 +56,7 @@
 
 }
 
-void full_set_3dsphere_defaults(E)
-     struct All_variables *E;
+void full_set_3dsphere_defaults(struct All_variables *E)
 {
   E->mesh.nsd = 3;
   E->mesh.dof = 3;

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Full_parallel_related.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Full_parallel_related.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Full_parallel_related.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -326,8 +326,7 @@
  exchange info across the boundaries
  ============================================ */
 
-void full_parallel_domain_boundary_nodes(E)
-  struct All_variables *E;
+void full_parallel_domain_boundary_nodes(struct All_variables *E)
   {
 
   void parallel_process_termination();
@@ -502,8 +501,7 @@
 static void face_eqn_node_to_pass(struct All_variables *, int, int, int, int);
 static void line_eqn_node_to_pass(struct All_variables *, int, int, int, int, int, int);
 
-void full_parallel_communication_routs_v(E)
-  struct All_variables *E;
+void full_parallel_communication_routs_v(struct All_variables *E)
   {
 
   int m,i,ii,j,k,l,node,el,elt,lnode,jj,doff,target;
@@ -759,8 +757,7 @@
  assuming fault nodes are in the top row of processors
  ============================================ */
 
-void full_parallel_communication_routs_s(E)
-  struct All_variables *E;
+void full_parallel_communication_routs_s(struct All_variables *E)
 {
 
   int i,ii,j,k,l,node,el,elt,lnode,jj,doff;
@@ -834,9 +831,7 @@
 /* ================================================ */
 /* ================================================ */
 
-static void face_eqn_node_to_pass(E,lev,m,npass,bd)
-  struct All_variables *E;
-  int lev,m,npass,bd;
+static void face_eqn_node_to_pass(struct All_variables *E, int lev, int m, int npass, int bd)
 {
   int jj,kk,node,doff;
   const int dims=E->mesh.nsd;
@@ -859,9 +854,7 @@
 /* ================================================ */
 /* ================================================ */
 
-static void line_eqn_node_to_pass(E,lev,m,npass,num_node,offset,stride)
-  struct All_variables *E;
-  int lev,m,npass,num_node,offset,stride;
+static void line_eqn_node_to_pass(struct All_variables *E, int lev, int m, int npass, int num_node, int offset, int stride)
 {
   int jj,kk,node,doff;
   const int dims=E->mesh.nsd;
@@ -902,10 +895,7 @@
 by Tan2 7/21, 2003
 ================================================ */
 
-void full_exchange_id_d(E, U, lev)
- struct All_variables *E;
- double **U;
- int lev;
+void full_exchange_id_d(struct All_variables *E, double **U, int lev)
  {
 
  int ii,j,jj,m,k,kk,t_cap,idb,msginfo[8];
@@ -1018,10 +1008,7 @@
 
 /* ================================================ */
 /* ================================================ */
-static void exchange_node_d(E, U, lev)
- struct All_variables *E;
- double **U;
- int lev;
+static void exchange_node_d(struct All_variables *E, double **U, int lev)
  {
 
  int ii,j,jj,m,k,kk,t_cap,idb,msginfo[8];
@@ -1142,10 +1129,7 @@
 /* ================================================ */
 /* ================================================ */
 
-static void exchange_node_f(E, U, lev)
- struct All_variables *E;
- float **U;
- int lev;
+static void exchange_node_f(struct All_variables *E, float **U, int lev)
  {
 
  int ii,j,jj,m,k,kk,t_cap,idb,msginfo[8];

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Full_read_input_from_files.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Full_read_input_from_files.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Full_read_input_from_files.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -38,9 +38,7 @@
   Open these files, read in results, and average if necessary
 =========================================================================*/
 
-void full_read_input_files_for_timesteps(E,action,output)
-    struct All_variables *E;
-    int action, output;
+void full_read_input_files_for_timesteps(struct All_variables *E, int action, int output)
 {
     float find_age_in_MY();
 

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Full_sphere_related.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Full_sphere_related.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Full_sphere_related.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -168,10 +168,7 @@
   double theta, fi, cost, sint, cosf, sinf, efac2,rfac;
   double a, b;
   double offset;
-  double myatan();
 
-  void even_divide_arc12();
-  
   temp = max(E->mesh.noy, E->mesh.nox);
 
   theta0 = (double *)malloc((temp+1)*sizeof(double));
@@ -198,10 +195,10 @@
   v4     = (double *)malloc((temp+1)*sizeof(double));
 
   temp = E->mesh.noy * E->mesh.nox;
-  px = malloc((temp+1)*sizeof(double));
-  py = malloc((temp+1)*sizeof(double));
-  qx = malloc((temp+1)*sizeof(double));
-  qy = malloc((temp+1)*sizeof(double));
+  px = (double *)malloc((temp+1)*sizeof(double));
+  py = (double *)malloc((temp+1)*sizeof(double));
+  qx = (double *)malloc((temp+1)*sizeof(double));
+  qy = (double *)malloc((temp+1)*sizeof(double));
 
   /* define the cap corners */
 

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Full_tracer_advection.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Full_tracer_advection.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Full_tracer_advection.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -2319,8 +2319,6 @@
     double tiny, eps;
     double x,y,z;
 
-    double myatan();
-
     /* make vectors from node to node */
 
     makevector(v12,rnode2[1],rnode2[2],rnode2[3],rnode1[1],rnode1[2],rnode1[3]);
@@ -2866,7 +2864,7 @@
     double u, v, cosc, theta_f, phi_f, dphi, cosd;
     double *cost, *sint, *cosf, *sinf;
 
-    if ((E->gnomonic = malloc((E->lmesh.nsf+1)*sizeof(struct CITCOM_GNOMONIC)))
+    if ((E->gnomonic = (CITCOM_GNOMONIC*)malloc((E->lmesh.nsf+1)*sizeof(struct CITCOM_GNOMONIC)))
         == NULL) {
         fprintf(stderr,"Error(define uv)-not enough memory(a)\n");
         exit(10);
@@ -3066,8 +3064,7 @@
 /* This function (and the 2 following) are used to test advection of tracers by assigning */
 /* a test function (in "analytical_test_function").                                       */
 
-void analytical_test(E)
-     struct All_variables *E;
+void analytical_test(struct All_variables *E)
 
 {
 #if 0
@@ -3325,15 +3322,7 @@
 
 /*************** ANALYTICAL RUNGE KUTTE ******************/
 /*                                                       */
-void analytical_runge_kutte(E,nsteps,dt,x0_s,x0_c,xf_s,xf_c,vec)
-     struct All_variables *E;
-     int nsteps;
-     double dt;
-     double *x0_c;
-     double *x0_s;
-     double *xf_c;
-     double *xf_s;
-     double *vec;
+void analytical_runge_kutte(struct All_variables *E, int nsteps, double dt, double *x0_s, double *x0_c, double *xf_s, double *xf_c, double *vec)
 
 {
 
@@ -3445,11 +3434,7 @@
 /* vel_c[2] => velocity in y direction                      */
 /* vel_c[3] => velocity in z direction                      */
 
-void analytical_test_function(E,theta,phi,rad,vel_s,vel_c)
-     struct All_variables *E;
-     double theta,phi,rad;
-     double *vel_s;
-     double *vel_c;
+void analytical_test_function(struct All_variables *E, double theta, double phi, double rad, double *vel_s, double *vel_c)
 
 {
 

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Full_version_dependent.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Full_version_dependent.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Full_version_dependent.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -48,7 +48,7 @@
                              int m, int icap)
 {
     int i,lev;
-    double t[4], myatan();
+    double t[4];
 
     for (lev=E->mesh.levmin;lev<=E->mesh.levmax;lev++) {
         for (i=1;i<=E->lmesh.NNO[lev];i++) {
@@ -78,8 +78,7 @@
 
    =================================================  */
 
-void full_node_locations(E)
-     struct All_variables *E;
+void full_node_locations(struct All_variables *E)
 {
   int i,j,k,ii,lev;
   double ro,dr,*rr,*RR,fo,tg;

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/General_matrix_functions.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/General_matrix_functions.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/General_matrix_functions.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -45,12 +45,7 @@
     Iterative solver also using multigrid  ........
     ===========================================================  */
 
-int solve_del2_u(E,d0,F,acc,high_lev)
-     struct All_variables *E;
-     double **d0;
-     double **F;
-     double acc;
-     int high_lev;
+int solve_del2_u(struct All_variables *E, double **d0, double **F, double acc, int high_lev)
 {
   void assemble_del2_u();
   void e_assemble_del2_u();
@@ -149,12 +144,7 @@
    recursive multigrid function ....
    ================================= */
 
-double multi_grid(E,d1,F,acc,hl)
-     struct All_variables *E;
-     double **d1;
-     double **F;
-     double acc;
-     int hl;  /* higher level of two */
+double multi_grid(struct All_variables *E, double **d1, double **F, double acc, int hl)
 {
     double residual,AudotAu;
     void interp_vector();
@@ -304,13 +294,7 @@
 
 
 #ifndef USE_CUDA
-double conj_grad(E,d0,F,acc,cycles,level)
-     struct All_variables *E;
-     double **d0;
-     double **F;
-     double acc;
-     int *cycles;
-     int level;
+double conj_grad(struct All_variables *E, double **d0, double **F, double acc, int *cycles, int level)
 {
     double *r0[NCS],*r1[NCS],*r2[NCS];
     double *z0[NCS],*z1[NCS],*z2[NCS];
@@ -431,14 +415,7 @@
    versions
    =========================================================================================*/
 
-void element_gauss_seidel(E,d0,F,Ad,acc,cycles,level,guess)
-    struct All_variables *E;
-    double **d0;
-    double **F,**Ad;
-    double acc;
-    int *cycles;
-    int level;
-    int guess;
+void element_gauss_seidel(struct All_variables *E, double **d0, double **F, double **Ad, double acc, int *cycles, int level, int guess)
 {
     int count,i,j,k,l,m,ns,nc,d,steps,loc;
     int p1,p2,p3,q1,q2,q3;
@@ -603,14 +580,7 @@
    time (Jacobi at a node). It does the job though.
    ============================================================================ */
 
-void gauss_seidel(E,d0,F,Ad,acc,cycles,level,guess)
-     struct All_variables *E;
-     double **d0;
-     double **F,**Ad;
-     double acc;
-     int *cycles;
-     int level;
-     int guess;
+void gauss_seidel(struct All_variables *E, double **d0, double **F, double **Ad, double acc, int *cycles, int level, int guess)
 {
 
     int count,i,j,k,l,m,ns,steps;
@@ -758,9 +728,7 @@
 
 /* Fast (conditional) determinant for 3x3 or 2x2 ... otherwise calls general routine */
 
-double determinant(A,n)
-     double A[4][4];
-     int n;
+double determinant(double A[4][4], int n)
 
 { double gen_determinant();
 
@@ -781,12 +749,9 @@
 
 
 
-double cofactor(A,i,j,n)
-     double A[4][4];
-     int i,j,n;
+double cofactor(double A[4][4], int i, int j, int 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 */

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Global_operations.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Global_operations.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Global_operations.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -44,10 +44,7 @@
    aren't & another method is required.
    =============================================== */
 
-void remove_horiz_ave(E,X,H,store_or_not)
-     struct All_variables *E;
-     double **X, *H;
-     int store_or_not;
+void remove_horiz_ave(struct All_variables *E, double **X, double *H, int store_or_not)
 
 {
     int m,i,j,k,n,nox,noz,noy;
@@ -83,9 +80,7 @@
 }
 
 
-void return_horiz_ave(E,X,H)
-     struct All_variables *E;
-     double **X, *H;
+void return_horiz_ave(struct All_variables *E, double **X, double *H)
 {
   const int dims = E->mesh.nsd;
   int m,i,j,k,d,nint,noz,nox,noy,el,elz,elx,ely,j1,j2,i1,i2,k1,k2,nproc;
@@ -163,9 +158,7 @@
   return;
   }
 
-void return_horiz_ave_f(E,X,H)
-     struct All_variables *E;
-     float **X, *H;
+void return_horiz_ave_f(struct All_variables *E, float **X, float *H)
 {
   const int dims = E->mesh.nsd;
   int m,i,j,k,d,nint,noz,nox,noy,el,elz,elx,ely,j1,j2,i1,i2,k1,k2,nproc;
@@ -250,9 +243,7 @@
 /* however here, elemental horizontal averages are given rather than */
 /* nodal averages. Also note, here is average per element            */
 
-void return_elementwise_horiz_ave(E,X,H)
-     struct All_variables *E;
-     double **X, *H;
+void return_elementwise_horiz_ave(struct All_variables *E, double **X, double *H)
 {
 
   int m,i,j,k,d,noz,noy,el,elz,elx,ely,nproc;
@@ -312,10 +303,7 @@
   return;
 }
 
-float return_bulk_value(E,Z,average)
-     struct All_variables *E;
-     float **Z;
-     int average;
+float return_bulk_value(struct All_variables *E, float **Z, int average)
 
 {
     int n,i,j,k,el,m;
@@ -356,10 +344,7 @@
 /*         when integer average =0, integral is returned.           */
 
 
-double return_bulk_value_d(E,Z,average)
-     struct All_variables *E;
-     double **Z;
-     int average;
+double return_bulk_value_d(struct All_variables *E, double **Z, int average)
 
 {
     int n,i,j,el,m;
@@ -394,9 +379,7 @@
 }
 
 /* ================================================== */
-float find_max_horizontal(E,Tmax)
-struct All_variables *E;
-float Tmax;
+float find_max_horizontal(struct All_variables *E, float Tmax)
 {
  float ttmax;
 
@@ -406,10 +389,7 @@
  }
 
 /* ================================================== */
-void sum_across_surface(E,data,total)
-struct All_variables *E;
-float *data;
-int total;
+void sum_across_surface(struct All_variables *E, float *data, int total)
 {
  int j,d;
  float *temp;
@@ -430,9 +410,7 @@
 /* ================================================== */
 
 /* ================================================== */
-void sum_across_surf_sph1(E,sphc,sphs)
-struct All_variables *E;
-float *sphc,*sphs;
+void sum_across_surf_sph1(struct All_variables *E, float *sphc, float *sphs)
 {
  int jumpp,total,j,d;
  float *sphcs,*temp;
@@ -466,10 +444,7 @@
 /* ================================================== */
 
 
-float global_fvdot(E,A,B,lev)
-   struct All_variables *E;
-   float **A,**B;
-   int lev;
+float global_fvdot(struct All_variables *E, float **A, float **B, int lev)
 
 {
   int m,i,neq;
@@ -499,10 +474,7 @@
 }
 
 
-double kineticE_radial(E,A,lev)
-   struct All_variables *E;
-   double **A;
-   int lev;
+double kineticE_radial(struct All_variables *E, double **A, int lev)
 
 {
   int m,i,neq;
@@ -531,10 +503,7 @@
   return (prod);
 }
 
-double global_vdot(E,A,B,lev)
-   struct All_variables *E;
-   double **A,**B;
-   int lev;
+double global_vdot(struct All_variables *E, double **A, double **B, int lev)
 
 {
   int m,i,neq;
@@ -562,10 +531,7 @@
 }
 
 
-double global_pdot(E,A,B,lev)
-   struct All_variables *E;
-   double **A,**B;
-   int lev;
+double global_pdot(struct All_variables *E, double **A, double **B, int lev)
 
 {
   int i,m,npno;
@@ -656,10 +622,7 @@
 }
 
 
-double global_tdot_d(E,A,B,lev)
-   struct All_variables *E;
-   double **A,**B;
-   int lev;
+double global_tdot_d(struct All_variables *E, double **A, double **B, int lev)
 
 {
   int i,nno,m;
@@ -681,10 +644,7 @@
   return (prod);
   }
 
-float global_tdot(E,A,B,lev)
-   struct All_variables *E;
-   float **A,**B;
-   int lev;
+float global_tdot(struct All_variables *E, float **A, float **B, int lev)
 
 {
   int i,nno,m;
@@ -706,18 +666,14 @@
   }
 
 
-float global_fmin(E,a)
-   struct All_variables *E;
-   float a;
+float global_fmin(struct All_variables *E, float a)
 {
   float temp;
   MPI_Allreduce(&a, &temp,1,MPI_FLOAT,MPI_MIN,E->parallel.world);
   return (temp);
   }
 
-double global_dmax(E,a)
-   struct All_variables *E;
-   double a;
+double global_dmax(struct All_variables *E, double a)
 {
   double temp;
   MPI_Allreduce(&a, &temp,1,MPI_DOUBLE,MPI_MAX,E->parallel.world);
@@ -725,18 +681,14 @@
   }
 
 
-float global_fmax(E,a)
-   struct All_variables *E;
-   float a;
+float global_fmax(struct All_variables *E, float a)
 {
   float temp;
   MPI_Allreduce(&a, &temp,1,MPI_FLOAT,MPI_MAX,E->parallel.world);
   return (temp);
   }
 
-double Tmaxd(E,T)
-  struct All_variables *E;
-  double **T;
+double Tmaxd(struct All_variables *E, double **T)
 {
   double global_dmax(),temp,temp1;
   int i,m;
@@ -751,9 +703,7 @@
   }
 
 
-float Tmax(E,T)
-  struct All_variables *E;
-  float **T;
+float Tmax(struct All_variables *E, float **T)
 {
   float global_fmax(),temp,temp1;
   int i,m;
@@ -768,10 +718,7 @@
   }
 
 
-double  vnorm_nonnewt(E,dU,U,lev)
-  struct All_variables *E;
-  double **dU,**U;
-  int lev;
+double  vnorm_nonnewt(struct All_variables *E, double **dU, double **U, int lev)
 {
  double temp1,temp2,dtemp,temp;
  int a,e,i,m,node;
@@ -803,9 +750,7 @@
 }
 
 
-void sum_across_depth_sph1(E,sphc,sphs)
-     struct All_variables *E;
-     float *sphc,*sphs;
+void sum_across_depth_sph1(struct All_variables *E, float *sphc, float *sphs)
 {
     int jumpp,total,j;
 
@@ -888,7 +833,6 @@
 void remove_rigid_rot(struct All_variables *E)
 {
     void velo_from_element_d();
-    double myatan();
     double wx, wy, wz, v_theta, v_phi, cos_t,sin_t,sin_f, cos_f,frd;
     double vx[9], vy[9], vz[9];
     double r, t, f, efac,tg;

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Instructions.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Instructions.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Instructions.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -908,8 +908,7 @@
    common to all problems follow ...
    ===================================  */
 
-void allocate_common_vars(E)
-     struct All_variables *E;
+void allocate_common_vars(struct All_variables *E)
 
 {
     void set_up_nonmg_aliases();
@@ -1144,8 +1143,7 @@
 
 /*  =========================================================  */
 
-void allocate_velocity_vars(E)
-     struct All_variables *E;
+void allocate_velocity_vars(struct All_variables *E)
 
 {
     int m,n,i,j,k,l;
@@ -1206,8 +1204,7 @@
 
 /*  =========================================================  */
 
-void global_default_values(E)
-     struct All_variables *E;
+void global_default_values(struct All_variables *E)
 {
 
   /* FIRST: values which are not changed routinely by the user */
@@ -1306,8 +1303,7 @@
 /* =============================================================
    ============================================================= */
 
-void check_bc_consistency(E)
-     struct All_variables *E;
+void check_bc_consistency(struct All_variables *E)
 
 { int i,j,lev;
 
@@ -1346,9 +1342,7 @@
 
 }
 
-void set_up_nonmg_aliases(E,j)
-     struct All_variables *E;
-     int j;
+void set_up_nonmg_aliases(struct All_variables *E, int j)
 
 { /* Aliases for functions only interested in the highest mg level */
 
@@ -1373,9 +1367,7 @@
 
   return; }
 
-void report(E,string)
-     struct All_variables *E;
-     char * string;
+void report(struct All_variables *E, char * string)
 { if(E->control.verbose && E->parallel.me==0)
     { fprintf(stderr,"%s\n",string);
       fflush(stderr);
@@ -1383,9 +1375,7 @@
   return;
 }
 
-void record(E,string)
-     struct All_variables *E;
-     char * string;
+void record(struct All_variables *E, char * string)
 { if(E->control.verbose && E->fp)
     { fprintf(E->fp,"%s\n",string);
       fflush(E->fp);
@@ -1405,8 +1395,7 @@
 
 
 /* This function is replaced by CitcomS.Components.IC.launch()*/
-void common_initial_fields(E)
-    struct All_variables *E;
+void common_initial_fields(struct All_variables *E)
 {
     void initial_pressure();
     void initial_velocity();
@@ -1422,8 +1411,7 @@
 
 /* ========================================== */
 
-void initial_pressure(E)
-     struct All_variables *E;
+void initial_pressure(struct All_variables *E)
 {
     int i,m;
     report(E,"Initialize pressure field");
@@ -1435,8 +1423,7 @@
   return;
 }
 
-void initial_velocity(E)
-     struct All_variables *E;
+void initial_velocity(struct All_variables *E)
 {
     int i,m;
     report(E,"Initialize velocity field");

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Mineral_physics_models.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Mineral_physics_models.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Mineral_physics_models.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -176,10 +176,10 @@
 
 
     /* reference model (PREM) */
-    rhor = malloc((E->lmesh.noz+1) * sizeof(double));
-    vpr = malloc((E->lmesh.noz+1) * sizeof(double));
-    vsr = malloc((E->lmesh.noz+1) * sizeof(double));
-    depthkm = malloc((E->lmesh.noz+1) * sizeof(double));
+    rhor = (double *)malloc((E->lmesh.noz+1) * sizeof(double));
+    vpr = (double *)malloc((E->lmesh.noz+1) * sizeof(double));
+    vsr = (double *)malloc((E->lmesh.noz+1) * sizeof(double));
+    depthkm = (double *)malloc((E->lmesh.noz+1) * sizeof(double));
 
     for(nz=1; nz<=E->lmesh.noz; nz++) {
         get_prem(E->sx[m][3][nz], &vpr[nz], &vsr[nz], &rhor[nz]);

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Nodal_mesh.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Nodal_mesh.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Nodal_mesh.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -36,8 +36,7 @@
 
 
 /* get nodal spherical velocities from the solution vector */
-void v_from_vector(E)
-     struct All_variables *E;
+void v_from_vector(struct All_variables *E)
 {
     int m,node;
     const int nno = E->lmesh.nno;
@@ -59,8 +58,7 @@
     return;
 }
 
-void assign_v_to_vector(E)
-     struct All_variables *E;
+void assign_v_to_vector(struct All_variables *E)
 {
     int m,node;
     const int nno = E->lmesh.nno;
@@ -75,8 +73,7 @@
     return;
 }
 
-void v_from_vector_pseudo_surf(E)
-     struct All_variables *E;
+void v_from_vector_pseudo_surf(struct All_variables *E)
 {
     int m,node;
 
@@ -118,10 +115,7 @@
     return;
 }
 /* cartesian velocities within element, single prec version */
-void velo_from_element(E,VV,m,el,sphere_key)
-     struct All_variables *E;
-     float VV[4][9];
-     int el,m,sphere_key;
+void velo_from_element(struct All_variables *E, float VV[4][9], int m, int el, int sphere_key)
 {
 
     int a, node;
@@ -159,10 +153,7 @@
 }
 
 /* double prec version */
-void velo_from_element_d(E,VV,m,el,sphere_key)
-     struct All_variables *E;
-     double VV[4][9];
-     int el,m,sphere_key;
+void velo_from_element_d(struct All_variables *E, double VV[4][9], int m, int el, int sphere_key)
 {
 
     int a, node;
@@ -202,11 +193,7 @@
 }
 
 
-void p_to_nodes(E,P,PN,lev)
-     struct All_variables *E;
-     double **P;
-     float **PN;
-     int lev;
+void p_to_nodes(struct All_variables *E, double **P, float **PN, int lev)
 
 { int e,element,node,j,m;
 
@@ -236,10 +223,7 @@
    interpolate the viscosity from element integration points to nodes
 
  */
-void visc_from_gint_to_nodes(E,VE,VN,lev)
-  struct All_variables *E;
-  float **VE,**VN;
-  int lev;
+void visc_from_gint_to_nodes(struct All_variables *E, float **VE, float **VN, int lev)
 {
   int m,e,i,j,k,n,off,lim;
   const int nsd=E->mesh.nsd;
@@ -275,10 +259,7 @@
 interpolate viscosity from nodes to element integration points
 
  */
-void visc_from_nodes_to_gint(E,VN,VE,lev)
-  struct All_variables *E;
-  float **VE,**VN;
-  int lev;
+void visc_from_nodes_to_gint(struct All_variables *E, float **VN, float **VE, int lev)
 {
 
   int m,e,i,j,k,n,off;
@@ -309,10 +290,7 @@
    visc_from_gint_to_ele(E,E->EVI[lv],viscU,lv) 
 
 */
-void visc_from_gint_to_ele(E,VE,VN,lev)
-  struct All_variables *E;
-  float **VE,**VN;
-  int lev;
+void visc_from_gint_to_ele(struct All_variables *E, float **VE, float **VN, int lev)
   {
     int m,e,i,j,k,n,off;
     const int nsd=E->mesh.nsd;
@@ -341,10 +319,7 @@
 
 */
 
-void visc_from_ele_to_gint(E,VN,VE,lev)
-  struct All_variables *E;
-  float **VE,**VN;
-  int lev;
+void visc_from_ele_to_gint(struct All_variables *E, float **VN, float **VE, int lev)
 {
   int m,e,i,j,k,n,off;
   const int nsd=E->mesh.nsd;

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Output.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Output.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Output.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -573,9 +573,9 @@
     double *rho, *vp, *vs;
     const int len = E->lmesh.nno;
 
-    rho = malloc(len * sizeof(double));
-    vp = malloc(len * sizeof(double));
-    vs = malloc(len * sizeof(double));
+    rho = (double *)malloc(len * sizeof(double));
+    vp = (double *)malloc(len * sizeof(double));
+    vs = (double *)malloc(len * sizeof(double));
     if(rho==NULL || vp==NULL || vs==NULL) {
         fprintf(stderr, "Error while allocating memory\n");
         abort();

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Output_gzdir.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Output_gzdir.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Output_gzdir.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -1514,8 +1514,8 @@
 /* this should not be called with (i,i,size i) */
 void be_flipit(void *d, void *s, size_t len)
 {
-  unsigned char *dest = d;
-  unsigned char *src  = s;
+  unsigned char *dest = (unsigned char*)d;
+  unsigned char *src  = (unsigned char*)s;
   src += len - 1;
   for (; len; len--)
     *dest++ = *src--;

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Output_vtk.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Output_vtk.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Output_vtk.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -114,7 +114,7 @@
 {
     int i;
     int nodes = E->sphere.caps_per_proc*E->lmesh.nno;
-    float* floattemp = malloc(nodes*sizeof(float));
+    float* floattemp = (float *)malloc(nodes*sizeof(float));
 
     fprintf(fp, "        <DataArray type=\"Float32\" Name=\"temperature\" format=\"%s\">\n", E->output.vtk_format);
 
@@ -139,7 +139,7 @@
     double sint, sinf, cost, cosf;
     float *V[4];
     const int lev = E->mesh.levmax;
-    float* floatvel = malloc(nodes*3*sizeof(float));
+    float* floatvel = (float *)malloc(nodes*3*sizeof(float));
 
     fprintf(fp, "        <DataArray type=\"Float32\" Name=\"velocity\" NumberOfComponents=\"3\" format=\"%s\">\n", E->output.vtk_format);
 
@@ -194,7 +194,7 @@
        assume it. */
     int i, j;
     int nodes = E->sphere.caps_per_proc*E->lmesh.nno;
-    float* floatpos = malloc(nodes*3*sizeof(float));
+    float* floatpos = (float *)malloc(nodes*3*sizeof(float));
 
     fputs("      <Points>\n", fp);
     fprintf(fp, "        <DataArray type=\"Float32\" Name=\"coordinate\" NumberOfComponents=\"3\" format=\"%s\">\n", E->output.vtk_format);
@@ -249,7 +249,7 @@
     int i, j, k;
     char name[255];
     int nodes = E->sphere.caps_per_proc*E->lmesh.nno;
-    float* floatcompo = malloc (nodes*sizeof(float));
+    float* floatcompo = (float *)malloc (nodes*sizeof(float));
 
     for(k=0;k<E->composition.ncomp;k++) {
         fprintf(fp, "        <DataArray type=\"Float32\" Name=\"composition%d\" format=\"%s\">\n", k+1, E->output.vtk_format);
@@ -276,7 +276,7 @@
     int i, j, k;
     int nodes = E->sphere.caps_per_proc*E->lmesh.nno;
     char output_file[255];
-    float* floattopo = malloc (nodes*sizeof(float));
+    float* floattopo = (float *)malloc (nodes*sizeof(float));
 
     if((E->output.write_q_files == 0) || (cycles == 0) ||
       (cycles % E->output.write_q_files)!=0)
@@ -516,7 +516,7 @@
     z_stream strm;
 
     /* hope compressed data will be <= uncompressed */
-    *out = malloc(sizeof(unsigned char)*nn);
+    *out = (unsigned char *)malloc(sizeof(unsigned char)*nn);
 
     strm.zalloc = Z_NULL;
     strm.zfree = Z_NULL;
@@ -563,7 +563,7 @@
 
     // now we know how short "out" should be!
     *nn2=ntemp;
-    *out = realloc(*out,sizeof(unsigned char)*ntemp);
+    *out = (unsigned char *)realloc(*out,sizeof(unsigned char)*ntemp);
 
     (void)deflateEnd(&strm);
 #endif
@@ -614,12 +614,12 @@
     int b64bodylength;
     unsigned char * b64body;
     /* header of data */
-    unsigned char * charhead = malloc(sizeof(unsigned char)*16);
+    unsigned char * charhead = (unsigned char*)malloc(sizeof(unsigned char)*16);
     /* - consists of "1" (number of pieces) */
     /* - original datalength in byte */
     /* - original datalength in byte */
     /* - new datalength after z-lib compression */
-    int * headInts= malloc(sizeof(int)*4);
+    int * headInts= (int *)malloc(sizeof(int)*4);
     headInts[0]=1;
     headInts[1]=orinn;
     headInts[2]=orinn;
@@ -628,13 +628,13 @@
     IntToUnsignedChar(headInts,4,charhead);
 
     // base64: 16byte -> 24byte
-    b64head =  malloc(sizeof(unsigned char)*24);
+    b64head =  (unsigned char *)malloc(sizeof(unsigned char)*24);
     // fills b64head
     base64(charhead, 16, b64head);
 
     // base64 data
     b64bodylength = 4*ceil((float) nn/3.0);
-    b64body = malloc(sizeof(unsigned char)*b64bodylength);
+    b64body = (unsigned char *)malloc(sizeof(unsigned char)*b64bodylength);
     // writes base64 data to b64body
     base64(in,nn,b64body);
 
@@ -657,7 +657,7 @@
 {
     /* writes vtk-data array of floats and performs zip and base64 encoding */
     int chararraylength=4*nn;	/* nn floats -> 4*nn unsigned chars */
-    unsigned char * chararray = malloc (chararraylength * sizeof(unsigned char));
+    unsigned char * chararray = (unsigned char *)malloc (chararraylength * sizeof(unsigned char));
     int compressedarraylength = 0;
     unsigned char * compressedarray;
     unsigned char ** pointertocompressedarray= &compressedarray;
@@ -672,7 +672,7 @@
     /* special header for zip compressed and bas64 encoded data
     header needs 4 int32 = 16 byte -> 24 byte due to base64 (4*16/3) */
     base64plusheadlength = 24 + 4*ceil((float) compressedarraylength/3.0);
-    base64plusheadarray = malloc(sizeof(unsigned char)* base64plusheadlength);
+    base64plusheadarray = (unsigned char *)malloc(sizeof(unsigned char)* base64plusheadlength);
 
     /* fills base64plusheadarray with everything ready for simple writing */
     base64plushead(compressedarray,compressedarraylength, chararraylength, base64plusheadarray);

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Pan_problem_misc_functions.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Pan_problem_misc_functions.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Pan_problem_misc_functions.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -80,9 +80,7 @@
 }
 
 
-void unique_copy_file(E,name,comment)
-    struct All_variables *E;
-    char *name, *comment;
+void unique_copy_file(struct All_variables *E, char *name, char *comment)
 {
     char unique_name[500];
     char command[600];
@@ -337,8 +335,7 @@
   my version of arc tan
  =================================================*/
 
-double myatan(y,x)
- double y,x;
+double myatan(double y, double x)
  {
  double fi;
 

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Parsing.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Parsing.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Parsing.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -84,12 +84,9 @@
 int interpret_control_string();
 
 
-void setup_parser(E,filename)
-     struct All_variables *E;
-     char *filename;
+void setup_parser(struct All_variables *E, char *filename)
 {
     void unique_copy_file();
-    void add_to_parameter_list();
 
     FILE * fp;
     char *pl,*pn,*pv;
@@ -175,8 +172,7 @@
 
 }
 
-void shutdown_parser(E)
-     struct All_variables *E;
+void shutdown_parser(struct All_variables *E)
 
 {
 	if(ARGLIST != NULL) free(ARGLIST);
@@ -188,13 +184,11 @@
 
 
 /* add an entry to arglist, expanding memory */
-void add_to_parameter_list(name,value)
-     char *name, *value;	/* if necessary */
+void add_to_parameter_list(char *name, char *value)
 {
   struct arglist *alptr;
   int len;
   char *ptr;
-  int compute_parameter_hash_table();
 
   /* check arglist memory */
   if(NLIST >= LISTMAX)
@@ -233,8 +227,7 @@
   NLIST++;
 }
 
-int compute_parameter_hash_table(s)
-     char *s;
+int compute_parameter_hash_table(char *s)
 { int h;
 
   h= s[0];
@@ -251,11 +244,7 @@
   return(h);
 }
 
-int input_int(name,value,interpret,m)
-     char *name;
-     int *value;
-     char *interpret;
-     int m;
+int input_int(char *name, int *value, char *interpret, int m)
 
 {
     struct arglist *alptr;
@@ -320,11 +309,8 @@
   return(found);
 }
 
-int input_string(name,value,Default,m)  /* in the case of a string default=NULL forces input */
-     char *name;
-     char *value;
-     char *Default;
-     int m;
+/* in the case of a string default=NULL forces input */
+int input_string(char *name, char *value, char *Default, int m)
 {
   char *sptr;
   struct arglist *alptr;
@@ -374,11 +360,8 @@
   return(found);
 }
 
-int input_boolean(name,value,interpret,m)  /* supports name=on/off too */
-     char *name;
-     int *value;
-     char *interpret;
-     int m;
+/* supports name=on/off too */
+int input_boolean(char *name, int *value, char *interpret, int m)
 {
   char *sptr;
   struct arglist *alptr;
@@ -443,11 +426,7 @@
   return(found);
 }
 
-int input_float(name,value,interpret,m)
-     char *name;
-     float *value;
-     char *interpret;
-     int m;
+int input_float(char *name, float *value, char *interpret, int m)
 
 { char *sptr;
   struct arglist *alptr;
@@ -511,11 +490,7 @@
   return(found);
 }
 
-int input_double(name,value,interpret,m)
-     char *name;
-     double *value;
-     char *interpret;
-     int m;
+int input_double(char *name, double *value, char *interpret, int m)
 
 { char *sptr;
   struct arglist *alptr;
@@ -630,11 +605,7 @@
 
 
 
-int input_char_vector(name,number,value,m)
-     char *name;
-     int number;
-     char *value; /* comma-separated list of ints */
-     int m;
+int input_char_vector(char *name, int number, char *value, int m)
 
 { char *sptr;
   struct arglist *alptr;
@@ -679,11 +650,7 @@
   return(found);
 }
 
-int input_float_vector(name,number,value,m)
-     char *name;
-     int number;
-     float *value; /* comma-separated list of floats */
-     int m;
+int input_float_vector(char *name, int number, float *value, int m)
 
 { char *sptr;
   struct arglist *alptr;
@@ -731,11 +698,7 @@
   return(found);
 }
 
-int input_double_vector(name,number,value,m)
-     char *name;
-     int number;
-     double *value; /* comma-separated list of floats */
-     int m;
+int input_double_vector(char *name, int number, double *value, int m)
 
 { char *sptr;
   struct arglist *alptr;
@@ -786,10 +749,7 @@
    The function strtok does not work on linux machine
 */
 
-int interpret_control_string(interpret,essential,Default,minvalue,maxvalue)
-     char *interpret;
-     int *essential;
-     double *Default,*minvalue,*maxvalue;
+int interpret_control_string(char *interpret, int *essential, double *Default, double *minvalue, double *maxvalue)
 
 { char *substring;
 

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Problem_related.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Problem_related.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Problem_related.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -38,8 +38,7 @@
   read velocity vectors at the top surface from files
 =========================================================================*/
 
-void read_velocity_boundary_from_file(E)
-     struct All_variables *E;
+void read_velocity_boundary_from_file(struct All_variables *E)
 {
     (E->solver.read_input_files_for_timesteps)(E,1,1); /* read velocity(1) and output(1) */
     return;
@@ -51,8 +50,7 @@
 laterally varying rayleigh number in the top layers 
 
  */
-void read_rayleigh_from_file(E)
-     struct All_variables *E;
+void read_rayleigh_from_file(struct All_variables *E)
 {
   (E->solver.read_input_files_for_timesteps)(E,4,1); /* read Rayleigh number for top layers */
   return;
@@ -62,8 +60,7 @@
   construct material array
 =========================================================================*/
 
-void read_mat_from_file(E)
-     struct All_variables *E;
+void read_mat_from_file(struct All_variables *E)
 {
     (E->solver.read_input_files_for_timesteps)(E,3,1); /* read element material(3) and output(1) */
   return;
@@ -73,8 +70,7 @@
   read temperature at the top surface from files
 =========================================================================*/
 
-void read_temperature_boundary_from_file(E)
-     struct All_variables *E;
+void read_temperature_boundary_from_file(struct All_variables *E)
 {
     (E->solver.read_input_files_for_timesteps)(E,5,1); /* read temperature(5) and output(1) */
     return;
@@ -85,8 +81,7 @@
   Open restart file to get initial elapsed time, or calculate the right value
 =========================================================================*/
 
-void get_initial_elapsed_time(E)
-  struct All_variables *E;
+void get_initial_elapsed_time(struct All_variables *E)
 {
     FILE *fp;
     int ll, mm,rezip;
@@ -136,8 +131,7 @@
   Sets the elapsed time to zero, if desired.
 =========================================================================*/
 
-void set_elapsed_time(E)
-  struct All_variables *E;
+void set_elapsed_time(struct All_variables *E)
 {
 
     if (E->control.zero_elapsed_time) /* set elapsed_time to zero */
@@ -151,8 +145,7 @@
   run, if desired.
 =========================================================================*/
 
-void set_starting_age(E)
-  struct All_variables *E;
+void set_starting_age(struct All_variables *E)
 {
 /* remember start_age is in MY */
     if (E->control.reset_startage)
@@ -168,9 +161,7 @@
   making ages SMALLER!
 =========================================================================*/
 
-  float find_age_in_MY(E)
-
-  struct All_variables *E;
+float find_age_in_MY(struct All_variables *E)
 {
    float age_in_MY, e_4;
 

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Process_buoyancy.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Process_buoyancy.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Process_buoyancy.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -50,8 +50,7 @@
     Surface heat flux
    =================== */
 
-void heat_flux(E)
-    struct All_variables *E;
+void heat_flux(struct All_variables *E)
 {
     int m,e,el,i,j,node,lnode,nz;
     float *flux[NCS],*SU[NCS],*RU[NCS];

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Regional_boundary_conditions.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Regional_boundary_conditions.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Regional_boundary_conditions.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -39,15 +39,14 @@
 void assign_internal_bc(struct All_variables * ,int);
 static void velocity_apply_periodic_bcs();
 static void temperature_apply_periodic_bcs();
-static void velocity_refl_vert_bc();
-static void temperature_refl_vert_bc();
+static void velocity_refl_vert_bc(struct All_variables *);
+static void temperature_refl_vert_bc(struct All_variables *);
 void read_temperature_boundary_from_file(struct All_variables *);
 void read_velocity_boundary_from_file(struct All_variables *);
 
 /* ========================================== */
 
-void regional_velocity_boundary_conditions(E)
-     struct All_variables *E;
+void regional_velocity_boundary_conditions(struct All_variables *E)
 {
   void velocity_imp_vert_bc();
   void renew_top_velocity_boundary();
@@ -144,17 +143,12 @@
 
 /* ========================================== */
 
-void regional_temperature_boundary_conditions(E)
-     struct All_variables *E;
+void regional_temperature_boundary_conditions(struct All_variables *E)
 {
-  void temperature_imposed_vert_bcs();
-  void temperature_lith_adj();
-  void temperatures_conform_bcs();
   int j,lev,noz;
 
   lev = E->mesh.levmax;
 
-
      temperature_refl_vert_bc(E);
 
   for (j=1;j<=E->sphere.caps_per_proc;j++)    {
@@ -196,8 +190,7 @@
 
 /* ========================================== */
 
-static void velocity_refl_vert_bc(E)
-     struct All_variables *E;
+static void velocity_refl_vert_bc(struct All_variables *E)
 {
   int m,i,j,ii,jj;
   int node1,node2;
@@ -339,8 +332,7 @@
   return;
 }
 
-static void temperature_refl_vert_bc(E)
-     struct All_variables *E;
+static void temperature_refl_vert_bc(struct All_variables *E)
 {
   int i,j,m;
   int node1,node2;
@@ -436,8 +428,7 @@
 }
 
 
-static void velocity_apply_periodic_bcs(E)
-    struct All_variables *E;
+static void velocity_apply_periodic_bcs(struct All_variables *E)
 {
   int n1,n2,level;
   int i,j,ii,jj;
@@ -448,8 +439,7 @@
   return;
   }
 
-static void temperature_apply_periodic_bcs(E)
-    struct All_variables *E;
+static void temperature_apply_periodic_bcs(struct All_variables *E)
 {
  const int dims=E->mesh.nsd;
 

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Regional_geometry_cartesian.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Regional_geometry_cartesian.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Regional_geometry_cartesian.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -29,8 +29,7 @@
 #include "parsing.h"
 
 
-void regional_set_2dc_defaults(E)
-     struct All_variables *E;
+void regional_set_2dc_defaults(struct All_variables *E)
 {
 
   E->mesh.nsd = 2;
@@ -39,8 +38,7 @@
 }
 
 
-void regional_set_2pt5dc_defaults(E)
-    struct All_variables *E;
+void regional_set_2pt5dc_defaults(struct All_variables *E)
 {
 
   E->mesh.nsd = 2;
@@ -48,8 +46,7 @@
 
 }
 
-void regional_set_3dc_defaults(E)
-     struct All_variables *E;
+void regional_set_3dc_defaults(struct All_variables *E)
 {
 
   E->mesh.nsd = 3;
@@ -57,8 +54,7 @@
 
 }
 
-void regional_set_3dsphere_defaults(E)
-     struct All_variables *E;
+void regional_set_3dsphere_defaults(struct All_variables *E)
 {
   E->mesh.nsd = 3;
   E->mesh.dof = 3;

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Regional_parallel_related.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Regional_parallel_related.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Regional_parallel_related.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -294,8 +294,7 @@
  exchange info across the boundaries
  ============================================ */
 
-void regional_parallel_domain_boundary_nodes(E)
-  struct All_variables *E;
+void regional_parallel_domain_boundary_nodes(struct All_variables *E)
   {
 
   void parallel_process_termination();
@@ -443,8 +442,7 @@
  assuming fault nodes are in the top row of processors
  ============================================ */
 
-void regional_parallel_communication_routs_v(E)
-  struct All_variables *E;
+void regional_parallel_communication_routs_v(struct All_variables *E)
   {
 
   int m,i,ii,j,k,l,node,el,elt,lnode,jj,doff,target_cap;
@@ -619,8 +617,7 @@
  assuming fault nodes are in the top row of processors
  ============================================ */
 
-void regional_parallel_communication_routs_s(E)
-  struct All_variables *E;
+void regional_parallel_communication_routs_s(struct All_variables *E)
   {
 
   int i,ii,j,k,l,node,el,elt,lnode,jj,doff;
@@ -741,10 +738,7 @@
 by Tan2 7/21, 2003
 ================================================ */
 
-void regional_exchange_id_d(E, U, lev)
- struct All_variables *E;
- double **U;
- int lev;
+void regional_exchange_id_d(struct All_variables *E, double **U, int lev)
  {
 
  int ii,j,jj,m,k;
@@ -791,10 +785,7 @@
 
 /* ================================================ */
 /* ================================================ */
-static void exchange_node_d(E, U, lev)
- struct All_variables *E;
- double **U;
- int lev;
+static void exchange_node_d(struct All_variables *E, double **U, int lev)
  {
 
  int ii,j,jj,m,k;
@@ -840,10 +831,7 @@
 /* ================================================ */
 /* ================================================ */
 
-static void exchange_node_f(E, U, lev)
- struct All_variables *E;
- float **U;
- int lev;
+static void exchange_node_f(struct All_variables *E, float **U, int lev)
 {
 
  int ii,j,jj,m,k;

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Regional_read_input_from_files.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Regional_read_input_from_files.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Regional_read_input_from_files.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -38,9 +38,7 @@
   Open these files, read in results, and average if necessary
 =========================================================================*/
 
-void regional_read_input_files_for_timesteps(E,action,output)
-    struct All_variables *E;
-    int action, output;
+void regional_read_input_files_for_timesteps(struct All_variables *E, int action, int output)
 {
     float find_age_in_MY();
 

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Regional_sphere_related.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Regional_sphere_related.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Regional_sphere_related.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -32,9 +32,7 @@
 #include "element_definitions.h"
 #include "global_defs.h"
 
-void regional_coord_of_cap(E,m,icap)
-   struct All_variables *E;
-   int icap,m;
+void regional_coord_of_cap(struct All_variables *E, int m, int icap)
   {
 
   int i,j,k,lev,temp,elx,ely,nox,noy,noz,node,nodes;

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Regional_version_dependent.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Regional_version_dependent.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Regional_version_dependent.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -43,8 +43,7 @@
 
    =================================================  */
 
-void regional_node_locations(E)
-  struct All_variables *E;
+void regional_node_locations(struct All_variables *E)
 {
   int i,j,k,lev;
   double ro,dr,*rr,*RR,fo;

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Shape_functions.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Shape_functions.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Shape_functions.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -41,10 +41,8 @@
     Function creating shape_fn data in form of a structure
     =======================================================*/
 
-void construct_shape_functions(E)
-     struct All_variables *E;
+void construct_shape_functions(struct All_variables *E)
 {	
-  double lpoly(),lpolydash();
   int i,j,k,d,dd;
   int remapj,remapk;
 
@@ -169,12 +167,13 @@
       }	 
 
 
-  return; }
+  return;
+}
 
-		
-double lpoly(p,y)
-     int p;	   /*   selects lagrange polynomial , 1d: node p */
-     double y;  /*   coordinate in given direction to evaluate poly */
+/*   selects lagrange polynomial , 1d: node p */
+/*   coordinate in given direction to evaluate poly */
+
+double lpoly(int p, double y)
 {	
   double value;
   
@@ -193,9 +192,7 @@
   return(value);
 }
 	
-double lpolydash(p,y)
-     int p;
-     double y;
+double lpolydash(int p, double y)
 {	
   double value;
   switch (p)

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Size_does_matter.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Size_does_matter.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Size_does_matter.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -34,8 +34,7 @@
 double theta_g(double , struct All_variables *);
 #endif
 
-void twiddle_thumbs(yawn)
-     struct All_variables *yawn;
+void twiddle_thumbs(struct All_variables *yawn)
      //     int scratch_groin;
 
 { /* Do nothing, just sit back and relax.
@@ -51,8 +50,6 @@
 static void form_rtf_bc(int k, double x[4],
                         double rtf[4][9], double bc[4][4])
 {
-    double myatan();
-
     rtf[3][k] = 1.0/sqrt(x[1]*x[1]+x[2]*x[2]+x[3]*x[3]); /* 1/r */
     rtf[1][k] = acos(x[3]*rtf[3][k]); /* theta */
     rtf[2][k] = myatan(x[2],x[1]); /* phi */
@@ -76,9 +73,6 @@
 {
     int i,j,k,d,e;
     double jacobian;
-    double determinant();
-    double cofactor(),myatan();
-    void   form_rtf_bc();
 
     struct Shape_function_dx LGNx;
 
@@ -209,8 +203,6 @@
     int i, k, d;
     double x[4];
 
-    double myatan();
-
     const int dims = E->mesh.nsd;
     const int ends = ENODES3D;
     const int vpts = VPOINTS3D;
@@ -239,8 +231,6 @@
     int i, k, d;
     double x[4];
 
-    double myatan();
-
     const int dims = E->mesh.nsd;
     const int ends = ENODES3D;
     const int ppts = PPOINTS3D;
@@ -306,15 +296,12 @@
 
 /*   ======================================================================
      ======================================================================  */
-void construct_surf_det (E)
-     struct All_variables *E;
+void construct_surf_det (struct All_variables *E)
 {
 
   int m,i,k,d,e,es,el;
 
   double jacobian;
-  double determinant();
-  double cofactor();
 
   const int oned = onedvpoints[E->mesh.nsd];
 
@@ -363,8 +350,6 @@
   int m,i,k,d,e,es,el,side;
 
   double jacobian;
-  double determinant();
-  double cofactor();
 
   const int oned = onedvpoints[E->mesh.nsd];
 
@@ -418,16 +403,11 @@
 
 /*   ======================================================================
      ======================================================================  */
-void get_global_1d_shape_fn(E,el,GM,dGammax,top,m)
-     struct All_variables *E;
-     int el,top,m;
-     struct Shape_function1 *GM;
-     struct Shape_function1_dA *dGammax;
+void get_global_1d_shape_fn(struct All_variables *E, int el, struct Shape_function1 *GM, struct Shape_function1_dA *dGammax, int top, int m)
 {
   int ii,i,k,d,e;
 
   double jacobian;
-  double determinant();
 
   const int oned = onedvpoints[E->mesh.nsd];
 
@@ -457,16 +437,11 @@
 
 /*   ======================================================================
      ======================================================================  */
-void get_global_1d_shape_fn_L(E,el,GM,dGammax,top,m)
-     struct All_variables *E;
-     int el,top,m;
-     struct Shape_function1 *GM;
-     struct Shape_function1_dA *dGammax;
+void get_global_1d_shape_fn_L(struct All_variables *E, int el, struct Shape_function1 *GM, struct Shape_function1_dA *dGammax, int top, int m)
 {
     int ii,i,k,d,e,node;
 
     double jacobian;
-    double determinant();
 
     const int oned = onedvpoints[E->mesh.nsd];
 
@@ -527,17 +502,11 @@
 /*   ======================================================================
      For calculating pressure boundary term --- Choi, 11/13/02
      ======================================================================  */
-void get_global_side_1d_shape_fn(E,el,GM,GMx,dGamma,side,m)
-     struct All_variables *E;
-     int el,side,m;
-     struct Shape_function1 *GM;
-     struct Shape_function1_dx *GMx;
-     struct Shape_function_side_dA *dGamma;
+void get_global_side_1d_shape_fn(struct All_variables *E, int el, struct Shape_function1 *GM, struct Shape_function1_dx *GMx, struct Shape_function_side_dA *dGamma, int side, int m)
 {
   int i,k,d,e;
 
   double jacobian;
-  double determinant();
 
   const int oned = onedvpoints[E->mesh.nsd];
   double xx[4][5],dxda[4][4];
@@ -571,7 +540,6 @@
 			      struct CCX *ccx,int lev,int m,int pressure)
 {
   int a,i,j,k,d,lnode;
-  double cofactor(),myatan();
   double x[4],u[4][4],ux[3][4][4],ua[4][4];
   double costt,cosff,sintt,sinff,rr,tt,ff;
 
@@ -713,7 +681,6 @@
 				  int lev,int m,int pressure,int side)
 {
   int a,aa,i,j,k,d,lnode;
-  double cofactor(),myatan();
   double x[4],u[4][4],ux[3][4][4],ua[4][4];
   double costt,cosff,sintt,sinff,rr,tt,ff;
 
@@ -850,11 +817,9 @@
 
 
 /* ======================================= */
-void construct_c3x3matrix(E)
-     struct All_variables *E;
+void construct_c3x3matrix(struct All_variables *E)
 {
   int m,a,i,j,k,d,es,el,nel_surface,lev,lnode;
-  double cofactor(),myatan();
   double x[4],u[4][4],ux[3][4][4],ua[4][4];
   double costt,cosff,sintt,sinff,rr,tt,ff;
 
@@ -1009,7 +974,7 @@
 {
     int m,node,i,nint,e,lev;
     int n[9], nz;
-    double myatan(),area,centre[4],temp[9],temp2[9],dx1,dx2,dx3;
+    double area,centre[4],temp[9],temp2[9],dx1,dx2,dx3;
 
     const int vpts=vpoints[E->mesh.nsd];
 

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Solver_conj_grad.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Solver_conj_grad.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Solver_conj_grad.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -28,12 +28,8 @@
 #include "element_definitions.h"
 #include "global_defs.h"
 
-void set_cg_defaults(E)
-     struct All_variables *E;
-{ void assemble_forces_iterative();
-  void solve_constrained_flow_iterative();
-  void cg_allocate_vars();
-
+void set_cg_defaults(struct All_variables *E)
+{
   E->control.CONJ_GRAD = 1;
   E->build_forcing_term =   assemble_forces_iterative;
   E->solve_stokes_problem = solve_constrained_flow_iterative;
@@ -43,8 +39,7 @@
   return;
 }
 
-void cg_allocate_vars(E)
-     struct All_variables *E;
+void cg_allocate_vars(struct All_variables *E)
 { 
   /* Nothing required ONLY by conj-grad stuff  */
  /* printf("here here\n"); */
@@ -53,14 +48,10 @@
 
 }
 
-void assemble_forces_iterative(E)
-    struct All_variables *E;
+void assemble_forces_iterative(struct All_variables *E)
 { 
   int i;
 
-  void assemble_forces();
-  void strip_bcs_from_residual();
-    
   assemble_forces(E,0);
 
   strip_bcs_from_residual(E,E->F,E->mesh.levmax);

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Solver_multigrid.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Solver_multigrid.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Solver_multigrid.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -32,12 +32,8 @@
 #include "anisotropic_viscosity.h"
 #endif
 
-void set_mg_defaults(E)
-     struct All_variables *E;
-{ void assemble_forces_iterative();
-  void solve_constrained_flow_iterative();
-  void mg_allocate_vars();
-
+void set_mg_defaults(struct All_variables *E)
+{
   E->control.NMULTIGRID = 1;
   E->build_forcing_term =   assemble_forces_iterative;
   E->solve_stokes_problem = solve_constrained_flow_iterative;
@@ -47,8 +43,7 @@
 return;
 }
 
-void mg_allocate_vars(E)
-     struct All_variables *E;
+void mg_allocate_vars(struct All_variables *E)
 {
   return;
 
@@ -60,10 +55,7 @@
    just dropping values at shared grid points.
    ===================================================== */
 
-void inject_scalar(E,start_lev,AU,AD)
-     struct All_variables *E;
-     int start_lev;
-     float **AU,**AD;  /* data on upper/lower mesh  */
+void inject_scalar(struct All_variables *E, int start_lev, float **AU, float **AD)
 
 {
     int i,m,el,node_coarse,node_fine,sl_minus,eqn,eqn_coarse;
@@ -91,10 +83,7 @@
     return;
 }
 
-void inject_vector(E,start_lev,AU,AD)
-     struct All_variables *E;
-     int start_lev;
-     double **AU,**AD;  /* data on upper/lower mesh  */
+void inject_vector(struct All_variables *E, int start_lev, double **AU, double **AD)
 
 {
     int i,j,m,el,node_coarse,node_fine,sl_minus,eqn_fine,eqn_coarse;
@@ -132,11 +121,7 @@
    just dropping values at shared grid points.
    ===================================================== */
 
-void un_inject_vector(E,start_lev,AD,AU)
-
-     struct All_variables *E;
-     int start_lev;
-     double **AU,**AD;  /* data on upper/lower mesh  */
+void un_inject_vector(struct All_variables *E, int start_lev, double **AD, double **AU)
 {
     int i,m;
     int el,node,node_plus;
@@ -184,11 +169,7 @@
    ======================================================================================= */
 
 
-void interp_vector(E,start_lev,AD,AU)
-
-    struct All_variables *E;
-     int start_lev;
-     double **AD,**AU;  /* data on upper/lower mesh  */
+void interp_vector(struct All_variables *E, int start_lev, double **AD, double **AU)
 {
     void un_inject_vector();
     void fill_in_gaps();
@@ -229,19 +210,10 @@
     levels in the problem. (no gaps for vbcs)
     ==============================================  */
 
-void project_viscosity(E)
-     struct All_variables *E;
+void project_viscosity(struct All_variables *E)
 
 {
     int lv,i,j,k,m,sl_minus;
-    void inject_scalar();
-    void project_scalar();
-    void project_scalar_e();
-    void inject_scalar_e();
-    void visc_from_gint_to_nodes();
-    void visc_from_nodes_to_gint();
-    void visc_from_gint_to_ele();
-    void visc_from_ele_to_gint();
 
     const int nsd=E->mesh.nsd;
     const int vpts=vpoints[nsd];
@@ -350,11 +322,7 @@
 }
 
 /* ==================================================== */
-void inject_scalar_e(E,start_lev,AU,AD)
-
-     struct All_variables *E;
-     int start_lev;
-     float **AU,**AD;  /* data on upper/lower mesh  */
+void inject_scalar_e(struct All_variables *E, int start_lev, float **AU, float **AD)
 {
     int i,j,m;
     int el,node,e;
@@ -384,11 +352,7 @@
 }
 
 /* ==================================================== */
-void project_scalar_e(E,start_lev,AU,AD)
-
-     struct All_variables *E;
-     int start_lev;
-     float **AU,**AD;  /* data on upper/lower mesh  */
+void project_scalar_e(struct All_variables *E, int start_lev, float **AU, float **AD)
 {
     int i,j,m;
     int el,node,e;
@@ -423,11 +387,7 @@
 }
 
 /* ==================================================== */
-void project_scalar(E,start_lev,AU,AD)
-
-     struct All_variables *E;
-     int start_lev;
-     float **AU,**AD;  /* data on upper/lower mesh  */
+void project_scalar(struct All_variables *E, int start_lev, float **AU, float **AD)
 {
     int i,j,m;
     int el,node,node1;
@@ -476,11 +436,7 @@
 
 /* this is prefered scheme with averages */
 
-void project_vector(E,start_lev,AU,AD,ic)
-
-     struct All_variables *E;
-     int start_lev,ic;
-     double **AU,**AD;  /* data on upper/lower mesh  */
+void project_vector(struct All_variables *E, int start_lev, double **AU, double **AD, int ic)
 {
     int i,j,m;
     int el,node1,node,e1;
@@ -553,10 +509,7 @@
  }
 
 /* ================================================= */
- void from_xyz_to_rtf(E,level,xyz,rtf)
- struct All_variables *E;
- int level;
- double **rtf,**xyz;
+ void from_xyz_to_rtf(struct All_variables *E, int level, double **xyz, double **rtf)
  {
 
  int i,j,m,eqn1,eqn2,eqn3;
@@ -585,10 +538,7 @@
  }
 
 /* ================================================= */
- void from_rtf_to_xyz(E,level,rtf,xyz)
- struct All_variables *E;
- int level;
- double **rtf,**xyz;
+ void from_rtf_to_xyz(struct All_variables *E, int level, double **rtf, double **xyz)
  {
 
  int i,j,m,eqn1,eqn2,eqn3;
@@ -618,10 +568,7 @@
  }
 
  /* ========================================================== */
- void fill_in_gaps(E,temp,level)
-    struct All_variables *E;
-    int level;
-    double **temp;
+ void fill_in_gaps(struct All_variables *E, double **temp, int level)
   {
 
     int i,j,k,m;

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Sphere_harmonics.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Sphere_harmonics.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Sphere_harmonics.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -12,8 +12,7 @@
 /*   ======================================================================
      ======================================================================  */
 
-void set_sphere_harmonics(E)
-     struct All_variables *E;
+void set_sphere_harmonics(struct All_variables *E)
 
 {
     int m,node,ll,mm,i,j;
@@ -100,9 +99,7 @@
 /* =========================================================
    expand the field TG into spherical harmonics
    ========================================================= */
-void sphere_expansion(E,TG,sphc,sphs)
-     struct All_variables *E;
-     float **TG,*sphc,*sphs;
+void sphere_expansion(struct All_variables *E, float **TG, float *sphc, float *sphs)
 {
     int el,nint,d,p,i,m,j,es,mm,ll,rand();
     void sum_across_surf_sph1();
@@ -193,11 +190,8 @@
 
 /* ==================================================*/
 /* ==================================================*/
-static void  compute_sphereh_table(E)
-     struct All_variables *E;
+static void  compute_sphereh_table(struct All_variables *E)
 {
-    double modified_plgndr_a();
-
     int m,node,ll,mm,i,j,p;
     double t,f,mmf;
     

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Sphere_util.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Sphere_util.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Sphere_util.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -37,11 +37,9 @@
   anglewise evenly.
  =================================================*/
 
-void even_divide_arc12(elx,x1,y1,z1,x2,y2,z2,theta,fi)
- double x1,y1,z1,x2,y2,z2,*theta,*fi;
- int elx;
+void even_divide_arc12(int elx, double x1, double y1, double z1, double x2, double y2, double z2, double *theta, double *fi)
 {
-  double dx,dy,dz,xx,yy,zz,myatan();
+  double dx,dy,dz,xx,yy,zz;
   int j, nox;
 
   nox = elx+1;
@@ -64,13 +62,11 @@
    compute angle and area
    ================================================*/
 
-void compute_angle_surf_area (E)
-     struct All_variables *E;
+void compute_angle_surf_area (struct All_variables *E)
 {
 
     int es,el,m,i,j,ii,ia[5],lev;
-    double aa,y1[4],y2[4],angle[6],xx[4][5],area_sphere_cap();
-    void get_angle_sphere_cap();
+    double aa,y1[4],y2[4],angle[6],xx[4][5];
     void parallel_process_termination();
 
     for (m=1;m<=E->sphere.caps_per_proc;m++)   {
@@ -123,12 +119,10 @@
 /* ================================================
    area of spherical rectangle
    ================================================ */
-double area_sphere_cap(angle)
-     double angle[6];
+double area_sphere_cap(double angle[6])
 {
 
     double area,a,b,c;
-    double area_of_sphere_triag();
 
     a = angle[1];
     b = angle[2];
@@ -146,8 +140,7 @@
 /* ================================================
    area of spherical triangle
    ================================================ */
-double area_of_sphere_triag(a,b,c)
-     double a,b,c;
+double area_of_sphere_triag(double a, double b, double c)
 {
 
     double ss,ak,aa,bb,cc,area;
@@ -176,13 +169,10 @@
     angle [i]: angle bet test node and node i of the rectangle
     angle1[i]: angle bet nodes i and i+1 of the rectangle
     ====================================================================== */
-double area_of_5points(E,lev,m,el,x,ne)
-     struct All_variables *E;
-     int lev,m,el,ne;
-     double x[4];
+double area_of_5points(struct All_variables *E, int lev, int m, int el, double x[4], int ne)
 {
     int i,es,ia[5];
-    double area1,get_angle(),area_of_sphere_triag();
+    double area1;
     double xx[4],angle[5],angle1[5];
 
     for (i=1;i<=4;i++)
@@ -210,12 +200,11 @@
     get the angle for given four points spherical rectangle
     ================================= */
 
-void  get_angle_sphere_cap(xx,angle)
-     double xx[4][5],angle[6];
+void  get_angle_sphere_cap(double xx[4][5], double angle[6])
 {
 
     int i,j,ii;
-    double y1[4],y2[4],get_angle();;
+    double y1[4],y2[4];
 
     for (i=1;i<=4;i++)     {     /* angle1: bet 1 & 2; angle2: bet 2 & 3 ..*/
         for (j=1;j<=3;j++)     {
@@ -238,8 +227,7 @@
 /*  ================================
     get the angle for given two points
     ================================= */
-double get_angle(x,xx)
-     double x[4],xx[4];
+double get_angle(double x[4], double xx[4])
 {
     double dist,angle;
     const double pt5 = 0.5;

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Stokes_flow_Incomp.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Stokes_flow_Incomp.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Stokes_flow_Incomp.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -57,8 +57,7 @@
 
 /* Master loop for pressure and (hence) velocity field */
 
-void solve_constrained_flow_iterative(E)
-     struct All_variables *E;
+void solve_constrained_flow_iterative(struct All_variables *E)
 
 {
     void v_from_vector();
@@ -103,8 +102,8 @@
     const int neq = E->lmesh.neq;
 
     for(m=1; m<=E->sphere.caps_per_proc; m++) {
-        r1[m] = malloc((neq+1)*sizeof(double));
-        r2[m] = malloc((neq+1)*sizeof(double));
+        r1[m] = (double *)malloc((neq+1)*sizeof(double));
+        r2[m] = (double *)malloc((neq+1)*sizeof(double));
     }
 
     /* r2 = F - grad(P) - K*V */

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Topo_gravity.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Topo_gravity.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Topo_gravity.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -63,11 +63,7 @@
 
  */
 
-void get_STD_topo(E,tpg,tpgb,divg,vort,ii)
-    struct All_variables *E;
-    float **tpg,**tpgb;
-    float **divg,**vort;
-    int ii;
+void get_STD_topo(struct All_variables *E, float **tpg, float **tpgb, float **divg, float **vort, int ii)
 {
     void allocate_STD_mem();
     void compute_nodal_stress();
@@ -933,8 +929,7 @@
 
 
 
-void compute_geoid(E)
-     struct All_variables *E;
+void compute_geoid(struct All_variables *E)
 {
     int i, p;
 
@@ -986,10 +981,8 @@
 this routine does not require stress tensor computation, call
 separately if stress output is needed
 
- */
-void get_CBF_topo(E,H,HB)       /* call this only for top and bottom processors*/
-    struct All_variables *E;
-    float **H,**HB;
+ */       /* call this only for top and bottom processors*/
+void get_CBF_topo(struct All_variables *E, float **H, float **HB)
 
 {
     void get_elt_k();

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Tracer_setup.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Tracer_setup.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Tracer_setup.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -221,15 +221,6 @@
 
 void tracer_initial_settings(struct All_variables *E)
 {
-   void full_keep_within_bounds();
-   void full_tracer_setup();
-   void full_get_velocity();
-   int full_iget_element();
-   void regional_keep_within_bounds();
-   void regional_tracer_setup();
-   void regional_get_velocity();
-   int regional_iget_element();
-
    E->trace.advection_time = 0;
    E->trace.find_tracers_time = 0;
    E->trace.lost_souls_time = 0;
@@ -1236,7 +1227,6 @@
 {
 
     double temp;
-    double myatan();
 
     temp=x*x+y*y;
 

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/Viscosity_structures.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/Viscosity_structures.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/Viscosity_structures.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -279,10 +279,7 @@
    visc  = E->VI[E->mesh.levmax]
 
  */
-void get_system_viscosity(E,propogate,evisc,visc)
-     struct All_variables *E;
-     int propogate;
-     float **evisc,**visc;
+void get_system_viscosity(struct All_variables *E, int propogate, float **evisc, float **visc)
 {
     void visc_from_mat();
     void visc_from_T();
@@ -408,9 +405,7 @@
 }
 
 
-void visc_from_mat(E,EEta)
-     struct All_variables *E;
-     float **EEta;
+void visc_from_mat(struct All_variables *E, float **EEta)
 {
 
     int i,m,jj;
@@ -476,10 +471,7 @@
 }
 
 
-void visc_from_T(E,EEta,propogate)
-     struct All_variables *E;
-     float **EEta;
-     int propogate;
+void visc_from_T(struct All_variables *E, float **EEta, int propogate)
 {
     int m,i,k,l,z,jj,kk;
     float zero,one,eta0,temp,tempa,TT[9];
@@ -902,10 +894,7 @@
 }
 
 
-void visc_from_S(E,EEta,propogate)
-     struct All_variables *E;
-     float **EEta;
-     int propogate;
+void visc_from_S(struct All_variables *E, float **EEta, int propogate)
 {
     float one,two,scale,stress_magnitude,depth,exponent1;
     float *eedot;
@@ -948,9 +937,9 @@
     return;
 }
 
-void visc_from_P(E,EEta) /* "plasticity" implementation
+void visc_from_P(struct All_variables *E, float **EEta)
+			 /* "plasticity" implementation
 
-
 			 psrw = FALSE
 
 			 viscosity will be limited by a yield stress
@@ -993,8 +982,6 @@
 			 TWB
 
 			 */
-     struct All_variables *E;
-     float **EEta;
 {
   float *eedot,zz[9],zzz,tau,eta_p,eta_new,tau2,eta_old,eta_old2;
   int m,e,l,z,jj,kk;
@@ -1105,9 +1092,7 @@
 compositions between zero and unity
 
 */
-void visc_from_C( E, EEta)
-     struct All_variables *E;
-     float **EEta;
+void visc_from_C(struct All_variables *E, float **EEta)
 {
   double vmean,cc_loc[10],CC[10][9],cbackground;
   int m,l,z,jj,kk,i,p,q;
@@ -1155,10 +1140,7 @@
   } /* end cap */
 }
 
-void strain_rate_2_inv(E,m,EEDOT,SQRT)
-     struct All_variables *E;
-     float *EEDOT;
-     int m,SQRT;
+void strain_rate_2_inv(struct All_variables *E, int m, float *EEDOT, int SQRT)
 {
     void get_rtf_at_ppts();
     void velo_from_element();

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/advection_diffusion.h
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/advection_diffusion.h	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/advection_diffusion.h	2011-07-20 20:03:59 UTC (rev 18786)
@@ -29,16 +29,8 @@
 #if !defined(CitcomS_advection_diffusion_h)
 #define CitcomS_advection_diffusion_h
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 void PG_timestep_init(struct All_variables *);
 void PG_timestep_solve(struct All_variables *);
 void std_timestep(struct All_variables *);
 
-#ifdef __cplusplus
-}
 #endif
-
-#endif

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/citcom_init.h
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/citcom_init.h	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/citcom_init.h	2011-07-20 20:03:59 UTC (rev 18786)
@@ -31,16 +31,8 @@
 
 #include "mpi.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 extern struct All_variables* citcom_init(MPI_Comm *world);
 void citcom_finalize(struct All_variables *E, int status);
 
-#ifdef __cplusplus
-}
 #endif
 
-#endif
-

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/drive_solvers.h
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/drive_solvers.h	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/drive_solvers.h	2011-07-20 20:03:59 UTC (rev 18786)
@@ -28,15 +28,7 @@
 #if !defined(CitcomS_drive_solvers_h)
 #define CitcomS_drive_solvers_h
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 void general_stokes_solver(struct All_variables*);
 void general_stokes_solver_setup(struct All_variables*);
 
-#ifdef __cplusplus
-}
 #endif
-
-#endif

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/global_defs.h
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/global_defs.h	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/global_defs.h	2011-07-20 20:03:59 UTC (rev 18786)
@@ -51,23 +51,14 @@
 #include "hdf5.h"
 #endif
 
-#ifdef __cplusplus
 
-extern "C" {
 
-#else
-
-
-
-
 /* Macros */
 #define max(A,B) (((A) > (B)) ? (A) : (B))
 #define min(A,B) (((A) < (B)) ? (A) : (B))
 #define SWAP(a,b) {temp=(a);(a)=(b);(b)=temp;}
 
-#endif
 
-
 #define LIDN 0x1
 #define VBX 0x2
 #define VBZ 0x4
@@ -856,9 +847,6 @@
 
 };
 
-#ifdef __cplusplus
-}
-#endif
 
 #ifndef TRUE
 #define TRUE 1

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/output.h
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/output.h	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/output.h	2011-07-20 20:03:59 UTC (rev 18786)
@@ -29,10 +29,6 @@
 #if !defined(CitcomS_output_h)
 #define CitcomS_output_h
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 void output_common_input(struct All_variables *);
 void output(struct All_variables *, int);
 void output_time(struct All_variables *, int);
@@ -43,10 +39,6 @@
 
 FILE* output_open(char *, char *);
 
-#ifdef __cplusplus
-}
-#endif
-
 #ifdef USE_GZDIR
 void gzdir_output(struct All_variables *, int );
 #endif

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/output_h5.h
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/output_h5.h	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/output_h5.h	2011-07-20 20:03:59 UTC (rev 18786)
@@ -29,16 +29,8 @@
 #if !defined(CitcomS_output_h5_h)
 #define CitcomS_output_h5_h
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 void h5output_allocate_memory(struct All_variables *);
 void h5input_params(struct All_variables *);
 void h5output(struct All_variables *, int);
 
-#ifdef __cplusplus
-}
 #endif
-
-#endif

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/parallel_related.h
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/parallel_related.h	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/parallel_related.h	2011-07-20 20:03:59 UTC (rev 18786)
@@ -29,17 +29,9 @@
 #if !defined(CitcomS_parallel_related_h)
 #define CitcomS_parallel_related_h
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 void parallel_process_finalize();
 void parallel_process_termination();
 void parallel_process_sync(struct All_variables *E);
 double CPU_time0();
 
-#ifdef __cplusplus
-}
 #endif
-
-#endif

Modified: mc/3D/CitcomS/branches/eheien_dev/lib/prototypes.h
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/lib/prototypes.h	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/lib/prototypes.h	2011-07-20 20:03:59 UTC (rev 18786)
@@ -207,7 +207,7 @@
 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);
+float global_fmin(struct All_variables *, float);
 double global_dmax(struct All_variables *, double);
 float global_fmax(struct All_variables *, double);
 double Tmaxd(struct All_variables *, double **);

Modified: mc/3D/CitcomS/branches/eheien_dev/module/misc.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/module/misc.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/module/misc.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -123,7 +123,7 @@
                             "%s: 'libCitcomSCommon.citcom_init' failed",
                             pyCitcom_citcom_init__name__);
 
-    cobj = PyCObject_FromVoidPtr(E, deleteE);
+    cobj = PyCObject_FromVoidPtr(E, (void (*)(void*))deleteE);
 
     return Py_BuildValue("N", cobj);
 }

Modified: mc/3D/CitcomS/branches/eheien_dev/visual/project_geoid.c
===================================================================
--- mc/3D/CitcomS/branches/eheien_dev/visual/project_geoid.c	2011-07-20 18:06:57 UTC (rev 18785)
+++ mc/3D/CitcomS/branches/eheien_dev/visual/project_geoid.c	2011-07-20 20:03:59 UTC (rev 18786)
@@ -66,10 +66,10 @@
 
 void allocate_sph_harm(sph_harm *coeff, int len)
 {
-    coeff->ll = malloc(len * sizeof(int));
-    coeff->mm = malloc(len * sizeof(int));
-    coeff->clm = malloc(len * sizeof(float));
-    coeff->slm = malloc(len * sizeof(float));
+    coeff->ll = (int *)malloc(len * sizeof(int));
+    coeff->mm = (int *)malloc(len * sizeof(int));
+    coeff->clm = (float *)malloc(len * sizeof(float));
+    coeff->slm = (float *)malloc(len * sizeof(float));
 }
 
 
@@ -145,8 +145,8 @@
     grid->nphi = nphi;
 
     /* allocate memory */
-    grid->theta = malloc(ntheta * sizeof(double));
-    grid->phi = malloc(nphi * sizeof(double));
+    grid->theta = (double *)malloc(ntheta * sizeof(double));
+    grid->phi = (double *)malloc(nphi * sizeof(double));
 
 
     /* create a regular mesh */



More information about the CIG-COMMITS mailing list