Index: /issm/trunk/src/m/solutions/ice/ModelProcessorThermal.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/ModelProcessorThermal.m	(revision 991)
+++ /issm/trunk/src/m/solutions/ice/ModelProcessorThermal.m	(revision 992)
@@ -49,4 +49,10 @@
 elements(pos)=SetStructureField(elements(pos),'element','matid',pos);
 elements(pos)=SetStructureField(elements(pos),'element','geothermalflux',md.geothermalflux(md.elements(pos,1:6)));
+%For penta elements where we want to implement MacAyeal's element, we need to collapse 
+%the formulation into trias: 
+el6pos=find((md.elements_type(:,1)==macayealenum() | md.elements_type(:,1)==pattynenum()) & (element_partitioning==labindex));
+pos=find(ismember(el6pos,find(md.elements_type(:,1)==macayealenum())));
+elements(pos)=SetStructureField(elements(pos),'element','collapse',ones(length(pos),1));
+
 if strcmpi(solutiontype,'thermalsteady'),
 	elements(pos)=SetStructureField(elements(pos),'element','thermal_steadystate',1);
