[cig-commits] r4950 - in long/3D/Gale/trunk/src/Underworld: .
Rheology/src
walter at geodynamics.org
walter at geodynamics.org
Wed Oct 11 13:54:54 PDT 2006
Author: walter
Date: 2006-10-11 13:54:53 -0700 (Wed, 11 Oct 2006)
New Revision: 4950
Modified:
long/3D/Gale/trunk/src/Underworld/
long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.c
long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.h
long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.meta
Log:
r610 at earth: boo | 2006-10-11 13:52:14 -0700
r572 at earth (orig r349): VincentLemiale | 2006-10-11 07:13:29 -0700
adding the possibility of defining the initial random strain distribution within a shape instead of defining it for the whole box.
Documentation oriented question : in .meta file as well as examples xml files, TimeIntegrator is defined as a dependancy (an essential one). Is that really true, cos I cant really see where it is declared like that in the c file.
Property changes on: long/3D/Gale/trunk/src/Underworld
___________________________________________________________________
Name: svk:merge
- 9570c393-cf10-0410-b476-9a651db1e55a:/cig:609
c24a034b-ab11-0410-afe6-cfe714e2959e:/trunk:348
+ 9570c393-cf10-0410-b476-9a651db1e55a:/cig:610
c24a034b-ab11-0410-afe6-cfe714e2959e:/trunk:349
Modified: long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.c 2006-10-11 20:54:51 UTC (rev 4949)
+++ long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.c 2006-10-11 20:54:53 UTC (rev 4950)
@@ -112,7 +112,8 @@
double initialDamageFraction,
double initialDamageWavenumber,
double initialDamageFactor,
- long int randomSeed )
+ long int randomSeed,
+ Stg_Shape* initialStrainShape )
{
/* Assign Values */
self->swarm = swarm;
@@ -122,6 +123,7 @@
self->initialDamageWavenumber = initialDamageWavenumber;
self->initialDamageFactor = initialDamageFactor;
self->randomSeed = randomSeed;
+ self->initialStrainShape = initialStrainShape;
/****** Setup Variables *****/
@@ -207,6 +209,7 @@
double initialDamageWavenumber;
double initialDamageFactor;
long int randomSeed;
+ Stg_Shape* initialStrainShape;
/* Construct Parent */
_TimeIntegratee_Construct( self, cf );
@@ -220,6 +223,7 @@
initialDamageWavenumber = Stg_ComponentFactory_GetDouble( cf, self->name, "initialDamageWavenumber", -1.0 );
initialDamageFactor = Stg_ComponentFactory_GetDouble( cf, self->name, "initialDamageFactor", 1.0 );
randomSeed = (long int) Stg_ComponentFactory_GetInt( cf, self->name, "randomSeed", 0 );
+ initialStrainShape = Stg_ComponentFactory_ConstructByKey( cf, self->name, "initialStrainShape", Stg_Shape, False );
_StrainWeakening_Init(
self,
@@ -229,7 +233,8 @@
initialDamageFraction,
initialDamageWavenumber,
initialDamageFactor,
- randomSeed );
+ randomSeed,
+ initialStrainShape );
}
void _StrainWeakening_Build( void* strainWeakening, void* data ) {
@@ -281,6 +286,13 @@
postFailureWeakening = 0.0;
if ( drand48() < self->initialDamageFraction ) {
+
+ coord = Variable_GetPtrDouble( positionVariable, lParticle_I );
+
+ if ( self->initialStrainShape && !Stg_Shape_IsCoordInside( self->initialStrainShape, coord ) ) {
+ Variable_SetValueDouble( self->variable, lParticle_I, postFailureWeakening );
+ continue;
+ }
postFailureWeakening = self->initialDamageFactor * drand48() * self->softeningStrain;
Modified: long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.h
===================================================================
--- long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.h 2006-10-11 20:54:51 UTC (rev 4949)
+++ long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.h 2006-10-11 20:54:53 UTC (rev 4950)
@@ -69,19 +69,20 @@
/* Parent info */ \
__TimeIntegratee \
/* Virtual functions go here */ \
- StrainWeakening_CalcIncrementFunction* _calcIncrement; \
+ StrainWeakening_CalcIncrementFunction* _calcIncrement; \
/* General Info */\
- SwarmVariable* postFailureWeakening; \
- SwarmVariable* postFailureWeakeningIncrement; \
- ExtensionInfo_Index particleExtHandle; \
+ SwarmVariable* postFailureWeakening; \
+ SwarmVariable* postFailureWeakeningIncrement; \
+ ExtensionInfo_Index particleExtHandle; \
/* Param passed in */ \
- MaterialPointsSwarm* swarm; \
- double healingRate; \
- double softeningStrain; \
- double initialDamageFraction; \
- double initialDamageWavenumber; \
- double initialDamageFactor; \
- long int randomSeed;
+ MaterialPointsSwarm* swarm; \
+ double healingRate; \
+ double softeningStrain; \
+ double initialDamageFraction; \
+ double initialDamageWavenumber; \
+ double initialDamageFactor; \
+ Stg_Shape* initialStrainShape; \
+ long int randomSeed;
struct StrainWeakening { __StrainWeakening };
@@ -111,7 +112,8 @@
double initialDamageFraction,
double initialDamageWavenumber,
double initialDamageFactor,
- long int randomSeed );
+ long int randomSeed,
+ Stg_Shape* initialStrainShape );
/* 'Stg_Component' implementations */
void* _StrainWeakening_DefaultNew( Name name ) ;
Modified: long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.meta
===================================================================
--- long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.meta 2006-10-11 20:54:51 UTC (rev 4949)
+++ long/3D/Gale/trunk/src/Underworld/Rheology/src/StrainWeakening.meta 2006-10-11 20:54:53 UTC (rev 4950)
@@ -12,8 +12,6 @@
<param name="Parent">TimeIntegratee</param>
<param name="Description">This component is used in problems where the material parameters can soften (usually used with a yield rheology component). The name StrainWeakening is probably not appropriate. This component is mainly used in the following cases: to define an initial distribution of strain in a material; to calculate the accumulated strain on each particles. Since the material parameters are not softened inside that component, 'Strain' or 'AccumulatedStrain' or 'EquivalentAccumulatedPlasticStrain' may be more appropriate names.</param>
-<!--Now the interesting stuff-->
-
<list name="Params">
<struct>
<param name="Name">healingRate</param>
@@ -69,14 +67,21 @@
<struct>
<param name="Essential">Yes</param>
- <param name="Type">IntegrationPointsSwarm</param>
+ <param name="Type">MaterialPointsSwarm</param>
<param name="Description">This defines the set of material points.</param>
</struct>
+ <struct>
+ <param name="Essential">No</param>
+ <param name="Type">Stg_Shape</param>
+ <param name="Description">If defined, the initial random strain will be prescibed inside this shape only (the initial strain will be zero outside the shape).</param>
+ </struct>
+
</list>
+
<!-- Add an example XML if possible -->
<param name="Example">Underworld/InputFiles/ExtensionDP.xml</param>
-<param name="Example">Underworld/InputFiles/ExtensionMC_LM.xml</param>
-<param name="Example">Underworld/InputFiles/ExtensionMC3D.xml</param>
+<param name="Example">Underworld/InputFiles/ExtensionFMM.xml</param>
+<param name="Example">Underworld/InputFiles/ExtensionFMM3D.xml</param>
</StGermainData>
More information about the cig-commits
mailing list