[cig-commits] r7186 - in long/3D/Gale/trunk: .
src/Underworld/plugins/Output/DumpSwarm
walter at geodynamics.org
walter at geodynamics.org
Wed Jun 13 01:45:19 PDT 2007
Author: walter
Date: 2007-06-13 01:45:18 -0700 (Wed, 13 Jun 2007)
New Revision: 7186
Modified:
long/3D/Gale/trunk/
long/3D/Gale/trunk/src/Underworld/plugins/Output/DumpSwarm/DumpSwarm.c
Log:
r1815 at earth: boo | 2007-06-07 13:59:01 -0700
Make DumpSwarm output stress, density, and alpha
Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
- 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:1814
+ 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:1815
Modified: long/3D/Gale/trunk/src/Underworld/plugins/Output/DumpSwarm/DumpSwarm.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/plugins/Output/DumpSwarm/DumpSwarm.c 2007-06-13 08:45:13 UTC (rev 7185)
+++ long/3D/Gale/trunk/src/Underworld/plugins/Output/DumpSwarm/DumpSwarm.c 2007-06-13 08:45:18 UTC (rev 7186)
@@ -142,7 +142,7 @@
/* Loop over all of the particles */
for ( lParticle_I = 0 ; lParticle_I < num_particles ;
++lParticle_I ){
- double yielding, viscosity;
+ double yielding, viscosity, density, alpha, stress[6];
int rheology_hash;
IntegrationPoint* integrationparticle = (IntegrationPoint*)Swarm_ParticleAt( picswarm, lParticle_I );
@@ -158,6 +158,11 @@
yielding=0;
viscosity=0;
rheology_hash=0;
+ density=Dictionary_GetDouble_WithDefault( material->dictionary,
+ "density", 0.0 );
+ alpha=Dictionary_GetDouble_WithDefault( material->dictionary,
+ "alpha", 0.0 );
+ stress[0]=stress[1]=stress[2]=stress[3]=stress[4]=stress[5]=0;
/* Loop over all of the rheologies for a particle. */
@@ -180,6 +185,23 @@
ExtensionManager_Get( materialSwarm->particleExtensionMgr, materialparticle, self->particleExtHandle );
viscosity=particleExt->effVisc;
}
+ /* Get stress */
+ else if(!strcmp(rheology->name,"storeStress"))
+ {
+ StoreStress* self = (StoreStress*) rheology;
+ StoreStress_ParticleExt* particleExt;
+ particleExt=
+ ExtensionManager_Get( materialSwarm->particleExtensionMgr, materialparticle, self->particleExtHandle );
+ stress[0]=particleExt->stress[0];
+ stress[1]=particleExt->stress[1];
+ stress[2]=particleExt->stress[2];
+ stress[3]=particleExt->stress[3];
+ if(context->dim==3)
+ {
+ stress[4]=particleExt->stress[4];
+ stress[5]=particleExt->stress[5];
+ }
+ }
}
/* Print out a hash of the rheology names. */
@@ -197,7 +219,12 @@
(double)coord[2],separator);
}
/* Then print out the data */
- fprintf(fp,"%lf%s %lf\n",yielding,separator,viscosity);
+ fprintf(fp,"%lf%s %lf%s %lf%s %lf%s %lf%s %lf%s %lf%s %lf%s %lf%s %lf\n",
+ yielding,separator,viscosity,separator,
+ density,separator,alpha,separator,
+ stress[0],separator,stress[1],separator,
+ stress[2],separator,stress[3],separator,
+ stress[4],separator,stress[5]);
}
fclose(fp);
Memory_Free( filename );
More information about the cig-commits
mailing list