[cig-commits] r14253 - in long/3D/Gale/trunk: . src/Underworld/Utils/src

walter at geodynamics.org walter at geodynamics.org
Sat Mar 7 23:38:30 PST 2009


Author: walter
Date: 2009-03-07 23:38:30 -0800 (Sat, 07 Mar 2009)
New Revision: 14253

Modified:
   long/3D/Gale/trunk/
   long/3D/Gale/trunk/src/Underworld/Utils/src/DensityField.c
   long/3D/Gale/trunk/src/Underworld/Utils/src/DensityField.h
Log:
 r2540 at dante:  boo | 2009-03-07 23:37:35 -0800
 Make DensityField work



Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
   - 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2538
   + 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2540

Modified: long/3D/Gale/trunk/src/Underworld/Utils/src/DensityField.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/Utils/src/DensityField.c	2009-03-08 05:05:24 UTC (rev 14252)
+++ long/3D/Gale/trunk/src/Underworld/Utils/src/DensityField.c	2009-03-08 07:38:30 UTC (rev 14253)
@@ -79,29 +79,10 @@
 		BuoyancyForceTerm*                               buoyancyForceTerm,
 		Variable_Register*                                variable_Register )
 {
-	Name              tmpName;
-
 	/* Assign Pointers */
 	self->buoyancyForceTerm = buoyancyForceTerm;
+        self->variable_Register=variable_Register;
 
-	/* Create Dof Layout */
-	tmpName = Stg_Object_AppendSuffix( self, "DataVariable" );
-	self->dataVariable = Variable_NewScalar( 	
-			tmpName,
-			Variable_DataType_Double, 
-			&self->feMesh->topo->domains[MT_VERTEX]->nDomains, 
-			(void**)&self->data, 
-			variable_Register );
-	Memory_Free( tmpName );
-	self->fieldComponentCount = 1;
-	
-	tmpName = Stg_Object_AppendSuffix( self, "DofLayout" );
-	self->dofLayout = DofLayout_New( tmpName, variable_Register, 0, self->feMesh );
-	DofLayout_AddAllFromVariableArray( self->dofLayout, 1, &self->dataVariable );
-	Memory_Free( tmpName );
-	self->eqNum->dofLayout = self->dofLayout;
-	
-	
 	/* Set pointers to swarm to be the same as the one on the constitutive matrix */
 	self->assemblyTerm->integrationSwarm = self->buoyancyForceTerm->integrationSwarm;
 	self->massMatrixForceTerm->integrationSwarm = self->buoyancyForceTerm->integrationSwarm;	
@@ -185,7 +166,28 @@
 
 void _DensityField_Build( void* densityField, void* data ) {
 	DensityField* self = (DensityField*) densityField;
+	Name              tmpName;
 
+	Build( self->feMesh, data, False );
+
+	/* Create Dof Layout */
+	tmpName = Stg_Object_AppendSuffix( self, "DataVariable" );
+	self->dataVariable = Variable_NewScalar( 	
+			tmpName,
+			Variable_DataType_Double, 
+			&self->feMesh->topo->domains[MT_VERTEX]->nDomains, 
+			(void**)&self->data, 
+			self->variable_Register );
+	Memory_Free( tmpName );
+	self->fieldComponentCount = 1;
+	
+	tmpName = Stg_Object_AppendSuffix( self, "DofLayout" );
+	self->dofLayout = DofLayout_New( tmpName, self->variable_Register, 0, self->feMesh );
+	self->dofLayout->_numItemsInLayout = FeMesh_GetNodeDomainSize( self->feMesh );
+	DofLayout_AddAllFromVariableArray( self->dofLayout, 1, &self->dataVariable );
+	Memory_Free( tmpName );
+	self->eqNum->dofLayout = self->dofLayout;
+	
 	_ParticleFeVariable_Build( self, data );
 }
 void _DensityField_Initialise( void* densityField, void* data ) {

Modified: long/3D/Gale/trunk/src/Underworld/Utils/src/DensityField.h
===================================================================
--- long/3D/Gale/trunk/src/Underworld/Utils/src/DensityField.h	2009-03-08 05:05:24 UTC (rev 14252)
+++ long/3D/Gale/trunk/src/Underworld/Utils/src/DensityField.h	2009-03-08 07:38:30 UTC (rev 14253)
@@ -22,6 +22,7 @@
 		/* Virtual functions go here */ \
 		\
 		/* Passed in parameters */ \
+		Variable_Register*				  variable_Register; \
 		BuoyancyForceTerm*       buoyancyForceTerm;
 		
 	struct DensityField { __DensityField };



More information about the CIG-COMMITS mailing list