[cig-commits] r14537 - in long/3D/Gale/trunk: . src/StGermain/Discretisation/Mesh/src

walter at geodynamics.org walter at geodynamics.org
Mon Mar 30 01:13:11 PDT 2009


Author: walter
Date: 2009-03-30 01:13:11 -0700 (Mon, 30 Mar 2009)
New Revision: 14537

Modified:
   long/3D/Gale/trunk/
   long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/SurfaceAdaptor.c
Log:
 r2629 at dante:  boo | 2009-03-30 01:00:31 -0700
 Fix a bug in SurfaceAdaptor (thanks to Laetitia)



Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
   - 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2628
   + 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2629

Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/SurfaceAdaptor.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/SurfaceAdaptor.c	2009-03-30 08:12:05 UTC (rev 14536)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Mesh/src/SurfaceAdaptor.c	2009-03-30 08:13:11 UTC (rev 14537)
@@ -310,6 +310,8 @@
                                unsigned* vertexInds )
 {
   double x_factor, z_factor;
+  x_factor =1;
+  z_factor=1;
   if( mesh->verts[vertex][0] < self->info.plateau.x1
       || mesh->verts[vertex][0] > self->info.plateau.x4)
     {
@@ -318,21 +320,18 @@
   else if( mesh->verts[vertex][0] <= self->info.plateau.x2)
     {
       x_factor=(mesh->verts[vertex][0] - self->info.plateau.x1)
-        *self->info.plateau.height
         /(self->info.plateau.x2 - self->info.plateau.x1);
     }
   else if( mesh->verts[vertex][0] <= self->info.plateau.x3)
     {
-      x_factor=self->info.plateau.height;
+      x_factor=1;
     }
   else if( mesh->verts[vertex][0] <= self->info.plateau.x4)
     {
       x_factor=(self->info.plateau.x4 - mesh->verts[vertex][0])
-        *self->info.plateau.height
         /(self->info.plateau.x4 - self->info.plateau.x3);
     }
 
-  z_factor=1;
   if(mesh->topo->nDims==3)
     {
       if( mesh->verts[vertex][2] < self->info.plateau.z1
@@ -343,22 +342,20 @@
       else if( mesh->verts[vertex][2] <= self->info.plateau.z2)
         {
           z_factor=(mesh->verts[vertex][2] - self->info.plateau.z1)
-            *self->info.plateau.height
             /(self->info.plateau.z2 - self->info.plateau.z1);
         }
       else if( mesh->verts[vertex][2] <= self->info.plateau.z3)
         {
-          z_factor=self->info.plateau.height;
+          z_factor=1;
         }
       else if( mesh->verts[vertex][2] <= self->info.plateau.z4)
         {
           z_factor=(self->info.plateau.z4 - mesh->verts[vertex][2])
-            *self->info.plateau.height
             /(self->info.plateau.z4 - self->info.plateau.z3);
         }
     }
 
-  return x_factor*z_factor;
+  return x_factor*z_factor*self->info.plateau.height;
 }
 
 double SurfaceAdaptor_Topo_Data( SurfaceAdaptor* self, Mesh* mesh, 



More information about the CIG-COMMITS mailing list