Ejemplo n.º 1
0
from src.utilities import DataInput, MeshGenerator
from data.data_factory import DataFactory

# create meshgrid for contour :
vara = DataFactory.get_bamber()
H = vara['H']['map_data']
S = vara['h']['map_data']
B = vara['b']['map_data']
H[S <= 0] = 0.0
vara['H']['map_data'] = H

# process the data :
dd = DataInput(None, vara, flip=False, gen_space=False)
#dd.set_data_max('mask', 2, 0)

m = MeshGenerator(dd, 'mesh', './')

# 20 works well for the last arg. below
m.create_contour('H', 200.0, 3)
m.plot_contour()

m.eliminate_intersections()
m.plot_contour()

# 10000 works well on the following line
m.write_gmsh_contour(1000)
m.finish(None)

m.create_2D_mesh('mesh')  #FIXME: fails
m.convert_msh_to_xml('mesh', 'mesh')
Ejemplo n.º 2
0
from src.utilities     import DataInput, MeshGenerator
from data.data_factory import DataFactory

# create meshgrid for contour :
vara = DataFactory.get_bamber()
H = vara['H']['map_data']
S = vara['h']['map_data']
B = vara['b']['map_data']
H[S<=0] = 0.0
vara['H']['map_data'] = H

# process the data :
dd = DataInput(None, vara, flip=False, gen_space=False)
#dd.set_data_max('mask', 2, 0)

m = MeshGenerator(dd, 'mesh', './')

# 20 works well for the last arg. below
m.create_contour('H', 200.0,3)
m.plot_contour()

m.eliminate_intersections()
m.plot_contour()

# 10000 works well on the following line
m.write_gmsh_contour(1000)
m.finish(None)

m.create_2D_mesh('mesh') #FIXME: fails
m.convert_msh_to_xml('mesh', 'mesh')
Ejemplo n.º 3
0
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, flip=True, gen_space=False)
#dd.set_data_max('mask', 2, 0)

m = MeshGenerator(dd, 'mesh', '../meshes/') 

m.create_contour('mask', 0.999, 100)
m.plot_contour()

m.eliminate_intersections()

m.write_gmsh_contour(10000.)
m.finish()


Ejemplo n.º 4
0
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')
Ejemplo n.º 5
0
#===============================================================================
# data preparation :

thklim = 0.0

# collect the raw data :
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)
Ejemplo n.º 6
0
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_bamber()

# process the data :
dd = DataInput(None, vara, gen_space=False)
dd.set_data_max('mask', 2, 0)

m = MeshGenerator(dd, 'mesh', '')

m.create_contour('H', 200.0, 4)
#m.plot_contour()

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, 20000, 100000, 1, 400000)
#m.finish(4)

#m.create_2D_mesh('mesh') #FIXME: fails
Ejemplo n.º 7
0
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')