[cig-commits] commit: recommit. passes all tests (complete).

Mercurial hg at geodynamics.org
Tue Mar 23 10:35:41 PDT 2010


changeset:   757:20216db07009
branch:      1.4.x
user:        JohnMansour <john.mansour at maths.monash.edu.au>
date:        Wed Mar 03 14:33:43 2010 +1100
files:       Discretisation/src/FeVariable.c Discretisation/src/OperatorFeVariable.c
description:
recommit. passes all tests (complete).

_operatorfevariable_build was not calling _fevariable_build, this was resulting in no memory for GNx being allocated. on inspection, it seems that it should be fine for
the _fevariable_build to be called, and all tests still pass.


diff -r c8a1cc7c5822 -r 20216db07009 Discretisation/src/FeVariable.c
--- a/Discretisation/src/FeVariable.c	Thu Mar 04 09:07:36 2010 +1100
+++ b/Discretisation/src/FeVariable.c	Wed Mar 03 14:33:43 2010 +1100
@@ -402,21 +402,20 @@ void _FeVariable_Build( void* variable, 
 
 		/** build the BCs */
 		Stg_Component_Build( self->feMesh, data, False );
-		Stg_Component_Build( self->dofLayout, data, False );
-		if ( self->bcs ){
-			Stg_Component_Build( self->bcs, data, False );
-		}
+		if ( self->dofLayout ) Stg_Component_Build( self->dofLayout, data, False );
+		if ( self->bcs       ) Stg_Component_Build( self->bcs,       data, False );
+		
 		/** only bother building the ics specified via XML/construct if we are not in restart mode
 		  - otherwise, we will use the checkpointed values anyway */
 		if ( self->ics && !(context && (True == context->loadFromCheckPoint) ) ) {
 			Stg_Component_Build( self->ics, data, False );
 		}
-		if ( self->linkedDofInfo ) {
-			Stg_Component_Build( self->linkedDofInfo, data, False );
-		}
+
+		if ( self->linkedDofInfo )	Stg_Component_Build( self->linkedDofInfo, data, False );
+
 
 		/** Extract component count. */
-		self->fieldComponentCount = self->dofLayout->_totalVarCount;
+		if ( self->dofLayout ) self->fieldComponentCount = self->dofLayout->_totalVarCount;
 
 		dim = Mesh_GetDimSize(self->feMesh);
 		/** allocate GNx here */
diff -r c8a1cc7c5822 -r 20216db07009 Discretisation/src/OperatorFeVariable.c
--- a/Discretisation/src/OperatorFeVariable.c	Thu Mar 04 09:07:36 2010 +1100
+++ b/Discretisation/src/OperatorFeVariable.c	Wed Mar 03 14:33:43 2010 +1100
@@ -182,7 +182,7 @@ OperatorFeVariable* OperatorFeVariable_N
 
 	self->isConstructed = True;
 	_FieldVariable_Init( (FieldVariable*)self, context, feVariableCount, dim, isCheckpointedAndReloaded, communicator, fieldVariable_Register );                                                                                                          
-   _FeVariable_Init( (FeVariable*)self, feMesh, geometryMesh, dofLayout, bcs, ics, linkedDofInfo, templateFeVariable, False, False );
+   _FeVariable_Init( (FeVariable*)self, feMesh, geometryMesh, dofLayout, bcs, ics, linkedDofInfo, templateFeVariable, True, False );
 	_OperatorFeVariable_Init( self, operatorName, feVariableCount, feVariableList, ownOperator );
 
 	return self;
@@ -321,7 +321,7 @@ void _OperatorFeVariable_AssignFromXML( 
 		Stg_ComponentFactory_ConstructByName( cf, (Name)feVariableName, FeVariable, True, data ); 
 	}
 
-	_FeVariable_Init( (FeVariable* ) self, feVariableList[0]->feMesh, feVariableList[0]->geometryMesh, feVariableList[0]->dofLayout, NULL, NULL, NULL, NULL, False, False );
+	_FeVariable_Init( (FeVariable* ) self, feVariableList[0]->feMesh, feVariableList[0]->geometryMesh, feVariableList[0]->dofLayout, NULL, NULL, NULL, NULL, True, False );
 	_OperatorFeVariable_Init( self, operatorName, feVariableCount, feVariableList, NULL );
 
 	Memory_Free( feVariableList );



More information about the CIG-COMMITS mailing list