[cig-commits] r5293 - in long/3D/Gale/trunk/src/Underworld: .
plugins/Output/ConvectionData
walter at geodynamics.org
walter at geodynamics.org
Wed Nov 15 13:08:19 PST 2006
Author: walter
Date: 2006-11-15 13:08:16 -0800 (Wed, 15 Nov 2006)
New Revision: 5293
Modified:
long/3D/Gale/trunk/src/Underworld/
long/3D/Gale/trunk/src/Underworld/plugins/Output/ConvectionData/ConvectionData.c
Log:
r726 at earth: boo | 2006-11-15 13:06:47 -0800
r717 at earth (orig r375): JulianGiordani | 2006-11-14 00:16:57 -0800
Previously the plugin relied on there being a NonNewtonian component. If there wasn't one it died.
Now if no NonNewtonian component is specified the stressExponent is set to 1.
Property changes on: long/3D/Gale/trunk/src/Underworld
___________________________________________________________________
Name: svk:merge
- 9570c393-cf10-0410-b476-9a651db1e55a:/cig:725
c24a034b-ab11-0410-afe6-cfe714e2959e:/trunk:373
+ 9570c393-cf10-0410-b476-9a651db1e55a:/cig:726
c24a034b-ab11-0410-afe6-cfe714e2959e:/trunk:375
Modified: long/3D/Gale/trunk/src/Underworld/plugins/Output/ConvectionData/ConvectionData.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/plugins/Output/ConvectionData/ConvectionData.c 2006-11-15 21:08:12 UTC (rev 5292)
+++ long/3D/Gale/trunk/src/Underworld/plugins/Output/ConvectionData/ConvectionData.c 2006-11-15 21:08:16 UTC (rev 5293)
@@ -86,7 +86,10 @@
Underworld_ConvectionData_Type );
rheology = (Rheology*)Stg_ComponentFactory_ConstructByName( context->CF, "temperatureDependence", Rheology, False, 0 /* dummy */ );
- nonNewtonian = (NonNewtonian*)Stg_ComponentFactory_ConstructByName( context->CF, "nonNewtonian", NonNewtonian, True, 0 /* dummy */ );
+ nonNewtonian = (NonNewtonian*)LiveComponentRegister_Get( context->CF->LCRegister, NonNewtonian_Type );
+ //(NonNewtonian*)Stg_ComponentFactory_ConstructByName( context->CF, "nonNewtonian", NonNewtonian, True, 0 /* dummy */ );
+ (nonNewtonian == NULL) ? (self->stressExponent = 1) :
+ (self->stressExponent = nonNewtonian->stressExponent) ;
if( !strcmp( rheology->type, "FrankKamenetskii" ) ) {
frankKamenetskii = (FrankKamenetskii*)rheology;
@@ -101,7 +104,7 @@
self->Ra = Stg_ComponentFactory_GetRootDictDouble( context->CF, "Ra", 1.0 );
self->eta0 = ( arrhenius != NULL ? arrhenius->eta0 : frankKamenetskii->eta0 );
- self->stressExponent = nonNewtonian->stressExponent;
+// self->stressExponent = nonNewtonian->stressExponent;
self->rheologyName = rheology->type;//( arrhenius != NULL ? StG_Strdup(arrhenius->type) : StG_Strdup(frankKamenetskii->type) );
self->boundaryLayersPlugin = (Underworld_BoundaryLayers*)LiveComponentRegister_Get(
context->CF->LCRegister,
@@ -126,6 +129,8 @@
Stg_asprintf( &filename, "ConvectionData.dat", context->rank, context->nproc );
Stream_RedirectFile_WithPrependedPath( dataStream, context->outputPath, filename );
Stream_SetAutoFlush( dataStream, True );
+ // Print Header
+ Journal_Printf( dataStream, "#Rheology | etaContrast | Ra | UpperVrms | LowerVrms | UTBL | LTBL | SurfaceMobility\n");
Memory_Free( filename );
}
@@ -149,7 +154,7 @@
assert( self->stressExponent != 0 );
deltaViscosity = pow(self->eta0, (-1/self->stressExponent) );
- Journal_Printf( dataStream, "%s %.3g %.3g ", self->rheologyName, deltaViscosity, self->Ra );
+ Journal_Printf( dataStream, "%s %g %g ", self->rheologyName, deltaViscosity, self->Ra );
// Prints out Surface Vrms
topVrms = Underworld_ConvectionData_XZPlaneVrms( context, geometry->max[ J_AXIS ] );
More information about the cig-commits
mailing list