bamber = DataFactory.get_bamber(thklim = thklim) searise = DataFactory.get_searise(thklim = thklim) dsr = DataInput(None, searise, gen_space=False) dbm = DataInput(None, bamber, gen_space=False) #=============================================================================== # generate the contour : m = MeshGenerator(dbm, 'mesh', '') m.create_contour('H', zero_cntr=200.0, skip_pts=2) m.eliminate_intersections(dist=40) #m.plot_contour() m.write_gmsh_contour(boundary_extend=False) m.extrude(h=100000, n_layers=10) m.close_file() #=============================================================================== # refine : thklim = 1250.0 #dsr.set_data_min('U_ob', boundary=0.0, val=0.0) #dsr.set_data_max('U_ob', boundary=400.0, val=400.0) dbm.set_data_min('H', boundary=thklim, val=thklim) #dbm.set_data_max('mask', 2, 0) # might want to refine off of thickness : H = dbm.data['H'] # ensure that there are no values less than 1 for taking log :
import os src_directory = '../../../../' sys.path.append(src_directory) from src.utilities import DataInput, MeshGenerator from data.data_factory import DataFactory # create meshgrid for contour : vara = DataFactory.get_bedmap2() # process the data : dd = DataInput(None, vara, gen_space=False) m = MeshGenerator(dd, '3dmesh', '') m.create_contour('mask', 1.0, 10) m.eliminate_intersections(dist=10) m.plot_contour() m.write_gmsh_contour(100000, boundary_extend=False) m.extrude(100000, 10) #m.add_edge_attractor(1) #field, ifield, lcMin, lcMax, distMin, distMax #m.add_threshold(2, 1, 10000, 50000, 1, 2000000) #m.finish(4) #m.create_2D_mesh('mesh') #FIXME: fails #m.convert_msh_to_xml('mesh', 'mesh')
import sys import os src_directory = '../../../../' sys.path.append(src_directory) from src.utilities import DataInput, MeshGenerator from data.data_factory import DataFactory # create meshgrid for contour : vara = DataFactory.get_bedmap2() # process the data : dd = DataInput(None, vara, gen_space=False) m = MeshGenerator(dd, '3dmesh', '') m.create_contour('mask', 1.0, 10) m.eliminate_intersections(dist=10) m.plot_contour() m.write_gmsh_contour(100000, boundary_extend=False) m.extrude(100000, 10) #m.add_edge_attractor(1) #field, ifield, lcMin, lcMax, distMin, distMax #m.add_threshold(2, 1, 10000, 50000, 1, 2000000) #m.finish(4) #m.create_2D_mesh('mesh') #FIXME: fails #m.convert_msh_to_xml('mesh', 'mesh')