#NEWLINE# def return_results( self , Pc = 0 , seq = None , sat = None , occupancy = 'occupancy' ) : #NEWLINE# #INDENT# '\n        Updates the occupancy status of invading and defending phases\n        as determined by the OP algorithm\n\n        ' #NEWLINE# p_inv = self [ 'pore.inv_Pc' ] #NEWLINE# self . _inv_phase [ 'pore.inv_Pc' ] = p_inv #NEWLINE# t_inv = self [ 'throat.inv_Pc' ] #NEWLINE# self . _inv_phase [ 'throat.inv_Pc' ] = t_inv #NEWLINE# p_seq = self [ 'pore.inv_seq' ] #NEWLINE# self . _inv_phase [ 'pore.inv_seq' ] = p_seq #NEWLINE# t_seq = self [ 'throat.inv_seq' ] #NEWLINE# self . _inv_phase [ 'throat.inv_seq' ] = t_seq #NEWLINE# self . _inv_phase [ 'pore.inv_sat' ] = self [ 'pore.inv_sat' ] #NEWLINE# self . _inv_phase [ 'throat.inv_sat' ] = self [ 'throat.inv_sat' ] #NEWLINE# if ( sat is not None ) : #NEWLINE# #INDENT# p_inv = ( self [ 'pore.inv_sat' ] <= sat ) #NEWLINE# t_inv = ( self [ 'throat.inv_sat' ] <= sat ) #NEWLINE# temp = sp . array ( p_inv , dtype = sp . float_ , ndmin = 1 ) #NEWLINE# self . _inv_phase [ ( 'pore.' + occupancy ) ] = temp #NEWLINE# temp = sp . array ( t_inv , dtype = sp . float_ , ndmin = 1 ) #NEWLINE# self . _inv_phase [ ( 'throat.' + occupancy ) ] = temp #NEWLINE# if ( self . _def_phase is not None ) : #NEWLINE# #INDENT# temp = sp . array ( ( ~ p_inv ) , dtype = sp . float_ , ndmin = 1 ) #NEWLINE# self . _def_phase [ ( 'pore.' + occupancy ) ] = temp #NEWLINE# temp = sp . array ( ( ~ t_inv ) , dtype = sp . float_ , ndmin = 1 ) #NEWLINE# self . _def_phase [ ( 'throat.' + occupancy ) ] = temp #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( seq is not None ) : #NEWLINE# #INDENT# p_seq = ( self [ 'pore.inv_seq' ] <= seq ) #NEWLINE# t_seq = ( self [ 'throat.inv_seq' ] <= seq ) #NEWLINE# temp = sp . array ( p_seq , dtype = sp . float_ , ndmin = 1 ) #NEWLINE# self . _inv_phase [ ( 'pore.' + occupancy ) ] = temp #NEWLINE# temp = sp . array ( t_seq , dtype = sp . float_ , ndmin = 1 ) #NEWLINE# self . _inv_phase [ ( 'throat.' + occupancy ) ] = temp #NEWLINE# if ( self . _def_phase is not None ) : #NEWLINE# #INDENT# temp = sp . array ( ( ~ p_seq ) , dtype = sp . float_ , ndmin = 1 ) #NEWLINE# self . _def_phase [ ( 'pore.' + occupancy ) ] = temp #NEWLINE# temp = sp . array ( ( ~ t_seq ) , dtype = sp . float_ , ndmin = 1 ) #NEWLINE# self . _def_phase [ ( 'throat.' + occupancy ) ] = temp #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# p_inv = ( self [ 'pore.inv_Pc' ] <= Pc ) #NEWLINE# t_inv = ( self [ 'throat.inv_Pc' ] <= Pc ) #NEWLINE# temp = sp . array ( p_inv , dtype = sp . float_ , ndmin = 1 ) #NEWLINE# self . _inv_phase [ ( 'pore.' + occupancy ) ] = temp #NEWLINE# temp = sp . array ( t_inv , dtype = sp . float_ , ndmin = 1 ) #NEWLINE# self . _inv_phase [ ( 'throat.' + occupancy ) ] = temp #NEWLINE# if ( self . _def_phase is not None ) : #NEWLINE# #INDENT# temp = sp . array ( ( ~ p_inv ) , dtype = sp . float_ , ndmin = 1 ) #NEWLINE# self . _def_phase [ ( 'pore.' + occupancy ) ] = temp #NEWLINE# temp = sp . array ( ( ~ t_inv ) , dtype = sp . float_ , ndmin = 1 ) #NEWLINE# self . _def_phase [ ( 'throat.' + occupancy ) ] = temp