#NEWLINE# def write_file( self ) : #NEWLINE# #INDENT# '\n        Write the package file.\n\n        Returns\n        -------\n        None\n\n        ' #NEWLINE# f_pbc = open ( self . fn_path , 'w' ) #NEWLINE# f_pbc . write ( ( '%s\n' % self . heading ) ) #NEWLINE# f_pbc . write ( ( '%10i%10i\n' % ( self . mxactp , self . mxcos ) ) ) #NEWLINE# for n in range ( self . parent . get_package ( 'DIS' ) . nper ) : #NEWLINE# #INDENT# if ( n < len ( self . layer_row_column_data ) ) : #NEWLINE# #INDENT# a = self . layer_row_column_data [ n ] #NEWLINE# itmp = a . shape [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# itmp = ( - 1 ) #NEWLINE# #UNINDENT# if ( n < len ( self . cosines ) ) : #NEWLINE# #INDENT# c = self . cosines [ n ] #NEWLINE# ctmp = c . shape [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ctmp = ( - 1 ) #NEWLINE# #UNINDENT# f_pbc . write ( ( '%10i%10i%10i\n' % ( itmp , ctmp , self . np ) ) ) #NEWLINE# if ( n < len ( self . layer_row_column_data ) ) : #NEWLINE# #INDENT# for b in a : #NEWLINE# #INDENT# f_pbc . write ( ( '%10i%10i%10i%10f%10f\n' % ( b [ 0 ] , b [ 1 ] , b [ 2 ] , b [ 3 ] , b [ 4 ] ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# if ( n < len ( self . cosines ) ) : #NEWLINE# #INDENT# for d in c : #NEWLINE# #INDENT# f_pbc . write ( ( '%10f%10f%10f\n' % ( d [ 0 ] , d [ 1 ] , d [ 2 ] ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# f_pbc . close ( )