[cig-commits] commit: Add hydrostatic correction for PT tracer output
Mercurial
hg at geodynamics.org
Wed Oct 20 10:47:08 PDT 2010
changeset: 856:20b6b32a9eef
tag: tip
user: Walter Landry <wlandry at caltech.edu>
date: Wed Oct 20 10:43:46 2010 -0700
files: Utils/src/PressureTemperatureOutput.c
description:
Add hydrostatic correction for PT tracer output
diff -r 401fd458c320 -r 20b6b32a9eef Utils/src/PressureTemperatureOutput.c
--- a/Utils/src/PressureTemperatureOutput.c Thu Oct 14 11:26:58 2010 -0700
+++ b/Utils/src/PressureTemperatureOutput.c Wed Oct 20 10:43:46 2010 -0700
@@ -208,11 +208,16 @@ void _PressureTemperatureOutput_PrintHea
void _PressureTemperatureOutput_PrintData( void* swarmOutput, Stream* stream, Particle_Index lParticle_I, void* context ){
PressureTemperatureOutput* self = (PressureTemperatureOutput*)swarmOutput;
+ FiniteElementContext* fe_context = (FiniteElementContext*) context;
Swarm* swarm = self->swarm;
GlobalParticle* particle = (GlobalParticle*)Swarm_ParticleAt( swarm, lParticle_I );
double* coord = particle->coord;
+ HydrostaticTerm *hydrostaticTerm;
double pressure;
double temperature;
+
+ hydrostaticTerm =
+ (HydrostaticTerm*)LiveComponentRegister_Get(fe_context->CF->LCRegister,"hydrostaticTerm" );
Journal_Firewall(
swarm->particleLayout->coordSystem == GlobalCoordSystem,
@@ -223,6 +228,9 @@ void _PressureTemperatureOutput_PrintDat
FieldVariable_InterpolateValueAt( self->pressureField, coord, &pressure );
FieldVariable_InterpolateValueAt( self->temperatureField, coord, &temperature );
+ if(hydrostaticTerm){
+ pressure+=HydrostaticTerm_Pressure(hydrostaticTerm,coord);
+ }
SwarmOutput_PrintValue( self, stream, pressure );
SwarmOutput_PrintValue( self, stream, temperature );
More information about the CIG-COMMITS
mailing list