[cig-commits] r14119 - in long/3D/Gale/trunk: . src/Underworld/plugins/EulerDeform
walter at geodynamics.org
walter at geodynamics.org
Sun Feb 22 23:39:52 PST 2009
Author: walter
Date: 2009-02-22 23:39:52 -0800 (Sun, 22 Feb 2009)
New Revision: 14119
Modified:
long/3D/Gale/trunk/
long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/EulerDeform.c
Log:
r2496 at dante: boo | 2009-02-22 23:38:37 -0800
Fix a bug where EulerDeform was not interpolating correctly
Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
- 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2494
+ 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2496
Modified: long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/EulerDeform.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/EulerDeform.c 2009-02-23 03:08:39 UTC (rev 14118)
+++ long/3D/Gale/trunk/src/Underworld/plugins/EulerDeform/EulerDeform.c 2009-02-23 07:39:52 UTC (rev 14119)
@@ -1134,19 +1134,20 @@
memcpy( crds[1], oldCrds[ind], nDims * sizeof(double) );
memcpy( crds[0], oldCrd, nDims * sizeof(double) );
}
+
+ if(newCrd[0]==oldCrd[0]) {
+ mesh->verts[centerInd][1]=oldCrd[1];
+ }
else {
- insist( Mesh_GlobalToDomain( mesh, MT_VERTEX, ind, &ind ) );
- memcpy( crds[1], oldCrds[ind], nDims * sizeof(double) );
- memcpy( crds[0], oldCrd, nDims * sizeof(double) );
- }
- /* Interpolate. */
+ /* Interpolate. */
#ifndef NDEBUG
- assert( _EulerDeform_LineInterp( (const double**)crds, newCrd, 0, 1, &mesh->verts[centerInd][1] ) );
+ assert( _EulerDeform_LineInterp( (const double**)crds, newCrd, 0, 1, &mesh->verts[centerInd][1] ) );
#else
- _EulerDeform_LineInterp( (const double**)crds, newCrd, 0, 1, &mesh->verts[centerInd][1] );
+ _EulerDeform_LineInterp( (const double**)crds, newCrd, 0, 1, &mesh->verts[centerInd][1] );
#endif
- mesh->verts[centerInd][1] -= 1e-15;
+ mesh->verts[centerInd][1] -= 1e-15;
+ }
}
else if( grm->nDims == 3 ) {
mesh = sys->remesher->mesh;
More information about the CIG-COMMITS
mailing list