Index: /issm/trunk/src/m/solutions/cielo/thermal_core.m
===================================================================
--- /issm/trunk/src/m/solutions/cielo/thermal_core.m	(revision 616)
+++ /issm/trunk/src/m/solutions/cielo/thermal_core.m	(revision 617)
@@ -26,8 +26,17 @@
 
 		%system matrices 
-		displaystring(m.parameters.debug,'%s',['   system matrices']);
-		[K_gg , p_g]=SystemMatrices(m.elements,m.nodes,loads,m.materials,m.parameters,inputs,analysis_type,sub_analysis_type);
-		displaystring(m.parameters.debug,'%s',['   penalty system matrices']);
-		[K_gg , p_g, melting_offset]=PenaltySystemMatrices(K_gg,p_g,m.elements,m.nodes,loads,m.materials,m.parameters,inputs,analysis_type,sub_analysis_type);
+		if ~m.parameters.lowmem 
+			if count==1
+				displaystring(m.parameters.debug,'%s',['   system matrices']);
+				[K_gg_nopenalty, p_g_nopenalty]=SystemMatrices(m.elements,m.nodes,loads,m.materials,m.parameters,inputs,analysis_type,sub_analysis_type);
+			end
+			displaystring(m.parameters.debug,'%s',['   penalty system matrices']);
+			[K_gg , p_g, melting_offset]=PenaltySystemMatrices(K_gg_nopenalty,p_g_nopenalty,m.elements,m.nodes,loads,m.materials,m.parameters,inputs,analysis_type,sub_analysis_type);
+		else
+			displaystring(m.parameters.debug,'%s',['   system matrices']);
+			[K_gg , p_g]=SystemMatrices(m.elements,m.nodes,loads,m.materials,m.parameters,inputs,analysis_type,sub_analysis_type);
+			displaystring(m.parameters.debug,'%s',['   penalty system matrices']);
+			[K_gg , p_g, melting_offset]=PenaltySystemMatrices(K_gg,p_g,m.elements,m.nodes,loads,m.materials,m.parameters,inputs,analysis_type,sub_analysis_type);
+		end
 
 		%Reduce tangent matrix from g size to f size
