Index: /issm/trunk-jpl/src/jl/issm.jl
===================================================================
--- /issm/trunk-jpl/src/jl/issm.jl	(revision 26470)
+++ /issm/trunk-jpl/src/jl/issm.jl	(revision 26471)
@@ -1,5 +1,7 @@
+using Printf
+
+#Define classes used by model struct
 abstract type AbstractMesh end
-
-struct Mesh2dTriangle <: AbstractMesh
+mutable struct Mesh2dTriangle <: AbstractMesh
 	numberofvertices::Int32
 	numberofelements::Int32
@@ -8,6 +10,8 @@
 	elements::Matrix{Int32}
 end
-
-struct Mesh3dPrism{T} <: AbstractMesh
+function Mesh2dTriangle() #{{{
+	return Mesh2dTriangle( 0, 0, Vector{Float64}(undef,0), Vector{Float64}(undef, 0), Matrix{Int32}(undef, 0, 0))
+end# }}}
+mutable struct Mesh3dPrism{T} <: AbstractMesh
 	numberofvertices::Int32
 	numberofelements::Int32
@@ -18,6 +22,8 @@
 	elements::Matrix{Int32}
 end
-
-struct Geometry
+function Mesh3dPrism() #{{{
+	return Mesh3dPrism( 0, 0, 0, Vector{Float64}(undef,0), Vector{Float64}(undef,0), Vector{Float64}(undef,0), Matrix{Int32}(undef, 0, 0))
+end# }}}
+mutable struct Geometry
 	surface::Vector{Float64}
 	base::Vector{Float64}
@@ -25,35 +31,24 @@
 	bed::Vector{Float64}
 end
+function Geometry() #{{{
+	return Geometry( Vector{Float64}(undef,0), Vector{Float64}(undef,0), Vector{Float64}(undef,0), Vector{Float64}(undef,0))
+end# }}}
 
-function configure(;
-        MeshType = Mesh2dTriangle,
-		  meshnbv = 0,
-		  meshnbe = 0,
-        meshx = [NaN],
-        meshy = [NaN],
-		  meshel = [0],
-        GeometryType = Geometry,
-		  geos = [NaN],
-		  geob1 = [NaN],
-		  geoh = [NaN],
-		  geob2 = [NaN],
-    )
+mutable struct model
+	mesh::AbstractMesh
+	geometry::Geometry
+end
+function model() #{{{
+	return model(Mesh2dTriangle(),Geometry())
+end#}}}
+function Base.show(io::IO, md::model)# {{{
 
-	mesh = MeshType(meshnbv,meshnbe,meshx,meshy,meshel)
-	geometry = Geometry(geos,geob1,geoh,geob2)
+	compact = get(io, :compact, false)
 
-    return (mesh = mesh, geometry = geometry)
-end
+	println(io,"Model:")
+	@printf "%19s: %-22s -- %s\n" "mesh" typeof(md.mesh) "mesh properties"
+	@printf "%19s: %-22s -- %s\n" "geometry" typeof(md.geometry) "surface elevation, bedrock topography, ice thickness,..."
 
-solve(model::NamedTuple) = solve(model.mesh, model.geometry)
-
-function solve(mesh::Mesh2dTriangle, geometry::Geometry)
-    println("Solving with triangular mesh, ... data, ...")
-    # do something
-end
-function solve(mesh::Mesh3dPrism, geometry::Geometry)
-    println("Solving with rectangular mesh, ... data, ...")
-    # do something
-end
+end# }}}
 
 # Probably actually want something more like:
@@ -63,47 +58,2 @@
 #     # do something
 # end
-
-function remake(model::NamedTuple;
-        MeshType = typeof(model.mesh),
-		  meshnbv = model.mesh.nbv,
-		  meshnbe = model.mesh.nbe,
-        meshx = model.mesh.x,
-        meshy = model.mesh.y,
-		  meshel = model.mesh.elements,
-        surface = model.geometry.surface,
-        base = model.geometry.base,
-		  thickness = model.geometry.thickness,
-		  bed = model.geometry.bed,
-    )
-
-    mesh = MeshType(meshnbv, meshnbe, meshx, meshy, meshel)
-	 geometry = geometry(surface, base, thickness, bed)
-
-    return (mesh = mesh, geometry = geometry)
-end
-
-function remesh(model::NamedTuple;
-        MeshType = Mesh2dTriangle,
-        meshx = rand(1000),
-        meshy = rand(1000)
-    )
-
-    new_mesh = MeshType(meshx, meshy)
-    return (mesh = new_mesh, data = model.data)
-end
-
-## --- Try it out
-
-# Just use default parameters
-model = configure()
-solve(model)
-## --- Try it out
-
-# Actually specify some relevant parameters
-model = configure(
-    MeshType = Mesh3dPrism,
-    foo = rand(10000),
-    bar = rand(1000,1000),
-    baz = randn(1000,1000)
-)
-solve(model)
Index: /issm/trunk-jpl/src/jl/triangle.jl
===================================================================
--- /issm/trunk-jpl/src/jl/triangle.jl	(revision 26470)
+++ /issm/trunk-jpl/src/jl/triangle.jl	(revision 26471)
@@ -1,3 +1,4 @@
 #see https://github.com/JuliaGeometry/Triangulate.jl/blob/master/src/plot.jl
+#see https://github.com/JuliaGeometry/MeshViz.jl/blob/master/src/simplemesh.jl
 
 #Class Triangle's triangulateio
@@ -52,4 +53,5 @@
 
 using Printf, PyPlot
+using GLMakie
 """
 TRIANGLE - create model mesh using the triangle package
@@ -166,11 +168,14 @@
 	#plot
 	clf()
-	fig = matplotlib[:pyplot][:figure]("2D Mesh Plot", figsize = (10,10))
-	ax = matplotlib[:pyplot][:axes]()
-	ax[:set_aspect]("equal")
-	tri = ax[:triplot](points[:,1], points[:,2], elements.-1)
-	setp(tri, linestyle = "-", linewidth = 1.5, marker = "None", markersize = 5., color = "blue")
-
-	fig[:canvas][:draw]()
+	if false
+		poly(points, elements, strokewidth=1, shading=false,transparency=true)
+	else
+		fig = matplotlib[:pyplot][:figure]("2D Mesh Plot", figsize = (10,10))
+		ax = matplotlib[:pyplot][:axes]()
+		ax[:set_aspect]("equal")
+		tri = ax[:triplot](points[:,1], points[:,2], elements.-1)
+		setp(tri, linestyle = "-", linewidth = 1.5, marker = "None", markersize = 5., color = "blue")
+		fig[:canvas][:draw]()
+	end
 	
 end#}}}
