[cig-commits] r14365 - in long/3D/Gale/trunk: . src/Underworld/Utils/src
walter at geodynamics.org
walter at geodynamics.org
Tue Mar 17 01:27:32 PDT 2009
Author: walter
Date: 2009-03-17 01:27:32 -0700 (Tue, 17 Mar 2009)
New Revision: 14365
Modified:
long/3D/Gale/trunk/
long/3D/Gale/trunk/src/Underworld/Utils/src/PressureTemperatureOutput.c
long/3D/Gale/trunk/src/Underworld/Utils/src/PressureTemperatureOutput.h
Log:
r2558 at dante: boo | 2009-03-17 01:26:43 -0700
Make PressureTemperatureOutput output the correct pressure
Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
- 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2555
+ 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2558
Modified: long/3D/Gale/trunk/src/Underworld/Utils/src/PressureTemperatureOutput.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/Utils/src/PressureTemperatureOutput.c 2009-03-17 04:06:26 UTC (rev 14364)
+++ long/3D/Gale/trunk/src/Underworld/Utils/src/PressureTemperatureOutput.c 2009-03-17 08:27:32 UTC (rev 14365)
@@ -47,6 +47,7 @@
#include <StGermain/StGermain.h>
#include <StgFEM/StgFEM.h>
#include <PICellerator/PICellerator.h>
+#include <PICellerator/Utils/Utils.h>
#include "types.h"
#include "PressureTemperatureOutput.h"
@@ -120,12 +121,16 @@
void _PressureTemperatureOutput_Init(
void* swarmOutput,
FeVariable* pressureField,
- FeVariable* temperatureField )
+ FeVariable* temperatureField,
+ FeVariable* stressField,
+ HydrostaticTerm* hydrostaticTerm)
{
PressureTemperatureOutput* self = (PressureTemperatureOutput*)swarmOutput;
self->pressureField = pressureField;
self->temperatureField = temperatureField;
+ self->stressField = stressField;
+ self->hydrostaticTerm = hydrostaticTerm;
}
@@ -180,13 +185,18 @@
PressureTemperatureOutput* self = (PressureTemperatureOutput*) swarmOutput;
FeVariable* pressureField;
FeVariable* temperatureField;
+ FeVariable* stressField;
+ HydrostaticTerm* hydrostaticTerm;
_SwarmOutput_Construct( self, cf, data );
pressureField = Stg_ComponentFactory_ConstructByKey( cf, self->name, "PressureField", FeVariable, True, data ) ;
temperatureField = Stg_ComponentFactory_ConstructByKey( cf, self->name, "TemperatureField", FeVariable, True, data ) ;
+ stressField = Stg_ComponentFactory_ConstructByKey( cf, self->name, "StressField", FeVariable, True, data ) ;
+ hydrostaticTerm = Stg_ComponentFactory_ConstructByKey( cf, self->name, "HydrostaticTerm", FeVariable, True, data ) ;
- _PressureTemperatureOutput_Init( self, pressureField, temperatureField );
+ _PressureTemperatureOutput_Init( self, pressureField, temperatureField,
+ stressField, hydrostaticTerm);
}
@@ -225,8 +235,9 @@
Swarm* swarm = self->swarm;
GlobalParticle* particle = (GlobalParticle*)Swarm_ParticleAt( swarm, lParticle_I );
double* coord = particle->coord;
- double pressure;
+ double pressure, trace;
double temperature;
+ double stress[6];
Journal_Firewall(
swarm->particleLayout->coordSystem == GlobalCoordSystem,
@@ -235,9 +246,13 @@
_SwarmOutput_PrintData( self, stream, lParticle_I, context );
- FieldVariable_InterpolateValueAt( self->pressureField, coord, &pressure );
FieldVariable_InterpolateValueAt( self->temperatureField, coord, &temperature );
-
+ /* Get the pressure, with corrections from the trace of the
+ stress and the hydrostatic term */
+ FieldVariable_InterpolateValueAt( self->pressureField,coord,&pressure);
+ FieldVariable_InterpolateValueAt( self->stressField, coord, stress );
+ SymmetricTensor_GetTrace(stress, swarm->dim, &trace);
+ pressure+=trace+HydrostaticTerm_Pressure(self->hydrostaticTerm,coord);
SwarmOutput_PrintValue( self, stream, pressure );
SwarmOutput_PrintValue( self, stream, temperature );
}
Modified: long/3D/Gale/trunk/src/Underworld/Utils/src/PressureTemperatureOutput.h
===================================================================
--- long/3D/Gale/trunk/src/Underworld/Utils/src/PressureTemperatureOutput.h 2009-03-17 04:06:26 UTC (rev 14364)
+++ long/3D/Gale/trunk/src/Underworld/Utils/src/PressureTemperatureOutput.h 2009-03-17 08:27:32 UTC (rev 14365)
@@ -56,6 +56,8 @@
/* Virtual Info */\
FeVariable* pressureField; \
FeVariable* temperatureField; \
+ FeVariable* stressField; \
+ HydrostaticTerm* hydrostaticTerm;
struct PressureTemperatureOutput { __PressureTemperatureOutput };
More information about the CIG-COMMITS
mailing list