#NEWLINE# def domain_area( self , face ) : #NEWLINE# #INDENT# '\n        Calculate the area of a given network face\n\n        Parameters\n        ----------\n        face : array_like\n            List of pores of pore defining the face of interest\n\n        Returns\n        -------\n        The area of the specified face\n        ' #NEWLINE# coords = self [ 'pore.coords' ] [ face ] #NEWLINE# rads = ( self [ 'pore.diameter' ] [ face ] / 2.0 ) #NEWLINE# dx = ( max ( ( coords [ : , 0 ] + rads ) ) - min ( ( coords [ : , 0 ] - rads ) ) ) #NEWLINE# dy = ( max ( ( coords [ : , 1 ] + rads ) ) - min ( ( coords [ : , 1 ] - rads ) ) ) #NEWLINE# dz = ( max ( ( coords [ : , 2 ] + rads ) ) - min ( ( coords [ : , 2 ] - rads ) ) ) #NEWLINE# yz = ( dy * dz ) #NEWLINE# xz = ( dx * dz ) #NEWLINE# xy = ( dx * dy ) #NEWLINE# directions = sp . where ( ( [ yz , xz , xy ] != max ( [ yz , xz , xy ] ) ) ) [ 0 ] #NEWLINE# try : #NEWLINE# #INDENT# coords = self [ 'pore.coords' ] #NEWLINE# rads = ( self [ 'pore.diameter' ] / 2.0 ) #NEWLINE# d0 = ( max ( ( coords [ : , directions [ 0 ] ] + rads ) ) - min ( ( coords [ : , directions [ 0 ] ] - rads ) ) ) #NEWLINE# d1 = ( max ( ( coords [ : , directions [ 1 ] ] + rads ) ) - min ( ( coords [ : , directions [ 1 ] ] - rads ) ) ) #NEWLINE# A = ( d0 * d1 ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# A = max ( [ yz , xz , xy ] ) #NEWLINE# #UNINDENT# if ( not misc . iscoplanar ( self [ 'pore.coords' ] [ face ] ) ) : #NEWLINE# #INDENT# logger . warning ( 'The supplied pores are not coplanar. Area will beapproximate' ) #NEWLINE# pass #NEWLINE# #UNINDENT# return A