PEATSA/Core/Environment.py
def combineArray(self, arrayFragment):
	
		'''Combines a set of arrayFragments from each processor into one array'''

		if Environment.isParallel:
			import pypar
			if self.isRoot():
				completeArray = arrayFragment
				for i in range(1, pypar.size()):
					fragment = pypar.receive(i)
					completeArray.extend(fragment)
				
				#Send the array
				for i in range(1, pypar.size()):
					pypar.send(completeArray, i)
			else:
				#Send the fragment
				pypar.send(arrayFragment, 0)
				#Retrieve the array
				completeArray = pypar.receive(0)
		else:
			completeArray = arrayFragment
		
		return completeArray
Combines a set of arrayFragments from each processor into one array
Combines a set of arrayFragments from each processor into one array
Combines a set of arrayFragments from each processor into one array
def combineArray(self, arrayFragment):
		if Environment.isParallel:
			import pypar
			if self.isRoot():
				completeArray = arrayFragment
				for i in range(1, pypar.size()):
					fragment = pypar.receive(i)
					completeArray.extend(fragment)
				for i in range(1, pypar.size()):
					pypar.send(completeArray, i)
			else:
				pypar.send(arrayFragment, 0)
				completeArray = pypar.receive(0)
		else:
			completeArray = arrayFragment
		return completeArray
def combineArray ( self , arrayFragment ) : if Environment . isParallel : import pypar if self . isRoot ( ) : completeArray = arrayFragment for i in range ( 1 , pypar . size ( ) ) : fragment = pypar . receive ( i ) completeArray . extend ( fragment ) for i in range ( 1 , pypar . size ( ) ) : pypar . send ( completeArray , i ) else : pypar . send ( arrayFragment , 0 ) completeArray = pypar . receive ( 0 ) else : completeArray = arrayFragment return completeArray
Combines a set of arrayFragments from each processor into one array
Combines a set of arrayFragments from each processor into one array
'''Combines a set of arrayFragments from each processor into one array''' #Send the array #Send the fragment #Retrieve the array
self
arrayFragment