[cig-commits] r12736 - in long/3D/Gale/trunk: . src/StgFEM/plugins/StandardConditionFunctions
walter at geodynamics.org
walter at geodynamics.org
Wed Aug 27 13:43:42 PDT 2008
Author: walter
Date: 2008-08-27 13:43:42 -0700 (Wed, 27 Aug 2008)
New Revision: 12736
Modified:
long/3D/Gale/trunk/
long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c
Log:
r2323 at earth: boo | 2008-08-27 13:40:28 -0700
Get rid of the ugly hack for StaticFriction
Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
- 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2322
+ 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2323
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:39 UTC (rev 12735)
+++ long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c 2008-08-27 20:43:42 UTC (rev 12736)
@@ -1543,6 +1543,7 @@
void StgFEM_StandardConditionFunctions_StaticFriction_Internal
(Node_LocalIndex node_lI, Variable_Index var_I, void* _context, void* _result,
double boundary_v, double boundary_upper_v, double boundary_lower_v,
+ Bool set_upper_boundary_v, Bool set_lower_boundary_v,
double coefficient, unsigned normal_dim, unsigned tangent_dim) {
FiniteElementContext * context = (FiniteElementContext*)_context;
FeVariable* velocityField = NULL;
@@ -1590,11 +1591,12 @@
grid = *(Grid**)ExtensionManager_Get( feMesh->info, feMesh,
ExtensionManager_GetHandle( feMesh->info, "vertexGrid" ) );
- if(inds[tangent_dim]==0)
+ if(set_lower_boundary_v==True && inds[tangent_dim]==0)
{
*result=boundary_lower_v;
}
- else if(inds[tangent_dim]==(grid->sizes[tangent_dim]-1) && node_lI!=2192)
+ else if(set_upper_boundary_v==True
+ && inds[tangent_dim]==(grid->sizes[tangent_dim]-1))
{
*result=boundary_upper_v;
}
@@ -1654,6 +1656,9 @@
unsigned normal_dim, tangent_dim;
double boundary_v,boundary_upper_v,boundary_lower_v,coefficient,
nonsense_number;
+ Bool set_upper_boundary_v, set_lower_boundary_v;
+ set_upper_boundary_v=True;
+ set_lower_boundary_v=True;
nonsense_number=-345.225287;
@@ -1663,12 +1668,18 @@
Dictionary_GetDouble_WithDefault(dictionary,
"StaticFrictionUpperV",nonsense_number);
if(boundary_upper_v==nonsense_number)
- boundary_upper_v=boundary_v;
+ {
+ boundary_upper_v=boundary_v;
+ set_upper_boundary_v=False;
+ }
boundary_lower_v =
Dictionary_GetDouble_WithDefault(dictionary,
"StaticFrictionLowerV",nonsense_number);
if(boundary_lower_v==nonsense_number)
- boundary_lower_v=boundary_v;
+ {
+ boundary_lower_v=boundary_v;
+ set_lower_boundary_v=False;
+ }
coefficient =
Dictionary_GetDouble_WithDefault(dictionary,
@@ -1682,7 +1693,8 @@
StgFEM_StandardConditionFunctions_StaticFriction_Internal
(node_lI,var_I,_context,_result,boundary_v,boundary_upper_v,
- boundary_lower_v,coefficient,normal_dim,tangent_dim);
+ boundary_lower_v,set_upper_boundary_v,set_lower_boundary_v,
+ coefficient,normal_dim,tangent_dim);
}
@@ -1695,6 +1707,9 @@
unsigned normal_dim, tangent_dim;
double boundary_v,boundary_upper_v,boundary_lower_v,coefficient,
nonsense_number;
+ Bool set_upper_boundary_v, set_lower_boundary_v;
+ set_upper_boundary_v=True;
+ set_lower_boundary_v=True;
nonsense_number=-345.225287;
@@ -1708,12 +1723,18 @@
Dictionary_GetDouble_WithDefault(dictionary,
"StaticFriction2UpperV",nonsense_number);
if(boundary_upper_v==nonsense_number)
- boundary_upper_v=boundary_v;
+ {
+ boundary_upper_v=boundary_v;
+ set_upper_boundary_v=False;
+ }
boundary_lower_v =
Dictionary_GetDouble_WithDefault(dictionary,
"StaticFriction2LowerV",nonsense_number);
if(boundary_lower_v==nonsense_number)
- boundary_lower_v=boundary_v;
+ {
+ boundary_lower_v=boundary_v;
+ set_lower_boundary_v=False;
+ }
coefficient =
Dictionary_GetDouble_WithDefault(dictionary,
@@ -1727,7 +1748,8 @@
StgFEM_StandardConditionFunctions_StaticFriction_Internal
(node_lI,var_I,_context,_result,boundary_v,boundary_upper_v,
- boundary_lower_v,coefficient,normal_dim,tangent_dim);
+ boundary_lower_v,set_upper_boundary_v,set_lower_boundary_v,
+ coefficient,normal_dim,tangent_dim);
}
More information about the cig-commits
mailing list