[cig-commits] r12730 - in long/3D/Gale/trunk: . src/StgFEM/SLE/SystemSetup/src src/StgFEM/plugins/StandardConditionFunctions
walter at geodynamics.org
walter at geodynamics.org
Wed Aug 27 13:43:23 PDT 2008
Author: walter
Date: 2008-08-27 13:43:23 -0700 (Wed, 27 Aug 2008)
New Revision: 12730
Modified:
long/3D/Gale/trunk/
long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/Context.c
long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/Context.h
long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/SystemLinearEquations.c
long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c
Log:
r2317 at earth: boo | 2008-08-25 22:06:13 -0700
Make Friction BC's restick
Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
- 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2316
+ 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2317
Modified: long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/Context.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/Context.c 2008-08-27 20:43:19 UTC (rev 12729)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/Context.c 2008-08-27 20:43:23 UTC (rev 12730)
@@ -189,6 +189,7 @@
self->limitTimeStepIncreaseRate = Dictionary_GetBool_WithDefault( self->dictionary, "limitTimeStepIncreaseRate", False );
self->maxTimeStepIncreasePercentage = Dictionary_GetDouble_WithDefault( self->dictionary,
"maxTimeStepIncreasePercentage", 10.0 );
+ self->nonLinearIteration_I=NULL;
Journal_Firewall( self->maxTimeStepIncreasePercentage >= 0, errorStream,
"Error - in %s(): maxTimeStepIncreasePercentage must be >= 0\n", __func__ );
Modified: long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/Context.h
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/Context.h 2008-08-27 20:43:19 UTC (rev 12729)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/Context.h 2008-08-27 20:43:23 UTC (rev 12730)
@@ -73,6 +73,7 @@
Bool limitTimeStepIncreaseRate; \
double maxTimeStepIncreasePercentage; \
EntryPoint* calcDtEP; \
+ int *nonLinearIteration_I; \
struct FiniteElementContext { __FiniteElementContext };
Modified: long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/SystemLinearEquations.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/SystemLinearEquations.c 2008-08-27 20:43:19 UTC (rev 12729)
+++ long/3D/Gale/trunk/src/StgFEM/SLE/SystemSetup/src/SystemLinearEquations.c 2008-08-27 20:43:23 UTC (rev 12730)
@@ -714,6 +714,9 @@
}
self->nonLinearIteration_I = 0;
+ ((FiniteElementContext *)_context)->nonLinearIteration_I=
+ &(self->nonLinearIteration_I);
+
self->linearExecute( self, _context );
self->hasExecuted = True;
currentVector =
Modified: long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c 2008-08-27 20:43:19 UTC (rev 12729)
+++ long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c 2008-08-27 20:43:23 UTC (rev 12730)
@@ -1581,18 +1581,28 @@
FeVariable_GetValueAtNode(velocityField,node_lI,v);
FeVariable_GetValueAtNode(viscosityField,node_lI,&viscosity);
-/* dim's are not used correctly. There should be one that is parallel and one that is perpendicular. */
-
/* Assume 2D, boundaries along x or y axis */
normal_stress=stress[normal_dim];
tangent_stress=stress[2];
yield_stress=(normal_stress+p)*coefficient;
- if(p==0)
- *result=boundary_v;
+ if(context->nonLinearIteration_I==NULL
+ || *(context->nonLinearIteration_I)==0 || p==0)
+ {
+ *result=boundary_v;
+ printf("Static %d %g %g %g %g %g 0\n",
+ node_lI,*result,p,tangent_stress,
+ yield_stress,viscosity);
+ }
else if(fabs(tangent_stress)<yield_stress)
- *result=v[tangent_dim];
+ {
+ *result=v[tangent_dim];
+ printf("Static %d %g %g %g %g %g %d\n",
+ node_lI,*result,p,tangent_stress,
+ yield_stress,viscosity,
+ *context->nonLinearIteration_I);
+ }
else
{
Node_GlobalIndex node_gI = 0;
@@ -1627,8 +1637,10 @@
if((*result-boundary_v)*(v_off[tangent_dim]-boundary_v)<0)
*result=boundary_v;
- printf("Static %d %g %g %g %g %g %g %g %g\n",node_lI,*result,p,tangent_stress,
- yield_stress,viscosity,delta,v[tangent_dim],v_off[tangent_dim]);
+ printf("Static %d %g %g %g %g %g %g %g %g %d\n",
+ node_lI,*result,p,tangent_stress,
+ yield_stress,viscosity,delta,v[tangent_dim],v_off[tangent_dim],
+ *context->nonLinearIteration_I);
}
}
More information about the cig-commits
mailing list