Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 5747)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 5748)
@@ -647,7 +647,4 @@
 	this->parameters->FindParam(&control_type,ControlTypeEnum);
 	this->parameters->FindParam(&cm_noisedmp,CmNoiseDmpEnum);
-	Input* drag_input=inputs->GetInput(DragCoefficientEnum);      ISSMASSERT(drag_input);
-	Input* dhdt_input=inputs->GetInput(DhDtEnum);                 ISSMASSERT(dhdt_input);
-	Input* Bbar_input=matice->inputs->GetInput(RheologyBbarEnum); ISSMASSERT(Bbar_input);
 
 	/*If on water, return 0: */
@@ -671,15 +668,15 @@
 		 * */
 		if (control_type==DragCoefficientEnum){
-			ISSMASSERT(drag_input);
+			Input* drag_input=inputs->GetInput(DragCoefficientEnum);      ISSMASSERT(drag_input);
 			drag_input->GetParameterDerivativeValue(&dk[0],&xyz_list[0][0],gauss);
 			//Jelem+=cm_noisedmp*1/2*(pow(dk[0],2)+pow(dk[1],2))*Jdet*gauss->weight;
 		}
 		else if (control_type==RheologyBbarEnum){
-			ISSMASSERT(Bbar_input);
+			Input* Bbar_input=matice->inputs->GetInput(RheologyBbarEnum); ISSMASSERT(Bbar_input);
 			Bbar_input->GetParameterDerivativeValue(&dB[0], &xyz_list[0][0], gauss);
 			//Jelem+=cm_noisedmp*1/2*(pow(dB[0],2)+pow(dB[1],2))*Jdet*gauss->weight;
 		}
 		else if (control_type==DhDtEnum){
-			ISSMASSERT(dhdt_input);
+			Input* dhdt_input=inputs->GetInput(DhDtEnum);                 ISSMASSERT(dhdt_input);
 			dhdt_input->GetParameterDerivativeValue(&dB[0], &xyz_list[0][0], gauss);
 			//Jelem+=cm_noisedmp*1/2*(pow(dB[0],2)+pow(dB[1],2))*Jdet*gauss->weight;
