#NEWLINE# def __init__( self , network = None , pores = [ ] , throats = [ ] , **kwargs ) : #NEWLINE# #INDENT# super ( ) . __init__ ( ** kwargs ) #NEWLINE# logger . name = network . name #NEWLINE# if ( network is None ) : #NEWLINE# #INDENT# network = GenericNetwork ( ) #NEWLINE# #UNINDENT# self . network . update ( { #NEWLINE# #INDENT# network . name : network , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . _net . geometries . update ( { #NEWLINE# #INDENT# self . name : self , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . _net [ ( 'pore.' + self . name ) ] = False #NEWLINE# self . _net [ ( 'throat.' + self . name ) ] = False #NEWLINE# try : #NEWLINE# #INDENT# self . set_locations ( pores = pores , throats = throats ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# self . controller . purge_object ( self ) #NEWLINE# raise Exception ( 'Provided locations are in use, instantiation cancelled' )