Index: /issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp	(revision 18652)
+++ /issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp	(revision 18653)
@@ -31,6 +31,9 @@
 	Analysis* analysis = EnumToAnalysis(analysisenum);
 
+	/*Check if there are penalties*/
+	bool ispenalty = femmodel->loads->IsPenalty(configuration_type);
+
 	/*First, we might need to do a dry run to get kmax if penalties are employed*/
-	if(femmodel->loads->IsPenalty(configuration_type)){
+	if(ispenalty){
 
 		/*Allocate Kff_temp*/
@@ -93,5 +96,5 @@
 
 	/*Now deal with penalties (only in loads)*/
-	if(femmodel->loads->IsPenalty(configuration_type)){
+	if(ispenalty){
 		for (i=0;i<femmodel->loads->Size();i++){
 			load=xDynamicCast<Load*>(femmodel->loads->GetObjectByOffset(i));
