[cig-commits] r13090 - long/3D/SNAC/trunk/Snac/plugins/hydroStaticIC

echoi at geodynamics.org echoi at geodynamics.org
Wed Oct 15 12:21:35 PDT 2008


Author: echoi
Date: 2008-10-15 12:21:35 -0700 (Wed, 15 Oct 2008)
New Revision: 13090

Modified:
   long/3D/SNAC/trunk/Snac/plugins/hydroStaticIC/ConstructExtensions.c
   long/3D/SNAC/trunk/Snac/plugins/hydroStaticIC/Register.c
   long/3D/SNAC/trunk/Snac/plugins/hydroStaticIC/VariableConditions.c
Log:
minor changes



Modified: long/3D/SNAC/trunk/Snac/plugins/hydroStaticIC/ConstructExtensions.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/hydroStaticIC/ConstructExtensions.c	2008-10-15 19:17:45 UTC (rev 13089)
+++ long/3D/SNAC/trunk/Snac/plugins/hydroStaticIC/ConstructExtensions.c	2008-10-15 19:21:35 UTC (rev 13090)
@@ -25,7 +25,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 **
-** $Id: ConstructExtensions.c 3275 2007-03-28 20:07:08Z EunseoChoi $
+** $Id: ConstructExtensions.c 3140 2005-08-30 18:35:09Z EunseoChoi $
 **
 **~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
@@ -48,11 +48,12 @@
 	Snac_Element				tmpElement;
 
 	/* The hydro static stress variable purposely covers many variables... its more of a convenience thing. */
-	#define					hydroStaticComponentCount	23
+	#define					hydroStaticComponentCount	24
 	Index					hydroStaticOffsetCount = hydroStaticComponentCount;
 	SizeT					hydroStaticOffsets[hydroStaticComponentCount] = {
 							GetOffsetOfMember( tmpElement, strainRate ),
 							GetOffsetOfMember( tmpElement, stress ),
+							GetOffsetOfMember( tmpElement, rzbo ),
 							GetOffsetOfMember( tmpElement, hydroPressure ),
 							GetOffsetOfMember( tmpElement, tetra[0].strainRate ),
 							GetOffsetOfMember( tmpElement, tetra[0].stress ),
@@ -97,11 +98,13 @@
 							Variable_DataType_Double,
 							Variable_DataType_Double,
 							Variable_DataType_Double,
+							Variable_DataType_Double,
 							Variable_DataType_Double };
 	Index					hydroStaticDataTypeCounts[hydroStaticComponentCount] = {
 							1,
 							1,
 							1,
+							1,
 							9,
 							9,
 							9,

Modified: long/3D/SNAC/trunk/Snac/plugins/hydroStaticIC/Register.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/hydroStaticIC/Register.c	2008-10-15 19:17:45 UTC (rev 13089)
+++ long/3D/SNAC/trunk/Snac/plugins/hydroStaticIC/Register.c	2008-10-15 19:21:35 UTC (rev 13090)
@@ -25,7 +25,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 **
-** $Id: Register.c 3243 2006-10-12 09:04:00Z SteveQuenette $
+** $Id: Register.c 3140 2005-08-30 18:35:09Z EunseoChoi $
 **
 **~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
@@ -49,7 +49,6 @@
 static double MIN[] = { -45.0f, -45.0f, 0.5f };
 static double MAX[] = { 45.0f, 45.0f, 1.0f };
 
-
 Index _SnacHydroStaticIC_Register( PluginsManager* pluginsMgr ) {
 	return PluginsManager_Submit( pluginsMgr,
 				      SnacHydroStaticIC_Type,
@@ -57,7 +56,6 @@
 				      _SnacHydroStaticIC_DefaultNew );
 }
 
-
 void* _SnacHydroStaticIC_DefaultNew( Name name ) {
 	return _Codelet_New( sizeof(Codelet),
 			     SnacHydroStaticIC_Type,
@@ -73,11 +71,10 @@
 			     name );
 }
 
-
 void _SnacHydroStaticIC_Construct( void* component, Stg_ComponentFactory* cf, void* data ) {
-	Snac_Context*		context;
-	Dictionary*		meshDict;
-	int			Spherical = 0;
+	Snac_Context*				context;
+	Dictionary*			meshDict;
+	int Spherical = 0;
 	Dictionary_Entry_Value* extensionsList;
 	Dictionary_Entry_Value* extension;
 

Modified: long/3D/SNAC/trunk/Snac/plugins/hydroStaticIC/VariableConditions.c
===================================================================
--- long/3D/SNAC/trunk/Snac/plugins/hydroStaticIC/VariableConditions.c	2008-10-15 19:17:45 UTC (rev 13089)
+++ long/3D/SNAC/trunk/Snac/plugins/hydroStaticIC/VariableConditions.c	2008-10-15 19:21:35 UTC (rev 13090)
@@ -25,7 +25,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 **
-** $Id: VariableConditions.c 3275 2007-03-28 20:07:08Z EunseoChoi $
+** $Id: VariableConditions.c 3166 2005-10-17 20:46:42Z EunseoChoi $
 **
 **~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
@@ -100,7 +100,7 @@
 						/* Initialize tetrahedral arrays and get the average T-dependent density */
 						for( tetra_I = 0; tetra_I < Tetrahedra_Count; tetra_I++ ) {
 							densT += phsDensity * ( 1.0 - alpha * (element->tetra[tetra_I].avgTemp-material->reftemp) ) / Tetrahedra_Count;
-/* 							memset( element->tetra[tetra_I].stress, 0, sizeof(Snac_TetraStressTensor) ); */
+/* 							memset( element->tetra[tetra_I].stress, 0, sizeof(element->tetra[tetra_I].stress) ); */
 							memset( element->tetra[tetra_I].strainRate, 0, sizeof(element->tetra[tetra_I].strainRate));
 						}
 						/* Compute the average height of the element */
@@ -114,6 +114,7 @@
 						element->stress=0.0;
 						element->strainRate=0.0;
 						element->hydroPressure = 0.0f;
+						element->rzbo = geometry->min[1];
 
 						dPT = densT * context->gravity * dh;
 						dP = dPT * ( 1.0 - beta*rogh ) / ( 1.0f + beta / 2.0f * dPT );
@@ -127,8 +128,13 @@
 
 						element->hydroPressure = P;
 						rogh += dP;
-						if( elJ == 0 )
-							bottomP[elI][elK] = rogh + PfromAbove[elI][elK];
+						element->bottomPressure = rogh;
+						if( elJ == 0 ) {
+							bottomP[elI][elK] = element->bottomPressure + PfromAbove[elI][elK];
+							if( elI==0 && elK==0 ) {
+								context->pisos = bottomP[elI][elK];
+							}
+						}
 					}
 				}
 			/* Send bottomP to the proc below if the r-axis is partitioned and this proc is not on the bottom. */
