Index: /issm/trunk-jpl/src/jl/solve/analyses.jl
===================================================================
--- /issm/trunk-jpl/src/jl/solve/analyses.jl	(revision 26648)
+++ /issm/trunk-jpl/src/jl/solve/analyses.jl	(revision 26649)
@@ -57,5 +57,25 @@
 	#Get dofs for this finite element
 	doflist = GetDofList(element,GsetEnum)
-	error("S")
+	@assert length(doflist)==6
+
+	#Fetch inputs
+	vx_input = GetInput(element, VxEnum)
+	vy_input = GetInput(element, VyEnum)
+
+	#Loop over each node and enter solution in ug
+	count = 0
+	gauss=GaussTria(P1Enum)
+	for i in 1:gauss.numgauss
+		vx = GetInputValue(vx_input, gauss, i)
+		vy = GetInputValue(vy_input, gauss, i)
+
+		count += 1
+		ug[doflist[count]] = vx
+		count += 1
+		ug[doflist[count]] = vy
+	end
+
+	#Make sure we reached all the values
+	@assert count==length(doflist)
 
 end#}}}
@@ -84,4 +104,6 @@
 	ug = GetSolutionFromInputsx(analysis,femmodel)
 
+	print(ug)
+
 	#Loop until we reach convergence
 	while(~converged)
Index: /issm/trunk-jpl/src/jl/solve/elements.jl
===================================================================
--- /issm/trunk-jpl/src/jl/solve/elements.jl	(revision 26648)
+++ /issm/trunk-jpl/src/jl/solve/elements.jl	(revision 26649)
@@ -72,6 +72,24 @@
 	end
 
-	println(doflist)
-	error("S")
+	return doflist
+end # }}}
+function GetInput(element::Tria,enum::IssmEnum) # {{{
+
+	input = GetInput(element.inputs,enum)
+	InputServe!(element,input)
+	return input
 
 end # }}}
+function InputServe!(element::Tria,input::ElementInput) # {{{
+
+	if input.interp==P0Enum
+		input.element_values[1] = input.values[element.sid]
+	elseif input.interp==P1Enum
+		for i in 1:3
+			input.element_values[i] = input.values[element.vertices[i].sid]
+		end
+	else
+		error("interpolation ",input.interp," not supported yet")
+	end
+
+end # }}}
Index: /issm/trunk-jpl/src/jl/solve/gauss.jl
===================================================================
--- /issm/trunk-jpl/src/jl/solve/gauss.jl	(revision 26648)
+++ /issm/trunk-jpl/src/jl/solve/gauss.jl	(revision 26649)
@@ -23,14 +23,14 @@
 		coords3 = [0.333333333333333]
 	elseif(order==2)
-		weights = [0.577350269189625, 0.577350269189625, 0.577350269189625]
-		coords1 = [0.666666666666667, 0.166666666666667, 0.166666666666667]
-		coords2 = [0.166666666666667, 0.666666666666667, 0.166666666666667]
-		coords3 = [0.166666666666667, 0.166666666666667, 0.666666666666667]
+		weights = [0.577350269189625; 0.577350269189625; 0.577350269189625]
+		coords1 = [0.666666666666667; 0.166666666666667; 0.166666666666667]
+		coords2 = [0.166666666666667; 0.666666666666667; 0.166666666666667]
+		coords3 = [0.166666666666667; 0.166666666666667; 0.666666666666667]
 	elseif(order==3)
 		npoints=4
-		weights = [-0.974278579257493, 0.902109795608790, 0.902109795608790, 0.902109795608790]
-		coords1 = [0.333333333333333, 0.600000000000000, 0.200000000000000, 0.200000000000000]
-		coords2 = [0.333333333333333, 0.200000000000000, 0.600000000000000, 0.200000000000000]
-		coords3 = [0.333333333333333, 0.200000000000000, 0.200000000000000, 0.600000000000000]
+		weights = [-0.974278579257493; 0.902109795608790; 0.902109795608790; 0.902109795608790]
+		coords1 = [ 0.333333333333333; 0.600000000000000; 0.200000000000000; 0.200000000000000]
+		coords2 = [ 0.333333333333333; 0.200000000000000; 0.600000000000000; 0.200000000000000]
+		coords3 = [ 0.333333333333333; 0.200000000000000; 0.200000000000000; 0.600000000000000]
 	else
 		error("order ",order," not supported yet");
