[cig-commits] r18793 - mc/1D/hc/trunk

becker at geodynamics.org becker at geodynamics.org
Thu Jul 21 15:47:49 PDT 2011


Author: becker
Date: 2011-07-21 15:47:49 -0700 (Thu, 21 Jul 2011)
New Revision: 18793

Modified:
   mc/1D/hc/trunk/hc_init.c
   mc/1D/hc/trunk/main.c
Log:
Fixed another operation mode bug



Modified: mc/1D/hc/trunk/hc_init.c
===================================================================
--- mc/1D/hc/trunk/hc_init.c	2011-07-21 19:55:54 UTC (rev 18792)
+++ mc/1D/hc/trunk/hc_init.c	2011-07-21 22:47:49 UTC (rev 18793)
@@ -1342,7 +1342,10 @@
 {
   int i;
   hc_boolean hit;
-  if(pvel->n == 1){
+  if(pvel->n == 0){
+    /* do nothing, if not initialized proper */
+    return;
+  }else if(pvel->n == 1){
     if(verbose){
       fprintf(stderr,"hc_select_pvel: only one plate velocity loadeed, disregarding time argument\n");
     }

Modified: mc/1D/hc/trunk/main.c
===================================================================
--- mc/1D/hc/trunk/main.c	2011-07-21 19:55:54 UTC (rev 18792)
+++ mc/1D/hc/trunk/main.c	2011-07-21 22:47:49 UTC (rev 18793)
@@ -134,8 +134,7 @@
      make sure we have room for the plate velocities 
   */
   sh_allocate_and_init(&pvel,2,lmax,model->sh_type,1,p->verbose,FALSE);
-
-
+  
   /* init done */
   /* 
 
@@ -163,7 +162,8 @@
     /* 
        solve poloidal and toroidal part and sum
     */
-    hc_select_pvel(p->pvel_time,&model->pvel,pvel,p->verbose);
+    if(!p->free_slip)
+      hc_select_pvel(p->pvel_time,&model->pvel,pvel,p->verbose);
     hc_solve(model,p->free_slip,p->solution_mode,sol_spectral,
 	     TRUE,TRUE,TRUE,p->print_pt_sol,p->compute_geoid,
 	     pvel,model->dens_anom,geoid,
@@ -295,7 +295,8 @@
 
     /*  */
     /* select plate velocity */
-    hc_select_pvel(p->pvel_time,&model->pvel,pvel,p->verbose);
+    if(!p->free_slip)
+      hc_select_pvel(p->pvel_time,&model->pvel,pvel,p->verbose);
     
     solved=0;
     for(v[0]=vl[0][0];v[0] <= vl[0][1];v[0] += vl[0][2])



More information about the CIG-COMMITS mailing list