[cig-commits] r14419 - in long/3D/Gale/trunk: . src/Gale/Utils/src
walter at geodynamics.org
walter at geodynamics.org
Mon Mar 23 06:22:41 PDT 2009
Author: walter
Date: 2009-03-23 06:22:40 -0700 (Mon, 23 Mar 2009)
New Revision: 14419
Modified:
long/3D/Gale/trunk/
long/3D/Gale/trunk/src/Gale/Utils/src/StressBC.c
Log:
r2572 at dante: boo | 2009-03-23 06:10:04 -0700
Add an overcount factor back into StressBC, but this time it is uniform.
Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
- 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2571
+ 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2572
Modified: long/3D/Gale/trunk/src/Gale/Utils/src/StressBC.c
===================================================================
--- long/3D/Gale/trunk/src/Gale/Utils/src/StressBC.c 2009-03-23 13:22:36 UTC (rev 14418)
+++ long/3D/Gale/trunk/src/Gale/Utils/src/StressBC.c 2009-03-23 13:22:40 UTC (rev 14419)
@@ -337,6 +337,7 @@
Dof_Index nodeDofCount;
double stress, area;
IJK ijk;
+ int overcount;
Node_DomainIndex* elementNodes = NULL;
@@ -353,6 +354,14 @@
area=StressBC_compute_face_area(self->_wall,mesh,lElement_I,
&elementNodeCount,dim,&elementNodes);
+ if(dim==2)
+ {
+ overcount=2;
+ }
+ else
+ {
+ overcount=4;
+ }
/* Apply the stress */
for( eNode_I = 0 ; eNode_I < elementNodeCount; eNode_I++ ) {
/* Make sure that we are on the boundary */
@@ -408,8 +417,12 @@
Mesh_GetVertex(mesh,elementNodes[eNode_I]));
break;
}
+ /* We have to divide by an overcount_factor, because
+ otherwise different elements will count the same node
+ more than once. In 2D, nodes are counted twice, in 3D,
+ nodes are counted four times. */
elForceVec[eNode_I*nodeDofCount + self->_entryTbl[entry_I].axis]+=
- stress*area;
+ stress*area/overcount;
}
}
}
More information about the CIG-COMMITS
mailing list