@@ -39,3 +39,22 @@
 	return GaussTria(npoints,weights,coords1,coords2,coords3)
 end# }}}
+function GaussTria(finiteelement::IssmEnum) #{{{
 
+	if(finiteelement==P0Enum)
+		npoints = 1
+		weights = [1.]
+		coords1 = [0.333333333333333]
+		coords2 = [0.333333333333333]
+		coords3 = [0.333333333333333]
+	elseif(finiteelement==P1Enum)
+			npoints = 3
+			weights = 0.333333333333333*ones(3)
+			coords1 = [1.; 0.; 0.]
+			coords2 = [0.; 1.; 0.]
+			coords3 = [0.; 0.; 1.]
+	else
+		error("finite element ", finiteelement," not supported yet");
+	end
+
+	return GaussTria(npoints,weights,coords1,coords2,coords3)
+end# }}}
Index: /issm/trunk-jpl/src/jl/solve/inputs.jl
===================================================================
--- /issm/trunk-jpl/src/jl/solve/inputs.jl	(revision 26648)
+++ /issm/trunk-jpl/src/jl/solve/inputs.jl	(revision 26649)
@@ -13,4 +13,5 @@
 	interp::IssmEnum
 	values::Vector{Float64}
+	element_values::Vector{Float64}
 end# }}}
 
@@ -23,4 +24,15 @@
 
 #Inputs functions
+function GetInput(inputs::Inputs,enum::IssmEnum) #{{{
+
+	#Does this input exist
+	if !haskey(inputs.lookup,enum)
+		error("Input ",enum," not found")
+	end
+
+	#return input
+	return inputs.lookup[enum]
+
+end#}}}
 function SetInput(inputs::Inputs,enum::IssmEnum,index::Int64,value::Bool) #{{{
 
@@ -48,7 +60,7 @@
 		@assert inputs.numberofelements > 0
 		if interp==P0Enum
-			inputs.lookup[enum] = ElementInput(enum,interp,zeros(inputs.numberofelements))
+			inputs.lookup[enum] = ElementInput(enum,interp,zeros(inputs.numberofelements),Vector{Float64}(undef,1))
 		elseif interp==P1Enum
-			inputs.lookup[enum] = ElementInput(enum,interp,zeros(inputs.numberofvertices))
+			inputs.lookup[enum] = ElementInput(enum,interp,zeros(inputs.numberofvertices),Vector{Float64}(undef,3))
 		else
 			error("not supported yet")
@@ -71,5 +83,5 @@
 		@assert inputs.numberofvertices>0
 		if interp==P1Enum
-			inputs.lookup[enum] = ElementInput(enum,interp,zeros(inputs.numberofvertices))
+			inputs.lookup[enum] = ElementInput(enum,interp,zeros(inputs.numberofvertices),Vector{Float64}(undef,3))
 		else
 			error("not supported yet")
@@ -85,2 +97,15 @@
 	input.values[indices] = values
 end#}}}
+function GetInputValue(input::ElementInput,gauss::GaussTria,i::Int64)
+
+	if input.interp==P0Enum
+		return input.element_value
+	elseif input.interp==P1Enum
+		value = input.element_values[1]*gauss.coords1[i] +  input.element_values[2]*gauss.coords2[i] +  input.element_values[3]*gauss.coords3[i]
+	else
+		error("not implemented yet")
+	end
+
+	return value
+
+end#}}}
Index: /issm/trunk-jpl/src/jl/solve/solve.jl
===================================================================
--- /issm/trunk-jpl/src/jl/solve/solve.jl	(revision 26648)
+++ /issm/trunk-jpl/src/jl/solve/solve.jl	(revision 26649)
@@ -1,4 +1,5 @@
 include("../md/classes.jl")
 include("./issmenums.jl")
+include("./gauss.jl")
 include("./parameters.jl")
 include("./inputs.jl")
@@ -9,5 +10,4 @@
 include("./femmodel.jl")
 include("./analyses.jl")
-include("./gauss.jl")
 include("./modules.jl")
 
