[cig-commits] r12032 - in long/3D/Gale/trunk: . src/Gale/Utils/src
walter at geodynamics.org
walter at geodynamics.org
Tue May 27 05:05:43 PDT 2008
Author: walter
Date: 2008-05-27 05:05:43 -0700 (Tue, 27 May 2008)
New Revision: 12032
Modified:
long/3D/Gale/trunk/
long/3D/Gale/trunk/src/Gale/Utils/src/KineticFriction.c
long/3D/Gale/trunk/src/Gale/Utils/src/StaticFrictionVC.c
long/3D/Gale/trunk/src/Gale/Utils/src/StaticFrictionVC.h
Log:
r2197 at earth: boo | 2008-05-27 05:05:45 -0700
Use correct local node numbers for computing surfaces in StaticFriction and remove all traces of force_vector.
Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
- 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2195
+ 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2197
Modified: long/3D/Gale/trunk/src/Gale/Utils/src/KineticFriction.c
===================================================================
--- long/3D/Gale/trunk/src/Gale/Utils/src/KineticFriction.c 2008-05-27 11:40:54 UTC (rev 12031)
+++ long/3D/Gale/trunk/src/Gale/Utils/src/KineticFriction.c 2008-05-27 12:05:43 UTC (rev 12032)
@@ -382,8 +382,6 @@
tangential_stress[3], tangential_norm, friction_coefficient;
Bool include_boundary[3];
- double *force_vector=StaticFrictionVC_get_force_vector();
-
Stream* errorStr = Journal_Register( Error_Type, self->type );
switch(self->friction_entry.type)
{
@@ -474,8 +472,6 @@
v_diff_norm=Vec_Mag3D(v_surface_diff);
}
- StaticFrictionVC_get_force_vector(force_vector);
-
friction_force=friction_coefficient*normal_stress*area/overcount;
if(friction_force>0 && v_diff_norm!=0.0)
Modified: long/3D/Gale/trunk/src/Gale/Utils/src/StaticFrictionVC.c
===================================================================
--- long/3D/Gale/trunk/src/Gale/Utils/src/StaticFrictionVC.c 2008-05-27 11:40:54 UTC (rev 12031)
+++ long/3D/Gale/trunk/src/Gale/Utils/src/StaticFrictionVC.c 2008-05-27 12:05:43 UTC (rev 12032)
@@ -39,8 +39,6 @@
extern const char* WallEnumToStr[Wall_Size];
-static double force_vector[129*65*2*4*2];
-
/*--------------------------------------------------------------------------------------------------------------------------
** Constructor
*/
@@ -618,7 +616,6 @@
unsigned nDims;
Grid* grid;
FeVariable *deviatoric_stress, *pressure;
- unsigned nnn;
nDims = Mesh_GetDimSize( self->_mesh );
grid = *(Grid**)ExtensionManager_Get( self->_mesh->info, self->_mesh,
@@ -637,10 +634,6 @@
self->deviatoric_stress_name);
-
- for(nnn=0;nnn<129*65*2*4*2;++nnn)
- force_vector[nnn]=0;
-
/* If this is the first time this routine is called, the
stress may not have been initialized yet. In that case,
make everything stick. */
@@ -932,7 +925,7 @@
{
double x1[2],x2[2],surface[2];
int sign;
- unsigned n_temp, ijk_temp[3], new_basis[2];
+ unsigned n_temp, n_local, ijk_temp[3], new_basis[2];
sign=1;
/* If the first direction is z, then use the
second direction and reverse it. This is
@@ -960,8 +953,12 @@
Vec_Set2D(ijk_temp,ijk);
ijk_temp[new_basis[0]]-=1;
n_temp=RegularMeshUtils_Node_3DTo1D(mesh,ijk_temp);
- x1[0]=mesh->verts[n_temp][0];
- x1[1]=mesh->verts[n_temp][1];
+ if(!Mesh_GlobalToDomain(mesh,MT_VERTEX,n_temp,&n_local))
+ {
+ printf("Bad node %d %d\n",n_temp,n_local);
+ }
+ x1[0]=mesh->verts[n_local][0];
+ x1[1]=mesh->verts[n_local][1];
}
/* Get x2 */
if(ijk[new_basis[0]]==sizes[new_basis[0]]-1)
@@ -979,8 +976,12 @@
Vec_Set2D(ijk_temp,ijk);
ijk_temp[new_basis[0]]+=1;
n_temp=RegularMeshUtils_Node_3DTo1D(mesh,ijk_temp);
- x2[0]=mesh->verts[n_temp][0];
- x2[1]=mesh->verts[n_temp][1];
+ if(!Mesh_GlobalToDomain(mesh,MT_VERTEX,n_temp,&n_local))
+ {
+ printf("Bad node %d %d\n",n_temp,n_local);
+ }
+ x2[0]=mesh->verts[n_local][0];
+ x2[1]=mesh->verts[n_local][1];
}
/* Get the surface */
Vec_Sub2D(surface,x2,x1);
@@ -1012,7 +1013,7 @@
else
{
double x1[3],x2[3],x3[3],x4[3],line1[3],line2[3];
- unsigned n_temp, ijk_temp[3];
+ unsigned n_temp, n_local, ijk_temp[3];
/* Get x1 */
if(ijk[basis[0]]==0)
@@ -1030,8 +1031,12 @@
Vec_Set2D(ijk_temp,ijk);
ijk_temp[basis[0]]-=1;
n_temp=RegularMeshUtils_Node_3DTo1D(mesh,ijk_temp);
- x1[0]=mesh->verts[n_temp][0];
- x1[1]=mesh->verts[n_temp][1];
+ if(!Mesh_GlobalToDomain(mesh,MT_VERTEX,n_temp,&n_local))
+ {
+ printf("Bad node %d %d\n",n_temp,n_local);
+ }
+ x1[0]=mesh->verts[n_local][0];
+ x1[1]=mesh->verts[n_local][1];
}
/* Get x2 */
if(ijk[basis[0]]==sizes[basis[0]]-1)
@@ -1049,8 +1054,12 @@
Vec_Set2D(ijk_temp,ijk);
ijk_temp[basis[0]]+=1;
n_temp=RegularMeshUtils_Node_3DTo1D(mesh,ijk_temp);
- x2[0]=mesh->verts[n_temp][0];
- x2[1]=mesh->verts[n_temp][1];
+ if(!Mesh_GlobalToDomain(mesh,MT_VERTEX,n_temp,&n_local))
+ {
+ printf("Bad node %d %d\n",n_temp,n_local);
+ }
+ x2[0]=mesh->verts[n_local][0];
+ x2[1]=mesh->verts[n_local][1];
}
/* Get x3 */
@@ -1069,8 +1078,12 @@
Vec_Set2D(ijk_temp,ijk);
ijk_temp[basis[1]]-=1;
n_temp=RegularMeshUtils_Node_3DTo1D(mesh,ijk_temp);
- x3[0]=mesh->verts[n_temp][0];
- x3[1]=mesh->verts[n_temp][1];
+ if(!Mesh_GlobalToDomain(mesh,MT_VERTEX,n_temp,&n_local))
+ {
+ printf("Bad node %d %d\n",n_temp,n_local);
+ }
+ x3[0]=mesh->verts[n_local][0];
+ x3[1]=mesh->verts[n_local][1];
}
/* Get x4 */
if(ijk[basis[1]]==sizes[basis[1]]-1)
@@ -1088,8 +1101,12 @@
Vec_Set2D(ijk_temp,ijk);
ijk_temp[basis[1]]+=1;
n_temp=RegularMeshUtils_Node_3DTo1D(mesh,ijk_temp);
- x4[0]=mesh->verts[n_temp][0];
- x4[1]=mesh->verts[n_temp][1];
+ if(!Mesh_GlobalToDomain(mesh,MT_VERTEX,n_temp,&n_local))
+ {
+ printf("Bad node %d %d\n",n_temp,n_local);
+ }
+ x4[0]=mesh->verts[n_local][0];
+ x4[1]=mesh->verts[n_local][1];
}
/* Compute the normal. */
@@ -1131,8 +1148,3 @@
*normal_stress=-(*normal_stress);
return True;
}
-
-double * StaticFrictionVC_get_force_vector()
-{
- return force_vector;
-}
Modified: long/3D/Gale/trunk/src/Gale/Utils/src/StaticFrictionVC.h
===================================================================
--- long/3D/Gale/trunk/src/Gale/Utils/src/StaticFrictionVC.h 2008-05-27 11:40:54 UTC (rev 12031)
+++ long/3D/Gale/trunk/src/Gale/Utils/src/StaticFrictionVC.h 2008-05-27 12:05:43 UTC (rev 12032)
@@ -215,6 +215,4 @@
unsigned *direction, unsigned *boundary,
unsigned basis[]);
-double * StaticFrictionVC_get_force_vector();
-
#endif /* __Discretisation_Utils_StaticFrictionVC_h__ */
More information about the cig-commits
mailing list