Beispiel #1
0
import sys
src_directory = '../../../'
sys.path.append(src_directory)

import src.model              as model
import src.solvers            as solvers
import src.physical_constants as pc
from data.data_factory   import DataFactory
from meshes.mesh_factory import MeshFactory
from src.helper          import default_nonlin_solver_params
from src.utilities       import DataInput
from dolfin              import *

set_log_active(True)

var_measures = DataFactory.get_ant_measures()
var_bedmap1  = DataFactory.get_lebrocq()
var_bedmap2  = DataFactory.get_bedmap2()

mesh         = MeshFactory.get_antarctica_coarse()
flat_mesh    = MeshFactory.get_antarctica_coarse()

dm  = DataInput(None, var_measures, mesh=mesh,flip=True)
db1 = DataInput(None, var_bedmap1,  mesh=mesh)
db2 = DataInput(None, var_bedmap2,  mesh=mesh, flip=True)

thklim = 50.0

db2.set_data_min("H", thklim, thklim)
db2.set_data_min("h", 0.0,0.0)
#set_log_level(DEBUG)

# output directory :
i = int(sys.argv[1])
dir_b   = './results_shelves/0'

# make the directory if needed :
out_dir = dir_b + str(i) + '/'
d       = os.path.dirname(out_dir)
if not os.path.exists(d):
  os.makedirs(d)


thklim = 200.0

measures  = DataFactory.get_ant_measures(res=900)
bedmap1   = DataFactory.get_bedmap1(thklim=thklim)
bedmap2   = DataFactory.get_bedmap2(thklim=thklim)

mesh      = Mesh('meshes/mesh_low.xml')
flat_mesh = Mesh('meshes/mesh_low.xml')
#mesh.coordinates()[:,2]      /= 100000.0
#flat_mesh.coordinates()[:,2] /= 100000.0


dm  = DataInput(None, measures, mesh=mesh)
db1 = DataInput(None, bedmap1,  mesh=mesh)
db2 = DataInput(None, bedmap2,  mesh=mesh)

db2.set_data_val('H', 32767, thklim)
db2.set_data_val('h', 32767, 0.0)