@@ -203,7 +209,7 @@
 						/* Initialize tetrahedral arrays and get the average T-dependent density */
 						for( tetra_I = 0; tetra_I < Tetrahedra_Count; tetra_I++ ) {
 							densT += phsDensity * (1.0 - alpha * element->tetra[tetra_I].avgTemp) / Tetrahedra_Count;
-/* 							memset( element->tetra[tetra_I].stress, 0, sizeof(Snac_TetraStressTensor) ); */
+/* 							memset( element->tetraStress[tetra_I], 0, sizeof(Snac_TetraStressTensor) ); */
 							memset( element->tetra[tetra_I].strainRate, 0, sizeof(element->tetra[tetra_I].strainRate));
 						}
 						/* Compute the average height of the element */
@@ -225,6 +231,7 @@
 						element->stress=0.0;
 						element->strainRate=0.0;
 						element->hydroPressure = 0.0f;
+						element->rzbo = geometry->min[1];
 						for( tetra_I = 0; tetra_I < Tetrahedra_Count; tetra_I++ ) {
 							element->tetra[tetra_I].stress[0][0] = P;
 							element->tetra[tetra_I].stress[1][1] = P;
@@ -232,8 +239,12 @@
 						}
 						element->hydroPressure = P;
 						rogh += dP;
-						if( elJ == 0 )
-							bottomP[elI][elK] = rogh + PfromAbove[elI][elK];
+						element->bottomPressure = rogh;
+						if( elJ == 0 ) {
+							bottomP[elI][elK] = element->bottomPressure + PfromAbove[elI][elK];
+							if( elI==0 && elK==0 )
+								context->pisos = bottomP[elI][elK];
+						}
 					}
 				}
 			/* Send bottomP to the proc below if the r-axis is partitioned and this proc is not on the bottom. */



More information about the cig-commits mailing list