def mesh_network(self, production_mode=True, refine_factor=1, slope=2): ''' Mesh Fracture Network using ncpus and lagrit meshing file is separate file: dfnGen_meshing.py ''' print('=' * 80) print("Meshing Network Using LaGriT : Starting") print('=' * 80) num_poly, h, visual_mode, dudded_points, domain = mh.parse_params_file() print('hpham: This is line 26 in mesh_network of meshdfn.py') # # if number of fractures is greater than number of CPUS, # # only use num_poly CPUs. This change is only made here, so ncpus # # is still used in PFLOTRAN ncpu = min(self._ncpu, num_poly) lagrit.create_parameter_mlgi_file(num_poly, h, slope=slope) lagrit.create_lagrit_scripts(visual_mode, ncpu) lagrit.create_user_functions() failure = run_mesh.mesh_fractures_header(num_poly, ncpu, visual_mode) if failure: mh.cleanup_dir() sys.exit( "One or more fractures failed to mesh properly.\nExiting Program") n_jobs = lagrit.create_merge_poly_files(ncpu, num_poly, h, visual_mode) run_mesh.merge_the_meshes(num_poly, ncpu, n_jobs, visual_mode) if not visual_mode: if not mh.check_dudded_points(dudded_points): mh.cleanup_dir() # sys.exit("Incorrect Number of dudded points.\nExiting Program") if production_mode: mh.cleanup_dir() if not visual_mode: lagrit.define_zones(h, domain) mh.output_meshing_report(visual_mode)
num_poly, h, visual_mode, dudded_points, domain = mh.parse_params_file() ncpu=min(ncpu, num_poly) lagrit.create_parameter_mlgi_file(num_poly, h) lagrit.create_lagrit_scripts(visual_mode, ncpu) lagrit.create_user_functions() failure = run_mesh.mesh_fractures_header(num_poly, ncpu, visual_mode) if failure: mh.cleanup_dir() sys.exit("One or more fractures failed to mesh properly.\nExiting Program") n_jobs = lagrit.create_merge_poly_files(ncpu, num_poly, h, visual_mode, domain) run_mesh.merge_the_meshes(num_poly, ncpu, n_jobs, visual_mode) if not visual_mode: if not mh.check_dudded_points(dudded_points): # mh.cleanup_dir() sys.exit("Incorrect Number of dudded points.\nExitingin Program") if production_mode: mh.cleanup_dir() if not visual_mode: lagrit.define_zones() mh.output_meshing_report(visual_mode)