[26740] | 1 | Index: ../trunk-jpl/src/jl/md/parameterization.jl
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/jl/md/parameterization.jl (revision 26712)
|
---|
| 4 | +++ ../trunk-jpl/src/jl/md/parameterization.jl (revision 26713)
|
---|
| 5 | @@ -16,8 +16,8 @@
|
---|
| 6 | """
|
---|
| 7 | function setmask(md::model,floatingicename::String,groundedicename::String)
|
---|
| 8 |
|
---|
| 9 | - elementonfloatingice = FlagElements( md, floatingicename);
|
---|
| 10 | - elementongroundedice = FlagElements( md, groundedicename);
|
---|
| 11 | + elementonfloatingice = FlagElements( md, floatingicename)
|
---|
| 12 | + elementongroundedice = FlagElements( md, groundedicename)
|
---|
| 13 |
|
---|
| 14 | elementonfloatingice = convert( Array{Float64}, (elementonfloatingice.>0) .& (elementongroundedice.==0.))
|
---|
| 15 | elementongroundedice = convert( Array{Float64}, elementonfloatingice.==0.)
|
---|
| 16 | @@ -44,7 +44,9 @@
|
---|
| 17 | elseif region == "all"
|
---|
| 18 | flags = ones(md.mesh.numberofelements)
|
---|
| 19 | else
|
---|
| 20 | - flags = InContour(md.mesh.x,md.mesh.y,region);
|
---|
| 21 | + xcenter = md.mesh.x[md.mesh.elements]*[1;1;1]/3
|
---|
| 22 | + ycenter = md.mesh.y[md.mesh.elements]*[1;1;1]/3
|
---|
| 23 | + flags = ContourToNodes(xcenter, ycenter, region, 2.)
|
---|
| 24 | end
|
---|
| 25 |
|
---|
| 26 | return flags
|
---|
| 27 | Index: ../trunk-jpl/src/jl/test101.jl
|
---|
| 28 | ===================================================================
|
---|
| 29 | --- ../trunk-jpl/src/jl/test101.jl (revision 26712)
|
---|
| 30 | +++ ../trunk-jpl/src/jl/test101.jl (revision 26713)
|
---|
| 31 | @@ -25,12 +25,13 @@
|
---|
| 32 | y = ISSM.archread(ISSM.issmdir()*"/test/Data/SquareShelfConstrained.arch","y")
|
---|
| 33 | vx = ISSM.archread(ISSM.issmdir()*"/test/Data/SquareShelfConstrained.arch","vx")
|
---|
| 34 | vy = ISSM.archread(ISSM.issmdir()*"/test/Data/SquareShelfConstrained.arch","vy")
|
---|
| 35 | -index = ISSM.archread(ISSM.issmdir()*"/test/Data/SquareShelfConstrained.arch","index")
|
---|
| 36 | -md.initialization.vx=zeros(md.mesh.numberofvertices)#InterpFromMeshToMesh2d(index,x,y,vx,md.mesh.x,md.mesh.y)
|
---|
| 37 | -md.initialization.vy=zeros(md.mesh.numberofvertices)#InterpFromMeshToMesh2d(index,x,y,vy,md.mesh.x,md.mesh.y)
|
---|
| 38 | +index = Int.(ISSM.archread(ISSM.issmdir()*"/test/Data/SquareShelfConstrained.arch","index"))
|
---|
| 39 | +md.initialization.vx=ISSM.InterpFromMeshToMesh2d(index,x,y,vx,md.mesh.x,md.mesh.y,0.0)
|
---|
| 40 | +md.initialization.vy=ISSM.InterpFromMeshToMesh2d(index,x,y,vy,md.mesh.x,md.mesh.y,0.0)
|
---|
| 41 |
|
---|
| 42 | md.materials.rheology_B=1.815730284801701e+08*ones(md.mesh.numberofvertices)
|
---|
| 43 | md.materials.rheology_n=3*ones(md.mesh.numberofelements)
|
---|
| 44 | +md.friction.coefficient=20*ones(md.mesh.numberofvertices)
|
---|
| 45 |
|
---|
| 46 | md.stressbalance.restol=0.05
|
---|
| 47 | md.stressbalance.reltol=0.05
|
---|
| 48 | Index: ../trunk-jpl/src/jl/test501.jl
|
---|
| 49 | ===================================================================
|
---|
| 50 | --- ../trunk-jpl/src/jl/test501.jl (revision 26712)
|
---|
| 51 | +++ ../trunk-jpl/src/jl/test501.jl (revision 26713)
|
---|
| 52 | @@ -5,35 +5,31 @@
|
---|
| 53 | md = ISSM.model()
|
---|
| 54 | md = ISSM.triangle(md,"../../test/Exp/Pig.exp",10000.)
|
---|
| 55 | md = ISSM.setmask(md,"../../test/Exp/PigShelves.exp","../../test/Exp/PigIslands.exp")
|
---|
| 56 | -error("not implemented yet")
|
---|
| 57 |
|
---|
| 58 | -#Geometry
|
---|
| 59 | -hmin=300.
|
---|
| 60 | -hmax=1000.
|
---|
| 61 | -ymin=minimum(md.mesh.y)
|
---|
| 62 | -ymax=maximum(md.mesh.y)
|
---|
| 63 | -xmin=minimum(md.mesh.x)
|
---|
| 64 | -xmax=maximum(md.mesh.x)
|
---|
| 65 | -md.geometry.thickness = hmax .+ (hmin-hmax)*(md.mesh.y .- ymin)./(ymax-ymin) .+ 0.1*(hmin-hmax)*(md.mesh.x .- xmin)./(xmax-xmin)
|
---|
| 66 | -md.geometry.base = -md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness .+20
|
---|
| 67 | -md.geometry.surface = md.geometry.base+md.geometry.thickness
|
---|
| 68 | -md.geometry.bed = md.geometry.base
|
---|
| 69 | +#Initial velocity and geometry
|
---|
| 70 | +x = ISSM.archread(ISSM.issmdir()*"/test/Data/Pig.arch","x")
|
---|
| 71 | +y = ISSM.archread(ISSM.issmdir()*"/test/Data/Pig.arch","y")
|
---|
| 72 | +vx_obs = ISSM.archread(ISSM.issmdir()*"/test/Data/Pig.arch","vx_obs")
|
---|
| 73 | +vy_obs = ISSM.archread(ISSM.issmdir()*"/test/Data/Pig.arch","vy_obs")
|
---|
| 74 | +index = Int.(ISSM.archread(ISSM.issmdir()*"/test/Data/Pig.arch","index"))
|
---|
| 75 | +surface = ISSM.archread(ISSM.issmdir()*"/test/Data/Pig.arch","surface")
|
---|
| 76 | +thickness = ISSM.archread(ISSM.issmdir()*"/test/Data/Pig.arch","thickness")
|
---|
| 77 | +bed = ISSM.archread(ISSM.issmdir()*"/test/Data/Pig.arch","bed")
|
---|
| 78 | +md.initialization.vx=ISSM.InterpFromMeshToMesh2d(index, x, y, vx_obs, md.mesh.x, md.mesh.y, 0.0)
|
---|
| 79 | +md.initialization.vy=ISSM.InterpFromMeshToMesh2d(index, x, y, vy_obs, md.mesh.x, md.mesh.y, 0.0)
|
---|
| 80 | +md.geometry.surface = ISSM.InterpFromMeshToMesh2d(index, x, y, surface, md.mesh.x, md.mesh.y, 0.0)
|
---|
| 81 | +md.geometry.thickness = ISSM.InterpFromMeshToMesh2d(index, x, y, thickness, md.mesh.x, md.mesh.y, 0.0)
|
---|
| 82 | +md.geometry.base=md.geometry.surface .- md.geometry.thickness
|
---|
| 83 | +md.geometry.bed =md.geometry.base
|
---|
| 84 | +pos = findall(md.mask.ocean_levelset.<0)
|
---|
| 85 | +md.geometry.bed[pos] = ISSM.InterpFromMeshToMesh2d(index, x, y, bed, md.mesh.x[pos], md.mesh.y[pos])
|
---|
| 86 |
|
---|
| 87 | -#Initial velocity
|
---|
| 88 | -#x = ISSM.archread(ISSM.issmdir()*"/test/Data/SquareShelfConstrained.arch","x")
|
---|
| 89 | -#y = ISSM.archread(ISSM.issmdir()*"/test/Data/SquareShelfConstrained.arch","y")
|
---|
| 90 | -#vx = ISSM.archread(ISSM.issmdir()*"/test/Data/SquareShelfConstrained.arch","vx")
|
---|
| 91 | -#vy = ISSM.archread(ISSM.issmdir()*"/test/Data/SquareShelfConstrained.arch","vy")
|
---|
| 92 | -#index = ISSM.archread(ISSM.issmdir()*"/test/Data/SquareShelfConstrained.arch","index")
|
---|
| 93 | -md.initialization.vx=zeros(md.mesh.numberofvertices)#InterpFromMeshToMesh2d(index,x,y,vx,md.mesh.x,md.mesh.y)
|
---|
| 94 | -md.initialization.vy=zeros(md.mesh.numberofvertices)#InterpFromMeshToMesh2d(index,x,y,vy,md.mesh.x,md.mesh.y)
|
---|
| 95 | -
|
---|
| 96 | md.materials.rheology_B=1.815730284801701e+08*ones(md.mesh.numberofvertices)
|
---|
| 97 | md.materials.rheology_n=3*ones(md.mesh.numberofelements)
|
---|
| 98 | -md.friction.coefficient=20*ones(md.mesh.numberofvertices)
|
---|
| 99 | +md.friction.coefficient=50*ones(md.mesh.numberofvertices)
|
---|
| 100 |
|
---|
| 101 | md.stressbalance.restol=0.05
|
---|
| 102 | -md.stressbalance.reltol=0.05
|
---|
| 103 | +md.stressbalance.reltol=1.0
|
---|
| 104 | md.stressbalance.abstol=NaN
|
---|
| 105 |
|
---|
| 106 | #Boundary conditions
|
---|