2 :filename: gen_output.py
3 :synopsis: Main driver for dfnGen output report
5 :maintainer: Jeffrey Hyman
6 :moduleauthor: Jeffrey Hyman <jhyman@lanl.gov>
12 import matplotlib.pylab
as plt
13 from matplotlib
import rc
14 rc(
'text', usetex=
True)
27 """ Create working dictionary for plots. There is one directory for the entire network information and one for each family.
32 Output report dictionary containing general parameters. See output_report for more details
45 if not os.path.isdir(params[
"output_dir"]):
46 os.mkdir(params[
"output_dir"])
47 if not os.path.isdir(f
"{params['output_dir']}/network"):
48 os.mkdir(f
"{params['output_dir']}/network")
49 for i
in range(1, params[
"num_families"] + 1):
50 if not os.path.isdir(f
"{params['output_dir']}/family_{i}"):
51 os.mkdir(f
"{params['output_dir']}/family_{i}")
56 output_dir="dfnGen_output_report"):
57 """ Creates a PDF output report for the network created by DFNGen. Plots of the fracture lengths, locations, orientations are produced for each family. Files are written into "output_dir/family_{id}/". Information about the whole network are also created and written into "output_dir/network/"
64 Toggle for the amount of information printed to screen. If true, progress information printed to screen
66 Name of directory where all plots are saved
74 Final output report is named "jobname"_output_report.pdf
75 User defined fractures (ellipses, rectangles, and polygons) are not supported at this time.
81 print(
'Creating Report of DFN generation')
82 print(
"=" * 80 +
"\n")
83 print(
'--> Gathering Network Information')
85 families = get_family_information()
87 fractures = get_fracture_information()
89 families, fractures, params = combine_family_and_fracture_information(
91 params, families = parse_dfn_output(params, families)
93 params[
"verbose"] = verbose
94 params[
"jobname"] = self.local_jobname
95 params[
"output_dir"] = output_dir
100 if len(families) > 0:
101 print(
'--> Plotting Information')
102 plot_fracture_centers(params, families, fractures)
103 plot_fracture_radii(params, families, fractures)
104 plot_fracture_orientations(params, families, fractures)
105 plot_fram_information(params)
107 make_pdf(params, families, fractures)
109 f
"--> Output report is written into {self.local_jobname}_output_report.pdf\n"
114 "--> There are no stochastic families. An output PDF will not be generated.\n"
119 print(
"Creating Report of DFN generation complete")
120 print(
"=" * 80 +
"\n")
121 os.chdir(self.jobname)
def setup_output_directory(params)
def output_report(self, verbose=True, output_dir="dfnGen_output_report")