void* _SLE_Solver_Copy( void* sleSolver, void* dest, Bool deep, Name nameExt, PtrMap* ptrMap ) {
	SLE_Solver*		self = (SLE_Solver*)sleSolver;
	SLE_Solver*		newSleSolver;
	PtrMap*			map = ptrMap;
	Bool			ownMap = False;
	
	if( !map ) {
		map = PtrMap_New( 10 );
		ownMap = True;
	}
	
	newSleSolver = _Stg_Component_Copy( self, dest, deep, nameExt, map );
	
	/* virtual functions */
	newSleSolver->_solverSetup  = self->_solverSetup;
	newSleSolver->_solve        = self->_solve;
	newSleSolver->maxIterations = self->maxIterations;

	newSleSolver->inneritsinitialtime = self->inneritsinitialtime;
	newSleSolver->outeritsinitialtime = self->outeritsinitialtime;
	newSleSolver->nonlinearitsinitialtime = self->nonlinearitsinitialtime;
	newSleSolver->inneritsendtime = self->inneritsendtime;
	newSleSolver->outeritsendtime = self->outeritsendtime;
	newSleSolver->nonlinearitsendtime = self->nonlinearitsendtime;
	newSleSolver->totalinneritstime = self->totalinneritstime;
	newSleSolver->totalouteritstime = self->totalouteritstime;
	newSleSolver->totalnonlinearitstime = self->totalnonlinearitstime;
	newSleSolver->totalnuminnerits = self->totalnuminnerits; 
	newSleSolver->totalnumouterits = self->totalnumouterits; 
	newSleSolver->totalnumnonlinearits = self->totalnumnonlinearits; 	
	newSleSolver->avgnuminnerits = self->avgnuminnerits;
    newSleSolver->avgnumouterits = self->avgnumouterits;
	newSleSolver->avgtimeinnerits = self->avgtimeinnerits; 
	newSleSolver->avgtimeouterits = self->avgtimeouterits; 
	newSleSolver->avgtimenonlinearits = self->avgtimenonlinearits; 
	newSleSolver->currenttimestep = self->currenttimestep; 
	newSleSolver->previoustimestep = self->previoustimestep;
	
	if( deep ) {
		if( (newSleSolver->debug = PtrMap_Find( map, self->debug )) == NULL ) {
			newSleSolver->debug = Stg_Class_Copy( self->debug, NULL, deep, nameExt, map );
			PtrMap_Append( map, self->debug, newSleSolver->debug );
		}
		if( (newSleSolver->extensionManager = PtrMap_Find( map, self->extensionManager )) == NULL ) {
			newSleSolver->extensionManager = Stg_Class_Copy( self->extensionManager, NULL, deep, nameExt, map );
			PtrMap_Append( map, self->extensionManager, newSleSolver->extensionManager );
		}
	}
	else {
		newSleSolver->debug = self->debug;
		newSleSolver->extensionManager = Stg_Class_Copy( self->extensionManager, NULL, deep, nameExt, map );
	}
	
	if( ownMap ) {
		Stg_Class_Delete( map );
	}
	
	return (void*)newSleSolver;
}
void* _DofLayout_Copy( void* dofLayout, void* dest, Bool deep, Name nameExt, PtrMap* ptrMap ) {
	DofLayout*	self = (DofLayout*)dofLayout;
	DofLayout*	newDofLayout;
	PtrMap*		map = ptrMap;
	Bool			ownMap = False;
	
	if( !map ) {
		map = PtrMap_New( 10 );
		ownMap = True;
	}
	
	newDofLayout = (DofLayout*)_Stg_Component_Copy( self, dest, deep, nameExt, map );
	
	newDofLayout->_variableRegister = self->_variableRegister;
	newDofLayout->_numItemsInLayout = self->_numItemsInLayout;
	newDofLayout->_totalVarCount = self->_totalVarCount;
	
	if( deep ) {
		if( (newDofLayout->_variableEnabledSets = PtrMap_Find( map, self->_variableEnabledSets )) == NULL && self->_variableEnabledSets ) {
			Index	set_I;
			
			newDofLayout->_variableEnabledSets = Memory_Alloc_Array( IndexSet*, newDofLayout->_totalVarCount, "DofLayout->_variableEnabledSets" );
			for( set_I = 0; set_I < newDofLayout->_totalVarCount; set_I++ ) {
				newDofLayout->_variableEnabledSets[set_I] = (IndexSet*)Stg_Class_Copy( self->_variableEnabledSets[set_I], NULL, deep, nameExt, map );
			}
			PtrMap_Append( map, self->_variableEnabledSets, newDofLayout->_variableEnabledSets );
		}
		
		if( (newDofLayout->_varIndicesMapping = PtrMap_Find( map, self->_varIndicesMapping )) == NULL && self->_varIndicesMapping ) {
			newDofLayout->_varIndicesMapping = Memory_Alloc_Array( Variable_Index, newDofLayout->_totalVarCount, "DofLayout->_varIndicesMapping" );
			memcpy( newDofLayout->_varIndicesMapping, self->_varIndicesMapping, sizeof(Variable_Index) * newDofLayout->_totalVarCount );
			PtrMap_Append( map, self->_varIndicesMapping, newDofLayout->_varIndicesMapping );
		}
		
		if( (newDofLayout->dofCounts = PtrMap_Find( map, self->dofCounts )) == NULL && self->dofCounts ) {
			newDofLayout->dofCounts = Memory_Alloc_Array( Index, newDofLayout->_numItemsInLayout, "DofLayout->dofCounts" );
			memcpy( newDofLayout->dofCounts, self->dofCounts, sizeof(Index) * newDofLayout->_numItemsInLayout );
			PtrMap_Append( map, self->dofCounts, newDofLayout->dofCounts );
		}
		
		if( (newDofLayout->varIndices = PtrMap_Find( map, self->varIndices )) == NULL && self->varIndices ) {
			Index	idx_I;
			
			newDofLayout->varIndices = Memory_Alloc_2DComplex( Variable_Index, newDofLayout->_numItemsInLayout, self->dofCounts, "DofLayout->varIndices" );
			for( idx_I = 0; idx_I < newDofLayout->_numItemsInLayout; idx_I++ ) {
				memcpy( newDofLayout->varIndices[idx_I], self->varIndices[idx_I], sizeof(Variable_Index) * newDofLayout->dofCounts[idx_I] );
			}
			PtrMap_Append( map, self->varIndices, newDofLayout->varIndices );
		}
	}
Beispiel #3
0
void* _IndexMap_Copy( void* indexMap, void* dest, Bool deep, Name nameExt, struct PtrMap* ptrMap ) {
	IndexMap*	self = (IndexMap*)indexMap;
	IndexMap*	newIndexMap;
	PtrMap*		map = ptrMap;
	Bool		ownMap = False;
	
	if( !map ) {
		map = PtrMap_New( 10 );
		ownMap = True;
	}
	
	newIndexMap = _Stg_Class_Copy( self, dest, deep, nameExt, map );
	
	newIndexMap->dictionary = self->dictionary;
	newIndexMap->delta = self->delta;
	newIndexMap->maxTuples = self->maxTuples;
	newIndexMap->tupleCnt = self->tupleCnt;
	
	if( deep ) {
		if( (newIndexMap->tupleTbl = PtrMap_Find( map, self->tupleTbl )) == NULL && self->tupleTbl ) {
			newIndexMap->tupleTbl = Memory_Alloc_Array( IndexMapTuple, self->maxTuples, "IndexMap->tupleTbl" );
			memcpy( newIndexMap->tupleTbl, self->tupleTbl, sizeof(IndexMapTuple) * self->maxTuples );
			PtrMap_Append( map, self->tupleTbl, newIndexMap->tupleTbl );
		}
	}
	else {
		newIndexMap->tupleTbl = self->tupleTbl;
	}
	
	if( ownMap ) {
		Stg_Class_Delete( map );
	}
	
	return (void*)newIndexMap;
}
void* _ExtensionInfo_Copy( void* extensionInfo, void* dest, Bool deep, Name nameExt, struct PtrMap* ptrMap  ) {
	ExtensionInfo*		self = (ExtensionInfo*)extensionInfo;
	ExtensionInfo*		newExtensionInfo;
	
	/* Copy parent */
	newExtensionInfo = (ExtensionInfo*)_Stg_Object_Copy( self, dest, deep, nameExt, ptrMap );
	
	newExtensionInfo->_dataCopy = self->_dataCopy;
	newExtensionInfo->key = self->key;
	newExtensionInfo->originalSize = self->originalSize;
	newExtensionInfo->size = self->size;
	newExtensionInfo->isRegistered = self->isRegistered;
	newExtensionInfo->itemSize = self->itemSize;
	newExtensionInfo->count = self->count;
	newExtensionInfo->offset = self->offset;
	newExtensionInfo->handle = self->handle;	

	newExtensionInfo->extensionManager = (ExtensionManager*)Stg_Class_Copy( self->extensionManager, NULL, deep, nameExt, ptrMap );

	if ( self->data ) {
		newExtensionInfo->data = PtrMap_Find( ptrMap, self->data );
		Journal_Firewall(
			newExtensionInfo->data != NULL ,
			Journal_Register( Error_Type, __FILE__ ),
			"Copy Error: Attempting to copy ExtensionInfo before data\n" );
	}
	else {
		newExtensionInfo->data = NULL;
	}
	
	return newExtensionInfo;
}
void PtrMapSuite_TestAppendFind( PtrMapSuiteData* data ) {
   ArithPointer		idx;
   
   for( idx = 0; idx < 100; idx++ ) {
      PtrMap_Append( data->map, (void*)(idx + 1), (void*)(100 - idx) );
   }
   
   for( idx = 0; idx < 100; idx++ ) {
      pcu_check_true( (ArithPointer)PtrMap_Find( data->map, (void*)(idx + 1) )
         == (100 - idx) );
   }
}
void* _LinkedDofInfo_Copy( void* linkedDofInfo, void* dest, Bool deep, Name nameExt, PtrMap* ptrMap ) {
	LinkedDofInfo*	self = (LinkedDofInfo*)linkedDofInfo;
	LinkedDofInfo*	newLinkedDofInfo;
	PtrMap*			map = ptrMap;
	Bool				ownMap = False;
	
	if( !map ) {
		map = PtrMap_New( 10 );
		ownMap = True;
	}
	
	newLinkedDofInfo = _Stg_Class_Copy( self, dest, deep, nameExt, map );
	
	/* Virtual methods */
	newLinkedDofInfo->linkedDofSetsCount = self->linkedDofSetsCount;
	newLinkedDofInfo->linkedDofSetsSize = self->linkedDofSetsSize;
	newLinkedDofInfo->linkedDofSetsDelta = self->linkedDofSetsDelta;
	
	if ( deep ) {
		newLinkedDofInfo->dofLayout = (DofLayout*)Stg_Class_Copy( self->dofLayout, NULL, deep, nameExt, map );
		newLinkedDofInfo->mesh = (Mesh*)Stg_Class_Copy( self->mesh, NULL, deep, nameExt, map );

		if ( (newLinkedDofInfo->linkedDofTbl = PtrMap_Find( map, self->linkedDofTbl )) == NULL && self->linkedDofTbl ) {
			Node_Index	node_I;
			Dof_Index	dof_I;
			newLinkedDofInfo->linkedDofTbl = Memory_Alloc_2DComplex( int, self->dofLayout->_numItemsInLayout, self->dofLayout->dofCounts, "linkedDofInfo->linkedDofTbl" );
			for ( node_I = 0; node_I < self->dofLayout->_numItemsInLayout; node_I++ ) {
				for ( dof_I = 0; dof_I < self->dofLayout->dofCounts[node_I]; dof_I++ ) {
					newLinkedDofInfo->linkedDofTbl[node_I][dof_I] =
						self->linkedDofTbl[node_I][dof_I];
				}
			}
			PtrMap_Append( map, self->linkedDofTbl, newLinkedDofInfo->linkedDofTbl );
		}
		if ( (newLinkedDofInfo->eqNumsOfLinkedDofs = PtrMap_Find( map, self->eqNumsOfLinkedDofs )) == NULL && self->eqNumsOfLinkedDofs ) {	
			newLinkedDofInfo->eqNumsOfLinkedDofs = Memory_Alloc_Array( int, self->linkedDofSetsCount, "linkedDofInfo->eqNumsOfLinkedDofs" );
			memcpy( newLinkedDofInfo->eqNumsOfLinkedDofs, self->eqNumsOfLinkedDofs, self->linkedDofSetsCount * sizeof(int) );
			PtrMap_Append( map, self->eqNumsOfLinkedDofs, newLinkedDofInfo->eqNumsOfLinkedDofs );
		}
Beispiel #7
0
void* Stg_Generic_Copy( 
	Stg_Class_CopyFunction* copyFunc,
	void* obj, 
	void* dest, 
	Bool deep, 
	Name nameExt, 
	struct PtrMap* ptrMap ) 
{
	void*		newObj;
	Bool		ownPtrMap = False;

	if ( obj == NULL ) {
		return NULL;
	}

	if ( copyFunc == NULL ) {
		/* TODO: change to Journal */
		printf( "Warning: attempting to copy a class with no copy method, return 'self'.\n" );
		return obj;
	}

	if( !ptrMap ) {
		ptrMap = PtrMap_New( 1 );
		ownPtrMap = True;
	}
	
	if ( (newObj = PtrMap_Find( ptrMap, obj )) == NULL ) {
		newObj = copyFunc( obj, dest, deep, nameExt, ptrMap );
	}

	if ( newObj != dest ) {
		/* Whether this is a new instance existing ptr map fetch, inc the counter because its being used again */
		/* But only do it when its not a destination copy because we can't assume that it is a single dynamic obj */
		Memory_CountInc( newObj );
	}

	if ( ownPtrMap && ptrMap ) {
		Stg_Class_Delete( ptrMap );
	}
	
	return (void*)newObj;
}
Beispiel #8
0
void* _SingleCellLayout_Copy( void* singleCellLayout, void* dest, Bool deep, Name nameExt, PtrMap* ptrMap ) {
	SingleCellLayout*	self = (SingleCellLayout*)singleCellLayout;
	SingleCellLayout*	newSingleCellLayout;
	PtrMap*			map = ptrMap;
	Bool			ownMap = False;
	
	if( !map ) {
		map = PtrMap_New( 10 );
		ownMap = True;
	}
	
	newSingleCellLayout = _CellLayout_Copy( self, dest, deep, nameExt, ptrMap );
	
	newSingleCellLayout->dimExists[0] = self->dimExists[0];
	newSingleCellLayout->dimExists[1] = self->dimExists[1];
	newSingleCellLayout->dimExists[2] = self->dimExists[2];
	newSingleCellLayout->min[0] = self->min[0];
	newSingleCellLayout->min[1] = self->min[1];
	newSingleCellLayout->min[2] = self->min[2];
	newSingleCellLayout->max[0] = self->max[0];
	newSingleCellLayout->max[1] = self->max[1];
	newSingleCellLayout->max[2] = self->max[2];
	newSingleCellLayout->pointCount = self->pointCount;
	
	if( deep ) {
		if( (newSingleCellLayout->cellPointCoords = PtrMap_Find( map, self->cellPointCoords )) == NULL && self->cellPointCoords ) {
			newSingleCellLayout->cellPointCoords = Memory_Alloc_Array( Coord, newSingleCellLayout->pointCount, "SingleCellLayout->cellPoints" );
			memcpy( newSingleCellLayout->cellPointCoords, self->cellPointCoords, sizeof(Coord) * newSingleCellLayout->pointCount );
			PtrMap_Append( map, self->cellPointCoords, newSingleCellLayout->cellPointCoords );
		}
	}
	else {
		newSingleCellLayout->cellPointCoords = self->cellPointCoords;
	}
	
	if( ownMap ) {
		Stg_Class_Delete( map );
	}
	
	return (void*)newSingleCellLayout;
}
void* _Variable_Register_Copy( void* vr, void* dest, Bool deep, Name nameExt, PtrMap* ptrMap ) {

	Variable_Register* self = (Variable_Register*)vr;
	Variable_Register* newVariableRegister;
	int ii;

	newVariableRegister = (Variable_Register*)_Stg_Class_Copy( self, dest, deep, nameExt, ptrMap );
	PtrMap_Append( ptrMap, self, newVariableRegister );

	newVariableRegister->count = self->count;
	newVariableRegister->_size = self->_size;
	newVariableRegister->_variable = Memory_Alloc_Array( Variable*, self->_size, "Variable_Register->_variable" );
	memset(newVariableRegister->_variable, 0, sizeof(Variable*)*self->_size);

	for ( ii = 0; ii < self->count; ++ii ) {
		if ( (newVariableRegister->_variable[ii] = (Variable*)PtrMap_Find( ptrMap, self->_variable[ii] )) == NULL ) {
			newVariableRegister->_variable[ii] = (Variable*)Stg_Class_Copy( self->_variable[ii], NULL, deep, nameExt, ptrMap );
		}
	}

	return newVariableRegister;
}
void* Stg_Generic_Copy( 
	Stg_Class_CopyFunction* copyFunc,
	void* obj, 
	void* dest, 
	Bool deep, 
	Name nameExt, 
	struct PtrMap* ptrMap ) 
{
	void*		newObj;
	Bool		ownPtrMap = False;

	if ( obj == NULL ) {
		return NULL;
	}

	if ( copyFunc == NULL ) {
		/* TODO: change to Journal */
		printf( "Warning: attempting to copy a class with no copy method, return 'self'.\n" );
		return obj;
	}

	if( !ptrMap ) {
		ptrMap = PtrMap_New( 1 );
		ownPtrMap = True;
	}
	
	if ( (newObj = PtrMap_Find( ptrMap, obj )) == NULL ) {
		newObj = copyFunc( obj, dest, deep, nameExt, ptrMap );
	}

	if ( ownPtrMap && ptrMap ) {
		Stg_Class_Delete( ptrMap );
	}
	
	return (void*)newObj;
}
void* _VariableCondition_Copy( void* variableCondition, void* dest, Bool deep, Name nameExt, struct PtrMap* ptrMap ) {
	VariableCondition*	self = (VariableCondition*)variableCondition;
	VariableCondition*	newVariableCondition;
	PtrMap*			map = ptrMap;
	Bool			ownMap = False;
	
	if( !map ) {
		map = PtrMap_New( 10 );
		ownMap = True;
	}
	
	newVariableCondition = (VariableCondition*)_Stg_Component_Copy( self, dest, deep, nameExt, map );
	
	/* Virtual methods */
	newVariableCondition->_buildSelf = self->_buildSelf;
	newVariableCondition->_printConcise = self->_printConcise;
	newVariableCondition->_readDictionary = self->_readDictionary;
	newVariableCondition->_getSet = self->_getSet;
	newVariableCondition->_getVariableCount = self->_getVariableCount;
	newVariableCondition->_getVariableIndex = self->_getVariableIndex;
	newVariableCondition->_getValueIndex = self->_getValueIndex;
	newVariableCondition->_getValueCount = self->_getValueCount;
	newVariableCondition->_getValue = self->_getValue;
	
	newVariableCondition->variable_Register = self->variable_Register;
	newVariableCondition->conFunc_Register = self->conFunc_Register;
	newVariableCondition->dictionary = self->dictionary;
	newVariableCondition->indexCount = self->indexCount;
	newVariableCondition->valueCount = self->valueCount;
	
	if( deep ) {
		newVariableCondition->_set = (IndexSet*)Stg_Class_Copy( self->_set, NULL, deep, nameExt, map );
		
		if( (newVariableCondition->indexTbl = (Index*)PtrMap_Find( map, self->indexTbl )) == NULL && self->indexTbl ) {
			newVariableCondition->indexTbl = (Index*)Memory_Alloc_Array( Index, newVariableCondition->indexCount, "VariableCondition->indexTbl" );
			memcpy( newVariableCondition->indexTbl, self->indexTbl, sizeof(Index) * newVariableCondition->indexCount );
			PtrMap_Append( map, newVariableCondition->indexTbl, self->indexTbl );
		}
		
		if( (newVariableCondition->vcVarCountTbl = (VariableCondition_VariableIndex*)PtrMap_Find( map, self->vcVarCountTbl )) == NULL && self->vcVarCountTbl ) {
			newVariableCondition->vcVarCountTbl = Memory_Alloc_Array( VariableCondition_VariableIndex, newVariableCondition->indexCount, "VC->vcVarCountTbl" );
			memcpy( newVariableCondition->vcVarCountTbl, self->vcVarCountTbl, sizeof(VariableCondition_VariableIndex) * newVariableCondition->indexCount );
			PtrMap_Append( map, newVariableCondition->vcVarCountTbl, self->vcVarCountTbl );
		}
		
		if( (newVariableCondition->vcTbl = (VariableCondition_Tuple**)PtrMap_Find( map, self->vcTbl )) == NULL && self->vcTbl ) {
			Index	idx_I;
			
			newVariableCondition->vcTbl = Memory_Alloc_2DComplex( VariableCondition_Tuple, newVariableCondition->indexCount, newVariableCondition->vcVarCountTbl, "VC->vcTbl" );
			for( idx_I = 0; idx_I < newVariableCondition->indexCount; idx_I++ ) {
				memcpy( newVariableCondition->vcTbl[idx_I], self->vcTbl[idx_I], sizeof(VariableCondition_Tuple) * newVariableCondition->vcVarCountTbl[idx_I] );
			}
			PtrMap_Append( map, newVariableCondition->vcTbl, self->vcTbl );
		}
		
		if( (newVariableCondition->valueTbl = (VariableCondition_Value*)PtrMap_Find( map, self->valueTbl )) == NULL && self->valueTbl ) {
			newVariableCondition->valueTbl = Memory_Alloc_Array( VariableCondition_Value, newVariableCondition->valueCount, "VC->valueTbl" );
			memcpy( newVariableCondition->valueTbl, self->valueTbl, sizeof(VariableCondition_Value) * newVariableCondition->indexCount );
			PtrMap_Append( map, newVariableCondition->valueTbl, self->valueTbl );
		}
	}
	else {
		newVariableCondition->_set = self->_set;
		newVariableCondition->indexTbl = self->indexTbl;
		newVariableCondition->vcVarCountTbl = self->vcVarCountTbl;
		newVariableCondition->vcTbl = self->vcTbl;
		newVariableCondition->valueTbl = self->valueTbl;
	}
	
	if( ownMap ) {
		Stg_Class_Delete( map );
	}
	
	return (void*)newVariableCondition;
}
Beispiel #12
0
void* _MeshDecomp_Copy( void* meshDecomp, void* dest, Bool deep, Name nameExt, PtrMap* ptrMap ) {
	MeshDecomp*	self = (MeshDecomp*)meshDecomp;
	MeshDecomp*	newMeshDecomp;
	PtrMap*		map = ptrMap;
	Bool		ownMap = False;
	
	if( !map ) {
		map = PtrMap_New( 10 );
		ownMap = True;
	}
	
	newMeshDecomp = (MeshDecomp*)_Stg_Component_Copy( self, dest, deep, nameExt, map );
	
	/* Virtual methods */
	newMeshDecomp->nodeMapLocalToGlobal = self->nodeMapLocalToGlobal;
	newMeshDecomp->nodeMapDomainToGlobal = self->nodeMapDomainToGlobal;
	newMeshDecomp->nodeMapShadowToGlobal = self->nodeMapShadowToGlobal;
	newMeshDecomp->nodeMapGlobalToLocal = self->nodeMapGlobalToLocal;
	newMeshDecomp->nodeMapGlobalToDomain = self->nodeMapGlobalToDomain;
	newMeshDecomp->nodeMapGlobalToShadow = self->nodeMapGlobalToShadow;
	newMeshDecomp->elementMapLocalToGlobal = self->elementMapLocalToGlobal;
	newMeshDecomp->elementMapDomainToGlobal = self->elementMapDomainToGlobal;
	newMeshDecomp->elementMapShadowToGlobal = self->elementMapShadowToGlobal;
	newMeshDecomp->elementMapGlobalToLocal = self->elementMapGlobalToLocal;
	newMeshDecomp->elementMapGlobalToDomain = self->elementMapGlobalToDomain;
	newMeshDecomp->elementMapGlobalToShadow = self->elementMapGlobalToShadow;
	newMeshDecomp->shadowProcCount = self->shadowProcCount;
	newMeshDecomp->shadowBuildProcs = self->shadowBuildProcs;
	newMeshDecomp->shadowProcElementCount = self->shadowProcElementCount;
	newMeshDecomp->procWithElement = self->procWithElement;
	
	newMeshDecomp->dictionary = self->dictionary;
	newMeshDecomp->communicator = self->communicator;
	newMeshDecomp->rank = self->rank;
	newMeshDecomp->nproc = self->nproc;
	newMeshDecomp->procsInUse = self->procsInUse;
	newMeshDecomp->allowUnusedCPUs = self->allowUnusedCPUs;
	newMeshDecomp->allowPartitionOnNode = self->allowPartitionOnNode;
	newMeshDecomp->allowPartitionOnElement = self->allowPartitionOnElement;
	newMeshDecomp->allowUnbalancing = self->allowUnbalancing;
	newMeshDecomp->storage = self->storage;
	newMeshDecomp->shadowDepth = self->shadowDepth;
	newMeshDecomp->nodeGlobalCount = self->nodeGlobalCount;
	newMeshDecomp->nodeLocalCount = self->nodeLocalCount;
	newMeshDecomp->nodeShadowCount = self->nodeShadowCount;
	newMeshDecomp->nodeDomainCount = self->nodeDomainCount;
	newMeshDecomp->elementGlobalCount = self->elementGlobalCount;
	newMeshDecomp->elementLocalCount = self->elementLocalCount;
	newMeshDecomp->elementShadowCount = self->elementShadowCount;
	newMeshDecomp->elementDomainCount = self->elementDomainCount;
	
	if( deep ) {
		newMeshDecomp->procTopology = (Topology*)Stg_Class_Copy( self->procTopology, NULL, deep, nameExt, map );
		newMeshDecomp->elementLayout = (ElementLayout*)Stg_Class_Copy( self->elementLayout, NULL, deep, nameExt, map );
		newMeshDecomp->nodeLayout = (NodeLayout*)Stg_Class_Copy( self->nodeLayout, NULL, deep, nameExt, map );
		
		if( (newMeshDecomp->localNodeSets = PtrMap_Find( map, self->localNodeSets )) == NULL && self->localNodeSets ) {
			Partition_Index		proc_I;
			
			newMeshDecomp->localNodeSets = Memory_Alloc_Array( IndexSet*, newMeshDecomp->procsInUse, "MeshDecomp->localNodeSets" );
			for( proc_I = 0; proc_I < newMeshDecomp->procsInUse; proc_I++ ) {
				newMeshDecomp->localNodeSets[proc_I] = (IndexSet*)Stg_Class_Copy( self->localNodeSets[proc_I], NULL, deep, nameExt, map );
			}
		}
		
		if( (newMeshDecomp->shadowNodeSets = PtrMap_Find( map, self->shadowNodeSets )) == NULL && self->shadowNodeSets ) {
			Partition_Index		proc_I;
			
			newMeshDecomp->shadowNodeSets = Memory_Alloc_Array( IndexSet*, newMeshDecomp->procsInUse, "MeshDecomp->shadowNodeSets" );
			for( proc_I = 0; proc_I < newMeshDecomp->procsInUse; proc_I++ ) {
				newMeshDecomp->shadowNodeSets[proc_I] = (IndexSet*)Stg_Class_Copy( self->shadowNodeSets[proc_I], NULL, deep, nameExt, map );
			}
		}