Index: /issm/trunk/src/c/Container/DataSet.cpp
===================================================================
--- /issm/trunk/src/c/Container/DataSet.cpp	(revision 6411)
+++ /issm/trunk/src/c/Container/DataSet.cpp	(revision 6412)
@@ -123,5 +123,5 @@
 	 * because this is a nasty error: */
 	if (marshalled_dataset!=old_marshalled_dataset){
-		ISSMERROR("final marshalled dataset is different from initial one!"); 
+		_error_("final marshalled dataset is different from initial one!"); 
 		abort();
 	}
@@ -355,5 +355,5 @@
 				break;
 			default:
-				ISSMERROR("could not recognize enum type: %i (%s)",enum_type,EnumToString(enum_type));
+				_error_("could not recognize enum type: %i (%s)",enum_type,EnumToString(enum_type));
 		}
 
@@ -408,7 +408,7 @@
 	vector<Object*>::iterator object;
 
-	if(this==NULL)ISSMERROR(" trying to echo a NULL dataset");
-
-	_printf_("DataSet echo: %i objects\n",objects.size());
+	if(this==NULL)_error_(" trying to echo a NULL dataset");
+
+	_printf_(true,"DataSet echo: %i objects\n",objects.size());
 
 	for ( object=objects.begin() ; object < objects.end(); object++ ){
@@ -426,7 +426,7 @@
 	vector<Object*>::iterator object;
 
-	if(this==NULL)ISSMERROR(" trying to echo a NULL dataset");
-
-	_printf_("DataSet echo: %i objects\n",objects.size());
+	if(this==NULL)_error_(" trying to echo a NULL dataset");
+
+	_printf_(true,"DataSet echo: %i objects\n",objects.size());
 
 	for ( object=objects.begin() ; object < objects.end(); object++ ){
@@ -455,5 +455,5 @@
 
 	/*Check index in debugging mode*/
-	ISSMASSERT(offset<this->Size());
+	_assert_(offset<this->Size());
 
 	return objects[offset];
@@ -468,9 +468,9 @@
 	int i;
 
-	if(!sorted)ISSMERROR(" trying to binary search on a non-sorted dataset!");
+	if(!sorted)_error_(" trying to binary search on a non-sorted dataset!");
 
 	/*Carry out a binary search on the sorted_ids: */
 	if(!binary_search(&id_offset,eid, sorted_ids,objects.size())){
-		ISSMERROR("could not find object with id %i in DataSet %s",eid,EnumToString(enum_type));
+		_error_("could not find object with id %i in DataSet %s",eid,EnumToString(enum_type));
 	}
 
@@ -532,6 +532,6 @@
 	/*Only sort if we are not already sorted: */
 	if(!sorted){
-		ISSMERROR(" not implemented yet!");
-	}
-}
-/*}}}*/
+		_error_(" not implemented yet!");
+	}
+}
+/*}}}*/
Index: /issm/trunk/src/c/Container/Inputs.cpp
===================================================================
--- /issm/trunk/src/c/Container/Inputs.cpp	(revision 6411)
+++ /issm/trunk/src/c/Container/Inputs.cpp	(revision 6412)
@@ -63,5 +63,5 @@
 		/*we could not find an input with the correct enum type. No defaults values were provided, 
 		 * error out: */
-		ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumToString(enum_type));
+		_error_("could not find input with enum type %i (%s)",enum_type,EnumToString(enum_type));
 	}
 
@@ -91,5 +91,5 @@
 		/*we could not find an input with the correct enum type. No defaults values were provided, 
 		 * error out: */
-		ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumToString(enum_type));
+		_error_("could not find input with enum type %i (%s)",enum_type,EnumToString(enum_type));
 	}
 
@@ -119,5 +119,5 @@
 		/*we could not find an input with the correct enum type. No defaults values were provided, 
 		 * error out: */
-		ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumToString(enum_type));
+		_error_("could not find input with enum type %i (%s)",enum_type,EnumToString(enum_type));
 	}
 
@@ -147,5 +147,5 @@
 		/*we could not find an input with the correct enum type. No defaults values were provided, 
 		 * error out: */
-		ISSMERROR("could not find input with enum type %i (%s)",enum_type,EnumToString(enum_type));
+		_error_("could not find input with enum type %i (%s)",enum_type,EnumToString(enum_type));
 	}
 
@@ -165,5 +165,5 @@
 
 	/*In debugging mode, check that the input is not a NULL pointer*/
-	ISSMASSERT(in_input);
+	_assert_(in_input);
 
 	for ( object=objects.begin() ; object < objects.end(); object++ ){
@@ -219,5 +219,5 @@
 
 	/*some checks: */
-	if(!constrain_input) ISSMERROR(" input %s could not be found!",EnumToString(constrain_enum));
+	if(!constrain_input) _error_(" input %s could not be found!",EnumToString(constrain_enum));
 
 	/*Apply ContrainMin: */
@@ -260,5 +260,5 @@
 	}
 	else{
-		ISSMERROR("Input %s not found",EnumToString(enumtype));
+		_error_("Input %s not found",EnumToString(enumtype));
 	}
 
@@ -281,5 +281,5 @@
 	}
 	else{
-		ISSMERROR("Input %s not found",EnumToString(enumtype));
+		_error_("Input %s not found",EnumToString(enumtype));
 	}
 
@@ -302,5 +302,5 @@
 	}
 	else{
-		ISSMERROR("Input %s not found",EnumToString(enumtype));
+		_error_("Input %s not found",EnumToString(enumtype));
 	}
 
@@ -323,5 +323,5 @@
 	}
 	else{
-		ISSMERROR("Input %s not found",EnumToString(enumtype));
+		_error_("Input %s not found",EnumToString(enumtype));
 	}
 
@@ -375,5 +375,5 @@
 	/*Make a copy of the original input: */
 	original=(Input*)this->GetInput(original_enum);
-	if(!original)ISSMERROR("could not find input with enum: %s",EnumToString(original_enum)); 
+	if(!original)_error_("could not find input with enum: %s",EnumToString(original_enum)); 
 	copy=(Input*)original->copy();
 
@@ -422,6 +422,6 @@
 
 	/*some checks: */
-	if(!xinput) ISSMERROR(" input %s could not be found!",EnumToString(XEnum));
-	if(!yinput) ISSMERROR(" input %s could not be found!",EnumToString(YEnum));
+	if(!xinput) _error_(" input %s could not be found!",EnumToString(XEnum));
+	if(!yinput) _error_(" input %s could not be found!",EnumToString(YEnum));
 
 	/*Apply AXPY: */
Index: /issm/trunk/src/c/Container/Nodes.cpp
===================================================================
--- /issm/trunk/src/c/Container/Nodes.cpp	(revision 6411)
+++ /issm/trunk/src/c/Container/Nodes.cpp	(revision 6412)
@@ -74,5 +74,5 @@
 
 	/*some check: */
-	if ((setenum!=GsetEnum) && (setenum!=FsetEnum) && (setenum!=SsetEnum))ISSMERROR("%s%s%s"," dof distribution for set of enum type ",EnumToString(setenum)," not supported yet!");
+	if ((setenum!=GsetEnum) && (setenum!=FsetEnum) && (setenum!=SsetEnum))_error_("%s%s%s"," dof distribution for set of enum type ",EnumToString(setenum)," not supported yet!");
 
 	/*Go through objects, and distribute dofs locally, from 0 to numberofdofs: */
Index: /issm/trunk/src/c/EnumDefinitions/EnumToModelField.cpp
===================================================================
--- /issm/trunk/src/c/EnumDefinitions/EnumToModelField.cpp	(revision 6411)
+++ /issm/trunk/src/c/EnumDefinitions/EnumToModelField.cpp	(revision 6412)
@@ -22,5 +22,5 @@
 		case VyEnum : return "vy";
 		case VyObsEnum : return "vy_obs";
-		default : ISSMERROR("No model field is associated to enum %s",EnumToString(en));
+		default : _error_("No model field is associated to enum %s",EnumToString(en));
 	}
 }
Index: /issm/trunk/src/c/EnumDefinitions/StringToEnum.cpp
===================================================================
--- /issm/trunk/src/c/EnumDefinitions/StringToEnum.cpp	(revision 6411)
+++ /issm/trunk/src/c/EnumDefinitions/StringToEnum.cpp	(revision 6412)
@@ -344,5 +344,5 @@
 	else if (strcmp(name,"Sset")==0) return SsetEnum;
 	else if (strcmp(name,"Yts")==0) return YtsEnum;
-	else ISSMERROR("Enum %s not found",name);
+	else _error_("Enum %s not found",name);
 
 }
Index: /issm/trunk/src/c/EnumDefinitions/Synchronize.sh
===================================================================
--- /issm/trunk/src/c/EnumDefinitions/Synchronize.sh	(revision 6411)
+++ /issm/trunk/src/c/EnumDefinitions/Synchronize.sh	(revision 6412)
@@ -202,5 +202,5 @@
 #Add footer of of StringToEnum.cpp{{{1
 cat <<END >> StringToEnum.cpp
-	else ISSMERROR("Enum %s not found",name);
+	else _error_("Enum %s not found",name);
 
 }
Index: /issm/trunk/src/c/include/macros.h
===================================================================
--- /issm/trunk/src/c/include/macros.h	(revision 6411)
+++ /issm/trunk/src/c/include/macros.h	(revision 6412)
@@ -18,27 +18,23 @@
 /* _printf_ {{{1*/
 /*Printing macro: only cpu number 0 */
-#define _printf_(...) PrintfFunction(__VA_ARGS__)
+#define _printf_(flag,...) if(flag) PrintfFunction(__VA_ARGS__)
 /*}}}*/
-/* ISSMPRINTF {{{1*/
-/*Printing macro with flag*/
-#define ISSMPRINTF(flag,...) if(flag) PrintfFunction(__VA_ARGS__)
-/*}}}*/
-/* ISSMERROR {{{1*/
+/* _error_ {{{1*/
 /*Error exception macro*/
 #ifdef _INTEL_WIN_
-#define ISSMERROR(...)\
+#define _error_(...)\
   throw ErrorException(exprintf(__VA_ARGS__))
 #else
-#define ISSMERROR(...)\
+#define _error_(...)\
   throw ErrorException(__FILE__,__func__,__LINE__,exprintf(__VA_ARGS__))
 #endif
 /*}}}*/
-/* ISSMASSERT {{{1*/
+/* _assert_ {{{1*/
 /*Assertion macro: do nothing if macro _ISSM_DEBUG_ undefined*/
 #ifdef _ISSM_DEBUG_ 
-#define ISSMASSERT(statement)\
-  if (!(statement)) ISSMERROR("Assertion \"%s\" failed, please report bug to an ISSM developer",#statement)
+#define _assert_(statement)\
+  if (!(statement)) _error_("Assertion \"%s\" failed, please report bug to an ISSM developer",#statement)
 #else
-#define ISSMASSERT(ignore)\
+#define _assert_(ignore)\
   ((void) 0)
 #endif
@@ -59,5 +55,5 @@
 	}\
 	catch (exception& e) {\
-		_printf_("Standard exception: %s\n",e.what());\
+		_printf_(true,"Standard exception: %s\n",e.what());\
 		mexErrMsgTxt(" ");\
 	}
@@ -74,5 +70,5 @@
 	}\
 	catch (exception& e) {\
-		_printf_("Standard exception: %s\n",e.what());\
+		_printf_(true,"Standard exception: %s\n",e.what());\
 		return 1;\
 	}
Index: /issm/trunk/src/c/io/FetchData.cpp
===================================================================
--- /issm/trunk/src/c/io/FetchData.cpp	(revision 6411)
+++ /issm/trunk/src/c/io/FetchData.cpp	(revision 6412)
@@ -41,5 +41,5 @@
 		else{
 			/*This is an error: we don't have the correct input!: */
-			ISSMERROR("  wrong input parameter!");
+			_error_("  wrong input parameter!");
 		}
 	}
@@ -77,5 +77,5 @@
 	else{
 		/*This is an error: we don't have the correct input!: */
-		ISSMERROR("Input parameter of class %s not supported yet",mxGetClassName(dataref));
+		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
 	}
 
@@ -113,5 +113,5 @@
 	else{
 		/*This is an error: we don't have the correct input!: */
-		ISSMERROR("wrong input parameter");
+		_error_("wrong input parameter");
 	}
 
@@ -139,5 +139,5 @@
 	else{
 		/*This is an error: we don't have the correct input!: */
-		ISSMERROR("wrong input parameter");
+		_error_("wrong input parameter");
 	}
 
@@ -171,5 +171,5 @@
 	else{
 		/*This is an error: we don't have the correct input!: */
-		ISSMERROR("wrong input parameter");
+		_error_("wrong input parameter");
 	}
 
@@ -203,5 +203,5 @@
 	else{
 		/*This is an error: we don't have the correct input!: */
-		ISSMERROR("wrong input parameter");
+		_error_("wrong input parameter");
 	}
 
@@ -228,5 +228,5 @@
 	else{
 		/*This is an error: we don't have the correct input!: */
-		ISSMERROR("wrong input parameter");
+		_error_("wrong input parameter");
 	}
 
@@ -243,5 +243,5 @@
 	/*Ok, the string should be coming directly from the matlab workspace: */
 	if (!mxIsChar(dataref)){
-		ISSMERROR("input data_type is not a string!");
+		_error_("input data_type is not a string!");
 	}
 	else{
@@ -264,5 +264,5 @@
 
 	if (!mxIsDouble(dataref)){
-		ISSMERROR("input data_type is not a double!");
+		_error_("input data_type is not a double!");
 	}
 	else{
@@ -281,5 +281,5 @@
 
 	if (!mxIsDouble(dataref)){
-		ISSMERROR("input data_type is not a scalar!");
+		_error_("input data_type is not a scalar!");
 	}
 	else{
@@ -298,10 +298,10 @@
 
 	if (mxIsClass(dataref,"logical")){
-		if(mxGetM(dataref)!=1) ISSMERROR("input data is not of size 1x1");
-		if(mxGetN(dataref)!=1) ISSMERROR("input data is not of size 1x1");
+		if(mxGetM(dataref)!=1) _error_("input data is not of size 1x1");
+		if(mxGetN(dataref)!=1) _error_("input data is not of size 1x1");
 		mxbool_ptr=mxGetLogicals(dataref);
 	}
 	else{
-		ISSMERROR("input data_type is not a bool!");
+		_error_("input data_type is not a bool!");
 	}
 
@@ -325,5 +325,5 @@
 	/*numberofelements: */
 	if(my_rank==0){  
-		if(fread(&M,sizeof(int),1,fid)!=1) ISSMERROR("could not read number of rows for matrix ");
+		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
 	}
 
@@ -331,5 +331,5 @@
 
 	if(my_rank==0){  
-		if(fread(&N,sizeof(int),1,fid)!=1) ISSMERROR("could not read number of columns for matrix ");
+		if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
 	}
 	MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 
@@ -341,5 +341,5 @@
 		/*Read matrix on node 0, then broadcast: */
 		if(my_rank==0){  
-			if(fread(matrix,M*N*sizeof(double),1,fid)!=1) ISSMERROR("could not read matrix ");
+			if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
 		}
 		
@@ -367,5 +367,5 @@
 	/*We have to read a string from disk. First read the dimensions of the string, then the string: */
 	if(my_rank==0){  
-		if(fread(&string_size,sizeof(int),1,fid)!=1) ISSMERROR(" could not read length of string ");
+		if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string ");
 	}
 
@@ -379,5 +379,5 @@
 		/*Read string on node 0, then broadcast: */
 		if(my_rank==0){  
-			if(fread(string,string_size*sizeof(char),1,fid)!=1)ISSMERROR("  could not read string ");
+			if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_("  could not read string ");
 		}
 		MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
@@ -404,5 +404,5 @@
 	/*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */
 	if(my_rank==0){
-		if(fread(&scalar,sizeof(double),1,fid)!=1)ISSMERROR(" could not read scalar ");
+		if(fread(&scalar,sizeof(double),1,fid)!=1)_error_(" could not read scalar ");
 	}
 	MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 
@@ -424,5 +424,5 @@
 	/*We have to read a integer from disk. First read the dimensions of the integer, then the integer: */
 	if(my_rank==0){  
-		if(fread(&integer,sizeof(int),1,fid)!=1) ISSMERROR(" could not read integer ");
+		if(fread(&integer,sizeof(int),1,fid)!=1) _error_(" could not read integer ");
 	}
 
Index: /issm/trunk/src/c/io/FetchParams.cpp
===================================================================
--- /issm/trunk/src/c/io/FetchParams.cpp	(revision 6411)
+++ /issm/trunk/src/c/io/FetchParams.cpp	(revision 6412)
@@ -55,5 +55,5 @@
 		enum_type=StringToEnum(name);
 		pfield=mxGetFieldByNumber(dataref,0,count);
-		ISSMASSERT(pfield);
+		_assert_(pfield);
 		
 		/*Check type of field: */
@@ -65,5 +65,5 @@
 
 			if (M==0 | N==0){
-				ISSMERROR("%s%i (%s) %s%i%s%i%s","array in parameters structure field ",count,name," is of size (",M,",",N,")");
+				_error_("%s%i (%s) %s%i%s%i%s","array in parameters structure field ",count,name," is of size (",M,",",N,")");
 			}
 			if (M==1 && N==1){
@@ -175,5 +175,5 @@
 			}
 		}
-		else ISSMERROR("%s%i","unknow type in parameters structure field ",i);
+		else _error_("%s%i","unknow type in parameters structure field ",i);
 	}
 
Index: /issm/trunk/src/c/io/IoModelFetchData.cpp
===================================================================
--- /issm/trunk/src/c/io/IoModelFetchData.cpp	(revision 6411)
+++ /issm/trunk/src/c/io/IoModelFetchData.cpp	(revision 6412)
@@ -135,5 +135,5 @@
 	MPI_Bcast(&found,1,MPI_INT,0,MPI_COMM_WORLD); 
 
-	if(!found)ISSMERROR("%s %s ","could not find data with name",data_name);
+	if(!found)_error_("%s %s ","could not find data with name",data_name);
 
 	return fid;
Index: /issm/trunk/src/c/io/WriteDataToDisk.cpp
===================================================================
--- /issm/trunk/src/c/io/WriteDataToDisk.cpp	(revision 6411)
+++ /issm/trunk/src/c/io/WriteDataToDisk.cpp	(revision 6412)
@@ -65,5 +65,5 @@
 	}
 	else{
-		ISSMERROR("data type not supported yet!");
+		_error_("data type not supported yet!");
 	}
 }
Index: /issm/trunk/src/c/io/pfclose.cpp
===================================================================
--- /issm/trunk/src/c/io/pfclose.cpp	(revision 6411)
+++ /issm/trunk/src/c/io/pfclose.cpp	(revision 6412)
@@ -17,4 +17,4 @@
 	/*Close file handle: */
 	extern int my_rank;
-	if(fclose(fid)!=0)ISSMERROR("%s%s","could not close file ",filename);
+	if(fclose(fid)!=0)_error_("%s%s","could not close file ",filename);
 }
Index: /issm/trunk/src/c/io/pfopen.cpp
===================================================================
--- /issm/trunk/src/c/io/pfopen.cpp	(revision 6411)
+++ /issm/trunk/src/c/io/pfopen.cpp	(revision 6412)
@@ -20,5 +20,5 @@
 	/*Open handle to data on disk: */
 	fid=fopen(filename,format);
-	if(fid==NULL) ISSMERROR("%s%s%s","could not open file ",filename," for binary reading or writing"); 
+	if(fid==NULL) _error_("%s%s%s","could not open file ",filename," for binary reading or writing"); 
 
 	return fid;
Index: /issm/trunk/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp
===================================================================
--- /issm/trunk/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp	(revision 6412)
@@ -35,5 +35,5 @@
 
 	/*First, recover qmu partition of vertices: */
-	if(!parameters->FindParam(&qmu_part,&dummy,QmuPartEnum))ISSMERROR(" could not find qmu partition vector");
+	if(!parameters->FindParam(&qmu_part,&dummy,QmuPartEnum))_error_(" could not find qmu partition vector");
 
 	/*Some parameters: */
Index: /issm/trunk/src/c/modules/BuildNodeSetsx/PartitionSets.cpp
===================================================================
--- /issm/trunk/src/c/modules/BuildNodeSetsx/PartitionSets.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/BuildNodeSetsx/PartitionSets.cpp	(revision 6412)
@@ -79,5 +79,5 @@
 				ccount++;
 			}
-			if (flags_b_local[i] && flags_c_local[i]) ISSMERROR("%s%i%s"," for dof ",i,": breach of exclusive partitioning between sets");
+			if (flags_b_local[i] && flags_c_local[i]) _error_("%s%i%s"," for dof ",i,": breach of exclusive partitioning between sets");
 			
 			acount++;
Index: /issm/trunk/src/c/modules/ComputeBasalStressx/ComputeBasalStressx.cpp
===================================================================
--- /issm/trunk/src/c/modules/ComputeBasalStressx/ComputeBasalStressx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/ComputeBasalStressx/ComputeBasalStressx.cpp	(revision 6412)
@@ -23,5 +23,5 @@
 	/*Recover numberofelements: */
 	found= parameters->FindParam(&numberofelements,NumberOfElementsEnum);
-	if (!found) ISSMERROR("numberofelements not provided in parameters");
+	if (!found) _error_("numberofelements not provided in parameters");
 
 	/*Allocate sigma on numberofelements: */
Index: /issm/trunk/src/c/modules/ConfigureObjectsx/ConfigureObjectsx.cpp
===================================================================
--- /issm/trunk/src/c/modules/ConfigureObjectsx/ConfigureObjectsx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/ConfigureObjectsx/ConfigureObjectsx.cpp	(revision 6412)
@@ -24,10 +24,10 @@
 	parameters->FindParam(&configuration_type,ConfigurationTypeEnum);
 	
-	ISSMPRINTF(VerboseMProcessor(),"      Configuring elements...\n");
+	_printf_(VerboseMProcessor(),"      Configuring elements...\n");
 	for (i=0;i<elements->Size();i++){
 		element=(Element*)elements->GetObjectByOffset(i);
 		element->Configure(elements,loads,nodes,materials,parameters);
 	}
-	ISSMPRINTF(VerboseMProcessor(),"      Configuring loads...\n");
+	_printf_(VerboseMProcessor(),"      Configuring loads...\n");
 	for (i=0;i<loads->Size();i++){
 		load=(Load*)loads->GetObjectByOffset(i);
@@ -36,5 +36,5 @@
 		}
 	}
-	ISSMPRINTF(VerboseMProcessor(),"      Configuring nodes...\n");
+	_printf_(VerboseMProcessor(),"      Configuring nodes...\n");
 	for (i=0;i<nodes->Size();i++){
 		node=(Node*)nodes->GetObjectByOffset(i);
@@ -44,5 +44,5 @@
 	}
 	
-	ISSMPRINTF(VerboseMProcessor(),"      Configuring materials...\n");
+	_printf_(VerboseMProcessor(),"      Configuring materials...\n");
 	for (i=0;i<materials->Size();i++){
 		material=(Material*)materials->GetObjectByOffset(i);
Index: /issm/trunk/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp
===================================================================
--- /issm/trunk/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp	(revision 6412)
@@ -87,5 +87,5 @@
 		}
 		else if (flag==NodalEnum){
-			ISSMERROR(" nodal response functions not supported yet!");
+			_error_(" nodal response functions not supported yet!");
 
 			/*increment response_pointer :*/
@@ -105,5 +105,5 @@
 			}
 		}
-		else ISSMERROR("%s%i%s"," flag type ",flag," not supported yet for response analysis");
+		else _error_("%s%i%s"," flag type ",flag," not supported yet for response analysis");
 	}
 
Index: /issm/trunk/src/c/modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp
===================================================================
--- /issm/trunk/src/c/modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp	(revision 6412)
@@ -26,5 +26,5 @@
 	/*Get size of vector: */
 	gsize=nodes->NumberOfDofs(configuration_type,GsetEnum);
-	if (gsize==0) ISSMERROR("Allocating a Vec of size 0 as gsize=0 for configuration: %s",EnumToString(configuration_type));
+	if (gsize==0) _error_("Allocating a Vec of size 0 as gsize=0 for configuration: %s",EnumToString(configuration_type));
 	
 	/*Initialize solution: */
Index: /issm/trunk/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp
===================================================================
--- /issm/trunk/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp	(revision 6412)
@@ -23,5 +23,5 @@
 		}
 	}
-	else ISSMERROR("%s%s%s"," vector type: ",EnumToString(TypeEnum)," not supported yet!");
+	else _error_("%s%s%s"," vector type: ",EnumToString(TypeEnum)," not supported yet!");
 
 	VecAssemblyBegin(vector);
Index: /issm/trunk/src/c/modules/InputConvergencex/InputConvergencex.cpp
===================================================================
--- /issm/trunk/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 6412)
@@ -33,5 +33,5 @@
 	num_notconverged=total_notconverged;
 	#endif
-	ISSMPRINTF(VerboseConvergence(),"      #elements above convergence criterion = %i\n",num_notconverged);
+	_printf_(VerboseConvergence(),"      #elements above convergence criterion = %i\n",num_notconverged);
 
 	/*Free ressources:*/
Index: /issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp
===================================================================
--- /issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 6412)
@@ -51,5 +51,5 @@
 			/*Now, pick up the parameter corresponding to root: */
 			if(!parameters->FindParam(&parameter,NULL,StringToEnum(root))){
-				ISSMERROR("%s%s"," could not find Qmu parameter: ",root);
+				_error_("%s%s"," could not find Qmu parameter: ",root);
 			}
 
@@ -82,8 +82,8 @@
 		}
 		else if (strncmp(descriptor,"indexed_",8)==0){
-			ISSMERROR(" indexed variables not supported yet!");
+			_error_(" indexed variables not supported yet!");
 		}
 		else if (strncmp(descriptor,"nodal_",8)==0){
-			ISSMERROR(" nodal variables not supported yet!");
+			_error_(" nodal variables not supported yet!");
 		}
 		else{
Index: /issm/trunk/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp
===================================================================
--- /issm/trunk/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 6412)
@@ -35,11 +35,11 @@
 	/*Some checks on arguments: */
 	if ((M<=2) || (N<=2) || (nods<=0)){
-		ISSMERROR("nothing to be done according to the dimensions of input matrices and vectors.");
+		_error_("nothing to be done according to the dimensions of input matrices and vectors.");
 	}
 	if (x_in[1]-x_in[0]<0){
-		ISSMERROR("x coordinate vectore should be increasing.\n   use Matlab's command x=flipud(x), also flip the data matrix data=fliplr(data)");
+		_error_("x coordinate vectore should be increasing.\n   use Matlab's command x=flipud(x), also flip the data matrix data=fliplr(data)");
 	}
 	if (y_in[1]-y_in[0]<0){
-		ISSMERROR("y coordinate vectore should be increasing.\n   use Matlab's command y=flipud(y), also flip the data matrix data=flipud(data)");
+		_error_("y coordinate vectore should be increasing.\n   use Matlab's command y=flipud(y), also flip the data matrix data=flipud(data)");
 	}
 
@@ -67,5 +67,5 @@
 	}
 	else{
-		ISSMERROR("x and y vectors length should be 1 or 0 more than data number of rows.");
+		_error_("x and y vectors length should be 1 or 0 more than data number of rows.");
 	}
 
Index: /issm/trunk/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp
===================================================================
--- /issm/trunk/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp	(revision 6412)
@@ -33,5 +33,5 @@
 	/*some checks*/
 	if (nels_data<1 || nods_data<3 || nods_prime==0){
-		ISSMERROR("nothing to be done according to the mesh given in input");
+		_error_("nothing to be done according to the mesh given in input");
 	}
 
@@ -47,9 +47,9 @@
 	}
 	else{
-		ISSMERROR("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
+		_error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
 	}
 
 	if((numcontours) && (interpolation_type==2)){
-		ISSMERROR(" element interpolation_type with contours not supported yet!");
+		_error_(" element interpolation_type with contours not supported yet!");
 	}
 
Index: /issm/trunk/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp
===================================================================
--- /issm/trunk/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp	(revision 6412)
@@ -33,5 +33,5 @@
 	/*some checks*/
 	if (nels<1 || nods<3 || nlines<1 || ncols<1 || xposting==0 || yposting==0){
-		ISSMERROR("nothing to be done according to the mesh given in input");
+		_error_("nothing to be done according to the mesh given in input");
 	}
 
@@ -44,5 +44,5 @@
 	}
 	else{
-		ISSMERROR("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
+		_error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
 	}
 
Index: /issm/trunk/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp
===================================================================
--- /issm/trunk/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp	(revision 6412)
@@ -39,11 +39,11 @@
 	/*Checks*/
 	if (data_cols<=0){
-		ISSMERROR("data provided has a negative number of columns");
+		_error_("data provided has a negative number of columns");
 	}
 	if (data_rows!=nods_data && data_rows!=nels_data){
-		ISSMERROR("data provided should have either %i or %i lines (not %i)",nods_data,nels_data,data_rows);
+		_error_("data provided should have either %i or %i lines (not %i)",nods_data,nels_data,data_rows);
 	}
 	if((num_default_values) && (data_cols>1)){
-		ISSMERROR("data provided can only have 1 column if a default value is provided");
+		_error_("data provided can only have 1 column if a default value is provided");
 	}
 	
@@ -126,5 +126,5 @@
 				for (j=0;j<data_cols;j++){
 					if (it<0 || it>=nels_data){
-						ISSMERROR("Triangle number %i not in [0 %i], because not correctly implemented yet... interpolate on grid first",it,nels_data);
+						_error_("Triangle number %i not in [0 %i], because not correctly implemented yet... interpolate on grid first",it,nels_data);
 					}
 					data_interp[i*data_cols+j]=data[data_cols*it+j];
Index: /issm/trunk/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp
===================================================================
--- /issm/trunk/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp	(revision 6412)
@@ -27,5 +27,5 @@
 	/*some checks*/
 	if (nels_data<1 || nods_data<6 || nods_prime==0){
-		ISSMERROR("nothing to be done according to the mesh given in input");
+		_error_("nothing to be done according to the mesh given in input");
 	}
 
@@ -41,5 +41,5 @@
 	}
 	else{
-		ISSMERROR("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
+		_error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
 	}
 
Index: /issm/trunk/src/c/modules/MassFluxx/MassFluxx.cpp
===================================================================
--- /issm/trunk/src/c/modules/MassFluxx/MassFluxx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/MassFluxx/MassFluxx.cpp	(revision 6412)
@@ -39,5 +39,5 @@
 
 	/*Retrieve index of segments being used for MassFlux computation: */
-	if(!parameters->FindParam(&counter,IndexEnum))ISSMERROR(" could not find IndexEnum");
+	if(!parameters->FindParam(&counter,IndexEnum))_error_(" could not find IndexEnum");
 
 	/*retrieve segments from array: */
Index: /issm/trunk/src/c/modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp
===================================================================
--- /issm/trunk/src/c/modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp	(revision 6412)
@@ -13,5 +13,5 @@
 	
 	/*Display message*/
-	ISSMPRINTF(VerboseModule(),"   Merging solution vector from fset to gset\n");
+	_printf_(VerboseModule(),"   Merging solution vector from fset to gset\n");
 
 	/*Merge f set back into g set: */
Index: /issm/trunk/src/c/modules/MeshPartitionx/MeshPartitionx.cpp
===================================================================
--- /issm/trunk/src/c/modules/MeshPartitionx/MeshPartitionx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/MeshPartitionx/MeshPartitionx.cpp	(revision 6412)
@@ -49,5 +49,5 @@
 			for (i=0;i<numberofgrids;i++)    npart[i]=0;
 		}
-		else ISSMERROR("At least one processor is required");
+		else _error_("At least one processor is required");
 	}
 	else{
@@ -74,5 +74,5 @@
 			for (i=0;i<numberofgrids2d;i++)    npart2d[i]=0;
 		}
-		else ISSMERROR("At least one processor is required");
+		else _error_("At least one processor is required");
 
 		/*Extrude epart2d to epart, using numlayers: */
Index: /issm/trunk/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp
===================================================================
--- /issm/trunk/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp	(revision 6412)
@@ -38,5 +38,5 @@
 	if(    (edge1==IntersectEnum) && (edge2==IntersectEnum) && (edge3==IntersectEnum)   ){
 		/*This case is impossible: */
-		ISSMERROR(" error: a line cannot go through 3 different vertices!");
+		_error_(" error: a line cannot go through 3 different vertices!");
 	}
 	else if(    ((edge1==IntersectEnum) && (edge2==IntersectEnum)) || ((edge2==IntersectEnum) && (edge3==IntersectEnum)) || ((edge3==IntersectEnum) && (edge1==IntersectEnum))   ){
Index: /issm/trunk/src/c/modules/ModelProcessorx/Balancedthickness/CreateNodesBalancedthickness.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Balancedthickness/CreateNodesBalancedthickness.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Balancedthickness/CreateNodesBalancedthickness.cpp	(revision 6412)
@@ -36,5 +36,5 @@
 
 	/*Check in 3d*/
-	if(iomodel->prognostic_DG && iomodel->dim==3) ISSMERROR("DG 3d not implemented yet");
+	if(iomodel->prognostic_DG && iomodel->dim==3) _error_("DG 3d not implemented yet");
 
 	/*First fetch data: */
@@ -70,5 +70,5 @@
 					vertex_id=(int)*(iomodel->elements+3*i+j); //(Matlab indexing)
 					io_index=vertex_id-1;                      //(C indexing)
-					ISSMASSERT(vertex_id>0 && vertex_id<=iomodel->numberofvertices);
+					_assert_(vertex_id>0 && vertex_id<=iomodel->numberofvertices);
 
 					//Compute Node id
Index: /issm/trunk/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp	(revision 6412)
@@ -49,5 +49,5 @@
 				break;
 			default:
-				ISSMERROR("Control %s not implemented yet",EnumToString((int)iomodel->control_type[i]));
+				_error_("Control %s not implemented yet",EnumToString((int)iomodel->control_type[i]));
 		}
 	}
Index: /issm/trunk/src/c/modules/ModelProcessorx/CreateDataSets.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/CreateDataSets.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/ModelProcessorx/CreateDataSets.cpp	(revision 6412)
@@ -101,5 +101,5 @@
 			break;
 		default:
-			ISSMERROR("%s%s%s"," analysis_type: ",EnumToString(analysis_type)," not supported yet!");
+			_error_("%s%s%s"," analysis_type: ",EnumToString(analysis_type)," not supported yet!");
 	}
 
Index: /issm/trunk/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp	(revision 6412)
@@ -25,7 +25,7 @@
 
 	/*Some checks if debugging*/
-	ISSMASSERT(iomodel->numberofvertices);
-	ISSMASSERT(iomodel->numberofelements);
-	ISSMASSERT(iomodel->elements);
+	_assert_(iomodel->numberofvertices);
+	_assert_(iomodel->numberofelements);
+	_assert_(iomodel->elements);
 
 	/*Allocate ouput*/
@@ -44,5 +44,5 @@
 		for (j=0;j<elementswidth;j++){
 			vertexid=(int)iomodel->elements[elementswidth*i+j];
-			ISSMASSERT(vertexid>0 && vertexid-1<iomodel->numberofvertices);
+			_assert_(vertexid>0 && vertexid-1<iomodel->numberofvertices);
 			connectivity[vertexid-1]+=1;
 		}
Index: /issm/trunk/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp	(revision 6412)
@@ -25,8 +25,8 @@
 
 	/*Some checks if debugging*/
-	ISSMASSERT(iomodel->numberofvertices);
-	ISSMASSERT(iomodel->numberofelements);
-	ISSMASSERT(iomodel->my_elements);
-	ISSMASSERT(iomodel->elements);
+	_assert_(iomodel->numberofvertices);
+	_assert_(iomodel->numberofelements);
+	_assert_(iomodel->my_elements);
+	_assert_(iomodel->elements);
 
 	/*Allocate ouput*/
@@ -47,5 +47,5 @@
 			for (j=0;j<elementswidth;j++){
 				vertexid=(int)iomodel->elements[elementswidth*i+j];
-				ISSMASSERT(vertexid>0 && vertexid-1<iomodel->numberofvertices);
+				_assert_(vertexid>0 && vertexid-1<iomodel->numberofvertices);
 				connectivity[vertexid-1]=i+1;
 			}
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp	(revision 6412)
@@ -81,5 +81,5 @@
 
 					}
-					else ISSMERROR("if vertices_type is MacAyealPattyn, you shoud have gridonpattyn or gridonmacayeal");
+					else _error_("if vertices_type is MacAyealPattyn, you shoud have gridonpattyn or gridonmacayeal");
 			}
 			/*Also add spcs of coupling: zero at the border pattyn/stokes for the appropriate dofs*/
@@ -121,5 +121,5 @@
 						}
 					}
-					else ISSMERROR("if vertices_type is PattynStokes, you shoud have gridonpattyn or gridonstokes");
+					else _error_("if vertices_type is PattynStokes, you shoud have gridonpattyn or gridonstokes");
 			}
 			/*Also add spcs of coupling: zero at the border pattyn/stokes for the appropriate dofs*/
@@ -161,5 +161,5 @@
 						}
 					}
-					else ISSMERROR("if vertices_type is MacAyealStokes, you shoud have gridonpattyn or gridonstokes");
+					else _error_("if vertices_type is MacAyealStokes, you shoud have gridonpattyn or gridonstokes");
 			}
 			/*Now add the regular spcs*/
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp	(revision 6412)
@@ -139,5 +139,5 @@
 
 			/*In debugging mode, check that the second node is in the same cpu*/
-			ISSMASSERT(iomodel->my_vertices[(int)iomodel->penalties[2*i+1]-1]);
+			_assert_(iomodel->my_vertices[(int)iomodel->penalties[2*i+1]-1]);
 
 			/*Get node ids*/
Index: /issm/trunk/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp	(revision 6412)
@@ -61,5 +61,5 @@
 			doftype[5]=StokesApproximationEnum;
 		}
-		else ISSMERROR("Approximationtype %i (%s) not implemented yet for DiagnosticHoriz",(int)*vertices_type,EnumToString((int)*vertices_type));
+		else _error_("Approximationtype %i (%s) not implemented yet for DiagnosticHoriz",(int)*vertices_type,EnumToString((int)*vertices_type));
 	}
 	else if (analysis_type==DiagnosticVertAnalysisEnum){
@@ -87,5 +87,5 @@
 		numdofs=1;
 	}
-	else ISSMERROR("analysis type: %i (%s) not implemented yet",analysis_type,EnumToString(analysis_type));
+	else _error_("analysis type: %i (%s) not implemented yet",analysis_type,EnumToString(analysis_type));
 
 	/*Now initialize the index*/
Index: /issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp	(revision 6412)
@@ -20,5 +20,5 @@
 
 	/*if 2d: Error*/
-	if (iomodel->dim==2) ISSMERROR("2d meshes not supported yet");
+	if (iomodel->dim==2) _error_("2d meshes not supported yet");
 
 	/*Recover pointer: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.cpp	(revision 6412)
@@ -40,5 +40,5 @@
 		analysis_type=analysis_type_list[i];
 	
-		ISSMPRINTF(VerboseMProcessor(),"   create datasets for analysis %s\n",EnumToString(analysis_type));
+		_printf_(VerboseMProcessor(),"   create datasets for analysis %s\n",EnumToString(analysis_type));
 		CreateDataSets(&elements,&nodes,&vertices,&materials,&constraints,&loads,&parameters,iomodel,IOMODEL,solution_type,analysis_type,nummodels,i);
 	}
Index: /issm/trunk/src/c/modules/ModelProcessorx/NodesPartitioning.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 6412)
@@ -87,5 +87,5 @@
 	}
 	else{
-		ISSMERROR("not implemented yet");
+		_error_("not implemented yet");
 	}
 
@@ -95,5 +95,5 @@
 	IoModelFetchData(&iomodel->edges,&iomodel->numberofedges,&cols,iomodel_handle,"edges");
 	IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
-	if (cols!=4) ISSMERROR("field edges should have 4 columns");
+	if (cols!=4) _error_("field edges should have 4 columns");
 
 	/*!All elements have been partitioned above, only create elements for this CPU: */
@@ -136,5 +136,5 @@
 			}
 			else{
-				ISSMERROR("Problem in edges creation");
+				_error_("Problem in edges creation");
 			}
 		}
Index: /issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp	(revision 6412)
@@ -36,5 +36,5 @@
 
 	/*Check in 3d*/
-	if(iomodel->prognostic_DG && iomodel->dim==3) ISSMERROR("DG 3d not implemented yet");
+	if(iomodel->prognostic_DG && iomodel->dim==3) _error_("DG 3d not implemented yet");
 
 	/*First fetch data: */
@@ -70,5 +70,5 @@
 					vertex_id=(int)*(iomodel->elements+3*i+j); //(Matlab indexing)
 					io_index=vertex_id-1;                      //(C indexing)
-					ISSMASSERT(vertex_id>0 && vertex_id<=iomodel->numberofvertices);
+					_assert_(vertex_id>0 && vertex_id<=iomodel->numberofvertices);
 
 					//Compute Node id
Index: /issm/trunk/src/c/modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp	(revision 6412)
@@ -180,5 +180,5 @@
 			 *responses. Let's build a DoubleMatArrayParam object with the array of segments: */
 			
-			if(iomodel->qmu_mass_flux_num_profiles==0)ISSMERROR(" qmu_mass_flux_num_profiles is 0, when MassFlux computations were requested!");
+			if(iomodel->qmu_mass_flux_num_profiles==0)_error_(" qmu_mass_flux_num_profiles is 0, when MassFlux computations were requested!");
 
 			array=(double**)xmalloc(iomodel->qmu_mass_flux_num_profiles*sizeof(double*));
Index: /issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp	(revision 6412)
@@ -27,5 +27,5 @@
 
 	/*return if 2d mesh*/
-	if (iomodel->dim==2) ISSMERROR("2d meshes not supported yet");
+	if (iomodel->dim==2) _error_("2d meshes not supported yet");
 
 	//create penalties for grids: no grid can have a temperature over the melting point
Index: /issm/trunk/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp
===================================================================
--- /issm/trunk/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp	(revision 6412)
@@ -71,5 +71,5 @@
 	 * warn the user to increase the connectivity width: */
 	for(i=0;i<nods;i++){
-		if (*(connectivity+width*i+maxels)>maxels)ISSMERROR("%s%g%s"," max connectivity width reached (",*(connectivity+width*i+maxels),")! increase width of connectivity table");
+		if (*(connectivity+width*i+maxels)>maxels)_error_("%s%g%s"," max connectivity width reached (",*(connectivity+width*i+maxels),")! increase width of connectivity table");
 	}
 
Index: /issm/trunk/src/c/modules/PenaltyConstraintsx/PenaltyConstraintsx.cpp
===================================================================
--- /issm/trunk/src/c/modules/PenaltyConstraintsx/PenaltyConstraintsx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/PenaltyConstraintsx/PenaltyConstraintsx.cpp	(revision 6412)
@@ -24,5 +24,5 @@
 
 	/*Display message*/
-	ISSMPRINTF(VerboseModule(),"   Constraining penalties\n");
+	_printf_(VerboseModule(),"   Constraining penalties\n");
 
 	/*recover parameters: */
Index: /issm/trunk/src/c/modules/PenaltyConstraintsx/RiftConstraints.cpp
===================================================================
--- /issm/trunk/src/c/modules/PenaltyConstraintsx/RiftConstraints.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/PenaltyConstraintsx/RiftConstraints.cpp	(revision 6412)
@@ -55,5 +55,5 @@
 	}
 	else if(num_unstable_constraints<=min_mechanical_constraints){
-		ISSMPRINTF(VerboseModule(),"   freezing constraints\n");
+		_printf_(VerboseModule(),"   freezing constraints\n");
 		RiftFreezeConstraints(loads,configuration_type);
 	}
Index: /issm/trunk/src/c/modules/Qmux/SpawnCoreParallel.cpp
===================================================================
--- /issm/trunk/src/c/modules/Qmux/SpawnCoreParallel.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/Qmux/SpawnCoreParallel.cpp	(revision 6412)
@@ -52,5 +52,5 @@
 	/*synchronize all cpus, as CPU 0 is probably late (it is starting the entire dakota strategy!) : */
 	MPI_Barrier(MPI_COMM_WORLD);
-	ISSMPRINTF(VerboseQmu(),"qmu iteration: %i\n",counter);
+	_printf_(VerboseQmu(),"qmu iteration: %i\n",counter);
 	
 	/*retrieve parameters: */
@@ -66,5 +66,5 @@
 
 	/*Determine solution sequence: */
-	ISSMPRINTF(VerboseQmu(),"%s%s%s\n","Starting ",EnumToString(solution_type)," core:");
+	_printf_(VerboseQmu(),"%s%s%s\n","Starting ",EnumToString(solution_type)," core:");
 	SolutionConfiguration(NULL,NULL,&solutioncore,solution_type); 
 	if(control_analysis)solutioncore=&control_core;
@@ -74,5 +74,5 @@
 
 	/*compute responses: */
-	ISSMPRINTF(VerboseQmu(),"compute dakota responses:\n");
+	_printf_(VerboseQmu(),"compute dakota responses:\n");
 	DakotaResponsesx(d_responses,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,responses_descriptors,numresponsedescriptors,d_numresponses);
 	
Index: /issm/trunk/src/c/modules/Reduceloadfromgtofx/Reduceloadfromgtofx.cpp
===================================================================
--- /issm/trunk/src/c/modules/Reduceloadfromgtofx/Reduceloadfromgtofx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/Reduceloadfromgtofx/Reduceloadfromgtofx.cpp	(revision 6412)
@@ -27,5 +27,5 @@
 
 	parameters->FindParam(&kffpartition,KffEnum);
-	ISSMPRINTF(VerboseModule(),"   Reducing Load vector from gset to fset\n");
+	_printf_(VerboseModule(),"   Reducing Load vector from gset to fset\n");
 
 	if(!pg){
Index: /issm/trunk/src/c/modules/Reduceloadx/Reduceloadx.cpp
===================================================================
--- /issm/trunk/src/c/modules/Reduceloadx/Reduceloadx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/Reduceloadx/Reduceloadx.cpp	(revision 6412)
@@ -21,5 +21,5 @@
 	int         verbose;
 
-	ISSMPRINTF(VerboseModule(),"   Dirichlet lifting applied to load vector\n");
+	_printf_(VerboseModule(),"   Dirichlet lifting applied to load vector\n");
 	
 	if(pf && Kfs){
Index: /issm/trunk/src/c/modules/Reducematrixfromgtofx/Reducematrixfromgtofx.cpp
===================================================================
--- /issm/trunk/src/c/modules/Reducematrixfromgtofx/Reducematrixfromgtofx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/Reducematrixfromgtofx/Reducematrixfromgtofx.cpp	(revision 6412)
@@ -11,5 +11,5 @@
 
 	/*Display message*/
-	ISSMPRINTF(VerboseModule(),"   Reducing Stiffness Matrix from gset to fset\n");
+	_printf_(VerboseModule(),"   Reducing Stiffness Matrix from gset to fset\n");
 
 	//Reduce matrix from g-size to f-size
Index: /issm/trunk/src/c/modules/Responsex/Responsex.cpp
===================================================================
--- /issm/trunk/src/c/modules/Responsex/Responsex.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/Responsex/Responsex.cpp	(revision 6412)
@@ -38,5 +38,5 @@
 		case SurfaceAverageVelMisfitEnum: SurfaceAverageVelMisfitx( responses, elements,nodes, vertices, loads, materials, parameters,process_units); break;
 		case ThicknessAbsMisfitEnum: ThicknessAbsMisfitx( responses, elements,nodes, vertices, loads, materials, parameters,process_units); break;
-		default: ISSMERROR(" response descriptor \"%s\" not supported yet!",response_descriptor); break;
+		default: _error_(" response descriptor \"%s\" not supported yet!",response_descriptor); break;
 	}
 
Index: /issm/trunk/src/c/modules/Solverx/Solverx.cpp
===================================================================
--- /issm/trunk/src/c/modules/Solverx/Solverx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/Solverx/Solverx.cpp	(revision 6412)
@@ -33,5 +33,5 @@
 
 	/*Display message*/
-	ISSMPRINTF(VerboseModule(),"   Solving\n");
+	_printf_(VerboseModule(),"   Solving\n");
 	if(VerboseSolver())PetscOptionsPrint(stdout);
 
@@ -114,5 +114,5 @@
 	/*Check convergence*/
 	KSPGetIterationNumber(ksp,&iteration_number);
-	if (iteration_number<0) ISSMERROR("%s%i"," Solver diverged at iteration number: ",-iteration_number);
+	if (iteration_number<0) _error_("%s%i"," Solver diverged at iteration number: ",-iteration_number);
 
 	/*Free ressources:*/
Index: /issm/trunk/src/c/modules/SystemMatricesx/SystemMatricesx.cpp
===================================================================
--- /issm/trunk/src/c/modules/SystemMatricesx/SystemMatricesx.cpp	(revision 6411)
+++ /issm/trunk/src/c/modules/SystemMatricesx/SystemMatricesx.cpp	(revision 6412)
@@ -29,5 +29,5 @@
 
 	/*Display message*/
-	ISSMPRINTF(VerboseModule(),"   Generating matrices\n");
+	_printf_(VerboseModule(),"   Generating matrices\n");
 
 	/*retrive parameters: */
@@ -45,6 +45,6 @@
 
 	/*Checks in debugging mode {{{1*/
-	if(penalty_kflag)ISSMASSERT(kflag);
-	if(penalty_pflag)ISSMASSERT(pflag);
+	if(penalty_kflag)_assert_(kflag);
+	if(penalty_pflag)_assert_(pflag);
 	/*}}}*/
 
Index: /issm/trunk/src/c/objects/Bamg/BamgGeom.cpp
===================================================================
--- /issm/trunk/src/c/objects/Bamg/BamgGeom.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Bamg/BamgGeom.cpp	(revision 6412)
@@ -71,5 +71,5 @@
 	fnames[i++] = "CrackedEdges";
 	fnames[i++] = "SubDomains";
-	ISSMASSERT(i==numfields);
+	_assert_(i==numfields);
 
 	/*Initialize Matlab structure*/
@@ -85,5 +85,5 @@
 	i++; SetMatlabStructureField(output,"CrackedEdges",    this->CrackedEdgesSize[0],    this->CrackedEdgesSize[1],    this->CrackedEdges);
 	i++; SetMatlabStructureField(output,"SubDomains",      this->SubDomainsSize[0],      this->SubDomainsSize[1],      this->SubDomains);
-	ISSMASSERT(i==numfields);
+	_assert_(i==numfields);
 
 	/*Assign output*/
Index: /issm/trunk/src/c/objects/Bamg/BamgMesh.cpp
===================================================================
--- /issm/trunk/src/c/objects/Bamg/BamgMesh.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Bamg/BamgMesh.cpp	(revision 6412)
@@ -120,5 +120,5 @@
 	fnames[i++] = "CrackedVertices";
 	fnames[i++] = "CrackedEdges";
-	ISSMASSERT(i==numfields);
+	_assert_(i==numfields);
 
 	/*Initialize Matlab structure*/
@@ -143,5 +143,5 @@
 	i++; SetMatlabStructureField(output,"CrackedVertices",          this->CrackedVerticesSize[0],          this->CrackedVerticesSize[1],           this->CrackedVertices);
 	i++; SetMatlabStructureField(output,"CrackedEdges",             this->CrackedEdgesSize[0],             this->CrackedEdgesSize[1],              this->CrackedEdges);
-	ISSMASSERT(i==numfields);
+	_assert_(i==numfields);
 
 	/*Assign output*/
Index: /issm/trunk/src/c/objects/Bamg/BamgOpts.cpp
===================================================================
--- /issm/trunk/src/c/objects/Bamg/BamgOpts.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Bamg/BamgOpts.cpp	(revision 6412)
@@ -100,28 +100,28 @@
 	int i;
 
-	if (this->anisomax<1) ISSMERROR("'anisomax' option should be >=1");
-	if (this->coeff==0) ISSMERROR("'coeff' should be positive");
-	if (this->errg<0) ISSMERROR("'errg' option should be >0");
-	if (this->gradation<1) ISSMERROR("'gradation' option should be >=1");
-	if (this->Hessiantype!=0  && this->Hessiantype!=1) ISSMERROR("'Hessiantype' supported options are 0 and 1");
-	if (this->maxnbv<3) ISSMERROR("'maxnbv' option should be >3");
-	if (this->maxsubdiv<=1) ISSMERROR("'maxsubdiv' should be >1");
-	if (this->Metrictype!=0   && this->Metrictype!=1 && this->Metrictype!=2) ISSMERROR("'Metrictype' supported options are 0, 1 and 2");
-	if (this->nbjacobi<=0) ISSMERROR("'nbjacobi' option should be >0");
-	if (this->nbsmooth<=0) ISSMERROR("'nbsmooth' option should be >0");
+	if (this->anisomax<1) _error_("'anisomax' option should be >=1");
+	if (this->coeff==0) _error_("'coeff' should be positive");
+	if (this->errg<0) _error_("'errg' option should be >0");
+	if (this->gradation<1) _error_("'gradation' option should be >=1");
+	if (this->Hessiantype!=0  && this->Hessiantype!=1) _error_("'Hessiantype' supported options are 0 and 1");
+	if (this->maxnbv<3) _error_("'maxnbv' option should be >3");
+	if (this->maxsubdiv<=1) _error_("'maxsubdiv' should be >1");
+	if (this->Metrictype!=0   && this->Metrictype!=1 && this->Metrictype!=2) _error_("'Metrictype' supported options are 0, 1 and 2");
+	if (this->nbjacobi<=0) _error_("'nbjacobi' option should be >0");
+	if (this->nbsmooth<=0) _error_("'nbsmooth' option should be >0");
 
-	if (this->Crack!=0  && this->Crack!=1) ISSMERROR("'Crack' supported options are 0 and 1");
-	if (this->KeepVertices!=0 && this->KeepVertices!=1) ISSMERROR("'KeepVertices' supported options are 0 and 1");
-	if (this->geometricalmetric!=0  && this->geometricalmetric!=1) ISSMERROR("'geometricalmetric' supported options are 0 and 1");
+	if (this->Crack!=0  && this->Crack!=1) _error_("'Crack' supported options are 0 and 1");
+	if (this->KeepVertices!=0 && this->KeepVertices!=1) _error_("'KeepVertices' supported options are 0 and 1");
+	if (this->geometricalmetric!=0  && this->geometricalmetric!=1) _error_("'geometricalmetric' supported options are 0 and 1");
 
-	if (this->hmin<=0) ISSMERROR("'hmin' option should be >0");
-	if (this->hmax<=0 || this->hmax<this->hmin) ISSMERROR("'hmax' option should be between 0 and hmin=%g",this->hmin);
-	if (this->hminVertices && this->hminVerticesSize[1]!=1) ISSMERROR("'hminVertices' should be a column");
-	if (this->hmaxVertices && this->hmaxVerticesSize[1]!=1) ISSMERROR("'hmaxVertices' should be a column");
-	if (this->hVertices && this->hVerticesSize[1]!=1) ISSMERROR("'hVertices' should be a column");
-	if (this->metric && (this->metricSize[1]!=1 && this->metricSize[1]!=3)) ISSMERROR("'metric' should have either 1 (iso) or 3 (aniso) columns.");
+	if (this->hmin<=0) _error_("'hmin' option should be >0");
+	if (this->hmax<=0 || this->hmax<this->hmin) _error_("'hmax' option should be between 0 and hmin=%g",this->hmin);
+	if (this->hminVertices && this->hminVerticesSize[1]!=1) _error_("'hminVertices' should be a column");
+	if (this->hmaxVertices && this->hmaxVerticesSize[1]!=1) _error_("'hmaxVertices' should be a column");
+	if (this->hVertices && this->hVerticesSize[1]!=1) _error_("'hVertices' should be a column");
+	if (this->metric && (this->metricSize[1]!=1 && this->metricSize[1]!=3)) _error_("'metric' should have either 1 (iso) or 3 (aniso) columns.");
 	if (this->field){
-		if (this->errSize[0]!=1 || this->errSize[1]!=this->fieldSize[1]) ISSMERROR("'err' should be of size %i x %i",1,this->fieldSize[1]);
-		for (i=0;i<this->fieldSize[1];i++) {if (this->err[i]<=0) ISSMERROR("'err' option should be >0");};
+		if (this->errSize[0]!=1 || this->errSize[1]!=this->fieldSize[1]) _error_("'err' should be of size %i x %i",1,this->fieldSize[1]);
+		for (i=0;i<this->fieldSize[1];i++) {if (this->err[i]<=0) _error_("'err' option should be >0");};
 	}
 
Index: /issm/trunk/src/c/objects/Bamg/BamgVertex.cpp
===================================================================
--- /issm/trunk/src/c/objects/Bamg/BamgVertex.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Bamg/BamgVertex.cpp	(revision 6412)
@@ -76,5 +76,5 @@
 		}
 		else{
-			ISSMERROR("Metrictype %i not supported yet (use 0,1 or 2(default))",Metrictype);
+			_error_("Metrictype %i not supported yet (use 0,1 or 2(default))",Metrictype);
 		}
 
@@ -146,5 +146,5 @@
 			j = NextEdge[jc];
 			if (k>=2000){
-				ISSMERROR("k>=2000 (Maximum number of iterations reached)");
+				_error_("k>=2000 (Maximum number of iterations reached)");
 			}
 		} while ( tbegin != tria); 
@@ -213,5 +213,5 @@
 				j = NextEdge[jc];
 				if (k>=2000){
-					ISSMERROR("k>=2000");
+					_error_("k>=2000");
 				}
 			}while ( tbegin != tria); 
Index: /issm/trunk/src/c/objects/Bamg/Edge.cpp
===================================================================
--- /issm/trunk/src/c/objects/Bamg/Edge.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Bamg/Edge.cpp	(revision 6412)
@@ -45,6 +45,6 @@
 
 		/*some shecks*/
-		if (!(adj[0]==&e || adj[1]==&e)){ ISSMERROR("Intersection bug"); }
-		ISSMASSERT(adj[0]==&e || adj[1]==&e);
+		if (!(adj[0]==&e || adj[1]==&e)){ _error_("Intersection bug"); }
+		_assert_(adj[0]==&e || adj[1]==&e);
 
 		return adj[0]==&e?0:1;
Index: /issm/trunk/src/c/objects/Bamg/GeomEdge.cpp
===================================================================
--- /issm/trunk/src/c/objects/Bamg/GeomEdge.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Bamg/GeomEdge.cpp	(revision 6412)
@@ -29,5 +29,5 @@
 
 		//Check that theta is in [0 1]
-		ISSMASSERT(theta>-1e-12 && theta<1+1e-12);
+		_assert_(theta>-1e-12 && theta<1+1e-12);
 
 		if (TgA()){ 
@@ -78,5 +78,5 @@
 
 		//check theta
-		ISSMASSERT(theta>=0 && theta<=1);
+		_assert_(theta>=0 && theta<=1);
 
 		if (TgA()){ 
Index: /issm/trunk/src/c/objects/Bamg/Geometry.cpp
===================================================================
--- /issm/trunk/src/c/objects/Bamg/Geometry.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Bamg/Geometry.cpp	(revision 6412)
@@ -48,5 +48,5 @@
 	Geometry::~Geometry() {
 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/~Geometry)*/
-		if(NbRef>0)    ISSMERROR("Trying to delete geometry and NbRef>0");
+		if(NbRef>0)    _error_("Trying to delete geometry and NbRef>0");
 		if(vertices)   delete [] vertices;  vertices=0;
 		if(edges)      delete [] edges;     edges=0;
@@ -76,11 +76,11 @@
 
 		//some checks
-		if (bamggeom->Vertices==NULL) ISSMERROR("the domain provided does not contain any vertex");
-		if (bamggeom->Edges==NULL) ISSMERROR("the domain provided does not contain any edge");
+		if (bamggeom->Vertices==NULL) _error_("the domain provided does not contain any vertex");
+		if (bamggeom->Edges==NULL) _error_("the domain provided does not contain any edge");
 
 		//Vertices
 		if (bamggeom->Vertices){
 			if(verbose>5) printf("      processing Vertices\n");
-			if (bamggeom->VerticesSize[1]!=3) ISSMERROR("Vertices should have 3 columns");
+			if (bamggeom->VerticesSize[1]!=3) _error_("Vertices should have 3 columns");
 			vertices = new GeomVertex[nbv];
 			for (i=0;i<nbv;i++) {
@@ -115,8 +115,8 @@
 			 */
 			coefIcoor=(MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y));
-			if(coefIcoor<=0) ISSMERROR("coefIcoor should be positive");
+			if(coefIcoor<=0) _error_("coefIcoor should be positive");
 		}
 		else{
-			ISSMERROR("No BamgVertex provided");
+			_error_("No BamgVertex provided");
 		}
 
@@ -127,5 +127,5 @@
 
 			if(verbose>5) printf("      processing Edges\n");
-			if (bamggeom->EdgesSize[1]!=3) ISSMERROR("Edges should have 3 columns");
+			if (bamggeom->EdgesSize[1]!=3) _error_("Edges should have 3 columns");
 			edges = new GeomEdge[nbe];
 
@@ -176,5 +176,5 @@
 		}
 		else{
-			ISSMERROR("No edges provided");
+			_error_("No edges provided");
 		}
 
@@ -206,5 +206,5 @@
 		if (bamggeom->TangentAtEdges){
 			if(verbose>5) printf("      processing TangentAtEdges");
-			if (bamggeom->TangentAtEdgesSize[1]!=4) ISSMERROR("TangentAtEdges should have 4 columns");
+			if (bamggeom->TangentAtEdgesSize[1]!=4) _error_("TangentAtEdges should have 4 columns");
 			int n,i,j,k;
 			R2 tg;
@@ -216,6 +216,6 @@
 				tg.x=bamggeom->TangentAtEdges[k*4+2];
 				tg.y=bamggeom->TangentAtEdges[k*4+3];
-				if (i<0 || i>=nbe) ISSMERROR("TangentAtEdges first index exceeds matrix dimension");
-				if (j!=0 && j!=1)  ISSMERROR("TangentAtEdges second index should be 1 or 2 only");
+				if (i<0 || i>=nbe) _error_("TangentAtEdges first index exceeds matrix dimension");
+				if (j!=0 && j!=1)  _error_("TangentAtEdges second index should be 1 or 2 only");
 				edges[i].tg[j] = tg;
 			}
@@ -225,9 +225,9 @@
 		if(bamggeom->Corners){
 			if(verbose>5) printf("      processing Corners");
-			if (bamggeom->CornersSize[1]!=1) ISSMERROR("Corners should have 1 column");
+			if (bamggeom->CornersSize[1]!=1) _error_("Corners should have 1 column");
 			n=bamggeom->CornersSize[0];
 			for (i=0;i<n;i++) {     
 				j=(int)bamggeom->Corners[i]-1; //for C indexing
-				if (j>nbv-1 || j<0) ISSMERROR("Bad corner definition: should in [0 %i]",nbv);
+				if (j>nbv-1 || j<0) _error_("Bad corner definition: should in [0 %i]",nbv);
 				/*Required => at the same time SetRequired and SetCorner*/
 				vertices[j].SetCorner();
@@ -239,9 +239,9 @@
 		if(bamggeom->RequiredVertices){
 			if(verbose>5) printf("      processing RequiredVertices\n");
-			if (bamggeom->RequiredVerticesSize[1]!=1) ISSMERROR("RequiredVertices should have 1 column");
+			if (bamggeom->RequiredVerticesSize[1]!=1) _error_("RequiredVertices should have 1 column");
 			n=bamggeom->RequiredVerticesSize[0];
 			for (i=0;i<n;i++) {     
 				j=(int)bamggeom->RequiredVertices[i]-1; //for C indexing
-				if (j>nbv-1 || j<0) ISSMERROR("Bad RequiredVerticess  definition: should in [0 %i]",nbv);
+				if (j>nbv-1 || j<0) _error_("Bad RequiredVerticess  definition: should in [0 %i]",nbv);
 				vertices[j].SetRequired();
 			}
@@ -251,9 +251,9 @@
 		if(bamggeom->RequiredEdges){
 			if(verbose>5) printf("      processing RequiredEdges\n");
-			if (bamggeom->RequiredEdgesSize[1]!=1) ISSMERROR("RequiredEdges should have 1 column");
+			if (bamggeom->RequiredEdgesSize[1]!=1) _error_("RequiredEdges should have 1 column");
 			n=bamggeom->RequiredEdgesSize[0];
 			for (i=0;i<n;i++) {     
 				j=(int)bamggeom->RequiredEdges[i]-1; //for C indexing
-				if (j>nbe-1 || j<0) ISSMERROR("Bad RequiredEdges definition: should in [0 %i]",nbe);
+				if (j>nbe-1 || j<0) _error_("Bad RequiredEdges definition: should in [0 %i]",nbe);
 				edges[j].SetRequired();  
 			}
@@ -263,5 +263,5 @@
 		if(bamggeom->SubDomains){
 			if(verbose>5) printf("      processing SubDomains\n");
-			if (bamggeom->SubDomainsSize[1]!=4) ISSMERROR("SubDomains should have 4 columns");
+			if (bamggeom->SubDomainsSize[1]!=4) _error_("SubDomains should have 4 columns");
 			nbsubdomains=bamggeom->SubDomainsSize[0];
 			subdomains = new GeomSubDomain[nbsubdomains];
@@ -271,6 +271,6 @@
 				i2=(int)bamggeom->SubDomains[i*4+2];
 				i3=(int)bamggeom->SubDomains[i*4+3];
-				if (i0!=2) ISSMERROR("Bad Subdomain definition: first number should be 2 (for Edges)");
-				if (i1>nbe || i1<=0) ISSMERROR("Bad Subdomain definition: second number should in [1 %i] (edge number)",nbe);
+				if (i0!=2) _error_("Bad Subdomain definition: first number should be 2 (for Edges)");
+				if (i1>nbe || i1<=0) _error_("Bad Subdomain definition: second number should in [1 %i] (edge number)",nbe);
 				subdomains[i].edge=edges + (i1-1);
 				subdomains[i].direction = (int) i2;
@@ -478,5 +478,5 @@
 		while(pon != on){  
 			counter++;
-			ISSMASSERT(counter<100);
+			_assert_(counter<100);
 			pon = on;
 			R2 A= (*on)[0];
@@ -527,5 +527,5 @@
 			/*if there is a vertex found that is to close to vertices[i] -> error*/
 			if( v && Norme1(v->r - vertices[i].r) < eps ){
-				ISSMERROR("two points of the geometry are very closed to each other");
+				_error_("two points of the geometry are very closed to each other");
 			}
 
@@ -601,5 +601,5 @@
 			double lv10=Norme2(v10);
 			//check that its length is not 0
-			if(lv10==0)ISSMERROR("Length of edge %i is 0",i);
+			if(lv10==0)_error_("Length of edge %i is 0",i);
 			//compute angle in [-Pi Pi]
 			eangle[i] = atan2(v10.y,v10.x);
@@ -694,5 +694,5 @@
 				long i1 = n1/2 ,j1=n1%2;
 
-				if( edges[i1].v[j1] != edges[i].v[j]) ISSMERROR("Problem while processing edges: check the edge list");
+				if( edges[i1].v[j1] != edges[i].v[j]) _error_("Problem while processing edges: check the edge list");
 
 				edges[i1].Adj[j1] = edges + i;
@@ -796,5 +796,5 @@
 				} 
 			}
-			ISSMASSERT(nb_marked_edges && nbe);
+			_assert_(nb_marked_edges && nbe);
 			//allocate if first step
 			if(step==0) curves=new Curve[nbcurves];
@@ -821,8 +821,8 @@
 		GeomEdge* on=e.GeomEdgeHook;
 		if (!on){
-			ISSMERROR("ProjectOnCurve error message: edge provided should be on geometry");
+			_error_("ProjectOnCurve error message: edge provided should be on geometry");
 		}
 		if (!e[0].GeomEdgeHook ||  !e[1].GeomEdgeHook){
-			ISSMERROR("ProjectOnCurve error message: at least one of the vertex of the edge provided is not on geometry");
+			_error_("ProjectOnCurve error message: at least one of the vertex of the edge provided is not on geometry");
 		}
 
@@ -865,5 +865,5 @@
 					printf(" 2)  code bug : be sure that we call   Mesh::SetVertexFieldOn() before\n");
 					printf("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)\n");
-					ISSMERROR("see above");
+					_error_("see above");
 				}
 				NbTry++;
@@ -872,5 +872,5 @@
 			GeomEdge* tmpge = eg0;
 			ge[--bge] =eg0 = eg0->Adj[direction0];
-			ISSMASSERT(bge>=0 && bge<=mxe);
+			_assert_(bge>=0 && bge<=mxe);
 			direction0 = 1-( directionge[bge] = tmpge->AdjVertexIndex[direction0]);
 		}
@@ -885,10 +885,10 @@
 				printf(" 2)  code bug : be sure that we call   Mesh::SetVertexFieldOn() before\n");
 				printf("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)\n");
-				ISSMERROR("see above");
+				_error_("see above");
 			}
 			GeomEdge* tmpge = eg1;
 			ge[++tge] =eg1 = eg1->Adj[direction1];
 			directionge[tge]= direction1 = 1-tmpge->AdjVertexIndex[direction1];
-			ISSMASSERT(tge>=0 && tge<=mxe);
+			_assert_(tge>=0 && tge<=mxe);
 		}
 
@@ -912,5 +912,5 @@
 			double ll=0;
 			for(i=bge;i<tge;i++){
-				ISSMASSERT(i>=0 && i<=mxe);
+				_assert_(i>=0 && i<=mxe);
 				BB =  (*ge[i])[directionge[i]];
 				lge[i]=ll += Norme2(AA-BB);
@@ -918,5 +918,5 @@
 				lge[tge]=ll+=Norme2(AA-V1); 
 				// search the geometrical edge
-				ISSMASSERT(s<=1.0);
+				_assert_(s<=1.0);
 				double ls= s*ll;
 				on =0;
@@ -926,5 +926,5 @@
 				i=bge;
 				while (  (l1=lge[i]) < ls ) {
-					ISSMASSERT(i>=0 && i<=mxe);
+					_assert_(i>=0 && i<=mxe);
 					i++,s0=1-(s1=directionge[i]),l0=l1;
 				}
@@ -936,5 +936,5 @@
 				sg =s0*(1.0-s)+s*s1;    
 		} 
-		ISSMASSERT(on);
+		_assert_(on);
 		V.r= on->F(sg);
 		GV=VertexOnGeom(V,*on,sg);
Index: /issm/trunk/src/c/objects/Bamg/ListofIntersectionTriangles.cpp
===================================================================
--- /issm/trunk/src/c/objects/Bamg/ListofIntersectionTriangles.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Bamg/ListofIntersectionTriangles.cpp	(revision 6412)
@@ -38,5 +38,5 @@
 		// check Size
 		if (Size<=0){
-			ISSMERROR("Size<=0");
+			_error_("Size<=0");
 		}
 
@@ -190,5 +190,5 @@
 			SegInterpolation * lEn =  new SegInterpolation[MaxNbSeg];
 			if (!lSegsI || NbSeg>=MaxNbSeg){
-				ISSMERROR("!lSegsI || NbSeg>=MaxNbSeg");
+				_error_("!lSegsI || NbSeg>=MaxNbSeg");
 			}
 			for (int i=0;i< NbSeg;i++) 
@@ -209,5 +209,5 @@
 		register int newsize = MaxSize*2;
 		IntersectionTriangles* nw = new IntersectionTriangles[newsize];
-		ISSMASSERT(nw);
+		_assert_(nw);
 
 		// recopy
@@ -271,5 +271,5 @@
 				k=(*t)(0) ?  ((  (*t)(1) ? ( (*t)(2) ? -1 : 2) : 1  )) : 0;
 				if (k<0){
-					ISSMERROR("k<0");
+					_error_("k<0");
 				}
 				ocut = OppositeEdge[k];
@@ -315,5 +315,5 @@
 				double dij = detj-deti;
 				if (i+j+k != 0 + 1 +2){
-					ISSMERROR("i+j+k != 0 + 1 +2");
+					_error_("i+j+k != 0 + 1 +2");
 				}
 				ba[j] =  detj/dij;
@@ -387,5 +387,5 @@
 					}
 					else {
-						ISSMERROR("Bug Split Edge");
+						_error_("Bug Split Edge");
 					}
 				}
Index: /issm/trunk/src/c/objects/Bamg/ListofIntersectionTriangles.h
===================================================================
--- /issm/trunk/src/c/objects/Bamg/ListofIntersectionTriangles.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Bamg/ListofIntersectionTriangles.h	(revision 6412)
@@ -34,5 +34,5 @@
 					double c01=lEnd-lBegin, c0=(lEnd-s)/c01, c1=(s-lBegin)/c01;
 					if (lBegin>s || s>lEnd){
-						ISSMERROR("lBegin>s || s>lEnd");
+						_error_("lBegin>s || s>lEnd");
 					}
 					return e->F(sBegin*c0+sEnd*c1);
Index: /issm/trunk/src/c/objects/Bamg/Mesh.cpp
===================================================================
--- /issm/trunk/src/c/objects/Bamg/Mesh.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Bamg/Mesh.cpp	(revision 6412)
@@ -110,5 +110,5 @@
 			  }
 		  if (imaxnbv != nbv){
-			  ISSMERROR("imaxnbv != nbv");
+			  _error_("imaxnbv != nbv");
 		  }
 		  for (i=0;i<Tho.nbt;i++)
@@ -120,8 +120,8 @@
 				int i2 = Tho.GetId(t[2]);
 				if (i0<0 || i1<0 || i2<0){
-					ISSMERROR("i0<0 || i1<0 || i2< 0");
+					_error_("i0<0 || i1<0 || i2< 0");
 				}
 				if (i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv){
-					ISSMERROR("i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv");
+					_error_("i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv");
 				}
 				triangles[nbt] = Triangle(this,kk[i0],kk[i1],kk[i2]);
@@ -130,8 +130,8 @@
 			  }
 		  if (kt!=nbt){
-			  ISSMERROR("kt!=nbt");
+			  _error_("kt!=nbt");
 		  }
 		  if (nbt==0 && nbv==0) {
-			  ISSMERROR("All triangles have been removed");
+			  _error_("All triangles have been removed");
 		  }
 		  delete [] kk;
@@ -145,8 +145,8 @@
 
 		  if (!nbsubdomains){
-			  ISSMERROR("nbsubdomains==0");
+			  _error_("nbsubdomains==0");
 		  }
 		  if (!subdomains[0].head || !subdomains[0].head->link){
-			  ISSMERROR("!subdomains[0].head || !subdomains[0].head->link");
+			  _error_("!subdomains[0].head || !subdomains[0].head->link");
 		  }
 
@@ -337,5 +337,5 @@
 		}
 		else{
-			if(verbose>5) ISSMERROR("no Vertices found in the initial mesh");
+			if(verbose>5) _error_("no Vertices found in the initial mesh");
 		}
 
@@ -355,5 +355,5 @@
 		}
 		else{
-			if(verbose>5) ISSMERROR("no Triangles found in the initial mesh");
+			if(verbose>5) _error_("no Triangles found in the initial mesh");
 		}
 
@@ -462,5 +462,5 @@
 						j0 = i0%2;
 						i0 = i0/2;
-						ISSMASSERT(v==edges[i0 ].v[j0]);
+						_assert_(v==edges[i0 ].v[j0]);
 						edges[i ].adj[j ] =edges +i0;
 						edges[i0].adj[j0] =edges +i ;
@@ -481,5 +481,5 @@
 				//Check value
 				if(!(i>=0 && j>=0 && i<nbe && j<Gh.nbe)) {
-					ISSMERROR("ReadMesh error: EdgesOnGeomEdge edge provided (line %i: [%i %i]) is incorrect (must be positive, [0<i<nbe=%i 0<j<Gh.nbe=%i]",i1+1,i+1,j+1,nbe,Gh.nbe);
+					_error_("ReadMesh error: EdgesOnGeomEdge edge provided (line %i: [%i %i]) is incorrect (must be positive, [0<i<nbe=%i 0<j<Gh.nbe=%i]",i1+1,i+1,j+1,nbe,Gh.nbe);
 				}
 				edges[i].GeomEdgeHook=Gh.edges+j;
@@ -497,6 +497,6 @@
 				head=(int)bamgmesh->SubDomains[i*3+1]-1;//C indexing
 				direction=(int)bamgmesh->SubDomains[i*3+2];
-				if (i3!=23) ISSMERROR("Bad Subdomain definition: first number should be 3");
-				if (head<0 || head>=nbt) ISSMERROR("Bad Subdomain definition: head should in [1 %i] (triangle number)",nbt);
+				if (i3!=23) _error_("Bad Subdomain definition: first number should be 3");
+				if (head<0 || head>=nbt) _error_("Bad Subdomain definition: head should in [1 %i] (triangle number)",nbt);
 				subdomains[i].head = triangles+head;
 			}
@@ -542,7 +542,7 @@
 				for (j=0;j<3;j++){
 					int v=GetId(triangles[i][j]); //jth vertex of the ith triangle
-					if (k>3*nbt-1 || k<0) ISSMERROR("k = %i, nbt = %i",k,nbt);
+					if (k>3*nbt-1 || k<0) _error_("k = %i, nbt = %i",k,nbt);
 					next_1[k]=head_1[v];
-					if (v>nbv-1 || v<0)   ISSMERROR("v = %i, nbv = %i",v,nbv);
+					if (v>nbv-1 || v<0)   _error_("v = %i, nbv = %i",v,nbv);
 					head_1[v]=k++;
 					connectivitysize_1[v]+=1;
@@ -636,5 +636,5 @@
 				}
 			}
-			ISSMASSERT(found);
+			_assert_(found);
 			bamgmesh->IssmEdges[i*4+2]=elemedge[2*i+0]+1; // back to M indexing
 			bamgmesh->IssmEdges[i*4+3]=elemedge[2*i+1]+1; // back to M indexing
@@ -682,5 +682,5 @@
 				}
 				if (!stop){
-					ISSMERROR("Element holding segment [%i %i] not found...",i1+1,i2+1);
+					_error_("Element holding segment [%i %i] not found...",i1+1,i2+1);
 				}
 			}
@@ -765,5 +765,5 @@
 			for (i=0;i<NbVerticesOnGeomVertex;i++){
 				VertexOnGeom &v=VerticesOnGeomVertex[i];
-				ISSMASSERT(v.OnGeomVertex());
+				_assert_(v.OnGeomVertex());
 				bamgmesh->VerticesOnGeomVertex[i*2+0]=GetId((BamgVertex*)v)+1; //back to Matlab indexing
 				bamgmesh->VerticesOnGeomVertex[i*2+1]=Gh.GetId((GeomVertex*)v)+1; //back to Matlab indexing
@@ -780,5 +780,5 @@
 				const VertexOnGeom &v=VerticesOnGeomEdge[i];
 				if (!v.OnGeomEdge()){
-					ISSMERROR("A vertices supposed to be OnGeomEdge is actually not");
+					_error_("A vertices supposed to be OnGeomEdge is actually not");
 				}
 				bamgmesh->VerticesOnGeomEdge[i*3+0]=GetId((BamgVertex*)v)+1; //back to Matlab indexing
@@ -820,5 +820,5 @@
 					k=GetId(triangles[i].TriangleAdj(j));
 					if (reft[k]>=0){
-						ISSMASSERT(3*num+j<3*(nbt-nbtout));
+						_assert_(3*num+j<3*(nbt-nbtout));
 						bamgmesh->ElementConnectivity[3*num+j]=k+1; // back to Matlab indexing
 					}
@@ -837,5 +837,5 @@
 			k=0;
 			for(j=head_1[i];j!=-1;j=next_1[j]){
-				ISSMASSERT(connectivitymax_1*i+k < connectivitymax_1*nbv);
+				_assert_(connectivitymax_1*i+k < connectivitymax_1*nbv);
 				bamgmesh->NodalElementConnectivity[connectivitymax_1*i+k]=floor(j/3)+1;
 				k++;
@@ -863,7 +863,7 @@
 			for (j=0;j<2;j++){
 				int v=(int)bamgmesh->IssmEdges[i*i2+j]-1; //back to C indexing
-				if (k>2*i1-1 || k<0) ISSMERROR("Index exceed matrix dimensions (k=%i not in [0 %i]",k,2*i1-1);
+				if (k>2*i1-1 || k<0) _error_("Index exceed matrix dimensions (k=%i not in [0 %i]",k,2*i1-1);
 				next_2[k]=head_2[v];
-				if (v>nbv-1 || v<0)   ISSMERROR("Index exceed matrix dimensions (v=%i not in [0 %i])",v,nbv-1);
+				if (v>nbv-1 || v<0)   _error_("Index exceed matrix dimensions (v=%i not in [0 %i])",v,nbv-1);
 				head_2[v]=k++;
 				connectivitysize_2[v]+=1;
@@ -882,5 +882,5 @@
 			k=0;
 			for(j=head_2[i];j!=-1;j=next_2[j]){
-				ISSMASSERT(connectivitymax_2*i+k < connectivitymax_2*nbv);
+				_assert_(connectivitymax_2*i+k < connectivitymax_2*nbv);
 				num=(int)bamgmesh->IssmEdges[int(j/2)*i2+0];
 				if (i+1==num){ //carefull, ElementEdge is in M indexing
@@ -998,5 +998,5 @@
 		//check that hmax is positive
 		if (hmax<=0){
-			ISSMERROR("hmax<=0");
+			_error_("hmax<=0");
 		}
 
@@ -1027,5 +1027,5 @@
 
 				if (ht<=0 || hn<=0){
-					ISSMERROR("ht<=0 || hn<=0");
+					_error_("ht<=0 || hn<=0");
 				}
 				EigenMetric Vp(1/(ht*ht),1/(hn*hn),tg);
@@ -1052,5 +1052,5 @@
 		}
 		else{
-			ISSMERROR("Hessiantype %i not supported yet (1->use Green formula, 0-> double P2 projection)",Hessiantype);
+			_error_("Hessiantype %i not supported yet (1->use Green formula, 0-> double P2 projection)",Hessiantype);
 		}
 	}
@@ -1096,5 +1096,5 @@
 		//some checks
 		if (( infvertexindex <0 ) && (detOld <0) ||  ( infvertexindex >=0  ) && (detOld >0) ){
-			ISSMERROR("inconsistent configuration (Contact ISSM developers)");
+			_error_("inconsistent configuration (Contact ISSM developers)");
 		}
 
@@ -1138,5 +1138,5 @@
 			}
 			else{
-				ISSMERROR("Cannot add a vertex more than once. Check duplicates");
+				_error_("Cannot add a vertex more than once. Check duplicates");
 			}
 		}
@@ -1151,5 +1151,5 @@
 		tt[2]= &triangles[nbt++];
 
-		if (nbt>maxnbt) ISSMERROR("Not enough triangles");
+		if (nbt>maxnbt) _error_("Not enough triangles");
 
 		*tt[1]=*tt[2]=*t;
@@ -1188,5 +1188,5 @@
 
 			if (!rswap) {
-				ISSMERROR("swap the point s is on a edge");
+				_error_("swap the point s is on a edge");
 			}
 		}
@@ -1255,5 +1255,5 @@
 		//check that the mesh is not empty
 		if (nbt<=0 || nbv <=0 ) {
-			ISSMERROR("nbt or nbv is negative (Mesh empty?)");
+			_error_("nbt or nbv is negative (Mesh empty?)");
 		}
 
@@ -1276,5 +1276,5 @@
 		//check that there is no double edge
 		if (nbe !=  edge4->nb()){ 
-			ISSMERROR("Some Double edge in the mesh, the number is %i, nbe4=%i",nbe,edge4->nb()); 
+			_error_("Some Double edge in the mesh, the number is %i, nbe4=%i",nbe,edge4->nb()); 
 		}
 		//keep nbe in nbeold
@@ -1296,5 +1296,5 @@
 					//check that it is not an edge on boundary (should not already exist)
 					if (triangles[i].TriangleAdj(j) || triangles[st[k]/3].TriangleAdj((int) (st[k]%3))){
-						ISSMERROR("problem in Geometry reconstruction: an edge on boundary is duplicated (double element?)");
+						_error_("problem in Geometry reconstruction: an edge on boundary is duplicated (double element?)");
 					}
 					//OK, the element is not on boundary, is belongs to 2 triangles -> build Adjacent triangles list
@@ -1314,5 +1314,5 @@
 					printf("Edge %i of triangle %i\n",(-st[k]+2)%3,(-st[k]+2)/3);
 					printf("Edge %i of triangle %i\n",triangles[(-st[k]+2)/3].NuEdgeTriangleAdj((int)((-st[k]+2)%3)),GetId(triangles[(-st[k]+2)/3].TriangleAdj((int)((-st[k]+2)%3))));
-					ISSMERROR("An edge belongs to more than 2 triangles");
+					_error_("An edge belongs to more than 2 triangles");
 				}	
 			}
@@ -1396,5 +1396,5 @@
 			//check that we have been through all edges
 			if (k!=nbe){
-				ISSMERROR("problem in edge construction process: k!=nbe (should not happen)");
+				_error_("problem in edge construction process: k!=nbe (should not happen)");
 			}
 			//delete edgessave
@@ -1441,5 +1441,5 @@
 					//check that we have the correct vertex
 					if (v!=edges[i0 ].v[j0]){
-						ISSMERROR("v!=edges[i0 ].v[j0]: this should not happen as the vertex belongs to this edge");
+						_error_("v!=edges[i0 ].v[j0]: this should not happen as the vertex belongs to this edge");
 					}
 
@@ -1458,5 +1458,5 @@
 		//check that nbsubdomains is empty
 		if (nbsubdomains){
-			ISSMERROR("nbsubdomains should be 0");
+			_error_("nbsubdomains should be 0");
 		}
 		nbsubdomains=0;
@@ -1526,5 +1526,5 @@
 		//check that we have been through all subdomains
 		if (k!= nbsubdomains){
-			ISSMERROR("k!= nbsubdomains");
+			_error_("k!= nbsubdomains");
 		}
 		//delete colorT and st
@@ -1586,5 +1586,5 @@
 		Gh.coefIcoor= (MaxICoor)/(Max(Gh.pmax.x-Gh.pmin.x,Gh.pmax.y-Gh.pmin.y));
 		if (Gh.coefIcoor<=0){
-			ISSMERROR("Gh.coefIcoor<=0 in infered Geometry (this should not happen)");
+			_error_("Gh.coefIcoor<=0 in infered Geometry (this should not happen)");
 		}
 
@@ -1637,5 +1637,5 @@
 			k = edge4->SortAndAdd(i0,i1);
 			if (k != i){
-				ISSMERROR("problem in Edge4 construction: k != i");
+				_error_("problem in Edge4 construction: k != i");
 			}
 		}
@@ -1666,5 +1666,5 @@
 			}
 			else
-			 ISSMERROR("%i should be >=0");
+			 _error_("%i should be >=0");
 		  }
 
@@ -1700,5 +1700,5 @@
 
 		/*Check size*/
-		if (bamgopts->fieldSize[0] != nbv) ISSMERROR("'field' should have %i rows",nbv);
+		if (bamgopts->fieldSize[0] != nbv) _error_("'field' should have %i rows",nbv);
 
 		//initialization of some variables
@@ -1905,5 +1905,5 @@
 
 		/*Check size*/
-		if (bamgopts->fieldSize[0] != nbv) ISSMERROR("'field' should have %i rows",nbv);
+		if (bamgopts->fieldSize[0] != nbv) _error_("'field' should have %i rows",nbv);
 
 		//initialization of some variables
@@ -2219,5 +2219,5 @@
 				i1=GetId(edges[i][0]);
 				i2=GetId(edges[i][1]);
-				ISSMASSERT(i1>=0 && i1<nbv && i2>=0 && i2<nbv);
+				_assert_(i1>=0 && i1<nbv && i2>=0 && i2<nbv);
 				splitvertex[i1]++;
 				splitvertex[i2]++;
@@ -2229,9 +2229,9 @@
 				//The vertex cannot be marked more than twice
 				if (splitvertex[i1]==3 || splitvertex[i2]==3){
-					ISSMERROR("Crossing rifts not supported yet");
-				}
-			}
-		}
-		ISSMASSERT(k==NbCrackedEdges);
+					_error_("Crossing rifts not supported yet");
+				}
+			}
+		}
+		_assert_(k==NbCrackedEdges);
 
 		//Add new vertices
@@ -2247,5 +2247,5 @@
 				}
 			}
-			ISSMASSERT(num==NbCrackedVertices);
+			_assert_(num==NbCrackedVertices);
 		}
 		delete [] splitvertex;
@@ -2265,5 +2265,5 @@
 			Triangle* tbegin=vertices[i1].t;
 			k=vertices[i1].IndexInTriangle;//local number of i in triangle tbegin
-			ISSMASSERT(GetId((*tbegin)[k])==GetId(vertices[i1]));
+			_assert_(GetId((*tbegin)[k])==GetId(vertices[i1]));
 
 			//Now, we are going to go through the adjacent triangle that hold i1 till
@@ -2307,5 +2307,5 @@
 				//printf("%i -> %i %i %i, edge [%i->%i %i->%i]\n",element_renu[GetId(ta.t)],GetId((*ta.t)[0])+1,GetId((*ta.t)[1])+1,GetId((*ta.t)[2])+1,i1,j1,i2,j2);
 				ta = Next(ta).Adj(); 
-				if (count++>50) ISSMERROR("Maximum number of iteration exceeded");
+				if (count++>50) _error_("Maximum number of iteration exceeded");
 			}while ((tbegin != ta)); 
 		}
@@ -2314,5 +2314,5 @@
 		for(i=0;i<NbCrackedEdges;i++){
 			if (Edgeflags[i]!=2){
-				ISSMERROR("A problem occured: at least one crack edge (number %i) does not belong to 2 elements",i+1);
+				_error_("A problem occured: at least one crack edge (number %i) does not belong to 2 elements",i+1);
 			}
 		}
@@ -2364,5 +2364,5 @@
 			}
 			if (k!=0) {
-				ISSMERROR("there is %i triangles of mes = 0",k);
+				_error_("there is %i triangles of mes = 0",k);
 			}
 
@@ -2378,10 +2378,10 @@
 				if (nbswp) nbfe++;
 				if ( nbswp < 0 && k < 5){
-					ISSMERROR("Missing Edge %i, v0=%i,v1=%i",i,GetId(edges[i][0]),GetId(edges[i][1]));
+					_error_("Missing Edge %i, v0=%i,v1=%i",i,GetId(edges[i][0]),GetId(edges[i][1]));
 				}
 			}
 
 			if (k!=0) {
-				ISSMERROR("There are %i lost edges, the boundary might be crossing",k);
+				_error_("There are %i lost edges, the boundary might be crossing",k);
 			}
 			for (int j=0;j<nbv;j++){
@@ -2464,5 +2464,5 @@
 			it++;} // end while (it<nbt)
 			if (nbt == nbtout ||  !NbSubDomTot) {
-				ISSMERROR("The boundary is not close: all triangles are outside");
+				_error_("The boundary is not close: all triangles are outside");
 			}
 
@@ -2501,5 +2501,5 @@
 						it++;} // end white (it<nbt)
 						if (k!=nbsubdomains){
-							ISSMERROR("k!=nbsubdomains");
+							_error_("k!=nbsubdomains");
 						}
 						if(OutSide) 
@@ -2571,5 +2571,5 @@
 					// see routine MakeGeomEdgeToEdge
 					Edge &e = *GeomEdgetoEdge[Gh.GetId(eg)];
-					ISSMASSERT(&e);
+					_assert_(&e);
 					BamgVertex * v0 =  e(0),*v1 = e(1);
 					Triangle *t  = v0->t;
@@ -2579,10 +2579,10 @@
 					subdomains[i].direction = direction;
 					subdomains[i].edge = &e;
-					ISSMASSERT(t && direction);
+					_assert_(t && direction);
 
 					AdjacentTriangle  ta(t,EdgesVertexTriangle[v0->IndexInTriangle][0]);// previous edges
 
 					while (1) {
-						ISSMASSERT(v0==ta.EdgeVertex(1));
+						_assert_(v0==ta.EdgeVertex(1));
 						if (ta.EdgeVertex(0) == v1) { // ok we find the edge
 							if (direction>0)  
@@ -2591,5 +2591,5 @@
 							 subdomains[i].head=t=ta;
 							if(t<triangles || t >= triangles+nbt || t->det < 0 || t->link == 0) {
-								ISSMERROR("bad definition of SubSomain %i",i);
+								_error_("bad definition of SubSomain %i",i);
 							}
 							long it = GetId(t);
@@ -2606,5 +2606,5 @@
 								kkk++;
 								if (mark[GetId(tt)]>=0){
-									ISSMERROR("mark[GetId(tt)]>=0");
+									_error_("mark[GetId(tt)]>=0");
 								}
 								mark[GetId(tt)]=i;
@@ -2615,5 +2615,5 @@
 						ta = Previous(Adj(ta));         
 						if(t == (Triangle *) ta) {
-							ISSMERROR("bad definition of SubSomain %i",i);
+							_error_("bad definition of SubSomain %i",i);
 						}
 					}
@@ -2702,9 +2702,9 @@
 		if (maxnbv_in) {
 			vertices=new BamgVertex[maxnbv];
-			ISSMASSERT(vertices);
+			_assert_(vertices);
 			orderedvertices=new (BamgVertex* [maxnbv]);
-			ISSMASSERT(orderedvertices);
+			_assert_(orderedvertices);
 			triangles=new Triangle[maxnbt];
-			ISSMASSERT(triangles);
+			_assert_(triangles);
 		}
 		else {
@@ -2777,5 +2777,5 @@
 			//if i is higher than nbv, it means that all the determinants are 0,
 			//all vertices are aligned!
-			if  (++i>=nbv) ISSMERROR("all the vertices are aligned");
+			if  (++i>=nbv) _error_("all the vertices are aligned");
 		}
 		// exchange i et 2 in "orderedvertices" so that
@@ -2913,5 +2913,5 @@
 				long  j=vj.ReferenceNumber; 
 				if (&vj!=orderedvertices[j]){
-					ISSMERROR("&vj!= orderedvertices[j]");
+					_error_("&vj!= orderedvertices[j]");
 				}
 				if(i!=j){ 
@@ -2923,5 +2923,5 @@
 				if (tcvj && !tcvj->link){
 					tcvj->Echo();
-					ISSMERROR("problem inserting point in InsertNewPoints (tcvj=%p and tcvj->link=%i)",tcvj,tcvj->link);
+					_error_("problem inserting point in InsertNewPoints (tcvj=%p and tcvj->link=%i)",tcvj,tcvj->link);
 				}
 				quadtree->Add(vj);
@@ -2955,5 +2955,5 @@
 
 		if (!Gh.nbe){
-			ISSMERROR("!Gh.nbe");
+			_error_("!Gh.nbe");
 		}
 		Edge **e= new (Edge* [Gh.nbe]);
@@ -2988,5 +2988,5 @@
 			}
 		}
-		if(kk) ISSMERROR("See above");
+		if(kk) _error_("See above");
 
 		return e;
@@ -3187,5 +3187,5 @@
 				//check i
 				if (i<0 || i>=nbt ){
-					ISSMERROR("Index problem in NewPoints (i=%i not in [0 %i])",i,nbt-1);
+					_error_("Index problem in NewPoints (i=%i not in [0 %i])",i,nbt-1);
 				}
 				//change first_np_or_next_t[i]
@@ -3238,5 +3238,5 @@
 					}
 					if (ta.EdgeVertex(0)!=s){
-						ISSMERROR("ta.EdgeVertex(0)!=s");
+						_error_("ta.EdgeVertex(0)!=s");
 					}
 					ta = Next(Adj(ta));
@@ -3278,5 +3278,5 @@
 		}
 		else {
-			ISSMERROR("ProjectOnCurve On BamgVertex %i forget call to SetVertexFieldOnBTh",BTh.GetId(vA));
+			_error_("ProjectOnCurve On BamgVertex %i forget call to SetVertexFieldOnBTh",BTh.GetId(vA));
 		} 
 
@@ -3289,9 +3289,9 @@
 		}
 		else {
-			ISSMERROR("ProjectOnCurve On BamgVertex %i forget call to SetVertexFieldOnBTh",BTh.GetId(vB));
+			_error_("ProjectOnCurve On BamgVertex %i forget call to SetVertexFieldOnBTh",BTh.GetId(vB));
 		} 
 		Edge * e = &BhAB;
 		if (!pA || !pB || !e){
-			ISSMERROR("!pA || !pB || !e");
+			_error_("!pA || !pB || !e");
 		}
 		// be carefull the back ground edge e is on same geom edge 
@@ -3299,5 +3299,5 @@
 		//check Is a background Mesh;   
 		if (e<BTh.edges || e>=BTh.edges+BTh.nbe){
-			ISSMERROR("e<BTh.edges || e>=BTh.edges+BTh.nbe");
+			_error_("e<BTh.edges || e>=BTh.edges+BTh.nbe");
 		}
 		// walk on BTh edge 
@@ -3322,5 +3322,5 @@
 		  } 
 		else{ // do the search by walking 
-			ISSMERROR("case not supported yet");
+			_error_("case not supported yet");
 		  }
 
@@ -3350,6 +3350,6 @@
 
 				kkk=kkk+1;
-				ISSMASSERT(kkk<100);
-				ISSMASSERT(eee);
+				_assert_(kkk<100);
+				_assert_(eee);
 				double lg0 = lg;
 				double dp = LengthInterpole(v0->m,v1->m,(R2) *v1 - (R2) *v0);
@@ -3358,5 +3358,5 @@
 					double sss  =   (abscisse-lg0)/dp;
 					double thetab = te0*(1-sss)+ sss*iii;
-					ISSMASSERT(thetab>=0 && thetab<=1);
+					_assert_(thetab>=0 && thetab<=1);
 					BR = VertexOnEdge(&R,eee,thetab);
 					return  Gh.ProjectOnCurve(*eee,thetab,R,GR);
@@ -3369,5 +3369,5 @@
 
 				double lg0 = lg;
-				ISSMASSERT(eee);
+				_assert_(eee);
 				v1 = pvB;
 				double dp = LengthInterpole(v0->m,v1->m,(R2) *v1 - (R2) *v0);
@@ -3378,5 +3378,5 @@
 					double sss  =   (abscisse-lg0)/dp;
 					double thetab = te0*(1-sss)+ sss*tB;
-					ISSMASSERT(thetab>=0 && thetab<=1);
+					_assert_(thetab>=0 && thetab<=1);
 					BR = VertexOnEdge(&R,eee,thetab);
 					return  Gh.ProjectOnCurve(*eee,thetab,R,GR);
@@ -3386,5 +3386,5 @@
 
 		  }
-		ISSMERROR("Big bug...");
+		_error_("Big bug...");
 		return 0; // just for the compiler 
 	}                  
@@ -3412,5 +3412,5 @@
 
 	//initialize orderedvertices
-	ISSMASSERT(orderedvertices);
+	_assert_(orderedvertices);
 	for (i=0;i<nbv;i++) orderedvertices[i]=0;
 
@@ -3427,5 +3427,5 @@
 	}
 	if (kk != nbe){ 
-		ISSMERROR("There are %i double edges in the mesh",kk-nbe);
+		_error_("There are %i double edges in the mesh",kk-nbe);
 	}
 
@@ -3446,6 +3446,6 @@
 			//If the edge already exists, add adjacency
 			else if(st[k]>=0) {
-				ISSMASSERT(!triangles[i].TriangleAdj(j));
-				ISSMASSERT(!triangles[st[k]/3].TriangleAdj((int) (st[k]%3)));
+				_assert_(!triangles[i].TriangleAdj(j));
+				_assert_(!triangles[st[k]/3].TriangleAdj((int) (st[k]%3)));
 
 				triangles[i].SetAdj2(j,triangles+st[k]/3,(int)(st[k]%3));
@@ -3459,5 +3459,5 @@
 			//An edge belongs to 2 triangles
 			else {
-				ISSMERROR("The edge (%i , %i) belongs to more than 2 triangles",GetId(triangles[i][VerticesOfTriangularEdge[j][0]]),GetId(triangles[i][VerticesOfTriangularEdge[j][1]]));
+				_error_("The edge (%i , %i) belongs to more than 2 triangles",GetId(triangles[i][VerticesOfTriangularEdge[j][0]]),GetId(triangles[i][VerticesOfTriangularEdge[j][1]]));
 			}
 		}
@@ -3497,5 +3497,5 @@
 	}
 	if(k) {
-		ISSMERROR("%i boundary edges (from the geometry) are not defined as mesh edges",k);
+		_error_("%i boundary edges (from the geometry) are not defined as mesh edges",k);
 	}
 
@@ -3524,5 +3524,5 @@
 	for (i=2;det(orderedvertices[0]->i,orderedvertices[1]->i,orderedvertices[i]->i)==0;) 
 	 if  (++i>=nbvb) {
-		 ISSMERROR("ReconstructExistingMesh: All the vertices are aligned");
+		 _error_("ReconstructExistingMesh: All the vertices are aligned");
 	 }
 	//Move this vertex (i) to the 2d position in orderedvertices
@@ -3584,5 +3584,5 @@
 	}
 	if(nbloss) {
-		ISSMERROR("we lost %i existing edges other %i",nbloss,knbe);
+		_error_("we lost %i existing edges other %i",nbloss,knbe);
 	}
 
@@ -3605,5 +3605,5 @@
 					long k =edge4->SortAndAdd(v0?GetId(v0):nbv,v1? GetId(v1):nbv);
 
-					ISSMASSERT(st[k]>=0);
+					_assert_(st[k]>=0);
 					tta.SetAdj2(ja,savetriangles + st[k] / 3,(int) (st[k]%3));
 					ta.SetLock();
@@ -3623,5 +3623,5 @@
 		}
 	}
-	ISSMASSERT(savenbt+NbTfillHoll<=savemaxnbt);
+	_assert_(savenbt+NbTfillHoll<=savemaxnbt);
 
 	// copy of the outside triangles in saveMesh 
@@ -3659,5 +3659,5 @@
 	subdomains = savesubdomains;
 	if (k) {
-		ISSMERROR("number of triangles edges alone = %i",k);
+		_error_("number of triangles edges alone = %i",k);
 	}
 	FindSubDomain();
@@ -3689,5 +3689,5 @@
 
 						printf("This edge is on geometry and has no adjacent edge (open curve) and one of the tip is not required\n");
-						ISSMERROR("See above (might be cryptic...)");
+						_error_("See above (might be cryptic...)");
 					}
 				}
@@ -3712,13 +3712,13 @@
 			t=t0=subdomains[i].head;
 			if (!t0){ // not empty sub domain
-				ISSMERROR("!t0");
+				_error_("!t0");
 			}
 			do { 
 				long kt = GetId(t);
 				if (kt<0 || kt >= nbt ){
-					ISSMERROR("kt<0 || kt >= nbt");
+					_error_("kt<0 || kt >= nbt");
 				}
 				if (renu[kt]!=-1){
-					ISSMERROR("renu[kt]!=-1");
+					_error_("renu[kt]!=-1");
 				}
 				renu[kt]=k++;
@@ -3737,5 +3737,5 @@
 		}
 		if (k != nbt){
-			ISSMERROR("k != nbt");
+			_error_("k != nbt");
 		}
 		// do the change on all the pointeur 
@@ -3863,5 +3863,5 @@
 	coefIcoor= (MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y));
 	if (coefIcoor<=0){
-		ISSMERROR("coefIcoor should be positive, a problem in the geometry is likely");
+		_error_("coefIcoor should be positive, a problem in the geometry is likely");
 	}
 
@@ -3899,5 +3899,5 @@
 	}
 
-	if (number_of_errors) ISSMERROR("Fatal error: some triangles have negative areas, see above");
+	if (number_of_errors) _error_("Fatal error: some triangles have negative areas, see above");
 }
 /*}}}1*/
@@ -4080,5 +4080,5 @@
 			register Triangle* t= vertices[i].t;
 			if (!t){
-				ISSMERROR("!t");
+				_error_("!t");
 			}
 			BamgVertex & vi = vertices[i];
@@ -4088,5 +4088,5 @@
 				ta=Previous(Adj(ta));
 				if (vertices+i != ta.EdgeVertex(1)){
-					ISSMERROR("vertices+i != ta.EdgeVertex(1)");
+					_error_("vertices+i != ta.EdgeVertex(1)");
 				}
 				BamgVertex & vj = *(ta.EdgeVertex(0));
@@ -4094,5 +4094,5 @@
 					j= &vj-vertices;
 					if (j<0 || j >= nbv){
-						ISSMERROR("j<0 || j >= nbv");
+						_error_("j<0 || j >= nbv");
 					}
 					R2 Aij = (R2) vj - (R2) vi;
@@ -4218,5 +4218,5 @@
 					// the first PB is to now a background edge between the 2 vertices
 					if (!edgesGtoB){
-						ISSMERROR("!edgesGtoB");
+						_error_("!edgesGtoB");
 					}
 					ong= ProjectOnCurve(*edgesGtoB[Gh.GetId(edges[i].GeomEdgeHook)],
@@ -4290,5 +4290,5 @@
 			Triangle & t = triangles[i];
 			if (!t.link){
-				ISSMERROR("!t.link");
+				_error_("!t.link");
 			}
 			for(int j=0;j<3;j++)
@@ -4317,5 +4317,5 @@
 										||   (cc=Area2( t[0].r , t[1].r , A.r    )) < 0.0)){
 							printf("%i not in triangle %i In= %i %g %g %g %g\n",ke + nbvold,i,!!t.link,aa,bb,cc,dd);
-							ISSMERROR("Number of triangles with P2 interpolation Problem");
+							_error_("Number of triangles with P2 interpolation Problem");
 						}
 					}
@@ -4325,5 +4325,5 @@
 										||   (cc=Area2( tt[0].r , tt[1].r , A.r     )) < 0)){
 							printf("%i not in triangle %i In= %i %g %g %g %g\n",ke + nbvold,ii,!!tt.link,aa,bb,cc,dd);
-							ISSMERROR("Number of triangles with P2 interpolation Problem");
+							_error_("Number of triangles with P2 interpolation Problem");
 						}
 					} 
@@ -4373,5 +4373,5 @@
 						  } // tt 
 						else
-						 ISSMERROR("Bug...");
+						 _error_("Bug...");
 					  } // ke<0	       
 					else
@@ -4386,5 +4386,5 @@
 			  } 
 			if (nbinvisible>=2){
-				ISSMERROR("nbinvisible>=2");
+				_error_("nbinvisible>=2");
 			}
 			switch (nbsplitedge) {
@@ -4398,5 +4398,5 @@
 			} 
 			if (ksplit[i]<40){
-				ISSMERROR("ksplit[i]<40");
+				_error_("ksplit[i]<40");
 			}
 		  }
@@ -4415,5 +4415,5 @@
 			int  ke=(int) (ksplit[i]%10);
 			if (kk>=7 || kk<=0){
-				ISSMERROR("kk>=7 || kk<=0");
+				_error_("kk>=7 || kk<=0");
 			}
 
@@ -4432,5 +4432,5 @@
 
 			if (nbmkadj>=10){
-				ISSMERROR("nbmkadj>=10");
+				_error_("nbmkadj>=10");
 			}
 			// --------------------------
@@ -4450,5 +4450,5 @@
 							t1=t0;
 							if (kedge[3*i+i0]<0){
-								ISSMERROR("kedge[3*i+i0]<0");
+								_error_("kedge[3*i+i0]<0");
 							}
 							BamgVertex * v3 = vertices + kedge[3*i+k0];
@@ -4466,8 +4466,8 @@
 							t2=t1=t0;
 							if (kedge[3*i+k1]<0){
-								ISSMERROR("kedge[3*i+k1]<0");
+								_error_("kedge[3*i+k1]<0");
 							}
 							if (kedge[3*i+k2]<0){
-								ISSMERROR("kedge[3*i+k2]<0");
+								_error_("kedge[3*i+k2]<0");
 							}
 
@@ -4493,5 +4493,5 @@
 							t3=t2=t1=t0;
 							if (kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0){
-								ISSMERROR("kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0");
+								_error_("kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0");
 							}
 							BamgVertex * v12 = vertices + kedge[3*i+k0];
@@ -4567,5 +4567,5 @@
 				}
 			if (nbmkadj>13){// 13 = 6 + 4 +
-				ISSMERROR("nbmkadj>13");
+				_error_("nbmkadj>13");
 			}
 
@@ -4693,5 +4693,5 @@
 			quadtree->Add(vi);
 			if (!tcvi || tcvi->det<0){// internal
-				ISSMERROR("!tcvi || tcvi->det < 0");
+				_error_("!tcvi || tcvi->det < 0");
 			}
 			AddVertex(vi,tcvi,det3);
@@ -4737,5 +4737,5 @@
 
 		/*Check that the quadtree does exist*/
-		if (!quadtree) ISSMERROR("no starting triangle provided and no quadtree available");
+		if (!quadtree) _error_("no starting triangle provided and no quadtree available");
 
 		/*Call NearestVertex*/
@@ -4743,11 +4743,11 @@
 
 		/*Check output (Vertex a)*/
-		if (!a)    ISSMERROR("problem while trying to find nearest vertex from a given point. No output found");
-		if (!a->t) ISSMERROR("no triangle is associated to vertex number %i (orphan?)",GetId(a)+1);
-		ISSMASSERT(a>=vertices && a<vertices+nbv);
+		if (!a)    _error_("problem while trying to find nearest vertex from a given point. No output found");
+		if (!a->t) _error_("no triangle is associated to vertex number %i (orphan?)",GetId(a)+1);
+		_assert_(a>=vertices && a<vertices+nbv);
 
 		/*Get starting triangle*/
 		t = a->t;
-		ISSMASSERT(t>=triangles && t<triangles+nbt);
+		_assert_(t>=triangles && t<triangles+nbt);
 	}
 
@@ -4762,5 +4762,5 @@
 		/*Get a real vertex from this triangle (k0)*/
 		int k0=(*t)(0)?(((*t)(1)?((*t)(2)?-1:2):1)):0;
-		ISSMASSERT(k0>=0);// k0 the NULL vertex
+		_assert_(k0>=0);// k0 the NULL vertex
 		int k1=NextVertex[k0],k2=PreviousVertex[k0];
 		det3[k0]=det(B,(*t)[k1],(*t)[k2]);
@@ -4770,5 +4770,5 @@
 		t = t->TriangleAdj(OppositeEdge[k0]);
 		counter++;
-		ISSMASSERT(counter<2);
+		_assert_(counter<2);
 	}
 
@@ -4779,5 +4779,5 @@
 
 		/*Increase counter*/
-		if (++counter>=10000) ISSMERROR("Maximum number of iteration reached (threshold = %i).",counter);
+		if (++counter>=10000) _error_("Maximum number of iteration reached (threshold = %i).",counter);
 
 		j= OppositeVertex[jj];
@@ -4799,5 +4799,5 @@
 		if (k==0) break;
 		if (k==2 && BinaryRand()) Exchange(ii[0],ii[1]);
-		ISSMASSERT(k<3);
+		_assert_(k<3);
 		AdjacentTriangle t1 = t->Adj(jj=ii[0]);
 		if ((t1.det() < 0 ) && (k == 2))
@@ -4843,5 +4843,5 @@
 
 		//check that the subdomain is not empty
-		if (!t0){ ISSMERROR("At least one subdomain is empty");}
+		if (!t0){ _error_("At least one subdomain is empty");}
 
 		//loop
@@ -4853,5 +4853,5 @@
 
 			//check that num is in [0 nbt[
-			ISSMASSERT(num>=0 && num<nbt);
+			_assert_(num>=0 && num<nbt);
 
 			//reft of this triangle is the subdomain number
@@ -4899,6 +4899,6 @@
 		//allocate
 		VerticesOnGeomVertex = new VertexOnGeom[NbVerticesOnGeomVertex];  
-		if(NbVerticesOnGeomVertex >= maxnbv) ISSMERROR("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,maxnbv);
-		ISSMASSERT(nbv==0);
+		if(NbVerticesOnGeomVertex >= maxnbv) _error_("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,maxnbv);
+		_assert_(nbv==0);
 		//Build VerticesOnGeomVertex
 		for (i=0;i<Gh.nbv;i++){
@@ -4907,5 +4907,5 @@
 
 				//Add the vertex
-				ISSMASSERT(nbv<maxnbv);
+				_assert_(nbv<maxnbv);
 				vertices[nbv]=Gh[i];
 				
@@ -4924,5 +4924,5 @@
 
 		//check that edges is still empty (Init)
-		ISSMASSERT(!edges);
+		_assert_(!edges);
 
 		/* Now we are going to create the first edges corresponding
@@ -4968,5 +4968,5 @@
 
 									//check that edges has been allocated
-									ISSMASSERT(edges);
+									_assert_(edges);
 									edges[nbe].v[0]=a->MeshVertexHook;
 									edges[nbe].v[1]=b->MeshVertexHook;;
@@ -4988,5 +4988,5 @@
 								NbNewPoints=0;
 								NbEdgeCurve=0;
-								if (nbvend>=maxnbv) ISSMERROR("maximum number of vertices too low! Check the domain outline or increase maxnbv");
+								if (nbvend>=maxnbv) _error_("maximum number of vertices too low! Check the domain outline or increase maxnbv");
 								lcurve =0;
 								s = lstep; //-1 initially, then length of each sub edge
@@ -5071,5 +5071,5 @@
 											 kk0=kkk,ll0=llk;
 										}
-										ISSMASSERT(kk1!=kk0);
+										_assert_(kk1!=kk0);
 
 										/*Curvilinear coordinate in [0 1] of ss in current edge*/
@@ -5115,5 +5115,5 @@
 									k = e->AdjVertexIndex[kprev];// next vertices
 									e = e->Adj[kprev];
-									ISSMASSERT(e);
+									_assert_(e);
 								}// for(;;)
 								vb = b->MeshVertexHook;
@@ -5146,6 +5146,6 @@
 			} // for (i=0;i<nbe;i++)
 			if(!step) {
-				ISSMASSERT(!edges);
-				ISSMASSERT(!VerticesOnGeomEdge);
+				_assert_(!edges);
+				_assert_(!VerticesOnGeomEdge);
 
 				edges = new Edge[nbex=nbe];
@@ -5153,9 +5153,9 @@
 
 				// do the vertex on a geometrical vertex
-				ISSMASSERT(VerticesOnGeomEdge || NbVerticesOnGeomEdge0==0);
+				_assert_(VerticesOnGeomEdge || NbVerticesOnGeomEdge0==0);
 				NbVerticesOnGeomEdge0 = NbVerticesOnGeomEdge;       
 			}
 			else{
-				ISSMASSERT(NbVerticesOnGeomEdge==NbVerticesOnGeomEdge0);
+				_assert_(NbVerticesOnGeomEdge==NbVerticesOnGeomEdge0);
 			}
 		}
@@ -5207,5 +5207,5 @@
 
 		//Check that background mesh and current mesh do have the same geometry
-		ISSMASSERT(&BTh.Gh==&Gh);
+		_assert_(&BTh.Gh==&Gh);
 		BTh.NbRef++; // add a ref to BackGround Mesh
 
@@ -5228,5 +5228,5 @@
 		int i; 
 		for (i=0;i<Gh.nbv;i++) if (Gh[i].Required()) NbVerticesOnGeomVertex++;
-		if(NbVerticesOnGeomVertex >= maxnbv) { ISSMERROR("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,maxnbv);}
+		if(NbVerticesOnGeomVertex >= maxnbv) { _error_("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,maxnbv);}
 
 		VerticesOnGeomVertex = new VertexOnGeom[  NbVerticesOnGeomVertex];
@@ -5234,5 +5234,5 @@
 
 		//At this point there is NO vertex but vertices should have been allocated by Init
-		ISSMASSERT(vertices);
+		_assert_(vertices);
 		for (i=0;i<Gh.nbv;i++){
 			if (Gh[i].Required()) {//Gh vertices Required
@@ -5250,10 +5250,10 @@
 				GeomVertex* gv=vog;
 				BamgVertex *bv = vog;
-				ISSMASSERT(gv->MeshVertexHook); // use of Geom -> Th
+				_assert_(gv->MeshVertexHook); // use of Geom -> Th
 				VertexOnBThVertex[NbVertexOnBThVertex++]=VertexOnVertex(gv->MeshVertexHook,bv);
 				gv->MeshVertexHook->m = bv->m; // for taking the metrix of the background mesh
 			}
 		}
-		ISSMASSERT(NbVertexOnBThVertex==NbVerticesOnGeomVertex);
+		_assert_(NbVertexOnBThVertex==NbVerticesOnGeomVertex);
 
 		/*STEP 2: reseed boundary edges*/
@@ -5296,5 +5296,5 @@
 			}
 		} 
-		if (bfind!=Gh.nbcurves) ISSMERROR("problem generating number of curves (%i found in the geometry but %i curve found in the mesh)",Gh.nbcurves,bfind);
+		if (bfind!=Gh.nbcurves) _error_("problem generating number of curves (%i found in the geometry but %i curve found in the mesh)",Gh.nbcurves,bfind);
 
 		// method in 2 + 1 step 
@@ -5358,5 +5358,5 @@
 
 					// New Curve phase 
-					ISSMASSERT(A0-vertices>=0 && A0-vertices<nbv);
+					_assert_(A0-vertices>=0 && A0-vertices<nbv);
 					if(ongequi->Required()){
 						GeomVertex *GA1 = *(*peequi)[1-k0equi].GeomEdgeHook;
@@ -5369,5 +5369,5 @@
 							k1 = 1-k0; // next vertex of the edge 
 							k1equi= 1 - k0equi;
-							ISSMASSERT(pe && ee.GeomEdgeHook);
+							_assert_(pe && ee.GeomEdgeHook);
 							ee.GeomEdgeHook->SetMark();
 							BamgVertex & v0=ee[0], & v1=ee[1];
@@ -5382,9 +5382,9 @@
 
 									//some checks
-									ISSMASSERT(sNew>=L0);
-									ISSMASSERT(LAB);
-									ISSMASSERT(vertices && nbv<maxnbv);
-									ISSMASSERT(edges && nbe<nbex);
-									ISSMASSERT(VerticesOnGeomEdge && NbVerticesOnGeomEdge<NbVerticesOnGeomEdgex);
+									_assert_(sNew>=L0);
+									_assert_(LAB);
+									_assert_(vertices && nbv<maxnbv);
+									_assert_(edges && nbe<nbex);
+									_assert_(VerticesOnGeomEdge && NbVerticesOnGeomEdge<NbVerticesOnGeomEdgex);
 
 									// new vertex on edge
@@ -5394,9 +5394,9 @@
 									double se= (sNew-L0)/LAB;
 									if (se<0 || se>=1.000000001){
-										ISSMERROR("Problem creating point on a boundary: se=%g should be in [0 1]",se);
+										_error_("Problem creating point on a boundary: se=%g should be in [0 1]",se);
 									}
 									se = abscisseInterpole(v0.m,v1.m,AB,se,1);
 									if (se<0 || se>1){
-										ISSMERROR("Problem creating point on a boundary: se=%g should be in [0 1]",se);
+										_error_("Problem creating point on a boundary: se=%g should be in [0 1]",se);
 									}
 									se = k1         ? se : 1. - se;
@@ -5421,14 +5421,14 @@
 
 							//some checks
-							ISSMASSERT(ee.GeomEdgeHook->CurveNumber==ei.GeomEdgeHook->CurveNumber);
+							_assert_(ee.GeomEdgeHook->CurveNumber==ei.GeomEdgeHook->CurveNumber);
 							if (ee[k1].GeomEdgeHook->IsRequiredVertex()) {
-								ISSMASSERT(eeequi[k1equi].GeomEdgeHook->IsRequiredVertex());
+								_assert_(eeequi[k1equi].GeomEdgeHook->IsRequiredVertex());
 								register GeomVertex * GA1 = *eeequi[k1equi].GeomEdgeHook;
 								A1=GA1->MeshVertexHook;// the vertex in new mesh
-								ISSMASSERT(A1-vertices>=0 && A1-vertices<nbv);
+								_assert_(A1-vertices>=0 && A1-vertices<nbv);
 								break;
 							}
 							if (!ee.adj[k1]) {
-								ISSMERROR(" adj edge %i, nbe=%i, Gh.vertices=%i",BTh.GetId(ee),nbe,Gh.vertices);
+								_error_(" adj edge %i, nbe=%i, Gh.vertices=%i",BTh.GetId(ee),nbe,Gh.vertices);
 							}
 							pe = ee.adj[k1]; // next edge
@@ -5451,5 +5451,5 @@
 						PreviousNewEdge = e;
 
-						ISSMASSERT(i==NbCreatePointOnCurve);
+						_assert_(i==NbCreatePointOnCurve);
 					}
 
@@ -5468,5 +5468,5 @@
 			if(step==0){
 				if(nbv+NbOfNewPoints > maxnbv) {
-					ISSMERROR("too many vertices on geometry: %i >= %i",nbv+NbOfNewPoints,maxnbv);
+					_error_("too many vertices on geometry: %i >= %i",nbv+NbOfNewPoints,maxnbv);
 				}
 				edges = new Edge[NbOfNewEdge];
@@ -5482,5 +5482,5 @@
 			}
 		}
-		ISSMASSERT(nbe!=0);
+		_assert_(nbe!=0);
 		delete [] bcurve;
 
@@ -5513,5 +5513,5 @@
 		int dir=0;
 		if (k<0){
-			ISSMERROR("k<0");
+			_error_("k<0");
 		}
 		int kkk=0;  
@@ -5521,5 +5521,5 @@
 			kkk++;
 			if (kkk>=1000){
-				ISSMERROR("kkk>=1000");
+				_error_("kkk>=1000");
 			}
 			BamgVertex  &vI =  *edge.EdgeVertex(0);
@@ -5538,5 +5538,5 @@
 							double IJ2 = IJ_IA + IJ_AJ;
 							if (IJ2==0){
-								ISSMERROR("IJ2==0");
+								_error_("IJ2==0");
 							}
 							a= IJ_AJ/IJ2;
@@ -5556,5 +5556,5 @@
 		//   int dir=0;
 		if (t->link != 0){
-			ISSMERROR("t->link != 0");
+			_error_("t->link != 0");
 		}
 		// to have a starting edges 
@@ -5628,5 +5628,5 @@
 		  }
 		if (cas ==-2){
-			ISSMERROR("cas==-2");
+			_error_("cas==-2");
 		}
 		// l1 = ||C s1||  , l0 = ||C s0||
@@ -5645,5 +5645,5 @@
 				kkk++;
 				if (edge.EdgeVertex(0)!=s && kkk>=10000){
-					ISSMERROR("edge.EdgeVertex(0)!=s && kkk>=10000");
+					_error_("edge.EdgeVertex(0)!=s && kkk>=10000");
 				}
 
@@ -5677,5 +5677,5 @@
 
 			if (!(Triangle *) er){
-				ISSMERROR("!(Triangle *) er");
+				_error_("!(Triangle *) er");
 			}
 			I2 A((I2)*er.EdgeVertex(0));
@@ -5701,5 +5701,5 @@
 	int NbSwap =0;
 	if (!a.t || !b.t){ // the 2 vertex is in a mesh
-		ISSMERROR("!a.t || !b.t");
+		_error_("!a.t || !b.t");
 	}
 	int k=0;
@@ -5718,5 +5718,5 @@
 		vbegin =v2;
 		if (!v2){
-			ISSMERROR("!v2");
+			_error_("!v2");
 		}
 		det2 = det(*v2,a,b);
@@ -5735,10 +5735,10 @@
 			tc = Previous(tc);
 			if (!v1 || !v2){
-				ISSMERROR("!v1 || !v2");
+				_error_("!v1 || !v2");
 			}
 			Icoor2 detss = 0,l=0,ks;
 			while ((ks=SwapForForcingEdge(  va,  vb, tc, detss, det1,det2,NbSwap)))
 			 if(l++ > 10000000) {
-				 ISSMERROR("Loop in forcing Egde, nb de swap=%i, nb of try swap (%i) too big",NbSwap,l);
+				 _error_("Loop in forcing Egde, nb de swap=%i, nb of try swap (%i) too big",NbSwap,l);
 			 }
 			BamgVertex *aa = tc.EdgeVertex(0), *bb = tc.EdgeVertex(1);
@@ -5759,5 +5759,5 @@
 		k++;
 		if (k>=2000){
-			ISSMERROR("k>=2000");
+			_error_("k>=2000");
 		}
 		if ( vbegin == v2 ) return -1;// error 
@@ -5831,5 +5831,5 @@
 		short a1=tt1,a2=tt2;// les 2 numero de l arete dans les 2 triangles
 		if ( a1<0 || a1>=3 ){
-			ISSMERROR("a1<0 || a1>=3");
+			_error_("a1<0 || a1>=3");
 		}
 
@@ -5843,8 +5843,8 @@
 		Icoor2 detT = det1+det2;
 		if ((det1<=0 ) || (det2<=0)){
-			ISSMERROR("(det1<=0 ) || (det2<=0)");
+			_error_("(det1<=0 ) || (det2<=0)");
 		}
 		if ( (detsa>=0) || (detsb<=0) ){ // [a,b] cut infinite line va,bb
-			ISSMERROR("(detsa>=0) || (detsb<=0)");
+			_error_("(detsa>=0) || (detsb<=0)");
 		}
 		Icoor2 ndet1 = bamg::det(s1,sa,s2);
Index: /issm/trunk/src/c/objects/Bamg/Metric.cpp
===================================================================
--- /issm/trunk/src/c/objects/Bamg/Metric.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Bamg/Metric.cpp	(revision 6412)
@@ -201,5 +201,5 @@
 		// warning for optimisation S is in [0:0.5] not in [0:1]
 		if (i>=512){
-			ISSMERROR("i>=512");
+			_error_("i>=512");
 		}
 		LastMetricInterpole.lab=l;
@@ -345,5 +345,5 @@
 		  }
 		if (r>1 || r<0){
-			ISSMERROR("r>1 || r<0");
+			_error_("r>1 || r<0");
 		}
 		return r ;
Index: /issm/trunk/src/c/objects/Bamg/QuadTree.cpp
===================================================================
--- /issm/trunk/src/c/objects/Bamg/QuadTree.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Bamg/QuadTree.cpp	(revision 6412)
@@ -126,5 +126,5 @@
 
 		/*Check Sizes*/
-		ISSMASSERT(MaxISize>MaxICoor);
+		_assert_(MaxISize>MaxICoor);
 
 		/*Add all vertices of the mesh*/
@@ -180,5 +180,5 @@
 
 		/*check that l is not 0 (this should not happen as MaxDeep = 30)*/
-		ISSMASSERT(level>0);
+		_assert_(level>0);
 
 		/*Now, try to add the vertex, if the subbox is full (nbitems=4), we have to divide it
Index: /issm/trunk/src/c/objects/Bamg/QuadTree.h
===================================================================
--- /issm/trunk/src/c/objects/Bamg/QuadTree.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Bamg/QuadTree.h	(revision 6412)
@@ -29,13 +29,13 @@
 					};
 					/*Object functions*/
-					void  Echo(){ISSMERROR("not implemented yet");};
-					void  DeepEcho(){ISSMERROR("not implemented yet");};
-					int   Id(){ISSMERROR("not implemented yet");};
-					int   MyRank(){ISSMERROR("not implemented yet");};
-					void  Marshall(char** pmarshalled_dataset){ISSMERROR("not implemented yet");};
-					int   MarshallSize(){ISSMERROR("not implemented yet");};
-					void  Demarshall(char** pmarshalled_dataset){ISSMERROR("not implemented yet");};
-					int   Enum(){ISSMERROR("not implemented yet");};
-					Object* copy(){ISSMERROR("not implemented yet");};
+					void  Echo(){_error_("not implemented yet");};
+					void  DeepEcho(){_error_("not implemented yet");};
+					int   Id(){_error_("not implemented yet");};
+					int   MyRank(){_error_("not implemented yet");};
+					void  Marshall(char** pmarshalled_dataset){_error_("not implemented yet");};
+					int   MarshallSize(){_error_("not implemented yet");};
+					void  Demarshall(char** pmarshalled_dataset){_error_("not implemented yet");};
+					int   Enum(){_error_("not implemented yet");};
+					Object* copy(){_error_("not implemented yet");};
 			};
 
Index: /issm/trunk/src/c/objects/Bamg/SetOfE4.cpp
===================================================================
--- /issm/trunk/src/c/objects/Bamg/SetOfE4.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Bamg/SetOfE4.cpp	(revision 6412)
@@ -34,5 +34,5 @@
 
 		//get n from h (usually h=ii)
-		ISSMASSERT(head);
+		_assert_(head);
 		n=head[h=Abs(ii)%nx];
 
@@ -50,5 +50,5 @@
 		//check that nbax <=NbOfEdges
 		if (nbax <=NbOfEdges ) {
-			ISSMERROR("SetOfEdges4::add overflow: NbOfEdges=%i > nbax=%i",NbOfEdges,nbax);
+			_error_("SetOfEdges4::add overflow: NbOfEdges=%i > nbax=%i",NbOfEdges,nbax);
 		}
 
@@ -69,5 +69,5 @@
 
 		//check that head is not empty
-		ISSMASSERT(head);
+		_assert_(head);
 
 		//get n from h (usually h=ii)
Index: /issm/trunk/src/c/objects/Bamg/SubDomain.cpp
===================================================================
--- /issm/trunk/src/c/objects/Bamg/SubDomain.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Bamg/SubDomain.cpp	(revision 6412)
@@ -16,9 +16,9 @@
 		*this = Th.subdomains[i];
 		if ( head-Th.triangles<0 || head-Th.triangles>=Th.nbt){
-			ISSMERROR("head-Th.triangles<0 || head-Th.triangles>=Th.nbt");
+			_error_("head-Th.triangles<0 || head-Th.triangles>=Th.nbt");
 		}
 		head = ThNew.triangles + Th.GetId(head) ; 
 		if (edge-Th.edges<0 || edge-Th.edges>=Th.nbe);{
-			ISSMERROR("edge-Th.edges<0 || edge-Th.edges>=Th.nbe");
+			_error_("edge-Th.edges<0 || edge-Th.edges>=Th.nbe");
 		}
 		edge = ThNew.edges+ Th.GetId(edge);
Index: /issm/trunk/src/c/objects/Bamg/Triangle.cpp
===================================================================
--- /issm/trunk/src/c/objects/Bamg/Triangle.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Bamg/Triangle.cpp	(revision 6412)
@@ -14,8 +14,8 @@
 		long nbv = Th->nbv;
 		if (i<0 || j<0 || k<0){
-			ISSMERROR("i<0 || j<0 || k<0");
+			_error_("i<0 || j<0 || k<0");
 		}
 		if (i>=nbv || j>=nbv || k>=nbv){
-			ISSMERROR("i>=nbv || j>=nbv || k>=nbv");
+			_error_("i>=nbv || j>=nbv || k>=nbv");
 		}
 		vertices[0]=v+i;
@@ -117,5 +117,5 @@
 			//check number of iterations
 			if (k>=2000){
-				ISSMERROR("too many iteration in Triangle::FindBoundaryEdge (k>=2000)");
+				_error_("too many iteration in Triangle::FindBoundaryEdge (k>=2000)");
 			}
 		} while (this!= t);
@@ -157,5 +157,5 @@
 		do {
 			while (t->swap(j,koption)){
-				if (k>=20000) ISSMERROR("k>=20000");
+				if (k>=20000) _error_("k>=20000");
 				NbSwap++;
 				k++;
Index: /issm/trunk/src/c/objects/Contour.cpp
===================================================================
--- /issm/trunk/src/c/objects/Contour.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Contour.cpp	(revision 6412)
@@ -17,8 +17,8 @@
 	int i;
 
-	_printf_("Number of grids in contour: %i\n",contour->nods);
-	_printf_("Grid coordinates: \n");
+	_printf_(true,"Number of grids in contour: %i\n",contour->nods);
+	_printf_(true,"Grid coordinates: \n");
 	for (i=0;i<contour->nods;i++){
-		_printf_("%lf %lf\n",*(contour->x+i),*(contour->y+i));
+		_printf_(true,"%lf %lf\n",*(contour->x+i),*(contour->y+i));
 	}
 }
Index: /issm/trunk/src/c/objects/DofIndexing.cpp
===================================================================
--- /issm/trunk/src/c/objects/DofIndexing.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/DofIndexing.cpp	(revision 6412)
@@ -141,5 +141,5 @@
 		else this->sdoflist=NULL;
 	}
-	else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
+	else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
 
 
Index: /issm/trunk/src/c/objects/ElementResults/PentaVertexElementResult.cpp
===================================================================
--- /issm/trunk/src/c/objects/ElementResults/PentaVertexElementResult.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/ElementResults/PentaVertexElementResult.cpp	(revision 6412)
@@ -156,5 +156,5 @@
 
 		/*Check index value*/
-		ISSMASSERT(indices[i]>=0 && indices[i]<6);
+		_assert_(indices[i]>=0 && indices[i]<6);
 
 		/*Assign value to new result*/
Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 6412)
@@ -57,6 +57,6 @@
 	/*Checks in debugging mode*/
 	/*{{{2*/
-	ISSMASSERT(iomodel->upperelements);
-	ISSMASSERT(iomodel->lowerelements);
+	_assert_(iomodel->upperelements);
+	_assert_(iomodel->lowerelements);
 	/*}}}*/
 
@@ -282,5 +282,5 @@
 /*FUNCTION Penta::AverageOntoPartition {{{1*/
 void  Penta::AverageOntoPartition(Vec partition_contributions,Vec partition_areas,double* vertex_response,double* qmu_part){
-	ISSMERROR("Not supported yet!");
+	_error_("Not supported yet!");
 }
 /*}}}*/
@@ -336,6 +336,6 @@
 
 	/*Check analysis_types*/
-	if (analysis_type!=DiagnosticHorizAnalysisEnum) ISSMERROR("Not supported yet!");
-	if (approximation!=StokesApproximationEnum) ISSMERROR("Not supported yet!");
+	if (analysis_type!=DiagnosticHorizAnalysisEnum) _error_("Not supported yet!");
+	if (approximation!=StokesApproximationEnum) _error_("Not supported yet!");
 
 	/*retrieve some parameters: */
@@ -357,8 +357,8 @@
 
 	/*Retrieve all inputs we will be needing: */
-	Input* pressure_input=inputs->GetInput(PressureEnum); ISSMASSERT(pressure_input);
-	Input* vx_input=inputs->GetInput(VxEnum);             ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum);             ISSMASSERT(vy_input);
-	Input* vz_input=inputs->GetInput(VzEnum);             ISSMASSERT(vz_input);
+	Input* pressure_input=inputs->GetInput(PressureEnum); _assert_(pressure_input);
+	Input* vx_input=inputs->GetInput(VxEnum);             _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);             _assert_(vy_input);
+	Input* vz_input=inputs->GetInput(VzEnum);             _assert_(vz_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -402,5 +402,5 @@
 void  Penta::ComputeStrainRate(Vec eps){
 
-	ISSMERROR("Not implemented yet");
+	_error_("Not implemented yet");
 
 }
@@ -448,6 +448,6 @@
 		input=inputs->GetInput(enum_type);
 	}
-	if (!input) ISSMERROR("Input %s not found",EnumToString(enum_type));
-	if (input->Enum()!=ControlInputEnum) ISSMERROR("Input %s is not a ControlInput",EnumToString(enum_type));
+	if (!input) _error_("Input %s not found",EnumToString(enum_type));
+	if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString(enum_type));
 
 	this->GetDofList1(&doflist1[0]);
@@ -466,6 +466,6 @@
 		input=inputs->GetInput(enum_type);
 	}
-	if (!input) ISSMERROR("Input %s not found",EnumToString(enum_type));
-	if (input->Enum()!=ControlInputEnum) ISSMERROR("Input %s is not a ControlInput",EnumToString(enum_type));
+	if (!input) _error_("Input %s not found",EnumToString(enum_type));
+	if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString(enum_type));
 
 	((ControlInput*)input)->ScaleGradient(scale);
@@ -485,6 +485,6 @@
 		input=inputs->GetInput(enum_type);
 	}
-	if (!input) ISSMERROR("Input %s not found",EnumToString(enum_type));
-	if (input->Enum()!=ControlInputEnum) ISSMERROR("Input %s is not a ControlInput",EnumToString(enum_type));
+	if (!input) _error_("Input %s not found",EnumToString(enum_type));
+	if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString(enum_type));
 
 	this->GetDofList1(&doflist1[0]);
@@ -503,5 +503,5 @@
 
 	/*Checks in debugging {{{2*/
-	ISSMASSERT(this->nodes && this->matice && this->matpar && this->neighbors && this->parameters && this->inputs);
+	_assert_(this->nodes && this->matice && this->matpar && this->neighbors && this->parameters && this->inputs);
 	/*}}}*/
 
@@ -536,5 +536,5 @@
 			break;
 		default:
-			ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
+			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
 	}
 
@@ -647,8 +647,8 @@
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
 	this->parameters->FindParam(&viscosity_overshoot,ViscosityOvershootEnum);
-	Input* vx_input=inputs->GetInput(VxEnum);       ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum);       ISSMASSERT(vy_input);
-	Input* vxold_input=inputs->GetInput(VxOldEnum); ISSMASSERT(vxold_input);
-	Input* vyold_input=inputs->GetInput(VyOldEnum); ISSMASSERT(vyold_input);
+	Input* vx_input=inputs->GetInput(VxEnum);       _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);       _assert_(vy_input);
+	Input* vxold_input=inputs->GetInput(VxOldEnum); _assert_(vxold_input);
+	Input* vyold_input=inputs->GetInput(VyOldEnum); _assert_(vyold_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -758,5 +758,5 @@
 			return CreateKMatrixDiagnosticPattynStokes();
 		default:
-			ISSMERROR("Approximation %s not supported yet",EnumToString(approximation));
+			_error_("Approximation %s not supported yet",EnumToString(approximation));
 	}
 }
@@ -896,8 +896,8 @@
 	GetVerticesCoordinates(&xyz_list[0][0], nodes,NUMVERTICES);
 	this->parameters->FindParam(&viscosity_overshoot,ViscosityOvershootEnum);
-	Input* vx_input=inputs->GetInput(VxEnum);       ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum);       ISSMASSERT(vy_input);
-	Input* vxold_input=inputs->GetInput(VxOldEnum); ISSMASSERT(vxold_input);
-	Input* vyold_input=inputs->GetInput(VyOldEnum); ISSMASSERT(vyold_input);
+	Input* vx_input=inputs->GetInput(VxEnum);       _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);       _assert_(vy_input);
+	Input* vxold_input=inputs->GetInput(VxOldEnum); _assert_(vxold_input);
+	Input* vyold_input=inputs->GetInput(VyOldEnum); _assert_(vyold_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -1014,8 +1014,8 @@
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
 	this->parameters->FindParam(&viscosity_overshoot,ViscosityOvershootEnum);
-	Input* vx_input=inputs->GetInput(VxEnum);       ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum);       ISSMASSERT(vy_input);
-	Input* vxold_input=inputs->GetInput(VxOldEnum); ISSMASSERT(vxold_input);
-	Input* vyold_input=inputs->GetInput(VyOldEnum); ISSMASSERT(vyold_input);
+	Input* vx_input=inputs->GetInput(VxEnum);       _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);       _assert_(vy_input);
+	Input* vxold_input=inputs->GetInput(VxOldEnum); _assert_(vxold_input);
+	Input* vyold_input=inputs->GetInput(VyOldEnum); _assert_(vyold_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -1122,7 +1122,7 @@
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
 	parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
-	Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);
-	Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);
+	Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
+	Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -1191,7 +1191,7 @@
 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
 	parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
-	Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);
-	Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);
+	Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
+	Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input);
 	for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) xyz_list_tria[i][j]=xyz_list[i][j];
 
@@ -1427,7 +1427,7 @@
 	this->parameters->FindParam(&artdiff,ArtDiffEnum);
 	this->parameters->FindParam(&epsvel,EpsVelEnum);
-	Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);
-	Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);
+	Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
+	Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input);
 	if (artdiff==2) diameter=MinEdgeLength(xyz_list);
 
@@ -1562,5 +1562,5 @@
 
 	/*if debugging mode, check that all pointers exist {{{2*/
-	ISSMASSERT(this->nodes && this->matice && this->matpar && this->neighbors && this->parameters && this->inputs);
+	_assert_(this->nodes && this->matice && this->matpar && this->neighbors && this->parameters && this->inputs);
 	/*}}}*/
 
@@ -1598,5 +1598,5 @@
 			break;
 		default:
-			ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
+			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
 	}
 
@@ -1624,5 +1624,5 @@
 			return CreatePVectorAdjointStokes();
 		default:
-			ISSMERROR("Approximation %s not supported yet",EnumToString(approximation));
+			_error_("Approximation %s not supported yet",EnumToString(approximation));
 	}
 }
@@ -1741,8 +1741,8 @@
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
 	this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
-	Input* vx_input=inputs->GetInput(VxEnum);               ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum);               ISSMASSERT(vy_input);
-	Input* vz_input=inputs->GetInput(VzEnum);               ISSMASSERT(vz_input);
-	Input* vzpattyn_input=inputs->GetInput(VzPattynEnum);   ISSMASSERT(vzpattyn_input);
+	Input* vx_input=inputs->GetInput(VxEnum);               _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);               _assert_(vy_input);
+	Input* vz_input=inputs->GetInput(VzEnum);               _assert_(vz_input);
+	Input* vzpattyn_input=inputs->GetInput(VzPattynEnum);   _assert_(vzpattyn_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -1806,8 +1806,8 @@
 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
 	this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
-	Input* vx_input=inputs->GetInput(VxEnum);               ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum);               ISSMASSERT(vy_input);
-	Input* vz_input=inputs->GetInput(VzEnum);               ISSMASSERT(vz_input);
-	Input* vzpattyn_input=inputs->GetInput(VzPattynEnum);   ISSMASSERT(vzpattyn_input);
+	Input* vx_input=inputs->GetInput(VxEnum);               _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);               _assert_(vy_input);
+	Input* vz_input=inputs->GetInput(VzEnum);               _assert_(vz_input);
+	Input* vzpattyn_input=inputs->GetInput(VzPattynEnum);   _assert_(vzpattyn_input);
 
 	for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) xyz_list_tria[i][j]=xyz_list[i][j];
@@ -1867,5 +1867,5 @@
 			return CreatePVectorDiagnosticPattynStokes();
 		default:
-			ISSMERROR("Approximation %s not supported yet",EnumToString(approximation));
+			_error_("Approximation %s not supported yet",EnumToString(approximation));
 	}
 }
@@ -1931,8 +1931,8 @@
 	n=matice->GetN();
 	B=matice->GetB();
-	Input* thickness_input=inputs->GetInput(ThicknessEnum);  ISSMASSERT(thickness_input);
-	Input* surface_input=inputs->GetInput(SurfaceEnum);      ISSMASSERT(surface_input);
-	Input* slopex_input=inputs->GetInput(SurfaceSlopeXEnum); ISSMASSERT(slopex_input);
-	Input* slopey_input=inputs->GetInput(SurfaceSlopeYEnum); ISSMASSERT(slopey_input);
+	Input* thickness_input=inputs->GetInput(ThicknessEnum);  _assert_(thickness_input);
+	Input* surface_input=inputs->GetInput(SurfaceEnum);      _assert_(surface_input);
+	Input* slopex_input=inputs->GetInput(SurfaceSlopeXEnum); _assert_(slopex_input);
+	Input* slopey_input=inputs->GetInput(SurfaceSlopeYEnum); _assert_(slopey_input);
 	for(i=0;i<NUMVERTICES;i++)z_list[i]=xyz_list[i][2];
 
@@ -2025,6 +2025,6 @@
 	/*Retrieve all inputs and parameters*/
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
-	Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);
-	Input* surface_input=inputs->GetInput(SurfaceEnum);     ISSMASSERT(surface_input);
+	Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input);
+	Input* surface_input=inputs->GetInput(SurfaceEnum);     _assert_(surface_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -2099,7 +2099,7 @@
 	gravity=matpar->GetG();
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
-	Input* vx_input=inputs->GetInput(VxEnum);   ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum);   ISSMASSERT(vy_input);
-	Input* vz_input=inputs->GetInput(VzEnum);   ISSMASSERT(vz_input);
+	Input* vx_input=inputs->GetInput(VxEnum);   _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);   _assert_(vy_input);
+	Input* vz_input=inputs->GetInput(VzEnum);   _assert_(vz_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -2168,5 +2168,5 @@
 	gravity=matpar->GetG();
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
-	Input* bed_input=inputs->GetInput(BedEnum); ISSMASSERT(bed_input);
+	Input* bed_input=inputs->GetInput(BedEnum); _assert_(bed_input);
 
 	for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) xyz_list_tria[i][j]=xyz_list[i][j];
@@ -2244,9 +2244,9 @@
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
 	inputs->GetParameterValue(&approximation,ApproximationEnum);
-	Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);
+	Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
 	Input* vzstokes_input=NULL;
 	if(approximation==PattynStokesApproximationEnum){
-		vzstokes_input=inputs->GetInput(VzStokesEnum); ISSMASSERT(vzstokes_input);
+		vzstokes_input=inputs->GetInput(VzStokesEnum); _assert_(vzstokes_input);
 	}
 
@@ -2383,9 +2383,9 @@
 	this->inputs->GetParameterValue(&dt,DtEnum);
 	this->parameters->FindParam(&artdiff,ArtDiffEnum);
-	Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);
-	Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);
+	Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
+	Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input);
 	Input* temperature_input=NULL;
-	if (dt) temperature_input=inputs->GetInput(TemperatureEnum); ISSMASSERT(inputs);
+	if (dt) temperature_input=inputs->GetInput(TemperatureEnum); _assert_(inputs);
 	if (artdiff==2) diameter=MinEdgeLength(xyz_list);
 
@@ -2525,5 +2525,5 @@
 		GradjB(gradient);
 	}
-	else ISSMERROR("control type %s not supported yet: ",EnumToString(control_type));
+	else _error_("control type %s not supported yet: ",EnumToString(control_type));
 }
 /*}}}*/
@@ -2603,5 +2603,5 @@
 		return;
 	}
-	else ISSMERROR("approximation %s not supported yet",EnumToString(approximation));
+	else _error_("approximation %s not supported yet",EnumToString(approximation));
 }
 /*}}}*/
@@ -2620,5 +2620,5 @@
 		/* get lower Penta*/
 		penta=penta->GetLowerElement();
-		ISSMASSERT(penta->Id()!=this->id);
+		_assert_(penta->Id()!=this->id);
 	}
 
@@ -2679,10 +2679,10 @@
 int Penta::GetNodeIndex(Node* node){
 
-	ISSMASSERT(nodes);
+	_assert_(nodes);
 	for(int i=0;i<NUMVERTICES;i++){
 		if(node==nodes[i])
 		 return i;
 	}
-	ISSMERROR("Node provided not found among element nodes");
+	_error_("Node provided not found among element nodes");
 
 }
@@ -2697,8 +2697,8 @@
 	/*Recover input*/
 	Input* input=inputs->GetInput(enumtype);
-	if (!input) ISSMERROR("Input %s not found in element",EnumToString(enumtype));
+	if (!input) _error_("Input %s not found in element",EnumToString(enumtype));
 
 	/*Checks in debugging mode*/
-	ISSMASSERT(pvalue);
+	_assert_(pvalue);
 
 	/* Start looping on the number of vertices: */
@@ -2724,5 +2724,5 @@
 
 	/*Checks in debugging mode*/
-	ISSMASSERT(pvalue);
+	_assert_(pvalue);
 
 	/* Start looping on the number of vertices: */
@@ -2746,5 +2746,5 @@
 
 	Input* input=inputs->GetInput(enumtype);
-	if(!input) ISSMERROR("No input of type %s found in tria",EnumToString(enumtype));
+	if(!input) _error_("No input of type %s found in tria",EnumToString(enumtype));
 
 	GaussPenta* gauss=new GaussPenta();
@@ -2833,5 +2833,5 @@
 	}
 	else{
-		ISSMERROR("analysis: %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
+		_error_("analysis: %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
 	}
 }
@@ -2851,6 +2851,6 @@
 	/*Get approximation enum and dof list: */
 	inputs->GetParameterValue(&approximation,ApproximationEnum);
-	Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);
+	Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
 
 	/*If the element is a coupling, do nothing: every grid is also on an other elements 
@@ -2892,6 +2892,6 @@
 	/*Get dof list: */
 	GetDofList(&doflist,NoneApproximationEnum,GsetEnum);
-	Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);
+	Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
 
 	/*Ok, we have vx and vy in values, fill in vx and vy arrays: */
@@ -2928,5 +2928,5 @@
 	/*Get dof list: */
 	GetDofList(&doflist,NoneApproximationEnum,GsetEnum);
-	Input* vz_input=inputs->GetInput(VzEnum); ISSMASSERT(vz_input);
+	Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input);
 
 	/*Ok, we have vx and vy in values, fill in vx and vy arrays: */
@@ -2962,8 +2962,8 @@
 	/*Get dof list: */
 	GetDofList(&doflist,StokesApproximationEnum,GsetEnum);
-	Input* vx_input=inputs->GetInput(VxEnum);       ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum);       ISSMASSERT(vy_input);
-	Input* vz_input=inputs->GetInput(VzEnum);       ISSMASSERT(vz_input);
-	Input* p_input =inputs->GetInput(PressureEnum); ISSMASSERT(p_input);
+	Input* vx_input=inputs->GetInput(VxEnum);       _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);       _assert_(vy_input);
+	Input* vz_input=inputs->GetInput(VzEnum);       _assert_(vz_input);
+	Input* p_input =inputs->GetInput(PressureEnum); _assert_(p_input);
 
 	/*Recondition pressure: */
@@ -3006,5 +3006,5 @@
 	/*Get dof list: */
 	GetDofList(&doflist,NoneApproximationEnum,GsetEnum);
-	Input* t_input=inputs->GetInput(TemperatureEnum); ISSMASSERT(t_input);
+	Input* t_input=inputs->GetInput(TemperatureEnum); _assert_(t_input);
 
 	gauss=new GaussPenta();
@@ -3058,5 +3058,5 @@
 	/*Check that both inputs have been found*/
 	if (!vx_input || !vy_input){
-		ISSMERROR("Input missing. Here are the input pointers we have for vx: %p, vy: %p\n",vx_input,vy_input);
+		_error_("Input missing. Here are the input pointers we have for vx: %p, vy: %p\n",vx_input,vy_input);
 	}
 
@@ -3083,5 +3083,5 @@
 	/*Check that both inputs have been found*/
 	if (!vx_input || !vy_input || !vz_input){
-		ISSMERROR("Input missing. Here are the input pointers we have for vx: %p, vy: %p, vz: %p\n",vx_input,vy_input,vz_input);
+		_error_("Input missing. Here are the input pointers we have for vx: %p, vy: %p, vz: %p\n",vx_input,vy_input,vz_input);
 	}
 
@@ -3150,5 +3150,5 @@
 	/*Make a copy of the original input: */
 	input=(Input*)this->inputs->GetInput(enum_type);
-	if(!input)ISSMERROR(" could not find old input with enum: %s",EnumToString(enum_type));
+	if(!input)_error_(" could not find old input with enum: %s",EnumToString(enum_type));
 
 	/*ArtificialNoise: */
@@ -3170,6 +3170,6 @@
 		new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]);
 		old_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+1]);
-		if(!new_inputs[i])ISSMERROR("%s%s"," could not find input with enum ",EnumToString(enums[2*i+0]));
-		if(!old_inputs[i])ISSMERROR("%s%s"," could not find input with enum ",EnumToString(enums[2*i+0]));
+		if(!new_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToString(enums[2*i+0]));
+		if(!old_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToString(enums[2*i+0]));
 	}
 
@@ -3208,11 +3208,11 @@
 		if(control_type[i]==RheologyBbarEnum){
 			if (!IsOnBed()) return;
-			input=(Input*)matice->inputs->GetInput(RheologyBEnum); ISSMASSERT(input);
+			input=(Input*)matice->inputs->GetInput(RheologyBEnum); _assert_(input);
 		}
 		else{
-			input=(Input*)this->inputs->GetInput(control_type[i]); ISSMASSERT(input);
-		}
-
-		if (input->Enum()!=ControlInputEnum) ISSMERROR("input %s is not a ControlInput",EnumToString(control_type[i]));
+			input=(Input*)this->inputs->GetInput(control_type[i]); _assert_(input);
+		}
+
+		if (input->Enum()!=ControlInputEnum) _error_("input %s is not a ControlInput",EnumToString(control_type[i]));
 
 		((ControlInput*)input)->UpdateValue(scalar);
@@ -3265,6 +3265,6 @@
 		 original_input=(Input*)penta->matice->inputs->GetInput(enum_type);
 		else
-		 ISSMERROR("object %s not supported yet",EnumToString(object_enum));
-		if(!original_input) ISSMERROR("could not find input with enum %s",EnumToString(enum_type));
+		 _error_("object %s not supported yet",EnumToString(object_enum));
+		if(!original_input) _error_("could not find input with enum %s",EnumToString(enum_type));
 
 		/*If first time, initialize total_integrated_input*/
@@ -3277,5 +3277,5 @@
 			 total_integrated_input=new DoubleInput(average_enum_type,0.0);
 			else
-			 ISSMERROR("object %s not supported yet",EnumToString(original_input->Enum()));
+			 _error_("object %s not supported yet",EnumToString(original_input->Enum()));
 		}
 
@@ -3305,5 +3305,5 @@
 		/* get upper Penta*/
 		penta=penta->GetUpperElement();
-		ISSMASSERT(penta->Id()!=this->id);
+		_assert_(penta->Id()!=this->id);
 
 		/*increase couter*/
@@ -3325,5 +3325,5 @@
 	 this->matice->inputs->AddInput((Input*)depth_averaged_input);
 	else
-	 ISSMERROR("object %s not supported yet",EnumToString(object_enum));
+	 _error_("object %s not supported yet",EnumToString(object_enum));
 }
 /*}}}*/
@@ -3355,6 +3355,6 @@
 		 original_input=(Input*)matice->inputs->GetInput(enum_type);
 		else
-		 ISSMERROR("object of type %s not supported yet",EnumToString(object_type));
-		if(!original_input) ISSMERROR("%s%s"," could not find input with enum:",EnumToString(enum_type));
+		 _error_("object of type %s not supported yet",EnumToString(object_type));
+		if(!original_input) _error_("%s%s"," could not find input with enum:",EnumToString(enum_type));
 		original_input->Extrude();
 
@@ -3368,5 +3368,5 @@
 			/* get upper Penta*/
 			penta=penta->GetUpperElement();
-			ISSMASSERT(penta->Id()!=this->id);
+			_assert_(penta->Id()!=this->id);
 
 			/*Add input of the basal element to penta->inputs*/
@@ -3378,5 +3378,5 @@
 			 penta->matice->inputs->AddInput((Input*)copy);
 			else
-			 ISSMERROR("object of type %s not supported yet",EnumToString(object_type));
+			 _error_("object of type %s not supported yet",EnumToString(object_type));
 
 			/*Stop if we have reached the surface*/
@@ -3395,5 +3395,5 @@
 	/*Make a copy of the original input: */
 	input=(Input*)this->inputs->GetInput(enum_type);
-	if(!input)ISSMERROR(" could not find old input with enum: %s",EnumToString(enum_type));
+	if(!input)_error_(" could not find old input with enum: %s",EnumToString(enum_type));
 
 	/*Scale: */
@@ -3411,5 +3411,5 @@
 	if (enum_type==RheologyBbarEnum) input=this->matice->inputs->GetInput(RheologyBEnum);
 	else input=this->inputs->GetInput(enum_type);
-	if (!input) ISSMERROR("Input %s not found in penta->inputs",EnumToString(enum_type));
+	if (!input) _error_("Input %s not found in penta->inputs",EnumToString(enum_type));
 
 	/*If we don't find it, no big deal, just don't do the transfer. Otherwise, build a new Result 
@@ -3458,5 +3458,5 @@
 	/*Checks if debuging*/
 	/*{{{2*/
-	ISSMASSERT(iomodel->elements);
+	_assert_(iomodel->elements);
 	/*}}}*/
 
@@ -3586,5 +3586,5 @@
 					/*Matice will take care of it*/ break;
 				default:
-					ISSMERROR("Control %s not implemented yet",EnumToString((int)iomodel->control_type[i]));
+					_error_("Control %s not implemented yet",EnumToString((int)iomodel->control_type[i]));
 			}
 		}
@@ -3615,5 +3615,5 @@
 		}
 		else{
-			ISSMERROR("Approximation type %s not supported yet",EnumToString((int)*(iomodel->elements_type+index)));
+			_error_("Approximation type %s not supported yet",EnumToString((int)*(iomodel->elements_type+index)));
 		}
 	}
@@ -3677,5 +3677,5 @@
 	}
 	else{
-		ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
+		_error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
 	}
 }
@@ -3764,5 +3764,5 @@
 		Input* vz_input=inputs->GetInput(VzEnum);
 		if (vz_input){
-			if (vz_input->Enum()!=PentaVertexInputEnum) ISSMERROR("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum()));
+			if (vz_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum()));
 			vz_input->GetValuesPtr(&vz_ptr,&dummy);
 			for(i=0;i<NUMVERTICES;i++) vz[i]=vz_ptr[i];
@@ -3791,5 +3791,5 @@
 
 		/* get upper Penta*/
-		penta=penta->GetUpperElement(); ISSMASSERT(penta->Id()!=this->id);
+		penta=penta->GetUpperElement(); _assert_(penta->Id()!=this->id);
 	}
 	
@@ -3851,5 +3851,5 @@
 	if (vz_input){
 		if (vz_input->Enum()!=PentaVertexInputEnum){
-			ISSMERROR("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum()));
+			_error_("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum()));
 		}
 		vz_input->GetValuesPtr(&vz_ptr,&dummy);
@@ -3944,5 +3944,5 @@
 	if (vzmacayeal_input){
 		if (vzmacayeal_input->Enum()!=PentaVertexInputEnum){
-			ISSMERROR("Cannot compute Vel as VzMacAyeal is of type %s",EnumToString(vzmacayeal_input->Enum()));
+			_error_("Cannot compute Vel as VzMacAyeal is of type %s",EnumToString(vzmacayeal_input->Enum()));
 		}
 		vzmacayeal_input->GetValuesPtr(&vzmacayeal_ptr,&dummy);
@@ -3950,5 +3950,5 @@
 	}
 	else{
-		ISSMERROR("Cannot update solution as VzMacAyeal is not present");
+		_error_("Cannot update solution as VzMacAyeal is not present");
 	}
 
@@ -4016,5 +4016,5 @@
 	if (vz_input){
 		if (vz_input->Enum()!=PentaVertexInputEnum){
-			ISSMERROR("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum()));
+			_error_("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum()));
 		}
 		vz_input->GetValuesPtr(&vz_ptr,&dummy);
@@ -4102,5 +4102,5 @@
 	if (vzpattyn_input){
 		if (vzpattyn_input->Enum()!=PentaVertexInputEnum){
-			ISSMERROR("Cannot compute Vel as VzPattyn is of type %s",EnumToString(vzpattyn_input->Enum()));
+			_error_("Cannot compute Vel as VzPattyn is of type %s",EnumToString(vzpattyn_input->Enum()));
 		}
 		vzpattyn_input->GetValuesPtr(&vzpattyn_ptr,&dummy);
@@ -4108,5 +4108,5 @@
 	}
 	else{
-		ISSMERROR("Cannot update solution as VzPattyn is not present");
+		_error_("Cannot update solution as VzPattyn is not present");
 	}
 
@@ -4174,5 +4174,5 @@
 	if (vz_input){
 		if (vz_input->Enum()!=PentaVertexInputEnum){
-			ISSMERROR("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum()));
+			_error_("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum()));
 		}
 		vz_input->GetValuesPtr(&vz_ptr,&dummy);
@@ -4251,5 +4251,5 @@
 	Input* vx_input=inputs->GetInput(VxEnum);
 	if (vx_input){
-		if (vx_input->Enum()!=PentaVertexInputEnum) ISSMERROR("Cannot compute Vel as Vx is of type %s",EnumToString(vx_input->Enum()));
+		if (vx_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as Vx is of type %s",EnumToString(vx_input->Enum()));
 		vx_input->GetValuesPtr(&vx_ptr,&dummy);
 		for(i=0;i<NUMVERTICES;i++) vx[i]=vx_ptr[i];
@@ -4259,5 +4259,5 @@
 	Input* vy_input=inputs->GetInput(VyEnum);
 	if (vy_input){
-		if (vy_input->Enum()!=PentaVertexInputEnum) ISSMERROR("Cannot compute Vel as Vy is of type %s",EnumToString(vy_input->Enum()));
+		if (vy_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as Vy is of type %s",EnumToString(vy_input->Enum()));
 		vy_input->GetValuesPtr(&vy_ptr,&dummy);
 		for(i=0;i<NUMVERTICES;i++) vy[i]=vy_ptr[i];
@@ -4269,9 +4269,9 @@
 		Input* vzstokes_input=inputs->GetInput(VzStokesEnum);
 		if (vzstokes_input){
-			if (vzstokes_input->Enum()!=PentaVertexInputEnum) ISSMERROR("Cannot compute Vel as VzStokes is of type %s",EnumToString(vy_input->Enum()));
+			if (vzstokes_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as VzStokes is of type %s",EnumToString(vy_input->Enum()));
 			vzstokes_input->GetValuesPtr(&vzstokes_ptr,&dummy);
 			for(i=0;i<NUMVERTICES;i++) vzstokes[i]=vzstokes_ptr[i];
 		}
-		else ISSMERROR("Cannot compute Vz as VzStokes in not present in PattynStokes element");
+		else _error_("Cannot compute Vz as VzStokes in not present in PattynStokes element");
 		for(i=0;i<NUMVERTICES;i++){
 			vzpattyn[i]=vz[i];
@@ -4282,9 +4282,9 @@
 		Input* vzstokes_input=inputs->GetInput(VzStokesEnum);
 		if (vzstokes_input){
-			if (vzstokes_input->Enum()!=PentaVertexInputEnum) ISSMERROR("Cannot compute Vel as VzStokes is of type %s",EnumToString(vy_input->Enum()));
+			if (vzstokes_input->Enum()!=PentaVertexInputEnum) _error_("Cannot compute Vel as VzStokes is of type %s",EnumToString(vy_input->Enum()));
 			vzstokes_input->GetValuesPtr(&vzstokes_ptr,&dummy);
 			for(i=0;i<NUMVERTICES;i++) vzstokes[i]=vzstokes_ptr[i];
 		}
-		else ISSMERROR("Cannot compute Vz as VzStokes in not present in MacAyealStokes element");
+		else _error_("Cannot compute Vz as VzStokes in not present in MacAyealStokes element");
 		for(i=0;i<NUMVERTICES;i++){
 			vzmacayeal[i]=vz[i];
@@ -4536,5 +4536,5 @@
 
 		/* get upper Penta*/
-		penta=penta->GetUpperElement(); ISSMASSERT(penta->Id()!=this->id);
+		penta=penta->GetUpperElement(); _assert_(penta->Id()!=this->id);
 	}
 	
@@ -4569,5 +4569,5 @@
 		default:
 
-			ISSMERROR("type %i (%s) not implemented yet",type,EnumToString(type));
+			_error_("type %i (%s) not implemented yet",type,EnumToString(type));
 	}
 }
@@ -4575,25 +4575,25 @@
 /*FUNCTION Penta::InputUpdateFromVector(int* vector, int name, int type);{{{1*/
 void  Penta::InputUpdateFromVector(int* vector, int name, int type){
-	ISSMERROR(" not supported yet!");
+	_error_(" not supported yet!");
 }
 /*}}}*/
 /*FUNCTION Penta::InputUpdateFromVector(bool* vector, int name, int type);{{{1*/
 void  Penta::InputUpdateFromVector(bool* vector, int name, int type){
-	ISSMERROR(" not supported yet!");
+	_error_(" not supported yet!");
 }
 /*}}}*/
 /*FUNCTION Penta::InputUpdateFromVectorDakota(double* vector, int name, int type);{{{1*/
 void  Penta::InputUpdateFromVectorDakota(double* vector, int name, int type){
-	ISSMERROR(" not supported yet!");
+	_error_(" not supported yet!");
 }
 /*}}}*/
 /*FUNCTION Penta::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{1*/
 void  Penta::InputUpdateFromVectorDakota(int* vector, int name, int type){
-	ISSMERROR(" not supported yet!");
+	_error_(" not supported yet!");
 }
 /*}}}*/
 /*FUNCTION Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{1*/
 void  Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type){
-	ISSMERROR(" not supported yet!");
+	_error_(" not supported yet!");
 }
 /*}}}*/
@@ -4664,5 +4664,5 @@
 /*FUNCTION Penta::MassFlux {{{1*/
 double Penta::MassFlux( double* segment,bool process_units){
-	ISSMERROR(" not supported yet!");
+	_error_(" not supported yet!");
 }
 /*}}}*/
@@ -5036,5 +5036,5 @@
 void  Penta::SetClone(int* minranks){
 
-	ISSMERROR("not implemented yet");
+	_error_("not implemented yet");
 }
 /*}}}1*/
@@ -5402,5 +5402,5 @@
 	/*If on water, return 0: */
 	if(IsOnWater())return 0;
-	ISSMERROR("Not implemented yet");
+	_error_("Not implemented yet");
 
 	tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face).
@@ -5422,5 +5422,5 @@
 	/*Checks if debuging*/
 	/*{{{2*/
-	ISSMASSERT(iomodel->elements);
+	_assert_(iomodel->elements);
 	/*}}}*/
 
Index: /issm/trunk/src/c/objects/Elements/PentaRef.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/PentaRef.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Elements/PentaRef.cpp	(revision 6412)
@@ -53,5 +53,5 @@
 void PentaRef::SetElementType(int type,int type_counter){
 
-	ISSMASSERT(type==P1Enum || type==P1DGEnum);
+	_assert_(type==P1Enum || type==P1DGEnum);
 
 	/*initialize element type*/
@@ -702,5 +702,5 @@
 	/*Get Determinant*/
 	Matrix3x3Determinant(Jdet,&J[0][0]);
-	if(*Jdet<0) ISSMERROR("negative jacobian determinant!");
+	if(*Jdet<0) _error_("negative jacobian determinant!");
 
 }
@@ -725,5 +725,5 @@
 	/*Jdet = norm( AB ^ AC ) / (2 * area of the reference triangle), with areaRef=sqrt(3) */
 	*Jdet=SQRT3/6.0*pow(pow(((y2-y1)*(z3-z1)-(z2-z1)*(y3-y1)),2.0)+pow(((z2-z1)*(x3-x1)-(x2-x1)*(z3-z1)),2.0)+pow(((x2-x1)*(y3-y1)-(y2-y1)*(x3-x1)),2.0),0.5);
-	if(*Jdet<0) ISSMERROR("negative jacobian determinant!");
+	if(*Jdet<0) _error_("negative jacobian determinant!");
 
 }
@@ -744,5 +744,5 @@
 
 	*Jdet=1.0/2.0*sqrt(pow(x2-x1,2.) + pow(y2-y1,2.) + pow(z2-z1,2.));
-	if(*Jdet<0) ISSMERROR("negative jacobian determinant!");
+	if(*Jdet<0) _error_("negative jacobian determinant!");
 
 }
@@ -902,8 +902,8 @@
 	double A1,A2,A3,z;
 
-	A1=gauss->coord1; ISSMASSERT(A1>=0 && A1<=1);//first area coordinate value. In term of xi and eta: A1=(1-xi)/2-eta/(2*SQRT3);
-	A2=gauss->coord2; ISSMASSERT(A2>=0 && A2<=1);//second area coordinate value In term of xi and eta: A2=(1+xi)/2-eta/(2*SQRT3);
-	A3=gauss->coord3; ISSMASSERT(A3>=0 && A3<=1);//third area coordinate value  In term of xi and eta: A3=y/SQRT3;
-	z =gauss->coord4; ISSMASSERT(z>=-1 &&  z<=1);//fourth vertical coordinate value. Corresponding nodal function: (1-z)/2 and (1+z)/2
+	A1=gauss->coord1; _assert_(A1>=0 && A1<=1);//first area coordinate value. In term of xi and eta: A1=(1-xi)/2-eta/(2*SQRT3);
+	A2=gauss->coord2; _assert_(A2>=0 && A2<=1);//second area coordinate value In term of xi and eta: A2=(1+xi)/2-eta/(2*SQRT3);
+	A3=gauss->coord3; _assert_(A3>=0 && A3<=1);//third area coordinate value  In term of xi and eta: A3=y/SQRT3;
+	z =gauss->coord4; _assert_(z>=-1 &&  z<=1);//fourth vertical coordinate value. Corresponding nodal function: (1-z)/2 and (1+z)/2
 
 	/*First nodal function derivatives. The corresponding nodal function is N=A1*(1-z)/2. Its derivatives follow*/
@@ -946,8 +946,8 @@
 	GetNodalFunctionsP1(&BasisFunctions[0],gauss);
 
-	ISSMASSERT(index1>=0 && index1<6);
-	ISSMASSERT(index2>=0 && index2<6);
-	ISSMASSERT(index3>=0 && index3<6);
-	ISSMASSERT(index4>=0 && index4<6);
+	_assert_(index1>=0 && index1<6);
+	_assert_(index2>=0 && index2<6);
+	_assert_(index3>=0 && index3<6);
+	_assert_(index4>=0 && index4<6);
 
 	l1l4[0]=BasisFunctions[index1];
@@ -980,5 +980,5 @@
 	/*Area of a trabezoid = altitude * (base1 + base2)/2 */
 	*Jdet= pow(pow(x2-x1,2.) + pow(y2-y1,2.),0.5) * (z4-z1 + z3-z2)/8;
-	if(*Jdet<0) ISSMERROR("negative jacobian determinant!");
+	if(*Jdet<0) _error_("negative jacobian determinant!");
 
 }
Index: /issm/trunk/src/c/objects/Elements/PentaRef.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/PentaRef.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Elements/PentaRef.h	(revision 6412)
@@ -50,7 +50,7 @@
 		void GetLprimeStokes(double* LprimeStokes, double* xyz_list, GaussPenta* gauss);
 		void GetParameterValue(double* pvalue,double* plist, GaussPenta* gauss);
-		void GetParameterValue(double* pvalue,double* plist,GaussTria* gauss){ISSMERROR("only PentaGauss are supported");};
+		void GetParameterValue(double* pvalue,double* plist,GaussTria* gauss){_error_("only PentaGauss are supported");};
 		void GetParameterDerivativeValue(double* pvalues, double* plist,double* xyz_list, GaussPenta* gauss);
-		void GetParameterDerivativeValue(double* pvalues, double* plist,double* xyz_list, GaussTria* gauss){ISSMERROR("only PentaGauss are supported");};
+		void GetParameterDerivativeValue(double* pvalues, double* plist,double* xyz_list, GaussTria* gauss){_error_("only PentaGauss are supported");};
 
 };
Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 6412)
@@ -305,5 +305,5 @@
 
 	/*Checks in debugging mode{{{2*/
-	ISSMASSERT(this->nodes && this->matice && this->matpar && this->parameters && this->inputs);
+	_assert_(this->nodes && this->matice && this->matpar && this->parameters && this->inputs);
 	/*}}}*/
 
@@ -332,5 +332,5 @@
 			break;
 		default:
-			ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
+			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
 	}
 
@@ -356,5 +356,5 @@
 			break;
 		default:
-			ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType()));
+			_error_("Element type %s not supported yet",EnumToString(GetElementType()));
 	}
 
@@ -373,5 +373,5 @@
 			return CreateKMatrixBalancedthickness_DG();
 		default:
-			ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType()));
+			_error_("Element type %s not supported yet",EnumToString(GetElementType()));
 	}
 
@@ -414,10 +414,10 @@
 	Input* vyaverage_input=NULL;
 	if(dim==2){
-		vxaverage_input=inputs->GetInput(VxEnum); ISSMASSERT(vxaverage_input);
-		vyaverage_input=inputs->GetInput(VyEnum); ISSMASSERT(vyaverage_input);
+		vxaverage_input=inputs->GetInput(VxEnum); _assert_(vxaverage_input);
+		vyaverage_input=inputs->GetInput(VyEnum); _assert_(vyaverage_input);
 	}
 	else{
-		vxaverage_input=inputs->GetInput(VxAverageEnum); ISSMASSERT(vxaverage_input);
-		vyaverage_input=inputs->GetInput(VyAverageEnum); ISSMASSERT(vyaverage_input);
+		vxaverage_input=inputs->GetInput(VxAverageEnum); _assert_(vxaverage_input);
+		vyaverage_input=inputs->GetInput(VyAverageEnum); _assert_(vyaverage_input);
 	}
 
@@ -515,6 +515,6 @@
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
 	this->parameters->FindParam(&dim,DimEnum);
-	Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);
+	Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
 
 	/*Start looping on the number of gaussian points:*/
@@ -583,14 +583,14 @@
 	this->parameters->FindParam(&artdiff,ArtDiffEnum);
 	this->parameters->FindParam(&dim,DimEnum);
-	Input* surface_input=inputs->GetInput(SurfaceEnum); ISSMASSERT(surface_input);
+	Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input);
 	Input* vxaverage_input=NULL;
 	Input* vyaverage_input=NULL;
 	if(dim==2){
-		vxaverage_input=inputs->GetInput(VxEnum); ISSMASSERT(vxaverage_input);
-		vyaverage_input=inputs->GetInput(VyEnum); ISSMASSERT(vyaverage_input);
+		vxaverage_input=inputs->GetInput(VxEnum); _assert_(vxaverage_input);
+		vyaverage_input=inputs->GetInput(VyEnum); _assert_(vyaverage_input);
 	}
 	else{
-		vxaverage_input=inputs->GetInput(VxAverageEnum); ISSMASSERT(vxaverage_input);
-		vyaverage_input=inputs->GetInput(VyAverageEnum); ISSMASSERT(vyaverage_input);
+		vxaverage_input=inputs->GetInput(VxAverageEnum); _assert_(vxaverage_input);
+		vyaverage_input=inputs->GetInput(VyAverageEnum); _assert_(vyaverage_input);
 	}
 
@@ -713,9 +713,9 @@
 	/*Retrieve all inputs and parameters*/
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
-	Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);
-	Input* vx_input=inputs->GetInput(VxEnum);               ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum);               ISSMASSERT(vy_input);
-	Input* vxold_input=inputs->GetInput(VxOldEnum);         ISSMASSERT(vxold_input);
-	Input* vyold_input=inputs->GetInput(VyOldEnum);         ISSMASSERT(vyold_input);
+	Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input);
+	Input* vx_input=inputs->GetInput(VxEnum);               _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);               _assert_(vy_input);
+	Input* vxold_input=inputs->GetInput(VxOldEnum);         _assert_(vxold_input);
+	Input* vyold_input=inputs->GetInput(VyOldEnum);         _assert_(vyold_input);
 	this->parameters->FindParam(&viscosity_overshoot,ViscosityOvershootEnum);
 
@@ -781,13 +781,13 @@
 	/*Retrieve all inputs and parameters*/
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
-	Input* surface_input=inputs->GetInput(SurfaceEnum); ISSMASSERT(surface_input);
-	Input* vx_input=inputs->GetInput(VxEnum);           ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum);           ISSMASSERT(vy_input);
-	Input* vz_input=inputs->GetInput(VzEnum);           ISSMASSERT(vz_input);
+	Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input);
+	Input* vx_input=inputs->GetInput(VxEnum);           _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);           _assert_(vy_input);
+	Input* vz_input=inputs->GetInput(VzEnum);           _assert_(vz_input);
 	inputs->GetParameterValue(&drag_type,DragTypeEnum);
 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
 
 	/*build friction object, used later on: */
-	if (drag_type!=2) ISSMERROR(" non-viscous friction not supported yet!");
+	if (drag_type!=2) _error_(" non-viscous friction not supported yet!");
 	friction=new Friction("2d",inputs,matpar,analysis_type);
 
@@ -857,11 +857,11 @@
 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
 	inputs->GetParameterValue(&drag_type,DragTypeEnum);
-	Input* surface_input=inputs->GetInput(SurfaceEnum); ISSMASSERT(surface_input);
-	Input* vx_input=inputs->GetInput(VxEnum);           ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum);           ISSMASSERT(vy_input);
-	Input* vz_input=inputs->GetInput(VzEnum);           ISSMASSERT(vz_input);
+	Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input);
+	Input* vx_input=inputs->GetInput(VxEnum);           _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);           _assert_(vy_input);
+	Input* vz_input=inputs->GetInput(VzEnum);           _assert_(vz_input);
 
 	/*build friction object, used later on: */
-	if (drag_type!=2)ISSMERROR(" non-viscous friction not supported yet!");
+	if (drag_type!=2)_error_(" non-viscous friction not supported yet!");
 	friction=new Friction("2d",inputs,matpar,analysis_type);
 
@@ -943,11 +943,11 @@
 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
 	inputs->GetParameterValue(&drag_type,DragTypeEnum);
-	Input* surface_input=inputs->GetInput(SurfaceEnum); ISSMASSERT(surface_input);
-	Input* vx_input=inputs->GetInput(VxEnum);           ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum);           ISSMASSERT(vy_input);
-	Input* vz_input=inputs->GetInput(VzEnum);           ISSMASSERT(vz_input);
+	Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input);
+	Input* vx_input=inputs->GetInput(VxEnum);           _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);           _assert_(vy_input);
+	Input* vz_input=inputs->GetInput(VzEnum);           _assert_(vz_input);
 
 	/*build friction object, used later on: */
-	if (drag_type!=2)ISSMERROR(" non-viscous friction not supported yet!");
+	if (drag_type!=2)_error_(" non-viscous friction not supported yet!");
 	friction=new Friction("2d",inputs,matpar,analysis_type);
 
@@ -1116,5 +1116,5 @@
 			return CreateKMatrixPrognostic_DG();
 		default:
-			ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType()));
+			_error_("Element type %s not supported yet",EnumToString(GetElementType()));
 	}
 
@@ -1159,10 +1159,10 @@
 	Input* vyaverage_input=NULL;
 	if(dim==2){
-		vxaverage_input=inputs->GetInput(VxEnum); ISSMASSERT(vxaverage_input);
-		vyaverage_input=inputs->GetInput(VyEnum); ISSMASSERT(vyaverage_input);
+		vxaverage_input=inputs->GetInput(VxEnum); _assert_(vxaverage_input);
+		vyaverage_input=inputs->GetInput(VyEnum); _assert_(vyaverage_input);
 	}
 	else{
-		vxaverage_input=inputs->GetInput(VxAverageEnum); ISSMASSERT(vxaverage_input);
-		vyaverage_input=inputs->GetInput(VyAverageEnum); ISSMASSERT(vyaverage_input);
+		vxaverage_input=inputs->GetInput(VxAverageEnum); _assert_(vxaverage_input);
+		vyaverage_input=inputs->GetInput(VyAverageEnum); _assert_(vyaverage_input);
 	}
 
@@ -1277,10 +1277,10 @@
 	Input* vyaverage_input=NULL;
 	if(dim==2){
-		vxaverage_input=inputs->GetInput(VxEnum); ISSMASSERT(vxaverage_input);
-		vyaverage_input=inputs->GetInput(VyEnum); ISSMASSERT(vyaverage_input);
+		vxaverage_input=inputs->GetInput(VxEnum); _assert_(vxaverage_input);
+		vyaverage_input=inputs->GetInput(VyEnum); _assert_(vyaverage_input);
 	}
 	else{
-		vxaverage_input=inputs->GetInput(VxAverageEnum); ISSMASSERT(vxaverage_input);
-		vyaverage_input=inputs->GetInput(VyAverageEnum); ISSMASSERT(vyaverage_input);
+		vxaverage_input=inputs->GetInput(VxAverageEnum); _assert_(vxaverage_input);
+		vyaverage_input=inputs->GetInput(VyAverageEnum); _assert_(vyaverage_input);
 	}
 
@@ -1436,5 +1436,5 @@
 	/*asserts: {{{*/
 	/*if debugging mode, check that all pointers exist*/
-	ISSMASSERT(this->nodes && this->matice && this->matpar && this->parameters && this->inputs);
+	_assert_(this->nodes && this->matice && this->matpar && this->parameters && this->inputs);
 	/*}}}*/
 
@@ -1466,5 +1466,5 @@
 			break;
 		default:
-			ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
+			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
 	}
 
@@ -1486,5 +1486,5 @@
 			return CreatePVectorBalancedthickness_DG();
 		default:
-			ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType()));
+			_error_("Element type %s not supported yet",EnumToString(GetElementType()));
 	}
 }
@@ -1509,7 +1509,7 @@
 	/*Retrieve all inputs and parameters*/
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
-	Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); ISSMASSERT(accumulation_input);
-	Input* melting_input=inputs->GetInput(MeltingRateEnum);           ISSMASSERT(melting_input);
-	Input* dhdt_input=inputs->GetInput(DhDtEnum);                     ISSMASSERT(dhdt_input);
+	Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); _assert_(accumulation_input);
+	Input* melting_input=inputs->GetInput(MeltingRateEnum);           _assert_(melting_input);
+	Input* dhdt_input=inputs->GetInput(DhDtEnum);                     _assert_(dhdt_input);
 	
 	/* Start  looping on the number of gaussian points: */
@@ -1553,7 +1553,7 @@
 	/*Retrieve all inputs and parameters*/
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
-	Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); ISSMASSERT(accumulation_input);
-	Input* melting_input=inputs->GetInput(MeltingRateEnum);           ISSMASSERT(melting_input);
-	Input* dhdt_input=inputs->GetInput(DhDtEnum);                     ISSMASSERT(dhdt_input);
+	Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); _assert_(accumulation_input);
+	Input* melting_input=inputs->GetInput(MeltingRateEnum);           _assert_(melting_input);
+	Input* dhdt_input=inputs->GetInput(DhDtEnum);                     _assert_(dhdt_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -1597,6 +1597,6 @@
 	/*Retrieve all inputs and parameters*/
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
-	Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); ISSMASSERT(accumulation_input);
-	Input* melting_input=inputs->GetInput(MeltingRateEnum);           ISSMASSERT(melting_input);
+	Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); _assert_(accumulation_input);
+	Input* melting_input=inputs->GetInput(MeltingRateEnum);           _assert_(melting_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -1643,11 +1643,11 @@
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
 	inputs->GetParameterValue(&approximation,ApproximationEnum);
-	Input* bed_input=inputs->GetInput(BedEnum);             ISSMASSERT(bed_input);
-	Input* melting_input=inputs->GetInput(MeltingRateEnum); ISSMASSERT(melting_input);
-	Input* vx_input=inputs->GetInput(VxEnum);               ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum);               ISSMASSERT(vy_input);
+	Input* bed_input=inputs->GetInput(BedEnum);             _assert_(bed_input);
+	Input* melting_input=inputs->GetInput(MeltingRateEnum); _assert_(melting_input);
+	Input* vx_input=inputs->GetInput(VxEnum);               _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);               _assert_(vy_input);
 	Input* vzstokes_input=NULL;
 	if(approximation==PattynStokesApproximationEnum){
-		vzstokes_input=inputs->GetInput(VzStokesEnum);       ISSMASSERT(vzstokes_input);
+		vzstokes_input=inputs->GetInput(VzStokesEnum);       _assert_(vzstokes_input);
 	}
 
@@ -1704,7 +1704,7 @@
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
 	inputs->GetParameterValue(&drag_type,DragTypeEnum);
-	Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input); 
-	Input* surface_input=inputs->GetInput(SurfaceEnum);     ISSMASSERT(surface_input);
-	Input* drag_input=inputs->GetInput(DragCoefficientEnum);ISSMASSERT(drag_input);
+	Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 
+	Input* surface_input=inputs->GetInput(SurfaceEnum);     _assert_(surface_input);
+	Input* drag_input=inputs->GetInput(DragCoefficientEnum);_assert_(drag_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -1768,7 +1768,7 @@
 	/*Retrieve all inputs and parameters*/
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
-	Input* thickness_input   =inputs->GetInput(ThicknessEnum);   ISSMASSERT(thickness_input);
-	Input* thicknessobs_input=inputs->GetInput(ThicknessObsEnum);ISSMASSERT(thicknessobs_input);
-	Input* weights_input     =inputs->GetInput(WeightsEnum);     ISSMASSERT(weights_input);
+	Input* thickness_input   =inputs->GetInput(ThicknessEnum);   _assert_(thickness_input);
+	Input* thicknessobs_input=inputs->GetInput(ThicknessObsEnum);_assert_(thicknessobs_input);
+	Input* weights_input     =inputs->GetInput(WeightsEnum);     _assert_(weights_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -1943,5 +1943,5 @@
 	else{
 		/*Not supported yet! : */
-		ISSMERROR("response %s not supported yet",EnumToString(response));
+		_error_("response %s not supported yet",EnumToString(response));
 	}
 
@@ -2124,5 +2124,5 @@
 	else{
 		/*Not supported yet! : */
-		ISSMERROR("response %s not supported yet",EnumToString(response));
+		_error_("response %s not supported yet",EnumToString(response));
 	}
 
@@ -2176,7 +2176,7 @@
 	n=matice->GetN();
 	B=matice->GetBbar();
-	Input* slopex_input=inputs->GetInput(SurfaceSlopeXEnum); ISSMASSERT(slopex_input);
-	Input* slopey_input=inputs->GetInput(SurfaceSlopeYEnum); ISSMASSERT(slopey_input);
-	Input* thickness_input=inputs->GetInput(ThicknessEnum);  ISSMASSERT(thickness_input);
+	Input* slopex_input=inputs->GetInput(SurfaceSlopeXEnum); _assert_(slopex_input);
+	Input* slopey_input=inputs->GetInput(SurfaceSlopeYEnum); _assert_(slopey_input);
+	Input* thickness_input=inputs->GetInput(ThicknessEnum);  _assert_(thickness_input);
 
 	/*Spawn 3 sing elements: */
@@ -2216,5 +2216,5 @@
 			return CreatePVectorPrognostic_DG();
 		default:
-			ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType()));
+			_error_("Element type %s not supported yet",EnumToString(GetElementType()));
 	}
 }
@@ -2241,7 +2241,7 @@
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
 	this->parameters->FindParam(&dt,DtEnum);
-	Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); ISSMASSERT(accumulation_input);
-	Input* melting_input=inputs->GetInput(MeltingRateEnum);           ISSMASSERT(melting_input);
-	Input* thickness_input=inputs->GetInput(ThicknessEnum);           ISSMASSERT(thickness_input);
+	Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); _assert_(accumulation_input);
+	Input* melting_input=inputs->GetInput(MeltingRateEnum);           _assert_(melting_input);
+	Input* thickness_input=inputs->GetInput(ThicknessEnum);           _assert_(thickness_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -2287,7 +2287,7 @@
 	this->parameters->FindParam(&dt,DtEnum);
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
-	Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); ISSMASSERT(accumulation_input);
-	Input* melting_input=inputs->GetInput(MeltingRateEnum);           ISSMASSERT(melting_input);
-	Input* thickness_input=inputs->GetInput(ThicknessEnum);           ISSMASSERT(thickness_input);
+	Input* accumulation_input=inputs->GetInput(AccumulationRateEnum); _assert_(accumulation_input);
+	Input* melting_input=inputs->GetInput(MeltingRateEnum);           _assert_(melting_input);
+	Input* thickness_input=inputs->GetInput(ThicknessEnum);           _assert_(thickness_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -2336,8 +2336,8 @@
 	Input* slope_input=NULL;
 	if ( (analysis_type==SurfaceSlopeXAnalysisEnum) || (analysis_type==SurfaceSlopeYAnalysisEnum)){
-		slope_input=inputs->GetInput(SurfaceEnum); ISSMASSERT(slope_input);
+		slope_input=inputs->GetInput(SurfaceEnum); _assert_(slope_input);
 	}
 	if ( (analysis_type==BedSlopeXAnalysisEnum) || (analysis_type==BedSlopeYAnalysisEnum)){
-		slope_input=inputs->GetInput(BedEnum);     ISSMASSERT(slope_input);
+		slope_input=inputs->GetInput(BedEnum);     _assert_(slope_input);
 	}
 		
@@ -2396,5 +2396,5 @@
 	meltingpoint=matpar->GetMeltingPoint();
 	this->parameters->FindParam(&dt,DtEnum);
-	Input* pressure_input=inputs->GetInput(PressureEnum); ISSMASSERT(pressure_input);
+	Input* pressure_input=inputs->GetInput(PressureEnum); _assert_(pressure_input);
 
 	/* Start looping on the number of gauss 2d (nodes on the bedrock) */
@@ -2450,12 +2450,12 @@
 	heatcapacity=matpar->GetHeatCapacity();
 	this->inputs->GetParameterValue(&dt,DtEnum);
-	Input* vx_input=inputs->GetInput(VxEnum);                         ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum);                         ISSMASSERT(vy_input);
-	Input* vz_input=inputs->GetInput(VzEnum);                         ISSMASSERT(vz_input);
-	Input* geothermalflux_input=inputs->GetInput(GeothermalFluxEnum); ISSMASSERT(geothermalflux_input);
+	Input* vx_input=inputs->GetInput(VxEnum);                         _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);                         _assert_(vy_input);
+	Input* vz_input=inputs->GetInput(VzEnum);                         _assert_(vz_input);
+	Input* geothermalflux_input=inputs->GetInput(GeothermalFluxEnum); _assert_(geothermalflux_input);
 
 	/*Build frictoin element, needed later: */
 	inputs->GetParameterValue(&drag_type,DragTypeEnum);
-	if (drag_type!=2)ISSMERROR(" non-viscous friction not supported yet!");
+	if (drag_type!=2)_error_(" non-viscous friction not supported yet!");
 	friction=new Friction("3d",inputs,matpar,analysis_type);
 
@@ -2489,10 +2489,10 @@
 /*FUNCTION Tria::ComputeBasalStress {{{1*/
 void  Tria::ComputeBasalStress(Vec eps){
-	ISSMERROR("Not Implemented yet");
+	_error_("Not Implemented yet");
 }
 /*}}}*/
 /*FUNCTION Tria::ComputeStrainRate {{{1*/
 void  Tria::ComputeStrainRate(Vec eps){
-	ISSMERROR("Not Implemented yet");
+	_error_("Not Implemented yet");
 }
 /*}}}*/
@@ -2536,6 +2536,6 @@
 		input=inputs->GetInput(enum_type);
 	}
-	if (!input) ISSMERROR("Input %s not found",EnumToString(enum_type));
-	if (input->Enum()!=ControlInputEnum) ISSMERROR("Input %s is not a ControlInput",EnumToString(enum_type));
+	if (!input) _error_("Input %s not found",EnumToString(enum_type));
+	if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString(enum_type));
 
 	this->GetDofList1(&doflist1[0]);
@@ -2554,6 +2554,6 @@
 		input=inputs->GetInput(enum_type);
 	}
-	if (!input) ISSMERROR("Input %s not found",EnumToString(enum_type));
-	if (input->Enum()!=ControlInputEnum) ISSMERROR("Input %s is not a ControlInput",EnumToString(enum_type));
+	if (!input) _error_("Input %s not found",EnumToString(enum_type));
+	if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString(enum_type));
 
 	((ControlInput*)input)->ScaleGradient(scale);
@@ -2573,6 +2573,6 @@
 		input=inputs->GetInput(enum_type);
 	}
-	if (!input) ISSMERROR("Input %s not found",EnumToString(enum_type));
-	if (input->Enum()!=ControlInputEnum) ISSMERROR("Input %s is not a ControlInput",EnumToString(enum_type));
+	if (!input) _error_("Input %s not found",EnumToString(enum_type));
+	if (input->Enum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToString(enum_type));
 
 	this->GetDofList1(&doflist1[0]);
@@ -2718,10 +2718,10 @@
 int Tria::GetNodeIndex(Node* node){
 
-	ISSMASSERT(nodes);
+	_assert_(nodes);
 	for(int i=0;i<NUMVERTICES;i++){
 		if(node==nodes[i])
 		 return i;
 	}
-	ISSMERROR("Node provided not found among element nodes");
+	_error_("Node provided not found among element nodes");
 }
 /*}}}*/
@@ -2735,8 +2735,8 @@
 	/*Recover input*/
 	Input* input=inputs->GetInput(enumtype);
-	if (!input) ISSMERROR("Input %s not found in element",EnumToString(enumtype));
+	if (!input) _error_("Input %s not found in element",EnumToString(enumtype));
 
 	/*Checks in debugging mode*/
-	ISSMASSERT(pvalue);
+	_assert_(pvalue);
 
 	/* Start looping on the number of vertices: */
@@ -2759,5 +2759,5 @@
 
 	/*Checks in debugging mode*/
-	ISSMASSERT(pvalue);
+	_assert_(pvalue);
 
 	/* Start looping on the number of vertices: */
@@ -2781,5 +2781,5 @@
 
 	Input* input=inputs->GetInput(enumtype);
-	if(!input) ISSMERROR("No input of type %s found in tria",EnumToString(enumtype));
+	if(!input) _error_("No input of type %s found in tria",EnumToString(enumtype));
 
 	GaussTria* gauss=new GaussTria();
@@ -2811,5 +2811,5 @@
 	 GetSolutionFromInputsDiagnosticHutter(solution);
 	else
-	 ISSMERROR("analysis: %s not supported yet",EnumToString(analysis_type));
+	 _error_("analysis: %s not supported yet",EnumToString(analysis_type));
 
 }
@@ -2830,6 +2830,6 @@
 
 	/*Get inputs*/
-	Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);
+	Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
 
 	/*Ok, we have vx and vy in values, fill in vx and vy arrays: */
@@ -2869,6 +2869,6 @@
 
 	/*Get inputs*/
-	Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);
+	Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
 
 	/*Ok, we have vx and vy in values, fill in vx and vy arrays: */
@@ -2904,5 +2904,5 @@
 	/*Check that both inputs have been found*/
 	if (!vx_input || !vy_input){
-		ISSMERROR("Input missing. Here are the input pointers we have for vx: %p, vy: %p\n",vx_input,vy_input);
+		_error_("Input missing. Here are the input pointers we have for vx: %p, vy: %p\n",vx_input,vy_input);
 	}
 
@@ -2955,5 +2955,5 @@
 			break;
 		default:
-			ISSMERROR("%s%i","control type not supported yet: ",control_type);
+			_error_("%s%i","control type not supported yet: ",control_type);
 	}
 }
@@ -2983,10 +2983,10 @@
 
 	/*Retrieve all inputs*/
-	Input* thickness_input=inputs->GetInput(ThicknessEnum);            ISSMASSERT(thickness_input);
-	Input* vx_input=inputs->GetInput(VxEnum);                          ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum);                          ISSMASSERT(vy_input);
-	Input* adjointx_input=inputs->GetInput(AdjointxEnum);              ISSMASSERT(adjointx_input);
-	Input* adjointy_input=inputs->GetInput(AdjointyEnum);              ISSMASSERT(adjointy_input);
-	Input* rheologyb_input=matice->inputs->GetInput(RheologyBbarEnum); ISSMASSERT(rheologyb_input);
+	Input* thickness_input=inputs->GetInput(ThicknessEnum);            _assert_(thickness_input);
+	Input* vx_input=inputs->GetInput(VxEnum);                          _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);                          _assert_(vy_input);
+	Input* adjointx_input=inputs->GetInput(AdjointxEnum);              _assert_(adjointx_input);
+	Input* adjointy_input=inputs->GetInput(AdjointyEnum);              _assert_(adjointy_input);
+	Input* rheologyb_input=matice->inputs->GetInput(RheologyBbarEnum); _assert_(rheologyb_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -3057,9 +3057,9 @@
 
 	/*Retrieve all inputs we will be needing: */
-	Input* adjointx_input=inputs->GetInput(AdjointxEnum);               ISSMASSERT(adjointx_input);
-	Input* adjointy_input=inputs->GetInput(AdjointyEnum);               ISSMASSERT(adjointy_input);
-	Input* vx_input=inputs->GetInput(VxEnum);                           ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum);                           ISSMASSERT(vy_input);
-	Input* dragcoefficient_input=inputs->GetInput(DragCoefficientEnum); ISSMASSERT(dragcoefficient_input);
+	Input* adjointx_input=inputs->GetInput(AdjointxEnum);               _assert_(adjointx_input);
+	Input* adjointy_input=inputs->GetInput(AdjointyEnum);               _assert_(adjointy_input);
+	Input* vx_input=inputs->GetInput(VxEnum);                           _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);                           _assert_(vy_input);
+	Input* dragcoefficient_input=inputs->GetInput(DragCoefficientEnum); _assert_(dragcoefficient_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -3130,11 +3130,11 @@
 	/*retrieve inputs :*/
 	inputs->GetParameterValue(&drag_type,DragTypeEnum);
-	Input* drag_input    =inputs->GetInput(DragCoefficientEnum); ISSMASSERT(drag_input);
-	Input* vx_input      =inputs->GetInput(VxEnum);              ISSMASSERT(vx_input);
-	Input* vy_input      =inputs->GetInput(VyEnum);              ISSMASSERT(vy_input);
-	Input* vz_input      =inputs->GetInput(VzEnum);              ISSMASSERT(vz_input);
-	Input* adjointx_input=inputs->GetInput(AdjointxEnum);        ISSMASSERT(adjointx_input);
-	Input* adjointy_input=inputs->GetInput(AdjointyEnum);        ISSMASSERT(adjointy_input);
-	Input* adjointz_input=inputs->GetInput(AdjointzEnum);        ISSMASSERT(adjointz_input);
+	Input* drag_input    =inputs->GetInput(DragCoefficientEnum); _assert_(drag_input);
+	Input* vx_input      =inputs->GetInput(VxEnum);              _assert_(vx_input);
+	Input* vy_input      =inputs->GetInput(VyEnum);              _assert_(vy_input);
+	Input* vz_input      =inputs->GetInput(VzEnum);              _assert_(vz_input);
+	Input* adjointx_input=inputs->GetInput(AdjointxEnum);        _assert_(adjointx_input);
+	Input* adjointy_input=inputs->GetInput(AdjointyEnum);        _assert_(adjointy_input);
+	Input* adjointz_input=inputs->GetInput(AdjointzEnum);        _assert_(adjointz_input);
 
 	/*retrieve some parameters: */
@@ -3252,6 +3252,6 @@
 	/*Retrieve all inputs we will be needing: */
 	this->parameters->FindParam(&cm_noisedmp,CmNoiseDmpEnum);
-	Input* adjoint_input=inputs->GetInput(AdjointEnum);     ISSMASSERT(adjoint_input);
-	Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);
+	Input* adjoint_input=inputs->GetInput(AdjointEnum);     _assert_(adjoint_input);
+	Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -3301,6 +3301,6 @@
 
 	/*Retrieve all inputs we will be needing: */
-	Input* adjoint_input=inputs->GetInput(AdjointEnum);     ISSMASSERT(adjoint_input);
-	Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);
+	Input* adjoint_input=inputs->GetInput(AdjointEnum);     _assert_(adjoint_input);
+	Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -3344,5 +3344,5 @@
 	/*Make a copy of the original input: */
 	input=(Input*)this->inputs->GetInput(enum_type);
-	if(!input)ISSMERROR(" could not find old input with enum: %s",EnumToString(enum_type));
+	if(!input)_error_(" could not find old input with enum: %s",EnumToString(enum_type));
 
 	/*ArtificialNoise: */
@@ -3369,12 +3369,12 @@
 
 		if(control_type[i]==RheologyBbarEnum){
-			input=(Input*)matice->inputs->GetInput(control_type[i]); ISSMASSERT(input);
+			input=(Input*)matice->inputs->GetInput(control_type[i]); _assert_(input);
 		}
 		else{
-			input=(Input*)this->inputs->GetInput(control_type[i]);   ISSMASSERT(input);
+			input=(Input*)this->inputs->GetInput(control_type[i]);   _assert_(input);
 		}
 
 		if (input->Enum()!=ControlInputEnum){
-			ISSMERROR("input %s is not a ControlInput",EnumToString(control_type[i]));
+			_error_("input %s is not a ControlInput",EnumToString(control_type[i]));
 		}
 
@@ -3405,6 +3405,6 @@
 		new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]);
 		old_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+1]);
-		if(!new_inputs[i])ISSMERROR("%s%s"," could not find input with enum ",EnumToString(enums[2*i+0]));
-		if(!old_inputs[i])ISSMERROR("%s%s"," could not find input with enum ",EnumToString(enums[2*i+0]));
+		if(!new_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToString(enums[2*i+0]));
+		if(!old_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToString(enums[2*i+0]));
 	}
 
@@ -3434,6 +3434,6 @@
 	 oldinput=(Input*)this->matice->inputs->GetInput(enum_type);
 	else
-	 ISSMERROR("object %s not supported yet",EnumToString(object_enum));
-	if(!oldinput)ISSMERROR("%s%s"," could not find old input with enum: ",EnumToString(enum_type));
+	 _error_("object %s not supported yet",EnumToString(object_enum));
+	if(!oldinput)_error_("%s%s"," could not find old input with enum: ",EnumToString(enum_type));
 	newinput=(Input*)oldinput->copy();
 
@@ -3447,5 +3447,5 @@
 	 this->matice->inputs->AddInput((Input*)newinput);
 	else
-	 ISSMERROR("object %s not supported yet",EnumToString(object_enum));
+	 _error_("object %s not supported yet",EnumToString(object_enum));
 }
 /*}}}*/
@@ -3465,5 +3465,5 @@
 	/*Make a copy of the original input: */
 	input=(Input*)this->inputs->GetInput(enum_type);
-	if(!input)ISSMERROR(" could not find old input with enum: %s",EnumToString(enum_type));
+	if(!input)_error_(" could not find old input with enum: %s",EnumToString(enum_type));
 
 	/*Scale: */
@@ -3480,5 +3480,5 @@
 	if (enum_type==RheologyBbarEnum) input=this->matice->inputs->GetInput(enum_type);
 	else input=this->inputs->GetInput(enum_type);
-	if (!input) ISSMERROR("Input %s not found in tria->inputs",EnumToString(enum_type));
+	if (!input) _error_("Input %s not found in tria->inputs",EnumToString(enum_type));
 
 	/*If we don't find it, no big deal, just don't do the transfer. Otherwise, build a new Result 
@@ -3525,5 +3525,5 @@
 	/*Checks if debuging*/
 	/*{{{2*/
-	ISSMASSERT(iomodel->elements);
+	_assert_(iomodel->elements);
 	/*}}}*/
 
@@ -3656,5 +3656,5 @@
 					/*Matice will take care of it*/ break;
 				default:
-					ISSMERROR("Control %s not implemented yet",EnumToString((int)iomodel->control_type[i]));
+					_error_("Control %s not implemented yet",EnumToString((int)iomodel->control_type[i]));
 			}
 		}
@@ -3705,5 +3705,5 @@
 			break;
 		default:
-			ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
+			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
 	}
 }
@@ -3858,5 +3858,5 @@
 	if (vz_input){
 		if (vz_input->Enum()!=TriaVertexInputEnum){
-			ISSMERROR("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum()));
+			_error_("Cannot compute Vel as Vz is of type %s",EnumToString(vz_input->Enum()));
 		}
 		vz_input->GetValuesPtr(&vz_ptr,&dummy);
@@ -3942,5 +3942,5 @@
 
 		default:
-			ISSMERROR("type %i (%s) not implemented yet",type,EnumToString(type));
+			_error_("type %i (%s) not implemented yet",type,EnumToString(type));
 	}
 }
@@ -3948,10 +3948,10 @@
 /*FUNCTION Tria::InputUpdateFromVector(int* vector, int name, int type);{{{1*/
 void  Tria::InputUpdateFromVector(int* vector, int name, int type){
-	ISSMERROR(" not supported yet!");
+	_error_(" not supported yet!");
 }
 /*}}}*/
 /*FUNCTION Tria::InputUpdateFromVector(bool* vector, int name, int type);{{{1*/
 void  Tria::InputUpdateFromVector(bool* vector, int name, int type){
-	ISSMERROR(" not supported yet!");
+	_error_(" not supported yet!");
 }
 /*}}}*/
@@ -4023,5 +4023,5 @@
 
 		default:
-			ISSMERROR("type %i (%s) not implemented yet",type,EnumToString(type));
+			_error_("type %i (%s) not implemented yet",type,EnumToString(type));
 	}
 
@@ -4030,10 +4030,10 @@
 /*FUNCTION Tria::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{1*/
 void  Tria::InputUpdateFromVectorDakota(int* vector, int name, int type){
-	ISSMERROR(" not supported yet!");
+	_error_(" not supported yet!");
 }
 /*}}}*/
 /*FUNCTION Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{1*/
 void  Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type){
-	ISSMERROR(" not supported yet!");
+	_error_(" not supported yet!");
 }
 /*}}}*/
@@ -4107,5 +4107,5 @@
 
 	/*First off, check that this segment belongs to this element: */
-	if ((int)*(segment+4)!=this->id)ISSMERROR("%s%i%s%i","error message: segment with id ",(int)*(segment+4)," does not belong to element with id:",this->id);
+	if ((int)*(segment+4)!=this->id)_error_("%s%i%s%i","error message: segment with id ",(int)*(segment+4)," does not belong to element with id:",this->id);
 
 	/*Recover segment node locations: */
@@ -4126,7 +4126,7 @@
 	length=sqrt(pow(x2-x1,2.0)+pow(y2-y1,2));
 
-	Input* thickness_input=inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);
-	Input* vx_input=inputs->GetInput(VxEnum); ISSMASSERT(vx_input);
-	Input* vy_input=inputs->GetInput(VyEnum); ISSMASSERT(vy_input);
+	Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input);
+	Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
 
 	thickness_input->GetParameterValue(&h1, gauss_1);
@@ -4404,5 +4404,5 @@
 			 * */
 			if (control_type[i]==DragCoefficientEnum){
-				Input* drag_input=inputs->GetInput(DragCoefficientEnum);      ISSMASSERT(drag_input);
+				Input* drag_input=inputs->GetInput(DragCoefficientEnum);      _assert_(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;
@@ -4421,5 +4421,5 @@
 			}
 			else{
-				ISSMERROR("unsupported control type: %s",EnumToString(control_type[i]));
+				_error_("unsupported control type: %s",EnumToString(control_type[i]));
 			}
 		}
@@ -4436,5 +4436,5 @@
 void  Tria::SetClone(int* minranks){
 
-	ISSMERROR("not implemented yet");
+	_error_("not implemented yet");
 }
 /*}}}1*/
@@ -4938,7 +4938,7 @@
 
 	/*Retrieve all inputs we will be needing: */
-	Input* thickness_input   =inputs->GetInput(ThicknessEnum);   ISSMASSERT(thickness_input);
-	Input* thicknessobs_input=inputs->GetInput(ThicknessObsEnum);ISSMASSERT(thicknessobs_input);
-	Input* weights_input     =inputs->GetInput(WeightsEnum);     ISSMASSERT(weights_input);
+	Input* thickness_input   =inputs->GetInput(ThicknessEnum);   _assert_(thickness_input);
+	Input* thicknessobs_input=inputs->GetInput(ThicknessObsEnum);_assert_(thicknessobs_input);
+	Input* weights_input     =inputs->GetInput(WeightsEnum);     _assert_(weights_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -5019,5 +5019,5 @@
 	/*Checks if debuging*/
 	/*{{{2*/
-	ISSMASSERT(iomodel->elements);
+	_assert_(iomodel->elements);
 	/*}}}*/
 
Index: /issm/trunk/src/c/objects/Elements/Tria.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Elements/Tria.h	(revision 6412)
@@ -100,5 +100,5 @@
 		void   InputToResult(int enum_type,int step,double time);
 		void   DeleteResults(void);
-		void   MaterialUpdateFromTemperature(void){ISSMERROR("not implemented yet");};
+		void   MaterialUpdateFromTemperature(void){_error_("not implemented yet");};
 		double MassFlux(double* segment,bool process_units);
 		void   MaxAbsVx(double* pmaxabsvx, bool process_units);
Index: /issm/trunk/src/c/objects/Elements/TriaRef.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/TriaRef.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Elements/TriaRef.cpp	(revision 6412)
@@ -52,5 +52,5 @@
 void TriaRef::SetElementType(int type,int type_counter){
 
-	ISSMASSERT(type==P1Enum || type==P1DGEnum);
+	_assert_(type==P1Enum || type==P1DGEnum);
 
 	/*initialize element type*/
@@ -277,5 +277,5 @@
 
 	*Jdet=1.0/2.0*sqrt(pow(x2-x1,2.) + pow(y2-y1,2.));
-	if(*Jdet<0) ISSMERROR("negative jacobian determinant!");
+	if(*Jdet<0) _error_("negative jacobian determinant!");
 
 }
@@ -292,5 +292,5 @@
 	/*Get Determinant*/
 	Matrix2x2Determinant(Jdet,&J[0][0]);
-	if(*Jdet<0) ISSMERROR("negative jacobian determinant!");
+	if(*Jdet<0) _error_("negative jacobian determinant!");
 
 }
@@ -314,5 +314,5 @@
 
 	*Jdet=SQRT3/6.0*pow(pow(((y2-y1)*(z3-z1)-(z2-z1)*(y3-y1)),2.0)+pow(((z2-z1)*(x3-x1)-(x2-x1)*(z3-z1)),2.0)+pow(((x2-x1)*(y3-y1)-(y2-y1)*(x3-x1)),2.0),0.5);
-	if(*Jdet<0) ISSMERROR("negative jacobian determinant!");
+	if(*Jdet<0) _error_("negative jacobian determinant!");
 
 }
@@ -350,6 +350,6 @@
 	GetNodalFunctions(&BasisFunctions[0],gauss);
 
-	ISSMASSERT(index1>=0 && index1<3);
-	ISSMASSERT(index2>=0 && index2<3);
+	_assert_(index1>=0 && index1<3);
+	_assert_(index2>=0 && index2<3);
 	l1l2[0]=BasisFunctions[index1];
 	l1l2[1]=BasisFunctions[index2];
Index: /issm/trunk/src/c/objects/FemModel.cpp
===================================================================
--- /issm/trunk/src/c/objects/FemModel.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/FemModel.cpp	(revision 6412)
@@ -53,26 +53,26 @@
 	for(i=0;i<nummodels;i++){
 
-		ISSMPRINTF(VerboseMProcessor(),"   Processing finite element model of analysis %s:\n",EnumToString(analysis_type_list[i]));
+		_printf_(VerboseMProcessor(),"   Processing finite element model of analysis %s:\n",EnumToString(analysis_type_list[i]));
 		analysis_type=analysis_type_list[i];
 		this->SetCurrentConfiguration(analysis_type);
 	
 		if(i==0){
-			ISSMPRINTF(VerboseMProcessor(),"      create vertex degrees of freedom\n");
+			_printf_(VerboseMProcessor(),"      create vertex degrees of freedom\n");
 			VerticesDofx(vertices,parameters); //only call once, we only have one set of vertices
 		}
 
-		ISSMPRINTF(VerboseMProcessor(),"      resolve node constraints\n");
+		_printf_(VerboseMProcessor(),"      resolve node constraints\n");
 		SpcNodesx(nodes,constraints,analysis_type); 
 	
-		ISSMPRINTF(VerboseMProcessor(),"      create nodal degrees of freedom\n");
+		_printf_(VerboseMProcessor(),"      create nodal degrees of freedom\n");
 		NodesDofx(nodes,parameters,analysis_type);
 	
-		ISSMPRINTF(VerboseMProcessor(),"      create nodal constraints vector\n");
+		_printf_(VerboseMProcessor(),"      create nodal constraints vector\n");
 		CreateNodalConstraintsx(&m_ys[i],nodes,analysis_type);
 
-		ISSMPRINTF(VerboseMProcessor(),"      create node sets\n");
+		_printf_(VerboseMProcessor(),"      create node sets\n");
 		BuildNodeSetsx(&m_nodesets[i], nodes,analysis_type);
 
-		ISSMPRINTF(VerboseMProcessor(),"      configuring element and loads\n");
+		_printf_(VerboseMProcessor(),"      configuring element and loads\n");
 		ConfigureObjectsx(elements, loads, nodes, vertices, materials,parameters);
 	}
@@ -152,5 +152,5 @@
 	}
 	if(found!=-1) analysis_counter=found;
-	else ISSMERROR("Could not find alias for analysis_type %s in list of FemModel analyses",EnumToString(configuration_type));
+	else _error_("Could not find alias for analysis_type %s in list of FemModel analyses",EnumToString(configuration_type));
 
 	/*activate matrices/vectors: */
@@ -170,5 +170,5 @@
 	/*take care of petsc options, that depend on this analysis type: */
 	PetscOptionsFromAnalysis(this->parameters,analysis_type);
-	ISSMPRINTF(VerboseSolver(),"      petsc Options set for analysis type: %s\n",EnumToString(analysis_type));
+	_printf_(VerboseSolver(),"      petsc Options set for analysis type: %s\n",EnumToString(analysis_type));
 
 }
Index: /issm/trunk/src/c/objects/Gauss/GaussPenta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Gauss/GaussPenta.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Gauss/GaussPenta.cpp	(revision 6412)
@@ -121,5 +121,5 @@
 	}
 	else{
-		ISSMERROR("Penta not supported yet");
+		_error_("Penta not supported yet");
 	}
 
@@ -151,5 +151,5 @@
 	}
 	else{
-		ISSMERROR("Tria not supported yet");
+		_error_("Tria not supported yet");
 	}
 
@@ -213,5 +213,5 @@
 	}
 	else{
-		ISSMERROR("Tria not supported yet (user provided indices %i %i %i %i)",index1,index2,index3,index4);
+		_error_("Tria not supported yet (user provided indices %i %i %i %i)",index1,index2,index3,index4);
 	}
 
@@ -294,5 +294,5 @@
 
 	/*Check input in debugging mode*/
-	 ISSMASSERT(ig>=0 && ig< numgauss);
+	 _assert_(ig>=0 && ig< numgauss);
 
 	 /*update static arrays*/
@@ -309,5 +309,5 @@
 
 	/*in debugging mode: check that the default constructor has been called*/
-	ISSMASSERT(numgauss==-1);
+	_assert_(numgauss==-1);
 
 	/*update static arrays*/
@@ -332,5 +332,5 @@
 			break;
 		default:
-			ISSMERROR("vertex index should be in [0 5]");
+			_error_("vertex index should be in [0 5]");
 
 	}
@@ -342,5 +342,5 @@
 
 	/*in debugging mode: check that the default constructor has been called*/
-	ISSMASSERT(numgauss==-1);
+	_assert_(numgauss==-1);
 
 	/*Basal Tria*/
@@ -351,5 +351,5 @@
 	}
 	else{
-		ISSMERROR("Tria not supported yet");
+		_error_("Tria not supported yet");
 	}
 
@@ -360,10 +360,10 @@
 
 	/*Check that this has been initialized*/
-	ISSMASSERT(numgauss>0);
-	ISSMASSERT(weights);
-	ISSMASSERT(coords1);
-	ISSMASSERT(coords2);
-	ISSMASSERT(coords3);
-	ISSMASSERT(coords4);
+	_assert_(numgauss>0);
+	_assert_(weights);
+	_assert_(coords1);
+	_assert_(coords2);
+	_assert_(coords3);
+	_assert_(coords4);
 
 	/*return first gauss index*/
@@ -375,10 +375,10 @@
 
 	/*Check that this has been initialized*/
-	ISSMASSERT(numgauss>0);
-	ISSMASSERT(weights);
-	ISSMASSERT(coords1);
-	ISSMASSERT(coords2);
-	ISSMASSERT(coords3);
-	ISSMASSERT(coords4);
+	_assert_(numgauss>0);
+	_assert_(weights);
+	_assert_(coords1);
+	_assert_(coords2);
+	_assert_(coords3);
+	_assert_(coords4);
 
 	/*return last gauss index +1*/
Index: /issm/trunk/src/c/objects/Gauss/GaussTria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Gauss/GaussTria.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Gauss/GaussTria.cpp	(revision 6412)
@@ -82,5 +82,5 @@
 	}
 	else
-	 ISSMERROR("The 2 indices provided are not supported yet (user provided %i and %i)",index1,index2);
+	 _error_("The 2 indices provided are not supported yet (user provided %i and %i)",index1,index2);
 
 	/*Initialize static fields as undefined*/
@@ -180,5 +180,5 @@
 	}
 	else
-	 ISSMERROR("The 2 indices provided are not supported yet (user provided %i and %i)",index1,index2);
+	 _error_("The 2 indices provided are not supported yet (user provided %i and %i)",index1,index2);
 
 }
@@ -188,5 +188,5 @@
 
 	/*Check input in debugging mode*/
-	 ISSMASSERT(ig>=0 && ig< numgauss);
+	 _assert_(ig>=0 && ig< numgauss);
 
 	 /*update static arrays*/
@@ -206,5 +206,5 @@
 
 	/*in debugging mode: check that the default constructor has been called*/
-	ISSMASSERT(numgauss==-1);
+	_assert_(numgauss==-1);
 
 	x1=*(xyz_list+3*0+0); y1=*(xyz_list+3*0+1);
@@ -229,5 +229,5 @@
 
 	/*in debugging mode: check that the default constructor has been called*/
-	ISSMASSERT(numgauss==-1);
+	_assert_(numgauss==-1);
 
 	/*update static arrays*/
@@ -243,5 +243,5 @@
 			break;
 		default:
-			ISSMERROR("vertex index should be in [0 2]");
+			_error_("vertex index should be in [0 2]");
 
 	}
@@ -253,9 +253,9 @@
 
 	/*Check that this has been initialized*/
-	ISSMASSERT(numgauss>0);
-	ISSMASSERT(weights);
-	ISSMASSERT(coords1);
-	ISSMASSERT(coords2);
-	ISSMASSERT(coords3);
+	_assert_(numgauss>0);
+	_assert_(weights);
+	_assert_(coords1);
+	_assert_(coords2);
+	_assert_(coords3);
 
 	/*return first gauss index*/
@@ -267,9 +267,9 @@
 
 	/*Check that this has been initialized*/
-	ISSMASSERT(numgauss>0);
-	ISSMASSERT(weights);
-	ISSMASSERT(coords1);
-	ISSMASSERT(coords2);
-	ISSMASSERT(coords3);
+	_assert_(numgauss>0);
+	_assert_(weights);
+	_assert_(coords1);
+	_assert_(coords2);
+	_assert_(coords3);
 
 	/*return last gauss index +1*/
Index: /issm/trunk/src/c/objects/Hook.cpp
===================================================================
--- /issm/trunk/src/c/objects/Hook.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Hook.cpp	(revision 6412)
@@ -172,5 +172,5 @@
 	/*allocate: */
 	if (num<0){
-		ISSMERROR("cannot demarshall Hook as num<=0");
+		_error_("cannot demarshall Hook as num<=0");
 	}
 	else if (num==0){
@@ -185,5 +185,5 @@
 
 		/*demarshall allocated ids and offsets: */
-		ISSMASSERT(num<1000);
+		_assert_(num<1000);
 		for (i=0;i<num;i++){
 			memcpy(&this->ids[i],marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
@@ -241,5 +241,5 @@
 
 	/*Checks if debugging mode*/
-	ISSMASSERT(this->num==0 || this->ids!=NULL);
+	_assert_(this->num==0 || this->ids!=NULL);
 
 	for(i=0;i<this->num;i++){
@@ -270,5 +270,5 @@
 			this->objects[i]=(Object*)dataset->GetObjectById(this->offsets+i,this->ids[i]); //remember the offset for later on.
 			/*check the id is correct!: */
-			if (this->objects[i]->Id()!=this->ids[i]) ISSMERROR("%s%i%s%i%s"," wrong id: ",this->objects[i]->Id()," vs ",this->ids[i],"  in resolved pointer!");
+			if (this->objects[i]->Id()!=this->ids[i]) _error_("%s%i%s%i%s"," wrong id: ",this->objects[i]->Id()," vs ",this->ids[i],"  in resolved pointer!");
 		}
 	}
@@ -279,8 +279,8 @@
 	
 	/*first, check that we only have one T object in our object list: */
-	if (this->num!=1) ISSMERROR("%s%i%s\n"," trying to delivery a single hook object when hook holds ",this->num," objects");
+	if (this->num!=1) _error_("%s%i%s\n"," trying to delivery a single hook object when hook holds ",this->num," objects");
 
 	/*check NULL: */
-	if (this->objects==NULL) ISSMERROR("hook is not pointing to any object, objects pointer is NULL");
+	if (this->objects==NULL) _error_("hook is not pointing to any object, objects pointer is NULL");
 
 	return *objects;
@@ -331,9 +331,9 @@
 
 	/*Else, check that we are requesting a half of num*/
-	if (numindices>this->num) ISSMERROR("Cannot spawn hook with %i objects from a Hook of %i objects",numindices,this->num);
+	if (numindices>this->num) _error_("Cannot spawn hook with %i objects from a Hook of %i objects",numindices,this->num);
 
 	/*go pickup the correct objects, ids and offsets :*/
 	output->num=numindices;
-	if(output->num<1) ISSMERROR("Trying to spawn an empty ElementProperties!");
+	if(output->num<1) _error_("Trying to spawn an empty ElementProperties!");
 
 	output->objects=(Object**)xmalloc(output->num*sizeof(Object*));
Index: /issm/trunk/src/c/objects/Inputs/BoolInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/Inputs/BoolInput.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Inputs/BoolInput.cpp	(revision 6412)
@@ -149,5 +149,5 @@
 ElementResult* BoolInput::SpawnResult(int step, double time){
 
-	ISSMERROR(" not supported yet!");
+	_error_(" not supported yet!");
 
 }
@@ -161,20 +161,20 @@
 /*}}}*/
 /*FUNCTION BoolInput::GetParameterValue(int* pvalue){{{1*/
-void BoolInput::GetParameterValue(int* pvalue){ISSMERROR(" not supported yet!");}
+void BoolInput::GetParameterValue(int* pvalue){_error_(" not supported yet!");}
 /*}}}*/
 /*FUNCTION BoolInput::GetParameterValue(double* pvalue){{{1*/
-void BoolInput::GetParameterValue(double* pvalue){ISSMERROR(" not supported yet!");}
+void BoolInput::GetParameterValue(double* pvalue){_error_(" not supported yet!");}
 /*}}}*/
 /*FUNCTION BoolInput::GetParameterValue(double* pvalue,GaussTria* gauss){{{1*/
-void BoolInput::GetParameterValue(double* pvalue,GaussTria* gauss){ISSMERROR(" not supported yet!");}
+void BoolInput::GetParameterValue(double* pvalue,GaussTria* gauss){_error_(" not supported yet!");}
 /*}}}*/
 /*FUNCTION BoolInput::GetParameterValue(double* pvalue,GaussPenta* gauss){{{1*/
-void BoolInput::GetParameterValue(double* pvalue,GaussPenta* gauss){ISSMERROR(" not supported yet!");}
+void BoolInput::GetParameterValue(double* pvalue,GaussPenta* gauss){_error_(" not supported yet!");}
 /*}}}*/
 /*FUNCTION BoolInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{1*/
-void BoolInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){ISSMERROR(" not supported yet!");}
+void BoolInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
 /*}}}*/
 /*FUNCTION BoolInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{1*/
-void BoolInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){ISSMERROR(" not supported yet!");}
+void BoolInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
 /*}}}*/
 /*FUNCTION BoolInput::ChangeEnum{{{1*/
@@ -210,5 +210,5 @@
 
 		default:
-			ISSMERROR("not implemented yet");
+			_error_("not implemented yet");
 	}
 
@@ -226,5 +226,5 @@
 void BoolInput::GetVectorFromInputs(Vec vector,int* doflist){
 
-	ISSMERROR(" not supporte yet!");
+	_error_(" not supporte yet!");
 
 }
@@ -233,6 +233,6 @@
 void BoolInput::GetValuesPtr(double** pvalues,int* pnum_values){
 
-	ISSMERROR(" not supported yet!");
-
-}
-/*}}}*/
+	_error_(" not supported yet!");
+
+}
+/*}}}*/
Index: /issm/trunk/src/c/objects/Inputs/BoolInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/BoolInput.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Inputs/BoolInput.h	(revision 6412)
@@ -40,5 +40,5 @@
 		int   EnumType();
 		Input* SpawnTriaInput(int* indices);
-		Input* PointwiseDivide(Input* inputB){ISSMERROR("not implemented yet");};
+		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
 		ElementResult* SpawnResult(int step, double time);
 		/*}}}*/
@@ -51,26 +51,26 @@
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss);
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss);
-		void GetParameterAverage(double* pvalue){ISSMERROR("not implemented yet");};
-		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){ISSMERROR("not implemented yet");};
-		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){ISSMERROR("not implemented yet");};
-		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
+		void GetParameterAverage(double* pvalue){_error_("not implemented yet");};
+		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
 		void ChangeEnum(int newenumtype);
 		void SquareMin(double* psquaremin, bool process_units,Parameters* parameters);
-		void ConstrainMin(double minimum){ISSMERROR("not implemented yet");};
-		double InfinityNorm(void){ISSMERROR("InfinityNorm not implemented for booleans");};
-		double Max(void){ISSMERROR("Max not implemented for booleans");};
-		double MaxAbs(void){ISSMERROR("Max not implemented for booleans");};
-		double Min(void){ISSMERROR("Min not implemented for booleans");};
-		double MinAbs(void){ISSMERROR("Min not implemented for booleans");};
+		void ConstrainMin(double minimum){_error_("not implemented yet");};
+		double InfinityNorm(void){_error_("InfinityNorm not implemented for booleans");};
+		double Max(void){_error_("Max not implemented for booleans");};
+		double MaxAbs(void){_error_("Max not implemented for booleans");};
+		double Min(void){_error_("Min not implemented for booleans");};
+		double MinAbs(void){_error_("Min not implemented for booleans");};
 		void Scale(double scale_factor);
-		void ArtificialNoise(double min,double max){ISSMERROR("not implemented yet");};
+		void ArtificialNoise(double min,double max){_error_("not implemented yet");};
 		void AXPY(Input* xinput,double scalar);
 		void Constrain(double cm_min, double cm_max);
-		void Extrude(void){ISSMERROR("not supported yet");};
-		void VerticallyIntegrate(Input* thickness_input){ISSMERROR("not supported yet");};
+		void Extrude(void){_error_("not supported yet");};
+		void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");};
 		void GetVectorFromInputs(Vec vector,int* doflist);
 		void GetValuesPtr(double** pvalues,int* pnum_values);
Index: /issm/trunk/src/c/objects/Inputs/ControlInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/Inputs/ControlInput.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Inputs/ControlInput.cpp	(revision 6412)
@@ -42,5 +42,5 @@
 			break;
 		default:
-			ISSMERROR("Input of Enum %s not supported yet by ControlInput",EnumToString(enum_input));
+			_error_("Input of Enum %s not supported yet by ControlInput",EnumToString(enum_input));
 	}
 	gradient   =NULL;
@@ -179,5 +179,5 @@
 			values->Demarshall(&marshalled_dataset);
 		}
-		else ISSMERROR("Not supported yet");
+		else _error_("Not supported yet");
 	}
 	else{
@@ -197,5 +197,5 @@
 			savedvalues->Demarshall(&marshalled_dataset);
 		}
-		else ISSMERROR("Not supported yet");
+		else _error_("Not supported yet");
 	}
 	else{
@@ -215,5 +215,5 @@
 			gradient->Demarshall(&marshalled_dataset);
 		}
-		else ISSMERROR("Not supported yet");
+		else _error_("Not supported yet");
 	}
 	else{
@@ -276,5 +276,5 @@
 /*FUNCTION ControlInput::ScaleGradient{{{1*/
 void ControlInput::ScaleGradient(double scaling_factor){
-	if(!gradient) ISSMERROR("Gradient of ControlInput %s not found",EnumToString(enum_type));
+	if(!gradient) _error_("Gradient of ControlInput %s not found",EnumToString(enum_type));
 	gradient->Scale(scaling_factor);
 }/*}}}*/
@@ -294,5 +294,5 @@
 			break;
 		default:
-			ISSMERROR("more than 3 controls not implemented yet (Gradient %i was requested). EnumDefinitions.h needs to be updated.",this->control_id);
+			_error_("more than 3 controls not implemented yet (Gradient %i was requested). EnumDefinitions.h needs to be updated.",this->control_id);
 	}
 
@@ -348,5 +348,5 @@
 /*FUNCTION ControlInput::SaveValue{{{1*/
 void ControlInput::SaveValue(void){
-	if(!values) ISSMERROR("Values of %s not found",EnumToString(this->enum_type));
+	if(!values) _error_("Values of %s not found",EnumToString(this->enum_type));
 
 	if(savedvalues) delete this->savedvalues;
@@ -355,6 +355,6 @@
 /*FUNCTION ControlInput::UpdateValue{{{1*/
 void ControlInput::UpdateValue(double scalar){
-	if(!gradient)    ISSMERROR("Gradient of %s not found",EnumToString(this->enum_type));
-	if(!savedvalues) ISSMERROR("Values of %s not found",EnumToString(this->enum_type));
+	if(!gradient)    _error_("Gradient of %s not found",EnumToString(this->enum_type));
+	if(!savedvalues) _error_("Values of %s not found",EnumToString(this->enum_type));
 
 	if(values) delete this->values;
Index: /issm/trunk/src/c/objects/Inputs/ControlInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/ControlInput.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Inputs/ControlInput.h	(revision 6412)
@@ -42,5 +42,5 @@
 		int    EnumType();
 		Input* SpawnTriaInput(int* indices);
-		Input* PointwiseDivide(Input* inputB){ISSMERROR("not implemented yet");};
+		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
 		ElementResult* SpawnResult(int step, double time);
 		/*}}}*/
@@ -54,27 +54,27 @@
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss);
 		void GetParameterAverage(double* pvalue);
-		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){ISSMERROR("not implemented yet");};
-		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){ISSMERROR("not implemented yet");};
-		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void ChangeEnum(int newenumtype){ISSMERROR("not implemented yet");};
-		void SquareMin(double* psquaremin, bool process_units,Parameters* parameters){ISSMERROR("not implemented yet");};
-		void ConstrainMin(double minimum){ISSMERROR("not implemented yet");};
-		void Scale(double scale_factor){ISSMERROR("not implemented yet");};
-		void ArtificialNoise(double min,double max){ISSMERROR("not implemented yet");};
-		void AXPY(Input* xinput,double scalar){ISSMERROR("not implemented yet");};
+		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void ChangeEnum(int newenumtype){_error_("not implemented yet");};
+		void SquareMin(double* psquaremin, bool process_units,Parameters* parameters){_error_("not implemented yet");};
+		void ConstrainMin(double minimum){_error_("not implemented yet");};
+		void Scale(double scale_factor){_error_("not implemented yet");};
+		void ArtificialNoise(double min,double max){_error_("not implemented yet");};
+		void AXPY(Input* xinput,double scalar){_error_("not implemented yet");};
 		void Constrain(double cm_min, double cm_max);
-		double InfinityNorm(void){ISSMERROR("not implemented yet");};
-		double Max(void){ISSMERROR("not implemented yet");};
-		double MaxAbs(void){ISSMERROR("not implemented yet");};
-		double Min(void){ISSMERROR("not implemented yet");};
-		double MinAbs(void){ISSMERROR("not implemented yet");};
+		double InfinityNorm(void){_error_("not implemented yet");};
+		double Max(void){_error_("not implemented yet");};
+		double MaxAbs(void){_error_("not implemented yet");};
+		double Min(void){_error_("not implemented yet");};
+		double MinAbs(void){_error_("not implemented yet");};
 		void Extrude(void);
 		void VerticallyIntegrate(Input* thickness_input);
-		void GetVectorFromInputs(Vec vector,int* doflist){ISSMERROR("not implemented yet");};
-		void GetValuesPtr(double** pvalues,int* pnum_values){ISSMERROR("not implemented yet");};
+		void GetVectorFromInputs(Vec vector,int* doflist){_error_("not implemented yet");};
+		void GetValuesPtr(double** pvalues,int* pnum_values){_error_("not implemented yet");};
 		ElementResult* SpawnGradient(int step, double time);
 		void GetGradient(Vec gradient_vec,int* doflist);
Index: /issm/trunk/src/c/objects/Inputs/DoubleInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/Inputs/DoubleInput.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Inputs/DoubleInput.cpp	(revision 6412)
@@ -160,5 +160,5 @@
 	*pvalue=(bool)value;
 #else
-	ISSMERROR("Double input of enum %s cannot return a boolean",EnumToString(enum_type));
+	_error_("Double input of enum %s cannot return a boolean",EnumToString(enum_type));
 #endif
 
@@ -170,5 +170,5 @@
 	*pvalue=(int)value;
 #else
-	ISSMERROR("Double input of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));
+	_error_("Double input of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));
 #endif
 
@@ -183,14 +183,14 @@
 /*}}}*/
 /*FUNCTION DoubleInput::GetParameterValue(double* pvalue,GaussTria* gauss){{{1*/
-void DoubleInput::GetParameterValue(double* pvalue,GaussTria* gauss){ISSMERROR(" not supported yet!");}
+void DoubleInput::GetParameterValue(double* pvalue,GaussTria* gauss){_error_(" not supported yet!");}
 /*}}}*/
 /*FUNCTION DoubleInput::GetParameterValue(double* pvalue,GaussPenta* gauss){{{1*/
-void DoubleInput::GetParameterValue(double* pvalue,GaussPenta* gauss){ISSMERROR(" not supported yet!");}
+void DoubleInput::GetParameterValue(double* pvalue,GaussPenta* gauss){_error_(" not supported yet!");}
 /*}}}*/
 /*FUNCTION DoubleInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{1*/
-void DoubleInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){ISSMERROR(" not supported yet!");}
+void DoubleInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
 /*}}}*/
 /*FUNCTION DoubleInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{1*/
-void DoubleInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){ISSMERROR(" not supported yet!");}
+void DoubleInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
 /*}}}*/
 /*FUNCTION DoubleInput::ChangeEnum{{{1*/
@@ -232,5 +232,5 @@
 
 		default:
-			ISSMERROR("not implemented yet");
+			_error_("not implemented yet");
 	}
 
@@ -268,5 +268,5 @@
 void DoubleInput::GetVectorFromInputs(Vec vector,int* doflist){
 
-	ISSMERROR(" not supporte yet!");
+	_error_(" not supporte yet!");
 
 }
@@ -275,5 +275,5 @@
 void DoubleInput::GetValuesPtr(double** pvalues,int* pnum_values){
 
-	ISSMERROR(" not supported yet!");
+	_error_(" not supported yet!");
 
 }
@@ -291,5 +291,5 @@
 
 	/*Check that input provided is a thickness*/
-	if (thickness_input->EnumType()!=ThicknessEnum) ISSMERROR("Input provided is not a Thickness (enum_type is %s)",EnumToString(thickness_input->EnumType()));
+	if (thickness_input->EnumType()!=ThicknessEnum) _error_("Input provided is not a Thickness (enum_type is %s)",EnumToString(thickness_input->EnumType()));
 
 	/*vertically integrate depending on type:*/
@@ -302,5 +302,5 @@
 
 		default:
-			ISSMERROR("not implemented yet");
+			_error_("not implemented yet");
 	}
 }
Index: /issm/trunk/src/c/objects/Inputs/DoubleInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/DoubleInput.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Inputs/DoubleInput.h	(revision 6412)
@@ -51,24 +51,24 @@
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss);
 		void GetParameterAverage(double* pvalue);
-		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){ISSMERROR("not implemented yet");};
-		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){ISSMERROR("not implemented yet");};
-		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
+		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
 		void ChangeEnum(int newenumtype);
 		void SquareMin(double* psquaremin, bool process_units,Parameters* parameters);
 		void ConstrainMin(double minimum);
 		void Scale(double scale_factor);
-		void ArtificialNoise(double min,double max){ISSMERROR("not implemented yet");};
+		void ArtificialNoise(double min,double max){_error_("not implemented yet");};
 		void AXPY(Input* xinput,double scalar);
 		void Constrain(double cm_min, double cm_max);
-		double InfinityNorm(void){ISSMERROR("not implemented yet");};
+		double InfinityNorm(void){_error_("not implemented yet");};
 		double Max(void);
 		double MaxAbs(void);
 		double Min(void);
 		double MinAbs(void);
-		void Extrude(void){ISSMERROR("not supported yet");};
+		void Extrude(void){_error_("not supported yet");};
 		void VerticallyIntegrate(Input* thickness_input);
 		void GetVectorFromInputs(Vec vector,int* doflist);
Index: /issm/trunk/src/c/objects/Inputs/IntInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/Inputs/IntInput.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Inputs/IntInput.cpp	(revision 6412)
@@ -148,5 +148,5 @@
 ElementResult* IntInput::SpawnResult(int step, double time){
 	
-	ISSMERROR(" not supported yet!");
+	_error_(" not supported yet!");
 
 }
@@ -155,5 +155,5 @@
 /*Object functions*/
 /*FUNCTION IntInput::GetParameterValue(bool* pvalue) {{{1*/
-void IntInput::GetParameterValue(bool* pvalue){ISSMERROR(" not supported yet!");}
+void IntInput::GetParameterValue(bool* pvalue){_error_(" not supported yet!");}
 /*}}}*/
 /*FUNCTION IntInput::GetParameterValue(int* pvalue){{{1*/
@@ -164,18 +164,18 @@
 /*FUNCTION IntInput::GetParameterValue(double* pvalue){{{1*/
 void IntInput::GetParameterValue(double* pvalue){
-	ISSMERROR("IntInput cannot return a double in parallel");
+	_error_("IntInput cannot return a double in parallel");
 }
 /*}}}*/
 /*FUNCTION IntInput::GetParameterValue(double* pvalue,GaussTria* gauss){{{1*/
-void IntInput::GetParameterValue(double* pvalue,GaussTria* gauss){ISSMERROR(" not supported yet!");}
+void IntInput::GetParameterValue(double* pvalue,GaussTria* gauss){_error_(" not supported yet!");}
 /*}}}*/
 /*FUNCTION IntInput::GetParameterValue(double* pvalue,GaussPenta* gauss){{{1*/
-void IntInput::GetParameterValue(double* pvalue,GaussPenta* gauss){ISSMERROR(" not supported yet!");}
+void IntInput::GetParameterValue(double* pvalue,GaussPenta* gauss){_error_(" not supported yet!");}
 /*}}}*/
 /*FUNCTION IntInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{1*/
-void IntInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){ISSMERROR(" not supported yet!");}
+void IntInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
 /*}}}*/
 /*FUNCTION IntInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{1*/
-void IntInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){ISSMERROR(" not supported yet!");}
+void IntInput::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
 /*}}}*/
 /*FUNCTION IntInput::ChangeEnum{{{1*/
@@ -215,5 +215,5 @@
 
 		default:
-			ISSMERROR("not implemented yet");
+			_error_("not implemented yet");
 	}
 
@@ -231,5 +231,5 @@
 void IntInput::GetVectorFromInputs(Vec vector,int* doflist){
 
-	ISSMERROR(" not supporte yet!");
+	_error_(" not supporte yet!");
 
 }
@@ -238,6 +238,6 @@
 void IntInput::GetValuesPtr(double** pvalues,int* pnum_values){
 
-	ISSMERROR(" not supported yet!");
-
-}
-/*}}}*/
+	_error_(" not supported yet!");
+
+}
+/*}}}*/
Index: /issm/trunk/src/c/objects/Inputs/IntInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/IntInput.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Inputs/IntInput.h	(revision 6412)
@@ -40,5 +40,5 @@
 		int   EnumType();
 		Input* SpawnTriaInput(int* indices);
-		Input* PointwiseDivide(Input* inputB){ISSMERROR("not implemented yet");};
+		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
 		ElementResult* SpawnResult(int step, double time);
 		/*}}}*/
@@ -51,26 +51,26 @@
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss);
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss);
-		void GetParameterAverage(double* pvalue){ISSMERROR("not implemented yet");};
-		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){ISSMERROR("not implemented yet");};
-		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){ISSMERROR("not implemented yet");};
-		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
+		void GetParameterAverage(double* pvalue){_error_("not implemented yet");};
+		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
 		void ChangeEnum(int newenumtype);
 		void SquareMin(double* psquaremin, bool process_units,Parameters* parameters);
-		void ConstrainMin(double minimum){ISSMERROR("not implemented yet");};
+		void ConstrainMin(double minimum){_error_("not implemented yet");};
 		void Scale(double scale_factor);
-		void ArtificialNoise(double min,double max){ISSMERROR("not implemented yet");};
+		void ArtificialNoise(double min,double max){_error_("not implemented yet");};
 		void AXPY(Input* xinput,double scalar);
 		void Constrain(double cm_min, double cm_max);
-		double InfinityNorm(void){ISSMERROR("InfinityNorm not implemented for integers");};
-		double Max(void){ISSMERROR("Max not implemented for integers");};
-		double MaxAbs(void){ISSMERROR("Max not implemented for integers");};
-		double Min(void){ISSMERROR("Min not implemented for integers");};
-		double MinAbs(void){ISSMERROR("Min not implemented for integers");};
-		void Extrude(void){ISSMERROR("not supported yet");};
-		void VerticallyIntegrate(Input* thickness_input){ISSMERROR("not supported yet");};
+		double InfinityNorm(void){_error_("InfinityNorm not implemented for integers");};
+		double Max(void){_error_("Max not implemented for integers");};
+		double MaxAbs(void){_error_("Max not implemented for integers");};
+		double Min(void){_error_("Min not implemented for integers");};
+		double MinAbs(void){_error_("Min not implemented for integers");};
+		void Extrude(void){_error_("not supported yet");};
+		void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");};
 		void GetVectorFromInputs(Vec vector,int* doflist);
 		void GetValuesPtr(double** pvalues,int* pnum_values);
Index: /issm/trunk/src/c/objects/Inputs/PentaVertexInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/Inputs/PentaVertexInput.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Inputs/PentaVertexInput.cpp	(revision 6412)
@@ -153,5 +153,5 @@
 
 		/*Check index value*/
-		ISSMASSERT(indices[i]>=0 && indices[i]<6);
+		_assert_(indices[i]>=0 && indices[i]<6);
 
 		/*Assign value to new input*/
@@ -506,10 +506,10 @@
 		case ControlInputEnum:{
 			ControlInput* cont_input=(ControlInput*)xinput;
-			if(cont_input->values->Enum()!=PentaVertexInputEnum) ISSMERROR("not supported yet");
+			if(cont_input->values->Enum()!=PentaVertexInputEnum) _error_("not supported yet");
 			PentaVertexInput* cast_input=(PentaVertexInput*)cont_input->values;
 			for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*(cast_input->values[i]);}
 			return;
 		default:
-			ISSMERROR("not implemented yet");
+			_error_("not implemented yet");
 	}
 
@@ -547,5 +547,5 @@
 
 	/*Check that input provided is a thickness*/
-	if (thickness_input->EnumType()!=ThicknessEnum) ISSMERROR("Input provided is not a Thickness (enum_type is %s)",EnumToString(thickness_input->EnumType()));
+	if (thickness_input->EnumType()!=ThicknessEnum) _error_("Input provided is not a Thickness (enum_type is %s)",EnumToString(thickness_input->EnumType()));
 
 	/*Get Thickness value pointer*/
@@ -563,5 +563,5 @@
 
 		default:
-			ISSMERROR("not implemented yet");
+			_error_("not implemented yet");
 	}
 }
@@ -582,10 +582,10 @@
 
 	/*Check that inputB is of the same type*/
-	if (inputB->Enum()!=PentaVertexInputEnum) ISSMERROR("Operation not permitted because inputB is of type %s",EnumToString(inputB->Enum()));
+	if (inputB->Enum()!=PentaVertexInputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToString(inputB->Enum()));
 	xinputB=(PentaVertexInput*)inputB;
 
 	/*Create point wise sum*/
 	for(i=0;i<numgrids;i++){
-		ISSMASSERT(xinputB->values[i]!=0);
+		_assert_(xinputB->values[i]!=0);
 		AdotBvalues[i]=this->values[i]/xinputB->values[i];
 	}
Index: /issm/trunk/src/c/objects/Inputs/PentaVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/PentaVertexInput.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Inputs/PentaVertexInput.h	(revision 6412)
@@ -44,14 +44,14 @@
 		/*}}}*/
 		/*numerics: {{{1*/
-		void GetParameterValue(bool* pvalue){ISSMERROR("not implemented yet");};
-		void GetParameterValue(int* pvalue){ISSMERROR("not implemented yet");};
-		void GetParameterValue(double* pvalue){ISSMERROR("not implemented yet");};
-		void GetParameterValue(double* pvalue,GaussTria* gauss){ISSMERROR("not implemented yet");};
+		void GetParameterValue(bool* pvalue){_error_("not implemented yet");};
+		void GetParameterValue(int* pvalue){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue,GaussTria* gauss){_error_("not implemented yet");};
 		void GetParameterValue(double* pvalue,GaussPenta* gauss);
-		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){ISSMERROR("not implemented yet");};
+		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss);
 		void GetParameterAverage(double* pvalue);
-		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){ISSMERROR("not implemented yet");};
-		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){ISSMERROR("not implemented yet");};
+		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
 		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss);
 		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss);
@@ -64,5 +64,5 @@
 		void ConstrainMin(double minimum);
 		void Scale(double scale_factor);
-		void ArtificialNoise(double min,double max){ISSMERROR("not implemented yet");};
+		void ArtificialNoise(double min,double max){_error_("not implemented yet");};
 		void AXPY(Input* xinput,double scalar);
 		void Constrain(double cm_min, double cm_max);
Index: /issm/trunk/src/c/objects/Inputs/TriaVertexInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/Inputs/TriaVertexInput.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Inputs/TriaVertexInput.cpp	(revision 6412)
@@ -374,5 +374,5 @@
 
 		default :
-			ISSMERROR("not implemented yet");
+			_error_("not implemented yet");
 	}
 
Index: /issm/trunk/src/c/objects/Inputs/TriaVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/TriaVertexInput.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Inputs/TriaVertexInput.h	(revision 6412)
@@ -40,23 +40,23 @@
 		int   EnumType();
 		Input* SpawnTriaInput(int* indices);
-		Input* PointwiseDivide(Input* inputB){ISSMERROR("not implemented yet");};
+		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
 		ElementResult* SpawnResult(int step, double time);
 		/*}}}*/
 		/*numerics: {{{1*/
-		void GetParameterValue(bool* pvalue){ISSMERROR("not implemented yet");}
-		void GetParameterValue(int* pvalue){ISSMERROR("not implemented yet");}
-		void GetParameterValue(double* pvalue){ISSMERROR("not implemented yet");}
+		void GetParameterValue(bool* pvalue){_error_("not implemented yet");}
+		void GetParameterValue(int* pvalue){_error_("not implemented yet");}
+		void GetParameterValue(double* pvalue){_error_("not implemented yet");}
 		void GetParameterValue(double* pvalue,GaussTria* gauss);
-		void GetParameterValue(double* pvalue,GaussPenta* gauss){ISSMERROR("not implemented yet");};
+		void GetParameterValue(double* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss);
-		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
+		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
 		void GetParameterAverage(double* pvalue);
 		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss);
 		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss);
-		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
-		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){ISSMERROR("not implemented yet");};
+		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
 		void ChangeEnum(int newenumtype);
 
@@ -72,6 +72,6 @@
 		double Min(void);
 		double MinAbs(void);
-		void Extrude(void){ISSMERROR("not supported yet");};
-		void VerticallyIntegrate(Input* thickness_input){ISSMERROR("not supported yet");};
+		void Extrude(void){_error_("not supported yet");};
+		void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");};
 		void GetVectorFromInputs(Vec vector,int* doflist);
 		void GetValuesPtr(double** pvalues,int* pnum_values);
Index: /issm/trunk/src/c/objects/Loads/Friction.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Friction.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Loads/Friction.cpp	(revision 6412)
@@ -108,5 +108,5 @@
 		vmag=sqrt(pow(vx,2)+pow(vy,2)+pow(vz,2));
 	}
-	else ISSMERROR("element_type %s not supported yet",element_type);
+	else _error_("element_type %s not supported yet",element_type);
 
 	alpha2=pow(drag_coefficient,2)*pow(Neff,r)*pow(vmag,(s-1));
@@ -169,5 +169,5 @@
 		vmag=sqrt(pow(vx,2)+pow(vy,2)+pow(vz,2));
 	}
-	else ISSMERROR("element_type %s not supported yet",element_type);
+	else _error_("element_type %s not supported yet",element_type);
 
 	alpha2=pow(drag_coefficient,2)*pow(Neff,r)*pow(vmag,(s-1));
@@ -239,5 +239,5 @@
 
 	Input* input=inputs->GetInput(enum_type);
-	if(!input) ISSMERROR("input %s not found",EnumToString(enum_type));
+	if(!input) _error_("input %s not found",EnumToString(enum_type));
 	input->GetParameterValue(pvalue,gauss);
 
@@ -248,5 +248,5 @@
 
 	Input* input=inputs->GetInput(enum_type);
-	if(!input) ISSMERROR("input %s not found",EnumToString(enum_type));
+	if(!input) _error_("input %s not found",EnumToString(enum_type));
 	input->GetParameterValue(pvalue,gauss);
 
Index: /issm/trunk/src/c/objects/Loads/Icefront.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Icefront.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Loads/Icefront.cpp	(revision 6412)
@@ -78,5 +78,5 @@
 		icefront_node_ids[3]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+3);
 	}
-	else ISSMERROR("in_icefront_type %s not supported yet!",EnumToString(in_icefront_type));
+	else _error_("in_icefront_type %s not supported yet!",EnumToString(in_icefront_type));
 
 	if (in_icefront_type==PattynIceFrontEnum || in_icefront_type==StokesIceFrontEnum) num_nodes=4;
@@ -319,7 +319,7 @@
 	/*Checks in debugging mode*/
 	/*{{{2*/
-	ISSMASSERT(nodes);
-	ISSMASSERT(element);
-	ISSMASSERT(matpar);
+	_assert_(nodes);
+	_assert_(element);
+	_assert_(matpar);
 	/*}}}*/
 
@@ -338,5 +338,5 @@
 			break;
 		default:
-			ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
+			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
 	}
 
@@ -436,5 +436,5 @@
 			return CreatePVectorDiagnosticStokes();
 		default:
-			ISSMERROR("Icefront type %s not supported yet",EnumToString(type));
+			_error_("Icefront type %s not supported yet",EnumToString(type));
 	}
 }
@@ -472,6 +472,6 @@
 	/*Retrieve all inputs and parameters*/
 	GetVerticesCoordinates(&xyz_list[0][0],nodes,numnodes);
-	Input* thickness_input=tria->inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);
-	Input* bed_input      =tria->inputs->GetInput(BedEnum);       ISSMASSERT(bed_input);
+	Input* thickness_input=tria->inputs->GetInput(ThicknessEnum); _assert_(thickness_input);
+	Input* bed_input      =tria->inputs->GetInput(BedEnum);       _assert_(bed_input);
 	inputs->GetParameterValue(&fill,FillEnum);
 	rho_water=matpar->GetRhoWater();
@@ -502,5 +502,5 @@
 				break;
 			default:
-				ISSMERROR("fill type %s not supported yet",EnumToString(fill));
+				_error_("fill type %s not supported yet",EnumToString(fill));
 		}
 		ice_pressure=1.0/2.0*gravity*rho_ice*pow(thickness,2);
@@ -575,5 +575,5 @@
 	/*Retrieve all inputs and parameters*/
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICESQUA);
-	Input* surface_input  =penta->inputs->GetInput(SurfaceEnum);   ISSMASSERT(surface_input);
+	Input* surface_input  =penta->inputs->GetInput(SurfaceEnum);   _assert_(surface_input);
 	inputs->GetParameterValue(&fill,FillEnum);
 	rho_water=matpar->GetRhoWater();
@@ -610,5 +610,5 @@
 				break;
 			default:
-				ISSMERROR("fill type %s not supported yet",EnumToString(fill));
+				_error_("fill type %s not supported yet",EnumToString(fill));
 		}
 		ice_pressure=rho_ice*gravity*(surface-z_g);
@@ -681,5 +681,5 @@
 				break;
 			default:
-				ISSMERROR("fill type %s not supported yet",EnumToString(fill));
+				_error_("fill type %s not supported yet",EnumToString(fill));
 		}
 		air_pressure=0;
@@ -716,5 +716,5 @@
 
 	/*Some checks for debugging*/
-	ISSMASSERT(nodes);
+	_assert_(nodes);
 		
 	/*How many nodes? :*/
Index: /issm/trunk/src/c/objects/Loads/Icefront.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Icefront.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Loads/Icefront.h	(revision 6412)
@@ -66,5 +66,5 @@
 		void  InputUpdateFromConstant(bool constant, int name);
 		void  InputUpdateFromSolution(double* solution);
-		void  InputUpdateFromIoModel(int index, IoModel* iomodel){ISSMERROR("not implemented yet");};
+		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
 		/*}}}*/
 		/*Load virtual functions definitions: {{{1*/
Index: /issm/trunk/src/c/objects/Loads/Numericalflux.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Numericalflux.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Loads/Numericalflux.cpp	(revision 6412)
@@ -92,5 +92,5 @@
 			if (iomodel->elements[3*(e2-1)+j]==i2) pos4=j+1;
 		}
-		ISSMASSERT(pos1!=UNDEF && pos2!=UNDEF && pos3!=UNDEF && pos4!=UNDEF);
+		_assert_(pos1!=UNDEF && pos2!=UNDEF && pos3!=UNDEF && pos4!=UNDEF);
 
 		/*3: We have the id of the elements and the position of the vertices in the index
@@ -109,5 +109,5 @@
 			if (iomodel->elements[3*(e1-1)+j]==i2) pos2=j+1;
 		}
-		ISSMASSERT(pos1!=UNDEF && pos2!=UNDEF);
+		_assert_(pos1!=UNDEF && pos2!=UNDEF);
 
 		/*3: We have the id of the elements and the position of the vertices in the index
@@ -347,5 +347,5 @@
 			break;
 		default:
-			ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
+			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
 	}
 
@@ -377,5 +377,5 @@
 			break;
 		default:
-			ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
+			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
 	}
 
@@ -424,5 +424,5 @@
 			return CreateKMatrixPrognosticBoundary();
 		default:
-			ISSMERROR("type not supported yet");
+			_error_("type not supported yet");
 	}
 }
@@ -577,5 +577,5 @@
 			return CreateKMatrixBalancedthicknessBoundary();
 		default:
-			ISSMERROR("type not supported yet");
+			_error_("type not supported yet");
 	}
 }
@@ -728,5 +728,5 @@
 			return CreateKMatrixAdjointBalancedthicknessBoundary();
 		default:
-			ISSMERROR("type not supported yet");
+			_error_("type not supported yet");
 	}
 }
@@ -760,5 +760,5 @@
 			return CreatePVectorPrognosticBoundary();
 		default:
-			ISSMERROR("type not supported yet");
+			_error_("type not supported yet");
 	}
 }
@@ -794,7 +794,7 @@
 	GetVerticesCoordinates(&xyz_list[0][0],nodes,NUMVERTICES_BOUNDARY);
 	parameters->FindParam(&dt,DtEnum);
-	Input* vxaverage_input=tria->inputs->GetInput(VxEnum); ISSMASSERT(vxaverage_input); 
-	Input* vyaverage_input=tria->inputs->GetInput(VyEnum); ISSMASSERT(vyaverage_input);
-	Input* thickness_input=tria->inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);
+	Input* vxaverage_input=tria->inputs->GetInput(VxEnum); _assert_(vxaverage_input); 
+	Input* vyaverage_input=tria->inputs->GetInput(VyEnum); _assert_(vyaverage_input);
+	Input* thickness_input=tria->inputs->GetInput(ThicknessEnum); _assert_(thickness_input);
 	GetNormal(&normal[0],xyz_list);
 
@@ -852,5 +852,5 @@
 			return CreatePVectorBalancedthicknessBoundary();
 		default:
-			ISSMERROR("type not supported yet");
+			_error_("type not supported yet");
 	}
 }
@@ -885,7 +885,7 @@
 	/*Retrieve all inputs and parameters*/
 	GetVerticesCoordinates(&xyz_list[0][0],nodes,NUMVERTICES_BOUNDARY);
-	Input* vxaverage_input=tria->inputs->GetInput(VxEnum); ISSMASSERT(vxaverage_input); 
-	Input* vyaverage_input=tria->inputs->GetInput(VyEnum); ISSMASSERT(vyaverage_input);
-	Input* thickness_input=tria->inputs->GetInput(ThicknessEnum); ISSMASSERT(thickness_input);
+	Input* vxaverage_input=tria->inputs->GetInput(VxEnum); _assert_(vxaverage_input); 
+	Input* vyaverage_input=tria->inputs->GetInput(VyEnum); _assert_(vyaverage_input);
+	Input* thickness_input=tria->inputs->GetInput(ThicknessEnum); _assert_(thickness_input);
 	GetNormal(&normal[0],xyz_list);
 
Index: /issm/trunk/src/c/objects/Loads/Numericalflux.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Numericalflux.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Loads/Numericalflux.h	(revision 6412)
@@ -53,14 +53,14 @@
 		/*Update virtual functions resolution: {{{1*/
 		void    InputUpdateFromVector(double* vector, int name, int type){/*Do nothing*/}
-		void    InputUpdateFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
-		void    InputUpdateFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}
+		void    InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}
 		void    InputUpdateFromVectorDakota(double* vector, int name, int type){/*Do nothing*/}
-		void    InputUpdateFromVectorDakota(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
-		void    InputUpdateFromVectorDakota(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}
+		void    InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");}
 		void    InputUpdateFromConstant(double constant, int name){/*Do nothing*/};
 		void    InputUpdateFromConstant(int constant, int name){/*Do nothing*/};
-		void    InputUpdateFromConstant(bool constant, int name){ISSMERROR("Not implemented yet!");}
-		void    InputUpdateFromSolution(double* solution){ISSMERROR("Not implemented yet!");}
-		void  InputUpdateFromIoModel(int index, IoModel* iomodel){ISSMERROR("not implemented yet");};
+		void    InputUpdateFromConstant(bool constant, int name){_error_("Not implemented yet!");}
+		void    InputUpdateFromSolution(double* solution){_error_("Not implemented yet!");}
+		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
 		/*}}}*/
 		/*Load virtual functions definitions: {{{1*/
Index: /issm/trunk/src/c/objects/Loads/Pengrid.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Pengrid.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Loads/Pengrid.cpp	(revision 6412)
@@ -54,7 +54,7 @@
 
 	/*Some checks if debugging activated*/
-	ISSMASSERT(iomodel->singlenodetoelementconnectivity);
-	ISSMASSERT(index>=0 && index<iomodel->numberofvertices);
-	ISSMASSERT(id);
+	_assert_(iomodel->singlenodetoelementconnectivity);
+	_assert_(index>=0 && index<iomodel->numberofvertices);
+	_assert_(id);
 
 	/*id: */
@@ -65,5 +65,5 @@
 	pengrid_node_id=iomodel->nodecounter+index+1;
 	pengrid_element_id=iomodel->singlenodetoelementconnectivity[index];
-	ISSMASSERT(pengrid_element_id);
+	_assert_(pengrid_element_id);
 	pengrid_matpar_id=iomodel->numberofelements+1; //refers to the constant material parameters object
 
@@ -324,5 +324,5 @@
 			break;
 		default:
-			ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
+			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
 	}
 
@@ -352,5 +352,5 @@
 			break;
 		default:
-			ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
+			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
 	}
 
@@ -455,5 +455,5 @@
 	}
 	else{
-		ISSMERROR("analysis: %s not supported yet",EnumToString(analysis_type));
+		_error_("analysis: %s not supported yet",EnumToString(analysis_type));
 	}
 
@@ -682,5 +682,5 @@
 /*FUNCTION Pengrid::UpdateInputs {{{1*/
 void  Pengrid::UpdateInputs(double* solution){
-	ISSMERROR("not supported yet!");
-}
-/*}}}1*/
+	_error_("not supported yet!");
+}
+/*}}}1*/
Index: /issm/trunk/src/c/objects/Loads/Pengrid.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Pengrid.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Loads/Pengrid.h	(revision 6412)
@@ -67,5 +67,5 @@
 		void  InputUpdateFromConstant(bool constant, int name);
 		void  InputUpdateFromSolution(double* solution);
-		void  InputUpdateFromIoModel(int index, IoModel* iomodel){ISSMERROR("not implemented yet");};
+		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
 		/*}}}*/
 		/*Load virtual functions definitions: {{{1*/
Index: /issm/trunk/src/c/objects/Loads/Penpair.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Penpair.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Loads/Penpair.cpp	(revision 6412)
@@ -229,5 +229,5 @@
 			break;
 		default:
-			ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
+			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
 	}
 
@@ -281,5 +281,5 @@
 				case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax); 
 				case PattynApproximationEnum:   return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax); 
-				default: ISSMERROR("not supported yet");
+				default: _error_("not supported yet");
 			}
 		case PattynApproximationEnum:
@@ -287,5 +287,5 @@
 				case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax); 
 				case PattynApproximationEnum:   return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax); 
-				default: ISSMERROR("not supported yet");
+				default: _error_("not supported yet");
 			}
 		case StokesApproximationEnum:
@@ -293,5 +293,5 @@
 				case StokesApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax); 
 				case NoneApproximationEnum: return   PenaltyCreateKMatrixDiagnosticStokes(kmax); 
-				default: ISSMERROR("not supported yet");
+				default: _error_("not supported yet");
 			}
 		case NoneApproximationEnum:
@@ -299,7 +299,7 @@
 				case StokesApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax); 
 				case NoneApproximationEnum: return   PenaltyCreateKMatrixDiagnosticStokes(kmax); 
-				default: ISSMERROR("not supported yet");
+				default: _error_("not supported yet");
 			}
-		default: ISSMERROR("not supported yet");
+		default: _error_("not supported yet");
 	}
 }
Index: /issm/trunk/src/c/objects/Loads/Penpair.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Penpair.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Loads/Penpair.h	(revision 6412)
@@ -44,15 +44,15 @@
 		/*}}}*/
 		/*Update virtual functions resolution: {{{1*/
-		void  InputUpdateFromVector(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
-		void  InputUpdateFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
-		void  InputUpdateFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
-		void  InputUpdateFromVectorDakota(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
-		void  InputUpdateFromVectorDakota(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
-		void  InputUpdateFromVectorDakota(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void  InputUpdateFromVector(double* vector, int name, int type){_error_("Not implemented yet!");}
+		void  InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}
+		void  InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}
+		void  InputUpdateFromVectorDakota(double* vector, int name, int type){_error_("Not implemented yet!");}
+		void  InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}
+		void  InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");}
 		void  InputUpdateFromConstant(double constant, int name);
 		void  InputUpdateFromConstant(int constant, int name);
 		void  InputUpdateFromConstant(bool constant, int name);
-		void  InputUpdateFromSolution(double* solution){ISSMERROR("Not implemented yet!");}
-		void  InputUpdateFromIoModel(int index, IoModel* iomodel){ISSMERROR("not implemented yet");};
+		void  InputUpdateFromSolution(double* solution){_error_("Not implemented yet!");}
+		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
 		/*}}}*/
 			/*Load virtual functions definitions: {{{1*/
Index: /issm/trunk/src/c/objects/Loads/Riftfront.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Riftfront.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Loads/Riftfront.cpp	(revision 6412)
@@ -385,5 +385,5 @@
 
 	/*update input*/
-	ISSMERROR("not implemented yet");
+	_error_("not implemented yet");
 	//this->inputs->AddInput(new DoubleInput(name,constant));
 
@@ -433,5 +433,5 @@
 			break;
 		default:
-			ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
+			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
 	}
 
@@ -459,5 +459,5 @@
 			break;
 		default:
-			ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
+			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
 	}
 
@@ -506,5 +506,5 @@
 
 	/*enum of element? */
-	if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
+	if(elements[0]->Enum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
 	tria1=(Tria*)elements[0];
 	tria2=(Tria*)elements[1];
@@ -519,5 +519,5 @@
 	tria1->GetParameterValue(&h[0],nodes[0],ThicknessEnum);
 	tria2->GetParameterValue(&h[1],nodes[1],ThicknessEnum);
-	if (h[0]!=h[1])ISSMERROR(" different thicknesses not supported for rift fronts");
+	if (h[0]!=h[1])_error_(" different thicknesses not supported for rift fronts");
 	thickness=h[0];
 
@@ -597,5 +597,5 @@
 
 	/*enum of element? */
-	if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
+	if(elements[0]->Enum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
 	tria1=(Tria*)elements[0];
 	tria2=(Tria*)elements[1];
@@ -613,9 +613,9 @@
 	tria1->GetParameterValue(&h[0],nodes[0],ThicknessEnum);
 	tria2->GetParameterValue(&h[1],nodes[1],ThicknessEnum);
-	if (h[0]!=h[1])ISSMERROR(" different thicknesses not supported for rift fronts");
+	if (h[0]!=h[1])_error_(" different thicknesses not supported for rift fronts");
 	thickness=h[0];
 	tria1->GetParameterValue(&b[0],nodes[0],BedEnum);
 	tria2->GetParameterValue(&b[1],nodes[1],BedEnum);
-	if (b[0]!=b[1])ISSMERROR(" different beds not supported for rift fronts");
+	if (b[0]!=b[1])_error_(" different beds not supported for rift fronts");
 	bed=b[0];
 
@@ -645,5 +645,5 @@
 	else if(fill==MelangeEnum){ //icefront finding itself against another icefront (pressure imbalance is fully compensated, ice vs ice)
 
-		if(!shelf) ISSMERROR("%s%i%s","fill type ",fill," not supported on ice sheets yet.");
+		if(!shelf) _error_("%s%i%s","fill type ",fill," not supported on ice sheets yet.");
 
 		pressure_litho=rho_ice*gravity*pow(thickness,(double)2)/(double)2;
@@ -655,5 +655,5 @@
 	}
 	else{
-		ISSMERROR("%s%i%s","fill type ",fill," not supported yet.");
+		_error_("%s%i%s","fill type ",fill," not supported yet.");
 	}
 
@@ -694,5 +694,5 @@
 
 	/*enum of element? */
-	if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
+	if(elements[0]->Enum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
 
 	/*recover elements on both side of rift: */
@@ -802,5 +802,5 @@
 
 	/*enum of element? */
-	if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
+	if(elements[0]->Enum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
 
 	/*recover elements on both side of rift: */
@@ -861,5 +861,5 @@
 
 	/*enum of element? */
-	if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
+	if(elements[0]->Enum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
 
 	/*recover elements on both side of rift: */
@@ -904,5 +904,5 @@
 
 	/*enum of element? */
-	if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
+	if(elements[0]->Enum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
 
 	/*recover elements on both side of rift: */
@@ -953,5 +953,5 @@
 
 	/*enum of element? */
-	if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
+	if(elements[0]->Enum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
 
 	/*recover elements on both side of rift: */
Index: /issm/trunk/src/c/objects/Loads/Riftfront.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Riftfront.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Loads/Riftfront.h	(revision 6412)
@@ -64,14 +64,14 @@
 		/*Update virtual functions resolution: {{{1*/
 		void    InputUpdateFromVector(double* vector, int name, int type);
-		void    InputUpdateFromVector(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
-		void    InputUpdateFromVector(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
-		void    InputUpdateFromVectorDakota(double* vector, int name, int type){ISSMERROR("Not implemented yet!");}
-		void    InputUpdateFromVectorDakota(int* vector, int name, int type){ISSMERROR("Not implemented yet!");}
-		void    InputUpdateFromVectorDakota(bool* vector, int name, int type){ISSMERROR("Not implemented yet!");}
+		void    InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}
+		void    InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}
+		void    InputUpdateFromVectorDakota(double* vector, int name, int type){_error_("Not implemented yet!");}
+		void    InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}
+		void    InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");}
 		void    InputUpdateFromConstant(double constant, int name);
 		void    InputUpdateFromConstant(int constant, int name);
-		void    InputUpdateFromConstant(bool constant, int name){ISSMERROR("Not implemented yet!");}
-		void    InputUpdateFromSolution(double* solution){ISSMERROR("Not implemented yet!");}
-		void  InputUpdateFromIoModel(int index, IoModel* iomodel){ISSMERROR("not implemented yet");};
+		void    InputUpdateFromConstant(bool constant, int name){_error_("Not implemented yet!");}
+		void    InputUpdateFromSolution(double* solution){_error_("Not implemented yet!");}
+		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
 		/*}}}*/
 		/*Load virtual functions definitions: {{{1*/
Index: /issm/trunk/src/c/objects/Materials/Matice.cpp
===================================================================
--- /issm/trunk/src/c/objects/Materials/Matice.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Materials/Matice.cpp	(revision 6412)
@@ -282,7 +282,7 @@
 
 	/*Checks in debugging mode*/
-	if(viscosity<=0) ISSMERROR("Negative viscosity");
-	ISSMASSERT(B>0);
-	ISSMASSERT(n>0);
+	if(viscosity<=0) _error_("Negative viscosity");
+	_assert_(B>0);
+	_assert_(n>0);
 
 	/*Return: */
@@ -353,7 +353,7 @@
 
 	/*Checks in debugging mode*/
-	if(viscosity3d<=0) ISSMERROR("Negative viscosity");
-	ISSMASSERT(B>0);
-	ISSMASSERT(n>0);
+	if(viscosity3d<=0) _error_("Negative viscosity");
+	_assert_(B>0);
+	_assert_(n>0);
 
 	/*Assign output pointers:*/
@@ -425,7 +425,7 @@
 
 	/*Checks in debugging mode*/
-	if(viscosity3d<=0) ISSMERROR("Negative viscosity");
-	ISSMASSERT(B>0);
-	ISSMASSERT(n>0);
+	if(viscosity3d<=0) _error_("Negative viscosity");
+	_assert_(B>0);
+	_assert_(n>0);
 
 	/*Assign output pointers:*/
@@ -481,7 +481,7 @@
 
 	/*Checks in debugging mode*/
-	ISSMASSERT(B>0);
-	ISSMASSERT(n>0);
-	ISSMASSERT(viscosity_complement>0);
+	_assert_(B>0);
+	_assert_(n>0);
+	_assert_(viscosity_complement>0);
 		
 	/*Return: */
@@ -521,7 +521,7 @@
 					return;
 
-				default: ISSMERROR("element %s not implemented yet",EnumToString(element->Enum()));
-			}
-		default: ISSMERROR("type %i (%s) not implemented yet",type,EnumToString(type));
+				default: _error_("element %s not implemented yet",EnumToString(element->Enum()));
+			}
+		default: _error_("type %i (%s) not implemented yet",type,EnumToString(type));
 	}
 }
@@ -561,7 +561,7 @@
 					return;
 
-				default: ISSMERROR("element %s not implemented yet",EnumToString(element->Enum()));
-			}
-		default: ISSMERROR("type %i (%s) not implemented yet",type,EnumToString(type));
+				default: _error_("element %s not implemented yet",EnumToString(element->Enum()));
+			}
+		default: _error_("type %i (%s) not implemented yet",type,EnumToString(type));
 	}
 }
@@ -670,5 +670,5 @@
 	}
 	else{
-		ISSMERROR(" Mesh type not supported yet!");
+		_error_(" Mesh type not supported yet!");
 	}
 
Index: /issm/trunk/src/c/objects/Materials/Matpar.h
===================================================================
--- /issm/trunk/src/c/objects/Materials/Matpar.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Materials/Matpar.h	(revision 6412)
@@ -56,8 +56,8 @@
 		void   InputUpdateFromConstant(bool constant, int name);
 		void   InputUpdateFromSolution(double* solution);
-		void   InputUpdateFromIoModel(int index, IoModel* iomodel){ISSMERROR("not implemented yet");};
+		void   InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
 		/*}}}*/
 		/*Material virtual functions resolution: {{{1*/
-		void   InputDuplicate(int original_enum,int new_enum){ISSMERROR("not implemented yet");};
+		void   InputDuplicate(int original_enum,int new_enum){_error_("not implemented yet");};
 		void   Configure(Elements* elements);
 		/*}}}*/
Index: /issm/trunk/src/c/objects/Node.cpp
===================================================================
--- /issm/trunk/src/c/objects/Node.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Node.cpp	(revision 6412)
@@ -92,6 +92,6 @@
 		if (iomodel->dim==3){
 			/*We have a  3d mesh, we may have collapsed elements, hence dead grids. Freeze them out: */
-			if (!iomodel->gridonbed) ISSMERROR("iomodel->gridonbed is NULL");
-			if (!iomodel->vertices_type) ISSMERROR("iomodel->vertices_type is NULL");
+			if (!iomodel->gridonbed) _error_("iomodel->gridonbed is NULL");
+			if (!iomodel->vertices_type) _error_("iomodel->vertices_type is NULL");
 			if (iomodel->vertices_type[io_index]==MacAyealApproximationEnum && !iomodel->gridonbed[io_index]){
 				for(k=1;k<=gsize;k++) this->FreezeDof(k);
@@ -109,5 +109,5 @@
 		}
 		/*spc all nodes on hutter*/
-		if (!iomodel->gridonhutter) ISSMERROR("iomodel->gridonhutter is NULL");
+		if (!iomodel->gridonhutter) _error_("iomodel->gridonhutter is NULL");
 		if (iomodel->gridonhutter[io_index]){
 			for(k=1;k<=gsize;k++){
@@ -120,5 +120,5 @@
 	if (analysis_type==DiagnosticHutterAnalysisEnum){
 		/*Spc all nodes that are not Hutter*/
-		if (!iomodel->gridonhutter) ISSMERROR("iomodel->gridonhutter is NULL");
+		if (!iomodel->gridonhutter) _error_("iomodel->gridonhutter is NULL");
 		if (!iomodel->gridonhutter[io_index]){
 			for(k=1;k<=gsize;k++){
@@ -139,5 +139,5 @@
 		if (iomodel->dim==3){
 			/*On a 3d mesh, we may have collapsed elements, hence dead grids. Freeze them out: */
-			if (!iomodel->gridonbed) ISSMERROR("iomodel->gridonbed is NULL");
+			if (!iomodel->gridonbed) _error_("iomodel->gridonbed is NULL");
 			if (!iomodel->gridonbed[io_index]){
 				for(k=1;k<=gsize;k++){
@@ -319,5 +319,5 @@
 		return indexing.sdoflist[dofindex];
 	}
-	else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
+	else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
 
 }
@@ -355,5 +355,5 @@
 					}
 				}
-				ISSMASSERT(count); //at least one dof should be the approximation requested
+				_assert_(count); //at least one dof should be the approximation requested
 			}
 			else for(i=0;i<this->indexing.gsize;i++) outdoflist[i]=indexing.gdoflist[i];
@@ -391,5 +391,5 @@
 			else for(i=0;i<this->indexing.ssize;i++) outdoflist[i]=indexing.sdoflist[i];
 		}
-		else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
+		else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
 	}
 }
@@ -431,5 +431,5 @@
 			}
 		}
-		else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
+		else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
 	}
 	else{
@@ -444,5 +444,5 @@
 					}
 				}
-				ISSMASSERT(count);
+				_assert_(count);
 			}
 			else for(i=0;i<this->indexing.gsize;i++) outdoflist[i]=i;
@@ -462,5 +462,5 @@
 					}
 				}
-				ISSMASSERT(count2);
+				_assert_(count2);
 			}
 			else{
@@ -488,5 +488,5 @@
 					}
 				}
-				ISSMASSERT(count2);
+				_assert_(count2);
 			}
 			else{
@@ -500,5 +500,5 @@
 			}
 		}
-		else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
+		else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
 	}
 }
@@ -659,5 +659,5 @@
 		else if (setenum==FsetEnum) numdofs=this->indexing.fsize;
 		else if (setenum==SsetEnum) numdofs=this->indexing.ssize;
-		else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
+		else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
 	}
 	else{
@@ -689,5 +689,5 @@
 			else numdofs=this->indexing.ssize;
 		}
-		else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
+		else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
 	}
 	return numdofs;
@@ -872,5 +872,5 @@
 		dofcount+=this->indexing.ssize;
 	}
-	else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
+	else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
 
 
@@ -901,5 +901,5 @@
 		for(i=0;i<this->indexing.ssize;i++) indexing.sdoflist[i]+=dofcount;
 	}
-	else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
+	else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
 }
 /*}}}*/
@@ -917,5 +917,5 @@
 	else if(setenum==FsetEnum)for(j=0;j<this->indexing.fsize;j++)  *(truedofs+ncols*sid+j)=indexing.fdoflist[j];
 	else if(setenum==SsetEnum)for(j=0;j<this->indexing.ssize;j++)  *(truedofs+ncols*sid+j)=indexing.sdoflist[j];
-	else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
+	else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
 
 }
@@ -936,5 +936,5 @@
 	else if(setenum==FsetEnum)for(j=0;j<this->indexing.fsize;j++) indexing.fdoflist[j]=*(alltruedofs+ncols*sid+j);
 	else if(setenum==SsetEnum)for(j=0;j<this->indexing.ssize;j++) indexing.sdoflist[j]=*(alltruedofs+ncols*sid+j);
-	else ISSMERROR("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
+	else _error_("%s%s%s"," set of enum type ",EnumToString(setenum)," not supported yet!");
 
 }
Index: /issm/trunk/src/c/objects/Node.h
===================================================================
--- /issm/trunk/src/c/objects/Node.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Node.h	(revision 6412)
@@ -61,6 +61,6 @@
 		void  InputUpdateFromConstant(int constant, int name);
 		void  InputUpdateFromConstant(bool constant, int name);
-		void  InputUpdateFromSolution(double* solution){ISSMERROR("Not implemented yet!");}
-		void  InputUpdateFromIoModel(int index, IoModel* iomodel){ISSMERROR("Not implemented yet!");}
+		void  InputUpdateFromSolution(double* solution){_error_("Not implemented yet!");}
+		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("Not implemented yet!");}
 		/*}}}*/
 		/*Node numerical routines {{{1*/
Index: /issm/trunk/src/c/objects/Numerics/ElementMatrix.cpp
===================================================================
--- /issm/trunk/src/c/objects/Numerics/ElementMatrix.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Numerics/ElementMatrix.cpp	(revision 6412)
@@ -48,5 +48,5 @@
 ElementMatrix::ElementMatrix(ElementMatrix* Ke){
 
-	if(!Ke) ISSMERROR("Input Element Matrix is a NULL pointer");
+	if(!Ke) _error_("Input Element Matrix is a NULL pointer");
 	this->Init(Ke);
 	return;
@@ -64,5 +64,5 @@
 	/*If one of the two matrix is NULL, we copy the other one*/
 	if(!Ke1 && !Ke2){
-		ISSMERROR("Two input element matrices are NULL");
+		_error_("Two input element matrices are NULL");
 	}
 	else if(!Ke1){
@@ -76,5 +76,5 @@
 
 	/*General Case: Ke1 and Ke2 are not empty*/
-	if(!Ke1->dofsymmetrical || !Ke2->dofsymmetrical) ISSMERROR("merging 2 non dofsymmetrical matrices not implemented yet");
+	if(!Ke1->dofsymmetrical || !Ke2->dofsymmetrical) _error_("merging 2 non dofsymmetrical matrices not implemented yet");
 
 	/*Initialize itransformation matrix Ke[P[i]] = Ke2[i]*/
@@ -307,5 +307,5 @@
 	}
 	else{
-		ISSMERROR(" non dofsymmetrical matrix AddToGlobal routine not support yet!");
+		_error_(" non dofsymmetrical matrix AddToGlobal routine not support yet!");
 	}
 
@@ -318,6 +318,6 @@
 	for (int i=0;i<this->nrows;i++){
 		for(int j=0;j<this->ncols;j++){
-			if (isnan(this->values[i*this->ncols+j])) ISSMERROR("NaN found in Element Matrix");
-			if (fabs(this->values[i*this->ncols+j])>1.e+50) ISSMERROR("Element Matrix values exceeds 1.e+50");
+			if (isnan(this->values[i*this->ncols+j])) _error_("NaN found in Element Matrix");
+			if (fabs(this->values[i*this->ncols+j])>1.e+50) _error_("Element Matrix values exceeds 1.e+50");
 		}
 	}
@@ -340,5 +340,5 @@
 	/*Transpose indices*/
 	if(!dofsymmetrical){
-		ISSMERROR("not supported yet");
+		_error_("not supported yet");
 	}
 
@@ -398,5 +398,5 @@
 void ElementMatrix::Init(ElementMatrix* Ke){
 
-	ISSMASSERT(Ke);
+	_assert_(Ke);
 
 	this->nrows =Ke->nrows;
Index: /issm/trunk/src/c/objects/Numerics/ElementVector.cpp
===================================================================
--- /issm/trunk/src/c/objects/Numerics/ElementVector.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Numerics/ElementVector.cpp	(revision 6412)
@@ -42,5 +42,5 @@
 	/*If one of the two matrix is NULL, we copy the other one*/
 	if(!pe1 && !pe2){
-		ISSMERROR("Two input element matrices are NULL");
+		_error_("Two input element matrices are NULL");
 	}
 	else if(!pe1){
@@ -223,5 +223,5 @@
 void ElementVector::Init(ElementVector* pe){
 
-	ISSMASSERT(pe);
+	_assert_(pe);
 
 	this->nrows =pe->nrows;
Index: /issm/trunk/src/c/objects/Params/BoolParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/BoolParam.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Params/BoolParam.h	(revision 6412)
@@ -50,28 +50,28 @@
 		int   EnumType(){return enum_type;}
 		void  GetParameterValue(bool* pbool){*pbool=value;}
-		void  GetParameterValue(int* pinteger){ISSMERROR("Bool param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int** pintarray,int* pM){ISSMERROR("Bool param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double* pdouble){ISSMERROR("Bool param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char** pstring){ISSMERROR("Bool param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("Bool param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("Bool param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("Bool param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ISSMERROR("Bool param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Vec* pvec){ISSMERROR("Bool param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Mat* pmat){ISSMERROR("Bool param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(FILE** pfid){ISSMERROR("Bool param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int* pinteger){_error_("Bool param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int** pintarray,int* pM){_error_("Bool param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double* pdouble){_error_("Bool param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char** pstring){_error_("Bool param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char*** pstringarray,int* pM){_error_("Bool param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM){_error_("Bool param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("Bool param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Bool param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Vec* pvec){_error_("Bool param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Mat* pmat){_error_("Bool param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(FILE** pfid){_error_("Bool param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
 
 		void  SetValue(bool boolean){this->value=boolean;}
 		void  SetValue(int integer){this->value=(bool)integer;}
-		void  SetValue(int* intarray,int M){ISSMERROR("Bool param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
+		void  SetValue(int* intarray,int M){_error_("Bool param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
 		void  SetValue(double scalar){this->value=(bool)scalar;}
-		void  SetValue(char* string){ISSMERROR("Bool param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
-		void  SetValue(char** stringarray,int M){ISSMERROR("Bool param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* doublearray,int M){ISSMERROR("Bool param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* pdoublearray,int M,int N){ISSMERROR("Bool param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
-		void  SetValue(Vec vec){ISSMERROR("Bool param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
-		void  SetValue(Mat mat){ISSMERROR("Bool param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
-		void  SetValue(FILE* fid){ISSMERROR("Bool param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){ISSMERROR("Bool param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
+		void  SetValue(char* string){_error_("Bool param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
+		void  SetValue(char** stringarray,int M){_error_("Bool param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* doublearray,int M){_error_("Bool param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* pdoublearray,int M,int N){_error_("Bool param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
+		void  SetValue(Vec vec){_error_("Bool param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
+		void  SetValue(Mat mat){_error_("Bool param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
+		void  SetValue(FILE* fid){_error_("Bool param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
+		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("Bool param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
 		
 		char* GetParameterName(void);
Index: /issm/trunk/src/c/objects/Params/DoubleMatArrayParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/DoubleMatArrayParam.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Params/DoubleMatArrayParam.h	(revision 6412)
@@ -52,28 +52,28 @@
 		/*Param vritual function definitions: {{{1*/
 		int   EnumType(){return enum_type;}
-		void  GetParameterValue(bool* pbool){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int* pinteger){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int** pintarray,int* pM){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double* pdouble){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char** pstring){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(bool* pbool){_error_("DoubleMatArray param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int* pinteger){_error_("DoubleMatArray param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int** pintarray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double* pdouble){_error_("DoubleMatArray param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char** pstring){_error_("DoubleMatArray param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("DoubleMatArray param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
 		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims);
-		void  GetParameterValue(Vec* pvec){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Mat* pmat){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(FILE** pfid){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Vec* pvec){_error_("DoubleMatArray param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Mat* pmat){_error_("DoubleMatArray param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(FILE** pfid){_error_("DoubleMatArray param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
 
-		void  SetValue(bool boolean){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}
-		void  SetValue(int integer){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}
-		void  SetValue(int* intarray,int M){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double scalar){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}
-		void  SetValue(char* string){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
-		void  SetValue(char** stringarray,int M){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* doublearray,int M){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* doublearray,int M,int N){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToString(enum_type));}
-		void  SetValue(Vec vec){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
-		void  SetValue(Mat mat){ISSMERROR("DoubleMatArray param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
-		void  SetValue(FILE* fid){ISSMERROR("Bool param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
+		void  SetValue(bool boolean){_error_("DoubleMatArray param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}
+		void  SetValue(int integer){_error_("DoubleMatArray param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}
+		void  SetValue(int* intarray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double scalar){_error_("DoubleMatArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}
+		void  SetValue(char* string){_error_("DoubleMatArray param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
+		void  SetValue(char** stringarray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* doublearray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* doublearray,int M,int N){_error_("DoubleMatArray param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToString(enum_type));}
+		void  SetValue(Vec vec){_error_("DoubleMatArray param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
+		void  SetValue(Mat mat){_error_("DoubleMatArray param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
+		void  SetValue(FILE* fid){_error_("Bool param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
 		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array);
 
Index: /issm/trunk/src/c/objects/Params/DoubleMatParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/DoubleMatParam.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Params/DoubleMatParam.h	(revision 6412)
@@ -51,29 +51,29 @@
 		/*Param vritual function definitions: {{{1*/
 		int   EnumType(){return enum_type;}
-		void  GetParameterValue(bool* pbool){ISSMERROR("DoubleMat param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int* pinteger){ISSMERROR("DoubleMat param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int** pintarray,int* pM){ISSMERROR("DoubleMat param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double* pdouble){ISSMERROR("DoubleMat param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char** pstring){ISSMERROR("DoubleMat param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("DoubleMat param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("DoubleMat param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(bool* pbool){_error_("DoubleMat param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int* pinteger){_error_("DoubleMat param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int** pintarray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double* pdouble){_error_("DoubleMat param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char** pstring){_error_("DoubleMat param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
 		void  GetParameterValue(double** pdoublearray,int* pM,int* pN);
-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ISSMERROR("DoubleMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Vec* pvec){ISSMERROR("DoubleMat param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Mat* pmat){ISSMERROR("DoubleMat param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(FILE** pfid){ISSMERROR("DoubleMat param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("DoubleMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Vec* pvec){_error_("DoubleMat param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Mat* pmat){_error_("DoubleMat param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(FILE** pfid){_error_("DoubleMat param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
 
-		void  SetValue(bool boolean){ISSMERROR("DoubleMat param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}
-		void  SetValue(int integer){ISSMERROR("DoubleMat param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}
-		void  SetValue(int* intarray,int M){ISSMERROR("DoubleMat param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double scalar){ISSMERROR("DoubleMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}
-		void  SetValue(char* string){ISSMERROR("DoubleMat param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
-		void  SetValue(char** stringarray,int M){ISSMERROR("DoubleMat param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* doublearray,int M){ISSMERROR("DoubleMat param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToString(enum_type));}
+		void  SetValue(bool boolean){_error_("DoubleMat param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}
+		void  SetValue(int integer){_error_("DoubleMat param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}
+		void  SetValue(int* intarray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double scalar){_error_("DoubleMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}
+		void  SetValue(char* string){_error_("DoubleMat param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
+		void  SetValue(char** stringarray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* doublearray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToString(enum_type));}
 		void  SetValue(double* doublearray,int M,int N);
-		void  SetValue(Vec vec){ISSMERROR("DoubleMat param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
-		void  SetValue(Mat mat){ISSMERROR("DoubleMat param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
-		void  SetValue(FILE* fid){ISSMERROR("DoubleMat param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){ISSMERROR("DoubleMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
+		void  SetValue(Vec vec){_error_("DoubleMat param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
+		void  SetValue(Mat mat){_error_("DoubleMat param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
+		void  SetValue(FILE* fid){_error_("DoubleMat param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
+		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("DoubleMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
 
 		char* GetParameterName(void);
Index: /issm/trunk/src/c/objects/Params/DoubleParam.cpp
===================================================================
--- /issm/trunk/src/c/objects/Params/DoubleParam.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Params/DoubleParam.cpp	(revision 6412)
@@ -134,5 +134,5 @@
 	*pinteger=(int)value;
 #else
-	ISSMERROR("Double param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));
+	_error_("Double param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));
 #endif
 }
@@ -143,9 +143,9 @@
 
 	/*If debugging mode, cheeck that the double is 0 or 1*/
-	ISSMASSERT(value==0 || value==1);
+	_assert_(value==0 || value==1);
 	*pbool=(bool)value;
 
 #else
-	ISSMERROR("Double param of enum %i (%s) cannot return an bool",enum_type,EnumToString(enum_type));
+	_error_("Double param of enum %i (%s) cannot return an bool",enum_type,EnumToString(enum_type));
 #endif
 }
@@ -163,5 +163,5 @@
 	*pintarray=output;
 #else
-	ISSMERROR("Double param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));
+	_error_("Double param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));
 #endif
 }
@@ -179,5 +179,5 @@
 	*pdoublearray=output;
 #else
-	ISSMERROR("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToString(enum_type));
+	_error_("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToString(enum_type));
 #endif
 }
@@ -196,5 +196,5 @@
 	*pdoublearray=output;
 #else
-	ISSMERROR("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToString(enum_type));
+	_error_("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToString(enum_type));
 #endif
 }
Index: /issm/trunk/src/c/objects/Params/DoubleParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/DoubleParam.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Params/DoubleParam.h	(revision 6412)
@@ -54,25 +54,25 @@
 		void  GetParameterValue(int** pintarray,int* pM);
 		void  GetParameterValue(double* pdouble){*pdouble=value;}
-		void  GetParameterValue(char** pstring){ISSMERROR("Double param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("Double param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char** pstring){_error_("Double param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char*** pstringarray,int* pM){_error_("Double param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
 		void  GetParameterValue(double** pdoublearray,int* pM);
 		void  GetParameterValue(double** pdoublearray,int* pM, int* pN);
-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ISSMERROR("Double param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Vec* pvec){ISSMERROR("Double param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Mat* pmat){ISSMERROR("Double param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(FILE** pfid){ISSMERROR("Double param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Double param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Vec* pvec){_error_("Double param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Mat* pmat){_error_("Double param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(FILE** pfid){_error_("Double param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
 
 		void  SetValue(bool boolean){this->value=(double)boolean;}
 		void  SetValue(int integer){this->value=(double)integer;}
-		void  SetValue(int* intarray,int M){ISSMERROR("Double param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
+		void  SetValue(int* intarray,int M){_error_("Double param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
 		void  SetValue(double scalar){this->value=(double)scalar;}
-		void  SetValue(char* string){ISSMERROR("Double param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
-		void  SetValue(char** stringarray,int M){ISSMERROR("Double param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* doublearray,int M){ISSMERROR("Double param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* pdoublearray,int M,int N){ISSMERROR("Double param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
-		void  SetValue(Vec vec){ISSMERROR("Double param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
-		void  SetValue(Mat mat){ISSMERROR("Double param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
-		void  SetValue(FILE* fid){ISSMERROR("Double param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){ISSMERROR("Double param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
+		void  SetValue(char* string){_error_("Double param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
+		void  SetValue(char** stringarray,int M){_error_("Double param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* doublearray,int M){_error_("Double param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* pdoublearray,int M,int N){_error_("Double param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
+		void  SetValue(Vec vec){_error_("Double param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
+		void  SetValue(Mat mat){_error_("Double param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
+		void  SetValue(FILE* fid){_error_("Double param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
+		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("Double param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
 
 		char* GetParameterName(void);
Index: /issm/trunk/src/c/objects/Params/DoubleVecParam.cpp
===================================================================
--- /issm/trunk/src/c/objects/Params/DoubleVecParam.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Params/DoubleVecParam.cpp	(revision 6412)
@@ -174,5 +174,5 @@
 	*pintarray=output;
 #else
-	ISSMERROR("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToString(enum_type));
+	_error_("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToString(enum_type));
 #endif
 }
Index: /issm/trunk/src/c/objects/Params/DoubleVecParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/DoubleVecParam.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Params/DoubleVecParam.h	(revision 6412)
@@ -50,29 +50,29 @@
 		/*Param virtual functions definitions: {{{1*/
 		int   EnumType(){return enum_type;}
-		void  GetParameterValue(bool* pbool){ISSMERROR("DoubleVec param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int* pinteger){ISSMERROR("DoubleVec param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(bool* pbool){_error_("DoubleVec param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int* pinteger){_error_("DoubleVec param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
 		void  GetParameterValue(int** pintarray,int* pM);
-		void  GetParameterValue(double* pdouble){ISSMERROR("DoubleVec param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char** pstring){ISSMERROR("DoubleVec param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("DoubleVec param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double* pdouble){_error_("DoubleVec param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char** pstring){_error_("DoubleVec param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleVec param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
 		void  GetParameterValue(double** pdoublearray,int* pM);
-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("DoubleVec param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ISSMERROR("DoubleVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Vec* pvec){ISSMERROR("DoubleVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Mat* pmat){ISSMERROR("DoubleVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(FILE** pfid){ISSMERROR("DoubleVec param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("DoubleVec param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("DoubleVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Vec* pvec){_error_("DoubleVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Mat* pmat){_error_("DoubleVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(FILE** pfid){_error_("DoubleVec param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
 
-		void  SetValue(bool boolean){ISSMERROR("DoubleVec param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}
-		void  SetValue(int integer){ISSMERROR("DoubleVec param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}
-		void  SetValue(int* intarray,int M){ISSMERROR("DoubleVec param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double scalar){ISSMERROR("DoubleVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}
-		void  SetValue(char* string){ISSMERROR("DoubleVec param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
-		void  SetValue(char** stringarray,int M){ISSMERROR("DoubleVec param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
+		void  SetValue(bool boolean){_error_("DoubleVec param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}
+		void  SetValue(int integer){_error_("DoubleVec param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}
+		void  SetValue(int* intarray,int M){_error_("DoubleVec param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double scalar){_error_("DoubleVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}
+		void  SetValue(char* string){_error_("DoubleVec param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
+		void  SetValue(char** stringarray,int M){_error_("DoubleVec param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
 		void  SetValue(double* doublearray,int M);
-		void  SetValue(double* pdoublearray,int M,int N){ISSMERROR("DoubleVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToString(enum_type));}
-		void  SetValue(Vec vec){ISSMERROR("DoubleVec param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
-		void  SetValue(Mat mat){ISSMERROR("DoubleVec param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
-		void  SetValue(FILE* fid){ISSMERROR("DoubleVec param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){ISSMERROR("DoubleVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* pdoublearray,int M,int N){_error_("DoubleVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToString(enum_type));}
+		void  SetValue(Vec vec){_error_("DoubleVec param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
+		void  SetValue(Mat mat){_error_("DoubleVec param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
+		void  SetValue(FILE* fid){_error_("DoubleVec param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
+		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("DoubleVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
 		
 		char* GetParameterName(void);
Index: /issm/trunk/src/c/objects/Params/FileParam.cpp
===================================================================
--- /issm/trunk/src/c/objects/Params/FileParam.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Params/FileParam.cpp	(revision 6412)
@@ -65,15 +65,15 @@
 void  FileParam::Marshall(char** pmarshalled_dataset){
 
-	ISSMERROR("FileParam is a pointer and cannot be marshalled");
+	_error_("FileParam is a pointer and cannot be marshalled");
 }
 /*}}}*/
 /*FUNCTION FileParam::MarshallSize{{{1*/
 int   FileParam::MarshallSize(){
-	ISSMERROR("FileParam is a pointer and cannot be marshalled");
+	_error_("FileParam is a pointer and cannot be marshalled");
 }
 /*}}}*/
 /*FUNCTION FileParam::Demarshall{{{1*/
 void  FileParam::Demarshall(char** pmarshalled_dataset){
-	ISSMERROR("FileParam is a pointer and cannot be marshalled");
+	_error_("FileParam is a pointer and cannot be marshalled");
 }
 /*}}}*/
@@ -103,5 +103,5 @@
 void  FileParam::SetMatlabField(mxArray* dataref){
 	
-	ISSMERROR("FileParam is a pointer and cannot be converted into a matlab object");
+	_error_("FileParam is a pointer and cannot be converted into a matlab object");
 }
 #endif
Index: /issm/trunk/src/c/objects/Params/FileParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/FileParam.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Params/FileParam.h	(revision 6412)
@@ -49,29 +49,29 @@
 		/*Param vritual function definitions: {{{1*/
 		int   EnumType(){return enum_type;}
-		void  GetParameterValue(bool* pbool){  ISSMERROR("FileParam of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int* pinteger){ISSMERROR("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int** pintarray,int* pM){ISSMERROR("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double* pdouble){ISSMERROR("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char** pstring){ISSMERROR("FileParam of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("FileParam of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("FileParam of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("FileParam of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ISSMERROR("File param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Vec* pvec){ISSMERROR("FileParam of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Mat* pmat){ISSMERROR("FileParam of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(bool* pbool){  _error_("FileParam of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int* pinteger){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int** pintarray,int* pM){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double* pdouble){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char** pstring){_error_("FileParam of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char*** pstringarray,int* pM){_error_("FileParam of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM){_error_("FileParam of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("FileParam of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("File param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Vec* pvec){_error_("FileParam of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Mat* pmat){_error_("FileParam of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
 		void  GetParameterValue(FILE** pfid){*pfid=value;};
 
-		void  SetValue(bool boolean){ISSMERROR("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
-		void  SetValue(int integer){ISSMERROR("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
-		void  SetValue(int* intarray,int M){ISSMERROR("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
-		void  SetValue(double scalar){ISSMERROR("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
-		void  SetValue(char* string){ISSMERROR("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
-		void  SetValue(char** stringarray,int M){ISSMERROR("FileParam of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* doublearray,int M){ISSMERROR("FileParam of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* pdoublearray,int M,int N){ISSMERROR("FileParam of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
-		void  SetValue(Vec vec){ISSMERROR("FileParam of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
-		void  SetValue(Mat mat){ISSMERROR("FileParam of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
-		void  SetValue(FILE* fid){ISSMERROR("File param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){ISSMERROR("File param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
+		void  SetValue(bool boolean){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
+		void  SetValue(int integer){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
+		void  SetValue(int* intarray,int M){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
+		void  SetValue(double scalar){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
+		void  SetValue(char* string){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
+		void  SetValue(char** stringarray,int M){_error_("FileParam of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* doublearray,int M){_error_("FileParam of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* pdoublearray,int M,int N){_error_("FileParam of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
+		void  SetValue(Vec vec){_error_("FileParam of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
+		void  SetValue(Mat mat){_error_("FileParam of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
+		void  SetValue(FILE* fid){_error_("File param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
+		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("File param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
 
 		char* GetParameterName(void);
Index: /issm/trunk/src/c/objects/Params/IntParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/IntParam.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Params/IntParam.h	(revision 6412)
@@ -50,29 +50,29 @@
 		/*Param vritual function definitions: {{{1*/
 		int   EnumType(){return enum_type;}
-		void  GetParameterValue(bool* pbool){ISSMERROR("Int param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(bool* pbool){_error_("Int param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
 		void  GetParameterValue(int* pinteger){*pinteger=value;}
-		void  GetParameterValue(int** pintarray,int* pM){ISSMERROR("Int param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double* pdouble){ISSMERROR("Int param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char** pstring){ISSMERROR("Int param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("Int param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("Int param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("Int param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ISSMERROR("Int param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Vec* pvec){ISSMERROR("Int param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Mat* pmat){ISSMERROR("Int param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(FILE** pfid){ISSMERROR("Int param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int** pintarray,int* pM){_error_("Int param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double* pdouble){_error_("Int param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char** pstring){_error_("Int param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char*** pstringarray,int* pM){_error_("Int param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM){_error_("Int param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("Int param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Int param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Vec* pvec){_error_("Int param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Mat* pmat){_error_("Int param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(FILE** pfid){_error_("Int param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
 
 		void  SetValue(bool boolean){this->value=(int)boolean;}
 		void  SetValue(int integer){this->value=integer;}
-		void  SetValue(int* intarray,int M){ISSMERROR("Int param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
+		void  SetValue(int* intarray,int M){_error_("Int param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
 		void  SetValue(double scalar){this->value=(int)scalar;}
-		void  SetValue(char* string){ISSMERROR("Int param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
-		void  SetValue(char** stringarray,int M){ISSMERROR("Int param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* doublearray,int M){ISSMERROR("Int param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* pdoublearray,int M,int N){ISSMERROR("Int param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
-		void  SetValue(Vec vec){ISSMERROR("Int param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
-		void  SetValue(Mat mat){ISSMERROR("Int param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
-		void  SetValue(FILE* fid){ISSMERROR("Int param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){ISSMERROR("Int param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
+		void  SetValue(char* string){_error_("Int param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
+		void  SetValue(char** stringarray,int M){_error_("Int param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* doublearray,int M){_error_("Int param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* pdoublearray,int M,int N){_error_("Int param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
+		void  SetValue(Vec vec){_error_("Int param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
+		void  SetValue(Mat mat){_error_("Int param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
+		void  SetValue(FILE* fid){_error_("Int param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
+		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("Int param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
 
 		char* GetParameterName(void);
Index: /issm/trunk/src/c/objects/Params/IntVecParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/IntVecParam.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Params/IntVecParam.h	(revision 6412)
@@ -51,29 +51,29 @@
 		/*Param virtual functions definitions: {{{1*/
 		int   EnumType(){return enum_type;}
-		void  GetParameterValue(bool* pbool){ISSMERROR("IntVec param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int* pinteger){ISSMERROR("IntVec param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(bool* pbool){_error_("IntVec param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int* pinteger){_error_("IntVec param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
 		void  GetParameterValue(int** pintarray,int* pM);
-		void  GetParameterValue(double* pdouble){ISSMERROR("IntVec param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char** pstring){ISSMERROR("IntVec param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("IntVec param of enum %i (%s) cannot return a string array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("IntVec param of enum %i (%s) cannot return a double array (maybe in serial?)",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("IntVec param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ISSMERROR("IntVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Vec* pvec){ISSMERROR("IntVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Mat* pmat){ISSMERROR("IntVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(FILE** pfid){ISSMERROR("IntVec param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double* pdouble){_error_("IntVec param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char** pstring){_error_("IntVec param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char*** pstringarray,int* pM){_error_("IntVec param of enum %i (%s) cannot return a string array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM){_error_("IntVec param of enum %i (%s) cannot return a double array (maybe in serial?)",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("IntVec param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("IntVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Vec* pvec){_error_("IntVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Mat* pmat){_error_("IntVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(FILE** pfid){_error_("IntVec param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
 
-		void  SetValue(bool boolean){ISSMERROR("IntVec param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}
-		void  SetValue(int integer){ISSMERROR("IntVec param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}
+		void  SetValue(bool boolean){_error_("IntVec param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}
+		void  SetValue(int integer){_error_("IntVec param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}
 		void  SetValue(int* intarray,int M);
-		void  SetValue(double scalar){ISSMERROR("IntVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}
-		void  SetValue(char* string){ISSMERROR("IntVec param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
-		void  SetValue(char** stringarray,int M){ISSMERROR("IntVec param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* doublearray,int M){ISSMERROR("IntVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* pdoublearray,int M,int N){ISSMERROR("IntVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToString(enum_type));}
-		void  SetValue(Vec vec){ISSMERROR("IntVec param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
-		void  SetValue(Mat mat){ISSMERROR("IntVec param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
-		void  SetValue(FILE* fid){ISSMERROR("IntVec param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){ISSMERROR("IntVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
+		void  SetValue(double scalar){_error_("IntVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}
+		void  SetValue(char* string){_error_("IntVec param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
+		void  SetValue(char** stringarray,int M){_error_("IntVec param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* doublearray,int M){_error_("IntVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* pdoublearray,int M,int N){_error_("IntVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToString(enum_type));}
+		void  SetValue(Vec vec){_error_("IntVec param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
+		void  SetValue(Mat mat){_error_("IntVec param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
+		void  SetValue(FILE* fid){_error_("IntVec param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
+		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("IntVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
 		
 		char* GetParameterName(void);
Index: /issm/trunk/src/c/objects/Params/PetscMatParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/PetscMatParam.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Params/PetscMatParam.h	(revision 6412)
@@ -50,29 +50,29 @@
 		/*Param vritual function definitions: {{{1*/
 		int   EnumType(){return enum_type;}
-		void  GetParameterValue(bool* pbool){ISSMERROR("PetscMat param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int* pinteger){ISSMERROR("PetscMat param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int** pintarray,int* pM){ISSMERROR("PetscMat param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double* pdouble){ISSMERROR("PetscMat param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char** pstring){ISSMERROR("PetscMat param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("PetscMat param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("PetscMat param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("PetscMat param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ISSMERROR("PetscMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Vec* pvec){ISSMERROR("PetscMat param of enum %i (%s) cannot return a vec",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(bool* pbool){_error_("PetscMat param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int* pinteger){_error_("PetscMat param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int** pintarray,int* pM){_error_("PetscMat param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double* pdouble){_error_("PetscMat param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char** pstring){_error_("PetscMat param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char*** pstringarray,int* pM){_error_("PetscMat param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM){_error_("PetscMat param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("PetscMat param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("PetscMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Vec* pvec){_error_("PetscMat param of enum %i (%s) cannot return a vec",enum_type,EnumToString(enum_type));}
 		void  GetParameterValue(Mat* poutput);
-		void  GetParameterValue(FILE** pfid){ISSMERROR("PetscMat param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(FILE** pfid){_error_("PetscMat param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
 
-		void  SetValue(bool boolean){ISSMERROR("PetscMat param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}
-		void  SetValue(int integer){ISSMERROR("PetscMat param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}
-		void  SetValue(int* intarray,int M){ISSMERROR("PetscMat param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double scalar){ISSMERROR("PetscMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}
-		void  SetValue(char* string){ISSMERROR("PetscMat param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
-		void  SetValue(char** stringarray,int M){ISSMERROR("PetscMat param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* doublearray,int M){ISSMERROR("PetscMat param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* pdoublearray,int M,int N){ISSMERROR("PetscMat param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
-		void  SetValue(Vec vec){ISSMERROR("PetscMat param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
+		void  SetValue(bool boolean){_error_("PetscMat param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}
+		void  SetValue(int integer){_error_("PetscMat param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}
+		void  SetValue(int* intarray,int M){_error_("PetscMat param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double scalar){_error_("PetscMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}
+		void  SetValue(char* string){_error_("PetscMat param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
+		void  SetValue(char** stringarray,int M){_error_("PetscMat param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* doublearray,int M){_error_("PetscMat param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* pdoublearray,int M,int N){_error_("PetscMat param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
+		void  SetValue(Vec vec){_error_("PetscMat param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
 		void  SetValue(Mat mat);
-		void  SetValue(FILE* fid){ISSMERROR("PetscMat param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){ISSMERROR("PetscMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
+		void  SetValue(FILE* fid){_error_("PetscMat param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
+		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("PetscMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
 
 		char* GetParameterName(void);
Index: /issm/trunk/src/c/objects/Params/PetscVecParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/PetscVecParam.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Params/PetscVecParam.h	(revision 6412)
@@ -50,29 +50,29 @@
 		/*Param vritual function definitions: {{{1*/
 		int   EnumType(){return enum_type;}
-		void  GetParameterValue(bool* pbool){ISSMERROR("PetscVec param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int* pinteger){ISSMERROR("PetscVec param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int** pintarray,int* pM){ISSMERROR("PetscVec param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double* pdouble){ISSMERROR("PetscVec param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char** pstring){ISSMERROR("PetscVec param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("PetscVec param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("PetscVec param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("PetscVec param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ISSMERROR("PetscVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Mat* pmat){ISSMERROR("PetscVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(bool* pbool){_error_("PetscVec param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int* pinteger){_error_("PetscVec param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int** pintarray,int* pM){_error_("PetscVec param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double* pdouble){_error_("PetscVec param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char** pstring){_error_("PetscVec param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char*** pstringarray,int* pM){_error_("PetscVec param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM){_error_("PetscVec param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("PetscVec param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("PetscVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Mat* pmat){_error_("PetscVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
 		void  GetParameterValue(Vec* poutput);
-		void  GetParameterValue(FILE** pfid){ISSMERROR("PetscVec of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(FILE** pfid){_error_("PetscVec of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
 
-		void  SetValue(bool boolean){ISSMERROR("PetscVec of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}
-		void  SetValue(int integer){ISSMERROR("PetscVec of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}
-		void  SetValue(int* intarray,int M){ISSMERROR("PetscVec of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double scalar){ISSMERROR("PetscVec of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}
-		void  SetValue(char* string){ISSMERROR("PetscVec of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
-		void  SetValue(char** stringarray,int M){ISSMERROR("PetscVec of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* doublearray,int M){ISSMERROR("PetscVec of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* pdoublearray,int M,int N){ISSMERROR("PetscVec of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
+		void  SetValue(bool boolean){_error_("PetscVec of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}
+		void  SetValue(int integer){_error_("PetscVec of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}
+		void  SetValue(int* intarray,int M){_error_("PetscVec of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double scalar){_error_("PetscVec of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}
+		void  SetValue(char* string){_error_("PetscVec of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
+		void  SetValue(char** stringarray,int M){_error_("PetscVec of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* doublearray,int M){_error_("PetscVec of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* pdoublearray,int M,int N){_error_("PetscVec of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
 		void  SetValue(Vec vec);
-		void  SetValue(Mat mat){ISSMERROR("PetscVec of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
-		void  SetValue(FILE* fid){ISSMERROR("PetscVec of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){ISSMERROR("PetscVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
+		void  SetValue(Mat mat){_error_("PetscVec of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
+		void  SetValue(FILE* fid){_error_("PetscVec of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
+		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("PetscVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
 
 		char* GetParameterName(void);
Index: /issm/trunk/src/c/objects/Params/StringArrayParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/StringArrayParam.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Params/StringArrayParam.h	(revision 6412)
@@ -52,29 +52,29 @@
 		/*Param vritual function definitions: {{{1*/
 		int   EnumType(){return enum_type;}
-		void  GetParameterValue(bool* pbool){ISSMERROR("StringArray param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int* pinteger){ISSMERROR("StringArray param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int** pintarray,int* pM){ISSMERROR("StringArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double* pdouble){ISSMERROR("StringArray param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(char** pstring){ISSMERROR("StringArray param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(bool* pbool){_error_("StringArray param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int* pinteger){_error_("StringArray param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int** pintarray,int* pM){_error_("StringArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double* pdouble){_error_("StringArray param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char** pstring){_error_("StringArray param of enum %i (%s) cannot return a string",enum_type,EnumToString(enum_type));}
 		void  GetParameterValue(char*** pstringarray,int* pM);
-		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("StringArray param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("StringArray param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ISSMERROR("Vec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Vec* pvec){ISSMERROR("StringArray param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Mat* pmat){ISSMERROR("StringArray param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(FILE** pfid){ISSMERROR("StringArray param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM){_error_("StringArray param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("StringArray param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Vec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Vec* pvec){_error_("StringArray param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Mat* pmat){_error_("StringArray param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(FILE** pfid){_error_("StringArray param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
 
-		void  SetValue(bool boolean){ISSMERROR("StringArray param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}
-		void  SetValue(int integer){ISSMERROR("StringArray param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}
-		void  SetValue(int* intarray,int M){ISSMERROR("StringArray param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double scalar){ISSMERROR("StringArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}
-		void  SetValue(char* string){ISSMERROR("StringArray param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
+		void  SetValue(bool boolean){_error_("StringArray param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}
+		void  SetValue(int integer){_error_("StringArray param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}
+		void  SetValue(int* intarray,int M){_error_("StringArray param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double scalar){_error_("StringArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}
+		void  SetValue(char* string){_error_("StringArray param of enum %i (%s) cannot hold a string",enum_type,EnumToString(enum_type));}
 		void  SetValue(char** stringarray,int M);
-		void  SetValue(double* doublearray,int M){ISSMERROR("StringArray param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* pdoublearray,int M,int N){ISSMERROR("StringArray param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
-		void  SetValue(Vec vec){ISSMERROR("StringArray param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
-		void  SetValue(Mat mat){ISSMERROR("StringArray param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
-		void  SetValue(FILE* fid){ISSMERROR("StringArray param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){ISSMERROR("StringArray param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* doublearray,int M){_error_("StringArray param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* pdoublearray,int M,int N){_error_("StringArray param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
+		void  SetValue(Vec vec){_error_("StringArray param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
+		void  SetValue(Mat mat){_error_("StringArray param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
+		void  SetValue(FILE* fid){_error_("StringArray param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
+		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("StringArray param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
 
 		char* GetParameterName(void);
Index: /issm/trunk/src/c/objects/Params/StringParam.h
===================================================================
--- /issm/trunk/src/c/objects/Params/StringParam.h	(revision 6411)
+++ /issm/trunk/src/c/objects/Params/StringParam.h	(revision 6412)
@@ -50,29 +50,29 @@
 		/*Param vritual function definitions: {{{1*/
 		int   EnumType(){return enum_type;}
-		void  GetParameterValue(bool* pbool){ISSMERROR("String param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int* pinteger){ISSMERROR("String param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(int** pintarray,int* pM){ISSMERROR("String param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double* pdouble){ISSMERROR("String param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(bool* pbool){_error_("String param of enum %i (%s) cannot return a bool",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int* pinteger){_error_("String param of enum %i (%s) cannot return an integer",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(int** pintarray,int* pM){_error_("String param of enum %i (%s) cannot return an array of integers",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double* pdouble){_error_("String param of enum %i (%s) cannot return a double",enum_type,EnumToString(enum_type));}
 		void  GetParameterValue(char** pstring);
-		void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("String param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("String param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("String param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){ISSMERROR("String param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Vec* pvec){ISSMERROR("String param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(Mat* pmat){ISSMERROR("String param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
-		void  GetParameterValue(FILE** pfid){ISSMERROR("Bool param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(char*** pstringarray,int* pM){_error_("String param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM){_error_("String param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("String param of enum %i (%s) cannot return a double array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("String param of enum %i (%s) cannot return a matrix array",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Vec* pvec){_error_("String param of enum %i (%s) cannot return a Vec",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(Mat* pmat){_error_("String param of enum %i (%s) cannot return a Mat",enum_type,EnumToString(enum_type));}
+		void  GetParameterValue(FILE** pfid){_error_("Bool param of enum %i (%s) cannot return a FILE",enum_type,EnumToString(enum_type));}
 
-		void  SetValue(bool boolean){ISSMERROR("String param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}
-		void  SetValue(int integer){ISSMERROR("String param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}
-		void  SetValue(int* intarray,int M){ISSMERROR("String param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double scalar){ISSMERROR("String param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}
+		void  SetValue(bool boolean){_error_("String param of enum %i (%s) cannot hold a boolean",enum_type,EnumToString(enum_type));}
+		void  SetValue(int integer){_error_("String param of enum %i (%s) cannot hold an integer",enum_type,EnumToString(enum_type));}
+		void  SetValue(int* intarray,int M){_error_("String param of enum %i (%s) cannot hold an int array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double scalar){_error_("String param of enum %i (%s) cannot hold a scalar",enum_type,EnumToString(enum_type));}
 		void  SetValue(char* string);
-		void  SetValue(char** stringarray,int M){ISSMERROR("String param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* doublearray,int M){ISSMERROR("String param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
-		void  SetValue(double* pdoublearray,int M,int N){ISSMERROR("String param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
-		void  SetValue(Vec vec){ISSMERROR("String param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
-		void  SetValue(Mat mat){ISSMERROR("String param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
-		void  SetValue(FILE* fid){ISSMERROR("String param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){ISSMERROR("String param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
+		void  SetValue(char** stringarray,int M){_error_("String param of enum %i (%s) cannot hold a string array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* doublearray,int M){_error_("String param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
+		void  SetValue(double* pdoublearray,int M,int N){_error_("String param of enum %i (%s) cannot hold a double array",enum_type,EnumToString(enum_type));}
+		void  SetValue(Vec vec){_error_("String param of enum %i (%s) cannot hold a Vec",enum_type,EnumToString(enum_type));}
+		void  SetValue(Mat mat){_error_("String param of enum %i (%s) cannot hold a Mat",enum_type,EnumToString(enum_type));}
+		void  SetValue(FILE* fid){_error_("String param of enum %i (%s) cannot hold a FILE",enum_type,EnumToString(enum_type));}
+		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("String param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToString(enum_type));}
 
 		char* GetParameterName(void);
Index: /issm/trunk/src/c/objects/Segment.cpp
===================================================================
--- /issm/trunk/src/c/objects/Segment.cpp	(revision 6411)
+++ /issm/trunk/src/c/objects/Segment.cpp	(revision 6412)
@@ -74,15 +74,15 @@
 void  Segment::Marshall(char** pmarshalled_dataset){
 
-	ISSMERROR(" not supported yet!");
+	_error_(" not supported yet!");
 }
 /*}}}*/
 /*FUNCTION Segment::MarshallSize{{{1*/
 int   Segment::MarshallSize(){
-	ISSMERROR(" not supported yet!");
+	_error_(" not supported yet!");
 }
 /*}}}*/
 /*FUNCTION Segment::Demarshall{{{1*/
 void  Segment::Demarshall(char** pmarshalled_dataset){
-	ISSMERROR(" not supported yet!");
+	_error_(" not supported yet!");
 }
 /*}}}*/
Index: /issm/trunk/src/c/shared/Alloc/alloc.cpp
===================================================================
--- /issm/trunk/src/c/shared/Alloc/alloc.cpp	(revision 6411)
+++ /issm/trunk/src/c/shared/Alloc/alloc.cpp	(revision 6412)
@@ -33,5 +33,5 @@
 	void* memptr=NULL;
 
-	if(!size)ISSMERROR(" attempting to 0 size allocation!");
+	if(!size)_error_(" attempting to 0 size allocation!");
 
 	#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
@@ -42,5 +42,5 @@
 	memptr=malloc(size);
 	#endif
-	if(!memptr) ISSMERROR("memory allocation failed!");
+	if(!memptr) _error_("memory allocation failed!");
 
 	return memptr;
@@ -51,5 +51,5 @@
 	void* memptr=NULL;
 	
-	if(!size)ISSMERROR("attempting to 0 size allocation!");
+	if(!size)_error_("attempting to 0 size allocation!");
 
 	#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
@@ -60,5 +60,5 @@
 	memptr=calloc(n,size);
 	#endif
-	if(!memptr) ISSMERROR("memory allocation failed!");
+	if(!memptr) _error_("memory allocation failed!");
 
 	return memptr;
@@ -83,5 +83,5 @@
 	register void* value=NULL;
 	
-	if(!size)ISSMERROR("attempting to realloc to zero");
+	if(!size)_error_("attempting to realloc to zero");
 
 	#ifndef MATLAB
@@ -92,5 +92,5 @@
 
 	if (value == NULL) {
-		ISSMERROR("virtual memory exhausted");
+		_error_("virtual memory exhausted");
 	}
 	return value;
Index: /issm/trunk/src/c/shared/Elements/GetVerticesCoordinates.cpp
===================================================================
--- /issm/trunk/src/c/shared/Elements/GetVerticesCoordinates.cpp	(revision 6411)
+++ /issm/trunk/src/c/shared/Elements/GetVerticesCoordinates.cpp	(revision 6412)
@@ -8,5 +8,5 @@
 
 	/*In debugging mode, check that nodes is not a NULL pointer*/
-	ISSMASSERT(nodes);
+	_assert_(nodes);
 
 	for(int i=0;i<numvertices;i++) {
Index: /issm/trunk/src/c/shared/Exp/DomainOutlineRead.cpp
===================================================================
--- /issm/trunk/src/c/shared/Exp/DomainOutlineRead.cpp	(revision 6411)
+++ /issm/trunk/src/c/shared/Exp/DomainOutlineRead.cpp	(revision 6412)
@@ -37,5 +37,5 @@
 	/*open domain outline file for reading: */
 	if ((fid=fopen(domainname,"r"))==NULL){
-		ISSMERROR("%s%s","could not find domain file ",domainname); 
+		_error_("%s%s","could not find domain file ",domainname); 
 		noerr=0; goto cleanupandreturn;
 	}
Index: /issm/trunk/src/c/shared/Matlab/CheckNumMatlabArguments.cpp
===================================================================
--- /issm/trunk/src/c/shared/Matlab/CheckNumMatlabArguments.cpp	(revision 6411)
+++ /issm/trunk/src/c/shared/Matlab/CheckNumMatlabArguments.cpp	(revision 6412)
@@ -17,9 +17,9 @@
 		/* special case: */
 		function();
-		ISSMERROR("usage: see above");
+		_error_("usage: see above");
 	}
 	else if (nlhs!=NLHS || nrhs!=NRHS ) {
 		function(); 
-		ISSMERROR("usage error.");
+		_error_("usage error.");
 	}
 	return 1;
Index: /issm/trunk/src/c/shared/Matrix/MatrixUtils.cpp
===================================================================
--- /issm/trunk/src/c/shared/Matrix/MatrixUtils.cpp	(revision 6411)
+++ /issm/trunk/src/c/shared/Matrix/MatrixUtils.cpp	(revision 6412)
@@ -36,5 +36,5 @@
 	if (!itrnb) {
 		if (nrowb != idimb) {
-			ISSMERROR("Matrix A and B inner vectors not equal size.");
+			_error_("Matrix A and B inner vectors not equal size.");
 		}
 		idimc=ncolb;
@@ -42,5 +42,5 @@
 	else {
 		if (ncolb != idimb) {
-			ISSMERROR("Matrix A and B inner vectors not equal size.");
+			_error_("Matrix A and B inner vectors not equal size.");
 		}
 		idimc=nrowb;
@@ -49,5 +49,5 @@
 	if (!itrnc) {
 		if (nrowc != idimc) {
-			ISSMERROR("Matrix B and C inner vectors not equal size.");
+			_error_("Matrix B and C inner vectors not equal size.");
 		}
 		idimd=ncolc;
@@ -55,5 +55,5 @@
 	else {
 		if (ncolc != idimc) {
-			ISSMERROR("Matrix B and C inner vectors not equal size.");
+			_error_("Matrix B and C inner vectors not equal size.");
 		}
 		idimd=nrowc;
@@ -134,5 +134,5 @@
 
 	if (ntrma != ntrmb) {
-		ISSMERROR("Matrix A and B inner vectors not equal size");
+		_error_("Matrix A and B inner vectors not equal size");
 	    noerr=0;	
 		return noerr;
@@ -185,5 +185,5 @@
 
 	if (!b && nvec) {
-		ISSMERROR("No right-hand side for nvec=%d.",nvec);
+		_error_("No right-hand side for nvec=%d.",nvec);
 		noerr=0;
 		return noerr;
@@ -191,6 +191,6 @@
 
 	/*In debugging mode, check that we are not dealing with simple matrices*/
-	ISSMASSERT(!(ndim==2 && nrow==2));
-	ISSMASSERT(!(ndim==3 && nrow==3));
+	_assert_(!(ndim==2 && nrow==2));
+	_assert_(!(ndim==3 && nrow==3));
 
 /*  initialize local variables and arrays  */
@@ -223,5 +223,5 @@
 			xfree((void **)&pivrc);
 			xfree((void **)&pindx);
-			ISSMERROR("Pivot %f less than machine epsilon",pivot);
+			_error_("Pivot %f less than machine epsilon",pivot);
 			noerr=0;
 			return noerr;
@@ -234,5 +234,5 @@
 		pindx[ipiv]++;
 
-//		_printf_("pivot for i=%d: irow=%d, icol=%d, pindx[%d]=%d\n",
+//		_printf_(true,"pivot for i=%d: irow=%d, icol=%d, pindx[%d]=%d\n",
 //				 i,irow,icol,ipiv,pindx[ipiv]);
 
@@ -241,5 +241,5 @@
 
 		if (irow != icol) {
-//			_printf_("row switch for i=%d: irow=%d, icol=%d\n",
+//			_printf_(true,"row switch for i=%d: irow=%d, icol=%d\n",
 //					 i,irow,icol);
 
@@ -323,5 +323,5 @@
 			icol=pivrc[j][1];
 
-//			_printf_("column switch back for j=%d: irow=%d, icol=%d\n",
+//			_printf_(true,"column switch back for j=%d: irow=%d, icol=%d\n",
 //					 j,irow,icol);
 
@@ -360,5 +360,5 @@
 	/*Compute determinant*/
 	Matrix2x2Determinant(&det,A);
-	if (fabs(det) < DBL_EPSILON) ISSMERROR("Determinant smaller that machine epsilon");
+	if (fabs(det) < DBL_EPSILON) _error_("Determinant smaller that machine epsilon");
 
 	/*Compute invert*/
@@ -385,5 +385,5 @@
 	/*Compute determinant*/
 	Matrix3x3Determinant(&det,A);
-	if (fabs(det) < DBL_EPSILON) ISSMERROR("Determinant smaller that machine epsilon");
+	if (fabs(det) < DBL_EPSILON) _error_("Determinant smaller that machine epsilon");
 
 	/*Compute invert*/
@@ -406,5 +406,5 @@
 
 	/*Check the the matrix has been allocated*/
-	ISSMASSERT(tA);
+	_assert_(tA);
 
 	/*Transpose*/
Index: /issm/trunk/src/c/shared/Numerics/BrentSearch.cpp
===================================================================
--- /issm/trunk/src/c/shared/Numerics/BrentSearch.cpp	(revision 6411)
+++ /issm/trunk/src/c/shared/Numerics/BrentSearch.cpp	(revision 6412)
@@ -56,14 +56,14 @@
 	//get the value of the function at the first boundary
 	fxmin = (*f)(xmin,optargs);
-	if isnan(fxmin) ISSMERROR("Function evaluation returned NaN");
+	if isnan(fxmin) _error_("Function evaluation returned NaN");
 
 	//display result
-	ISSMPRINTF(VerboseControl(),"\n        Iteration         x           f(x)       Tolerance         Procedure\n\n");
-	ISSMPRINTF(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",xmin,fxmin,"         N/A         boundary\n");
+	_printf_(VerboseControl(),"\n        Iteration         x           f(x)       Tolerance         Procedure\n\n");
+	_printf_(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",xmin,fxmin,"         N/A         boundary\n");
 
 	//get the value of the function at the first boundary xmax and display result
 	fxmax = (*f)(xmax,optargs);
-	if isnan(fxmax) ISSMERROR("Function evaluation returned NaN");
-	ISSMPRINTF(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",xmax,fxmax,"         N/A         boundary\n");
+	if isnan(fxmax) _error_("Function evaluation returned NaN");
+	_printf_(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",xmax,fxmax,"         N/A         boundary\n");
 
 	//test if jump option activated and xmin==0
@@ -96,5 +96,5 @@
 	//2: call the function to be evaluated
 	fxbest = (*f)(x,optargs);
-	if isnan(fxbest) ISSMERROR("Function evaluation returned NaN");
+	if isnan(fxbest) _error_("Function evaluation returned NaN");
 	iter=iter+1;
 
@@ -109,5 +109,5 @@
 
 	//4: print result
-	ISSMPRINTF(VerboseControl(),"         %5i    %12.6g  %12.6g  %12.6g  %s\n",iter,xbest,fxbest,pow(pow(xbest-xm,2),0.5),"       initial");
+	_printf_(VerboseControl(),"         %5i    %12.6g  %12.6g  %12.6g  %s\n",iter,xbest,fxbest,pow(pow(xbest-xm,2),0.5),"       initial");
 
 	//Main Loop
@@ -193,5 +193,5 @@
 		//evaluate function on x
 		fx = (*f)(x,optargs);
-		if isnan(fx) ISSMERROR("Function evaluation returned NaN");
+		if isnan(fx) _error_("Function evaluation returned NaN");
 		iter=iter+1;
 
@@ -230,17 +230,17 @@
 		//print result
 		if (goldenflag){
-			ISSMPRINTF(VerboseControl(),"         %5i    %12.6g  %12.6g  %12.6g  %s\n",iter,x,fx,pow(pow(xbest-xm,2),0.5),"       golden");
-		}
-		else{
-			ISSMPRINTF(VerboseControl(),"         %5i    %12.6g  %12.6g  %12.6g  %s\n",iter,x,fx,pow(pow(xbest-xm,2),0.5),"       parabolic");
+			_printf_(VerboseControl(),"         %5i    %12.6g  %12.6g  %12.6g  %s\n",iter,x,fx,pow(pow(xbest-xm,2),0.5),"       golden");
+		}
+		else{
+			_printf_(VerboseControl(),"         %5i    %12.6g  %12.6g  %12.6g  %s\n",iter,x,fx,pow(pow(xbest-xm,2),0.5),"       parabolic");
 		}
 
 		//Stop the optimization?
 		if (sqrt(pow(xbest-xm,2)) < (tol2-0.5*(xmax-xmin))){
-			ISSMPRINTF(VerboseControl(),"      %s%g\n","optimization terminated: the current x satisfies the termination criteria using 'tolx' of" ,tolerance);
+			_printf_(VerboseControl(),"      %s%g\n","optimization terminated: the current x satisfies the termination criteria using 'tolx' of" ,tolerance);
 			loop=0;
 		}
 		else if (iter>=maxiter){
-			ISSMPRINTF(VerboseControl(),"      %s\n","exiting: Maximum number of iterations has been exceeded  - increase 'maxiter'\n");
+			_printf_(VerboseControl(),"      %s\n","exiting: Maximum number of iterations has been exceeded  - increase 'maxiter'\n");
 			loop=0;
 		}
Index: /issm/trunk/src/c/shared/Numerics/GaussPoints.cpp
===================================================================
--- /issm/trunk/src/c/shared/Numerics/GaussPoints.cpp	(revision 6411)
+++ /issm/trunk/src/c/shared/Numerics/GaussPoints.cpp	(revision 6412)
@@ -51,5 +51,5 @@
 		sizeof(wgt4 )/sizeof(double)};
 
-	//	_printf_("Gauss-Legendre recurrence coefficients ngaus=%d\n",ngaus);
+	//	_printf_(true,"Gauss-Legendre recurrence coefficients ngaus=%d\n",ngaus);
 	*pxgaus = (double *) xmalloc(ngaus*sizeof(double));
 	*pxwgt  = (double *) xmalloc(ngaus*sizeof(double));
@@ -1139,5 +1139,5 @@
 		sizeof(wgt20)/sizeof(double)};
 
-	//	_printf_("GaussLegendreTria: iord=%d\n",iord);
+	//	_printf_(true,"GaussLegendreTria: iord=%d\n",iord);
 
 	/*  check to see if Gauss points need to be calculated  */
@@ -1199,7 +1199,7 @@
 	}
 
-	//	_printf_("GaussLegendreTria - ngaus=%d\n",*pngaus);
+	//	_printf_(true,"GaussLegendreTria - ngaus=%d\n",*pngaus);
 	//	for (i=0; i<*pngaus; i++)
-	//		_printf_("i=%d: l1gaus=%f,l2gaus=%f,l3gaus=%f,wgt=%f\n",
+	//		_printf_(true,"i=%d: l1gaus=%f,l2gaus=%f,l3gaus=%f,wgt=%f\n",
 	//				 i,(*pl1 )[i],(*pl2 )[i],(*pl3 )[i],(*pwgt)[i]);
 
@@ -1398,5 +1398,5 @@
 		sizeof(wgt6 )/sizeof(double)};
 
-	//	_printf_("GaussLegendreTetra: iord=%d\n",iord);
+	//	_printf_(true,"GaussLegendreTetra: iord=%d\n",iord);
 
 	/*  check to see if Gauss points need to be calculated  */
@@ -1521,5 +1521,5 @@
 		sizeof(wgt5 )/sizeof(double)};
 
-	//	_printf_("Gauss-Lobatto recurrence coefficients ngaus=%d\n",ngaus);
+	//	_printf_(true,"Gauss-Lobatto recurrence coefficients ngaus=%d\n",ngaus);
 	*pxgaus = (double *) xmalloc(ngaus*sizeof(double));
 	*pxwgt  = (double *) xmalloc(ngaus*sizeof(double));
@@ -1670,5 +1670,5 @@
 		if (iter >= MAX_GAUS_ITER) {
 			xfree((void **)&work);
-			ISSMERROR("%s%i"," Max iterations exceeded for l=",MAX_GAUS_ITER);
+			_error_("%s%i"," Max iterations exceeded for l=",MAX_GAUS_ITER);
 		}
 	}
Index: /issm/trunk/src/c/shared/Numerics/IsInputConverged.cpp
===================================================================
--- /issm/trunk/src/c/shared/Numerics/IsInputConverged.cpp	(revision 6411)
+++ /issm/trunk/src/c/shared/Numerics/IsInputConverged.cpp	(revision 6412)
@@ -34,5 +34,5 @@
 
 			/*in debugging mode, check that the inputs are of the same type*/
-			ISSMASSERT(new_inputs[i]->Enum()==old_inputs[i]->Enum());
+			_assert_(new_inputs[i]->Enum()==old_inputs[i]->Enum());
 
 			/*Get pointers*/
@@ -53,5 +53,5 @@
 		else eps=0;
 	}
-	else ISSMERROR("%s%s%s"," convergence criterion ",EnumToString(criterion_enum)," not supported yet!");
+	else _error_("%s%s%s"," convergence criterion ",EnumToString(criterion_enum)," not supported yet!");
 
 	/*Assign output pointers:*/
Index: /issm/trunk/src/c/shared/Numerics/OptFunc.cpp
===================================================================
--- /issm/trunk/src/c/shared/Numerics/OptFunc.cpp	(revision 6411)
+++ /issm/trunk/src/c/shared/Numerics/OptFunc.cpp	(revision 6412)
@@ -38,5 +38,5 @@
 #else
 double OptFunc(double scalar, OptArgs* optargs){
-	ISSMERROR(" not implemented yet");
+	_error_(" not implemented yet");
 }
 #endif
Index: /issm/trunk/src/c/shared/Numerics/OptimalSearch.cpp
===================================================================
--- /issm/trunk/src/c/shared/Numerics/OptimalSearch.cpp	(revision 6411)
+++ /issm/trunk/src/c/shared/Numerics/OptimalSearch.cpp	(revision 6412)
@@ -40,7 +40,7 @@
 	//get the value of the function at the first boundary
 	fx1= (*f)(x1,optargs);
-	if isnan(fx1) ISSMERROR("Function evaluation returned NaN");
-	ISSMPRINTF(VerboseControl(),"\n        Iteration         x           f(x)       Tolerance\n\n");
-	ISSMPRINTF(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",x1,fx1,"         N/A\n");
+	if isnan(fx1) _error_("Function evaluation returned NaN");
+	_printf_(VerboseControl(),"\n        Iteration         x           f(x)       Tolerance\n\n");
+	_printf_(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",x1,fx1,"         N/A\n");
 
 	//update tolerances
@@ -53,14 +53,14 @@
 		iter++;
 		fx2 = (*f)(x2,optargs);
-		if isnan(fx2) ISSMERROR("Function evaluation returned NaN");
-		ISSMPRINTF(VerboseControl(),"         %5i    %12.6g  %12.6g  %12.6g\n",iter,x2,fx2,fabs(x2-x1)>fabs(fx2-fx1)?fabs(fx2-fx1):fabs(x2-x1));
+		if isnan(fx2) _error_("Function evaluation returned NaN");
+		_printf_(VerboseControl(),"         %5i    %12.6g  %12.6g  %12.6g\n",iter,x2,fx2,fabs(x2-x1)>fabs(fx2-fx1)?fabs(fx2-fx1):fabs(x2-x1));
 
 		//Stop the optimization?
 		if ((fabs(x2-x1)+seps)<tolerance || (fabs(fx2-fx1)+seps)<tolerance){
-			ISSMPRINTF(VerboseControl(),"      %s%g\n","optimization terminated: the current x satisfies the termination criteria using 'tolx' of " ,tolerance);
+			_printf_(VerboseControl(),"      %s%g\n","optimization terminated: the current x satisfies the termination criteria using 'tolx' of " ,tolerance);
 			loop=false;
 		}
 		else if (iter>=maxiter){
-			ISSMPRINTF(VerboseControl(),"      %s\n","exiting: Maximum number of iterations has been exceeded  - increase 'maxiter'\n");
+			_printf_(VerboseControl(),"      %s\n","exiting: Maximum number of iterations has been exceeded  - increase 'maxiter'\n");
 			loop=false;
 		}
Index: /issm/trunk/src/c/shared/Numerics/PetscOptionsFromAnalysis.cpp
===================================================================
--- /issm/trunk/src/c/shared/Numerics/PetscOptionsFromAnalysis.cpp	(revision 6411)
+++ /issm/trunk/src/c/shared/Numerics/PetscOptionsFromAnalysis.cpp	(revision 6412)
@@ -57,5 +57,5 @@
 	if (found==-1){
 		/*ok, we did not find anything, this is not good! error out: */
-		ISSMERROR("%s%s","could find neither a default analysis  nor analysis ",EnumToString(analysis_type));
+		_error_("%s%s","could find neither a default analysis  nor analysis ",EnumToString(analysis_type));
 	}
 
Index: /issm/trunk/src/c/shared/Numerics/Synchronize.sh
===================================================================
--- /issm/trunk/src/c/shared/Numerics/Synchronize.sh	(revision 6411)
+++ /issm/trunk/src/c/shared/Numerics/Synchronize.sh	(revision 6412)
@@ -138,5 +138,5 @@
 void SetVerbosityLevel(int level){
 
-	if(level<0) ISSMERROR("vebosity level should be a positive integer (user provided %i)",level);
+	if(level<0) _error_("vebosity level should be a positive integer (user provided %i)",level);
 
 #ifdef _SERIAL_
@@ -168,5 +168,5 @@
 #else
 
-	ISSMASSERT(verbositylevel>=0);
+	_assert_(verbositylevel>=0);
 	return verbositylevel;
 
Index: /issm/trunk/src/c/shared/Numerics/UnitConversion.cpp
===================================================================
--- /issm/trunk/src/c/shared/Numerics/UnitConversion.cpp	(revision 6411)
+++ /issm/trunk/src/c/shared/Numerics/UnitConversion.cpp	(revision 6412)
@@ -29,5 +29,5 @@
 	if(direction_enum==IuToExtEnum) for(i=0;i<numvalues;i++)values[i]=values[i]*scale; 
 	else if(direction_enum==ExtToIuEnum) for(i=0;i<numvalues;i++)values[i]=values[i]/scale; 
-	else ISSMERROR(" wrong direction for unit conversion, either IuToExtEnum or ExtToIuEnum. ");
+	else _error_(" wrong direction for unit conversion, either IuToExtEnum or ExtToIuEnum. ");
 
 }
@@ -43,5 +43,5 @@
 	if(direction_enum==IuToExtEnum)value=value*scale;
 	else if(direction_enum==ExtToIuEnum)value=value/scale;
-	else ISSMERROR(" wrong direction for unit conversion, either IuToExtEnum or ExtToIuEnum. ");
+	else _error_(" wrong direction for unit conversion, either IuToExtEnum or ExtToIuEnum. ");
 
 	return value;
Index: /issm/trunk/src/c/shared/Numerics/Verbosity.cpp
===================================================================
--- /issm/trunk/src/c/shared/Numerics/Verbosity.cpp	(revision 6411)
+++ /issm/trunk/src/c/shared/Numerics/Verbosity.cpp	(revision 6412)
@@ -37,5 +37,5 @@
 void SetVerbosityLevel(int level){
 
-	if(level<0) ISSMERROR("vebosity level should be a positive integer (user provided %i)",level);
+	if(level<0) _error_("vebosity level should be a positive integer (user provided %i)",level);
 
 #ifdef _SERIAL_
@@ -67,5 +67,5 @@
 #else
 
-	ISSMASSERT(verbositylevel>=0);
+	_assert_(verbositylevel>=0);
 	return verbositylevel;
 
Index: /issm/trunk/src/c/shared/String/DescriptorIndex.cpp
===================================================================
--- /issm/trunk/src/c/shared/String/DescriptorIndex.cpp	(revision 6411)
+++ /issm/trunk/src/c/shared/String/DescriptorIndex.cpp	(revision 6412)
@@ -23,10 +23,10 @@
 	/*retrieve first token, separated by underscore: */
 	pch = strtok (descriptor,"_");
-	if(!pch)ISSMERROR("%s%s%s"," descriptor ",descriptor," is not correctly formatted!");
+	if(!pch)_error_("%s%s%s"," descriptor ",descriptor," is not correctly formatted!");
 
 	if (strncmp(pch,"scaled",6)==0){
 		/*we have a scaled variable. recover the root: */
 		pch = strtok (NULL, "_");
-		if(!pch)ISSMERROR("%s%s%s"," scaled descriptor ",descriptor," is not correctly formatted!");
+		if(!pch)_error_("%s%s%s"," scaled descriptor ",descriptor," is not correctly formatted!");
 		strcpy(root,pch);
 		/*now recover  the index if it exists: */
@@ -43,9 +43,9 @@
 		/*we have an indexed variable. recover the root: */
 		pch = strtok (NULL, "_");
-		if(!pch)ISSMERROR("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!");
+		if(!pch)_error_("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!");
 		strcpy(root,pch);
 		/*now recover  the index: */
 		pch = strtok (NULL, "_");
-		if(!pch)ISSMERROR("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!");
+		if(!pch)_error_("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!");
 		sscanf(pch,"%i",pindex);
 		return IndexedEnum;
@@ -54,9 +54,9 @@
 		/*we have an indexed variable. recover the root: */
 		pch = strtok (NULL, "_");
-		if(!pch)ISSMERROR("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!");
+		if(!pch)_error_("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!");
 		strcpy(root,pch);
 		/*now recover  the index: */
 		pch = strtok (NULL, "_");
-		if(!pch)ISSMERROR("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!");
+		if(!pch)_error_("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!");
 		sscanf(pch,"%i",pindex);
 		return NodalEnum;
Index: /issm/trunk/src/c/shared/Threads/LaunchThread.cpp
===================================================================
--- /issm/trunk/src/c/shared/Threads/LaunchThread.cpp	(revision 6411)
+++ /issm/trunk/src/c/shared/Threads/LaunchThread.cpp	(revision 6412)
@@ -46,10 +46,10 @@
 
 		if(pthread_create(threads+i,NULL,function,(void*)(handles+i))){
-			ISSMERROR(" pthread_create error");
+			_error_(" pthread_create error");
 		}
 	}
 	for(i=0;i<num_threads;i++){
 		if(pthread_join(threads[i],(void**)&status)){
-			ISSMERROR(" pthread_join error");
+			_error_(" pthread_join error");
 		}
 	}
Index: /issm/trunk/src/c/shared/TriMesh/TriMeshUtils.cpp
===================================================================
--- /issm/trunk/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 6411)
+++ /issm/trunk/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 6412)
@@ -919,5 +919,5 @@
 		/*Using the order vector, and the riftsegments_copy and riftspairs_copy, reorder the segments and the pairs: */
 		for (j=0;j<numsegs;j++){
-			ISSMASSERT(order[j]<numsegs);
+			_assert_(order[j]<numsegs);
 			*(riftsegments_copy+3*j+0)=*(riftsegments+3*order[j]+0);
 			*(riftsegments_copy+3*j+1)=*(riftsegments+3*order[j]+1);
Index: /issm/trunk/src/c/solutions/AdjointCorePointerFromSolutionEnum.cpp
===================================================================
--- /issm/trunk/src/c/solutions/AdjointCorePointerFromSolutionEnum.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/AdjointCorePointerFromSolutionEnum.cpp	(revision 6412)
@@ -35,10 +35,10 @@
 			break;
 		default:
-			ISSMERROR("No adjoint has been implemented for solution %s yet",EnumToString(solutiontype));
+			_error_("No adjoint has been implemented for solution %s yet",EnumToString(solutiontype));
 			break;
 	}
 	
 	/*Assign output pointer:*/
-	ISSMASSERT(padjointcore);
+	_assert_(padjointcore);
 	*padjointcore=adjointcore;
 
Index: /issm/trunk/src/c/solutions/CorePointerFromSolutionEnum.cpp
===================================================================
--- /issm/trunk/src/c/solutions/CorePointerFromSolutionEnum.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/CorePointerFromSolutionEnum.cpp	(revision 6412)
@@ -56,10 +56,10 @@
 			break;
 		default:
-			ISSMERROR("%s%s%s"," solution type: ",EnumToString(solutiontype)," not supported yet!");
+			_error_("%s%s%s"," solution type: ",EnumToString(solutiontype)," not supported yet!");
 			break;
 	}
 	
 	/*Assign output pointer:*/
-	ISSMASSERT(psolutioncore);
+	_assert_(psolutioncore);
 	*psolutioncore=solutioncore;
 
Index: /issm/trunk/src/c/solutions/ResetBoundaryConditions.cpp
===================================================================
--- /issm/trunk/src/c/solutions/ResetBoundaryConditions.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/ResetBoundaryConditions.cpp	(revision 6412)
@@ -13,5 +13,5 @@
 	int analysis_counter;
 			
-	ISSMPRINTF(VerboseSolution(),"%s\n","   updating boundary conditions...");
+	_printf_(VerboseSolution(),"%s\n","   updating boundary conditions...");
 			
 	/*set current analysis: */
Index: /issm/trunk/src/c/solutions/SolutionConfiguration.cpp
===================================================================
--- /issm/trunk/src/c/solutions/SolutionConfiguration.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/SolutionConfiguration.cpp	(revision 6412)
@@ -116,5 +116,5 @@
 
 		default:
-			ISSMERROR("%s%s%s"," solution type: ",EnumToString(solutiontype)," not supported yet!");
+			_error_("%s%s%s"," solution type: ",EnumToString(solutiontype)," not supported yet!");
 			break;
 	}
Index: /issm/trunk/src/c/solutions/WriteLockFile.cpp
===================================================================
--- /issm/trunk/src/c/solutions/WriteLockFile.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/WriteLockFile.cpp	(revision 6412)
@@ -17,8 +17,8 @@
 	if(my_rank==0){
 		fid=fopen(filename,"w");
-		if(fid==NULL) ISSMERROR("%s%s","error message: could not open lock file ",filename);
+		if(fid==NULL) _error_("%s%s","error message: could not open lock file ",filename);
 
 		/*Close file: */
-		if(fclose(fid)!=0) ISSMERROR("%s%s","could not close lock file ",filename);
+		if(fclose(fid)!=0) _error_("%s%s","could not close lock file ",filename);
 	}
 
Index: /issm/trunk/src/c/solutions/adjointbalancedthickness_core.cpp
===================================================================
--- /issm/trunk/src/c/solutions/adjointbalancedthickness_core.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/adjointbalancedthickness_core.cpp	(revision 6412)
@@ -23,5 +23,5 @@
 
 	/*compute thickness */
-	ISSMPRINTF(VerboseSolution(),"%s\n","   computing thickness");
+	_printf_(VerboseSolution(),"%s\n","   computing thickness");
 	femmodel->SetCurrentConfiguration(BalancedthicknessAnalysisEnum);
 	solver_linear(femmodel);
@@ -31,5 +31,5 @@
 
 	/*compute adjoint*/
-	ISSMPRINTF(VerboseSolution(),"%s\n","   computing adjoint");
+	_printf_(VerboseSolution(),"%s\n","   computing adjoint");
 	femmodel->SetCurrentConfiguration(BalancedthicknessAnalysisEnum,AdjointBalancedthicknessAnalysisEnum);
 	solver_adjoint_linear(femmodel);
@@ -37,5 +37,5 @@
 	/*Save results*/
 	if(solution_type==AdjointSolutionEnum && !control_analysis){
-		ISSMPRINTF(VerboseSolution(),"   saving results\n");
+		_printf_(VerboseSolution(),"   saving results\n");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointEnum);
 	}
Index: /issm/trunk/src/c/solutions/adjointdiagnostic_core.cpp
===================================================================
--- /issm/trunk/src/c/solutions/adjointdiagnostic_core.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/adjointdiagnostic_core.cpp	(revision 6412)
@@ -26,5 +26,5 @@
 
 	/*Compute velocities*/
-	ISSMPRINTF(VerboseSolution(),"%s\n","   computing velocities");
+	_printf_(VerboseSolution(),"%s\n","   computing velocities");
 	femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum);
 	solver_diagnostic_nonlinear(femmodel,conserve_loads); 
@@ -34,5 +34,5 @@
 
 	/*Compute adjoint*/
-	ISSMPRINTF(VerboseSolution(),"%s\n","   computing adjoint");
+	_printf_(VerboseSolution(),"%s\n","   computing adjoint");
 	femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum,AdjointHorizAnalysisEnum);
 	solver_adjoint_linear(femmodel);
@@ -40,5 +40,5 @@
 	/*Save results*/
 	if(solution_type==AdjointSolutionEnum && !control_analysis){
-		ISSMPRINTF(VerboseSolution(),"   saving results\n");
+		_printf_(VerboseSolution(),"   saving results\n");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointxEnum);
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointyEnum);
Index: /issm/trunk/src/c/solutions/balancedthickness_core.cpp
===================================================================
--- /issm/trunk/src/c/solutions/balancedthickness_core.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/balancedthickness_core.cpp	(revision 6412)
@@ -27,9 +27,9 @@
 	femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum);
 
-	ISSMPRINTF(VerboseSolution(),"call computational core:\n");
+	_printf_(VerboseSolution(),"call computational core:\n");
 	solver_linear(femmodel);
 
 	if(solution_type==BalancedthicknessSolutionEnum && !control_analysis){
-		ISSMPRINTF(VerboseSolution(),"   saving results\n");
+		_printf_(VerboseSolution(),"   saving results\n");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,ThicknessEnum);
 	}
Index: /issm/trunk/src/c/solutions/balancedvelocities_core.cpp
===================================================================
--- /issm/trunk/src/c/solutions/balancedvelocities_core.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/balancedvelocities_core.cpp	(revision 6412)
@@ -26,9 +26,9 @@
 	femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum);
 
-	ISSMPRINTF(VerboseSolution(),"   call computational core\n");
+	_printf_(VerboseSolution(),"   call computational core\n");
 	solver_linear(femmodel);
 
 	if(solution_type==BalancedvelocitiesSolutionEnum && !control_analysis){
-		ISSMPRINTF(VerboseSolution(),"   saving results\n");
+		_printf_(VerboseSolution(),"   saving results\n");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VelEnum);
 	}
Index: /issm/trunk/src/c/solutions/bedslope_core.cpp
===================================================================
--- /issm/trunk/src/c/solutions/bedslope_core.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/bedslope_core.cpp	(revision 6412)
@@ -24,5 +24,5 @@
 	femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum);
 
-	ISSMPRINTF(VerboseSolution(),"%s\n","   computing slope");
+	_printf_(VerboseSolution(),"%s\n","   computing slope");
 
 	/*Call on core computations: */
@@ -33,5 +33,5 @@
 	
 	if(solution_type==BedSlopeSolutionEnum && !control_analysis){
-		ISSMPRINTF(VerboseSolution(),"   saving results\n");
+		_printf_(VerboseSolution(),"   saving results\n");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BedSlopeXEnum);
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BedSlopeYEnum);
Index: /issm/trunk/src/c/solutions/control_core.cpp
===================================================================
--- /issm/trunk/src/c/solutions/control_core.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/control_core.cpp	(revision 6412)
@@ -66,5 +66,5 @@
 
 	/*Launch once a complete solution to set up all inputs*/
-	ISSMPRINTF(VerboseControl(),"%s\n","   preparing initial solution");
+	_printf_(VerboseControl(),"%s\n","   preparing initial solution");
 	if (isstokes) solutioncore(femmodel);
 
@@ -80,5 +80,5 @@
 
 		/*Display info*/
-		ISSMPRINTF(VerboseControl(),"\n%s%i%s%i\n","   control method step ",n+1,"/",nsteps);
+		_printf_(VerboseControl(),"\n%s%i%s%i\n","   control method step ",n+1,"/",nsteps);
 		InputUpdateFromConstantx(femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,(int)responses[n],CmResponseEnum);
 		
@@ -86,5 +86,5 @@
 		if (solution_type==SteadystateSolutionEnum) solutioncore(femmodel);
 
-		ISSMPRINTF(VerboseControl(),"%s\n","   compute adjoint state:");
+		_printf_(VerboseControl(),"%s\n","   compute adjoint state:");
 		adjointcore(femmodel);
 	
@@ -97,10 +97,10 @@
 		}
 
-		ISSMPRINTF(VerboseControl(),"%s\n","   optimizing along gradient direction");
+		_printf_(VerboseControl(),"%s\n","   optimizing along gradient direction");
 		optargs.n=n; optpars.maxiter=(int)maxiter[n]; optpars.cm_jump=cm_jump[n];
 		BrentSearch(&search_scalar,J+n,&optpars,&objectivefunctionC,&optargs);
 		//OptimalSearch(&search_scalar,J+n,&optpars,&objectivefunctionC,&optargs);
 
-		ISSMPRINTF(VerboseControl(),"%s\n","   updating parameter using optimized search scalar"); //true means update save controls
+		_printf_(VerboseControl(),"%s\n","   updating parameter using optimized search scalar"); //true means update save controls
 		InputControlUpdatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,search_scalar,true);
 		
@@ -109,10 +109,10 @@
 		/*Temporary saving every 5 control steps: */
 		if (((n+1)%5)==0){
-			ISSMPRINTF(VerboseControl(),"%s\n","   saving temporary results");
+			_printf_(VerboseControl(),"%s\n","   saving temporary results");
 			controlrestart(femmodel,J);
 		}
 	}
 
-	ISSMPRINTF(VerboseControl(),"%s\n","   preparing final solution");
+	_printf_(VerboseControl(),"%s\n","   preparing final solution");
 	femmodel->parameters->SetParam(false,ControlAnalysisEnum); //needed to turn control result output in solutioncore
 	solutioncore(femmodel);
Index: /issm/trunk/src/c/solutions/controlconvergence.cpp
===================================================================
--- /issm/trunk/src/c/solutions/controlconvergence.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/controlconvergence.cpp	(revision 6412)
@@ -32,8 +32,8 @@
 					//convergence if convergence criteria fullfilled
 					converged=true;
-					ISSMPRINTF(VerboseConvergence(),"%s%g%s%g\n","      Convergence criterion: dJ/J = ",(J[i]-J[n])/J[n],"<",eps_cm);
+					_printf_(VerboseConvergence(),"%s%g%s%g\n","      Convergence criterion: dJ/J = ",(J[i]-J[n])/J[n],"<",eps_cm);
 				}
 				else{
-					ISSMPRINTF(VerboseConvergence(),"%s%g%s%g\n","      Convergence criterion: dJ/J = ",(J[i]-J[n])/J[n],">",eps_cm);
+					_printf_(VerboseConvergence(),"%s%g%s%g\n","      Convergence criterion: dJ/J = ",(J[i]-J[n])/J[n],">",eps_cm);
 				}
 				break;
Index: /issm/trunk/src/c/solutions/convergence.cpp
===================================================================
--- /issm/trunk/src/c/solutions/convergence.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/convergence.cpp	(revision 6412)
@@ -54,5 +54,5 @@
 		VecNorm(pf,NORM_2,&nF);
 		solver_residue=nKUF/nF;
-		_printf_("\n%s%g\n","   solver residue: norm(KU-F)/norm(F)=",solver_residue);
+		_printf_(true,"\n%s%g\n","   solver residue: norm(KU-F)/norm(F)=",solver_residue);
 
 		//clean up
@@ -70,6 +70,6 @@
 	res=nKUoldF/nF;
 	if (isnan(res)){
-		_printf_("norm nf = %lf and norm kuold = %lf\n",nF,nKUoldF);
-		ISSMERROR("mechanical equilibrium convergence criterion is NaN!");
+		_printf_(true,"norm nf = %lf and norm kuold = %lf\n",nF,nKUoldF);
+		_error_("mechanical equilibrium convergence criterion is NaN!");
 	}
 
@@ -80,9 +80,9 @@
 	//print
 	if(res<eps_res){
-		ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n","   mechanical equilibrium convergence criterion",res*100," < ",eps_res*100," %");
+		_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   mechanical equilibrium convergence criterion",res*100," < ",eps_res*100," %");
 		converged=1;
 	}
 	else{ 
-		ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n","   mechanical equilibrium convergence criterion",res*100," > ",eps_res*100," %");
+		_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   mechanical equilibrium convergence criterion",res*100," > ",eps_res*100," %");
 		converged=0;
 	}
@@ -95,5 +95,5 @@
 		VecNorm(duf,NORM_2,&ndu); VecNorm(old_uf,NORM_2,&nu);
 
-		if (isnan(ndu) || isnan(nu)) ISSMERROR("convergence criterion is NaN!");
+		if (isnan(ndu) || isnan(nu)) _error_("convergence criterion is NaN!");
 
 		//clean up
@@ -103,12 +103,12 @@
 		if (!isnan(eps_rel)){
 			if((ndu/nu)<eps_rel){
-				ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n","   Convergence criterion: norm(du)/norm(u)",ndu/nu*100," < ",eps_rel*100," %");
+				_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   Convergence criterion: norm(du)/norm(u)",ndu/nu*100," < ",eps_rel*100," %");
 			}
 			else{ 
-				ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n","   Convergence criterion: norm(du)/norm(u)",ndu/nu*100," > ",eps_rel*100," %");
+				_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   Convergence criterion: norm(du)/norm(u)",ndu/nu*100," > ",eps_rel*100," %");
 				converged=0;
 			}
 		}
-		else _printf_("%-50s%g%s\n","   Convergence criterion: norm(du)/norm(u)",ndu/nu*100," %");
+		else _printf_(true,"%-50s%g%s\n","   Convergence criterion: norm(du)/norm(u)",ndu/nu*100," %");
 
 	}
@@ -120,5 +120,5 @@
 		VecDuplicate(old_uf,&duf);VecCopy(old_uf,duf); VecAYPX(duf,-1.0,uf);
 		VecNorm(duf,NORM_2,&ndu); VecNorm(duf,NORM_INFINITY,&nduinf);
-		if (isnan(ndu) || isnan(nu)) ISSMERROR("convergence criterion is NaN!");
+		if (isnan(ndu) || isnan(nu)) _error_("convergence criterion is NaN!");
 
 		//clean up
@@ -128,12 +128,12 @@
 		if (!isnan(eps_abs)){
 			if ((nduinf*yts)<eps_abs){
-				ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n","   Convergence criterion: max(du)",nduinf*yts," < ",eps_abs," m/yr");
+				_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   Convergence criterion: max(du)",nduinf*yts," < ",eps_abs," m/yr");
 			}
 			else{
-				ISSMPRINTF(VerboseConvergence(),"%-50s%g%s%g%s\n","   Convergence criterion: max(du)",nduinf*yts," > ",eps_abs," m/yr");
+				_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   Convergence criterion: max(du)",nduinf*yts," > ",eps_abs," m/yr");
 				converged=0;
 			}
 		}
-		else  _printf_("%-50s%g%s\n","   Convergence criterion: max(du)",nduinf*yts," m/yr");
+		else  _printf_(true,"%-50s%g%s\n","   Convergence criterion: max(du)",nduinf*yts," m/yr");
 
 	}
Index: /issm/trunk/src/c/solutions/diagnostic_core.cpp
===================================================================
--- /issm/trunk/src/c/solutions/diagnostic_core.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/diagnostic_core.cpp	(revision 6412)
@@ -50,5 +50,5 @@
 	if(ishutter){
 			
-		ISSMPRINTF(VerboseControl(),"%s\n","   computing hutter velocities");
+		_printf_(VerboseControl(),"%s\n","   computing hutter velocities");
 
 		//Take the last velocity into account so that the velocity on the MacAyeal domain is not zero
@@ -63,5 +63,5 @@
 	if (ismacayealpattyn^isstokes){
 		
-		ISSMPRINTF(VerboseControl(),"%s\n","   computing velocities");
+		_printf_(VerboseControl(),"%s\n","   computing velocities");
 		femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum);
 		solver_diagnostic_nonlinear(femmodel,modify_loads); 
@@ -70,5 +70,5 @@
 	if (ismacayealpattyn && isstokes){
 
-		ISSMPRINTF(VerboseControl(),"%s\n","   computing coupling macayealpattyn and stokes velocities and pressure ");
+		_printf_(VerboseControl(),"%s\n","   computing coupling macayealpattyn and stokes velocities and pressure ");
 		solver_stokescoupling_nonlinear(femmodel,conserve_loads);
 	}
@@ -76,5 +76,5 @@
 	if (dim==3 & (ishutter || ismacayealpattyn)){
 
-		ISSMPRINTF(VerboseControl(),"%s\n","   computing vertical velocities");
+		_printf_(VerboseControl(),"%s\n","   computing vertical velocities");
 		femmodel->SetCurrentConfiguration(DiagnosticVertAnalysisEnum);
 		solver_linear(femmodel);
@@ -83,5 +83,5 @@
 
 	if(solution_type==DiagnosticSolutionEnum && !control_analysis){
-		ISSMPRINTF(VerboseControl(),"   saving results\n");
+		_printf_(VerboseControl(),"   saving results\n");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum);
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum);
Index: /issm/trunk/src/c/solutions/gradient_core.cpp
===================================================================
--- /issm/trunk/src/c/solutions/gradient_core.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/gradient_core.cpp	(revision 6412)
@@ -36,5 +36,5 @@
 	for (int i=0;i<num_controls;i++){
 
-		ISSMPRINTF(VerboseControl(),"   compute gradient of J with respect to %s\n",EnumToString(control_type[i]));
+		_printf_(VerboseControl(),"   compute gradient of J with respect to %s\n",EnumToString(control_type[i]));
 		Gradjx(&gradient, femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters, control_type[i]);
 
@@ -42,10 +42,10 @@
 
 		if (step>0 && search_scalar==0){
-			ISSMPRINTF(VerboseControl(),"   orthogonalization\n");
+			_printf_(VerboseControl(),"   orthogonalization\n");
 			ControlInputGetGradientx(&old_gradient,femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters,control_type[i]);
 			Orthx(&new_gradient,gradient,old_gradient); VecFree(&old_gradient); VecFree(&gradient);
 		}
 		else{ 
-			ISSMPRINTF(VerboseControl(),"   normalizing directions\n");
+			_printf_(VerboseControl(),"   normalizing directions\n");
 			Orthx(&new_gradient,gradient,NULL); VecFree(&gradient);
 		}
@@ -53,6 +53,6 @@
 		/*Get scaling factor of current control:*/
 		VecNorm(new_gradient,NORM_INFINITY,&norm_grad);
-		if(norm_grad<=0)    ISSMERROR("||∂J/∂α||∞ = 0    gradient norm of J with respect to %s is zero",EnumToString(control_type[i]));
-		if(isnan(norm_grad))ISSMERROR("||∂J/∂α||∞ = NaN  gradient norm of J with respect to %s is NaN" ,EnumToString(control_type[i]));
+		if(norm_grad<=0)    _error_("||∂J/∂α||∞ = 0    gradient norm of J with respect to %s is zero",EnumToString(control_type[i]));
+		if(isnan(norm_grad))_error_("||∂J/∂α||∞ = NaN  gradient norm of J with respect to %s is NaN" ,EnumToString(control_type[i]));
 		if(i==0 || (optscal_list[num_controls*step+i]/norm_grad)<optscal) optscal=optscal_list[num_controls*step+i]/norm_grad;
 
Index: /issm/trunk/src/c/solutions/issm.cpp
===================================================================
--- /issm/trunk/src/c/solutions/issm.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/issm.cpp	(revision 6412)
@@ -36,10 +36,10 @@
 
 	#if !defined(_PARALLEL_) || (defined(_PARALLEL_) && !defined(_HAVE_PETSC_))
-	ISSMERROR(" parallel executable was compiled without support of parallel libraries!");
+	_error_(" parallel executable was compiled without support of parallel libraries!");
 	#endif
 
 	/*Initialize Petsc and get start time*/
 	int ierr=PetscInitialize(&argc,&argv,(char*)0,"");  
-	if(ierr) ISSMERROR("Could not initialize Petsc");
+	if(ierr) _error_("Could not initialize Petsc");
 	MPI_Barrier(MPI_COMM_WORLD); start=MPI_Wtime();
 
@@ -48,5 +48,5 @@
 	MPI_Comm_size(MPI_COMM_WORLD,&num_procs); 
 
-	_printf_("Launching solution sequence\n");
+	_printf_(true,"Launching solution sequence\n");
 	solution_type=StringToEnum(argv[1]);
 	petscoptionsfilename=argv[4];
@@ -78,15 +78,15 @@
 	if(!qmu_analysis){
 			
-		_printf_("call computational core:\n");
+		_printf_(true,"call computational core:\n");
 		MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
 		solutioncore(femmodel);
 		MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
 
-		_printf_("write results to disk:\n");
+		_printf_(true,"write results to disk:\n");
 		OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,&femmodel->results);
 	}
 	else{
 		/*run qmu analysis: */
-		_printf_("calling qmu analysis on diagnostic core:\n");
+		_printf_(true,"calling qmu analysis on diagnostic core:\n");
 
 		#ifdef _HAVE_DAKOTA_ 
@@ -95,5 +95,5 @@
 		MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
 	 	#else
-		ISSMERROR(" Dakota not present, cannot do qmu!");
+		_error_(" Dakota not present, cannot do qmu!");
 		#endif
 	}
@@ -101,5 +101,5 @@
 	/*Close output file and write lock file if requested*/
 	if (waitonlock>0){
-		_printf_("write lock file:\n");
+		_printf_(true,"write lock file:\n");
 		WriteLockFile(lockname);
 	}
@@ -111,8 +111,8 @@
 	/*Get finish time and close*/
 	MPI_Barrier(MPI_COMM_WORLD); finish = MPI_Wtime( );
-	_printf_("\n   %-34s %f seconds  \n","FemModel initialization elapsed time:",finish_init-start_init);
-	_printf_("   %-34s %f seconds  \n","Core solution elapsed time:",finish_core-start_core);
-	_printf_("\n   %s %i hrs %i min %i sec\n\n","Total elapsed time:",int((finish-start)/3600),int(int(finish-start)%3600/60),int(finish-start)%60);
-	_printf_("closing MPI and Petsc\n");
+	_printf_(true,"\n   %-34s %f seconds  \n","FemModel initialization elapsed time:",finish_init-start_init);
+	_printf_(true,"   %-34s %f seconds  \n","Core solution elapsed time:",finish_core-start_core);
+	_printf_(true,"\n   %s %i hrs %i min %i sec\n\n","Total elapsed time:",int((finish-start)/3600),int(int(finish-start)%3600/60),int(finish-start)%60);
+	_printf_(true,"closing MPI and Petsc\n");
 	PetscFinalize(); 
 	
Index: /issm/trunk/src/c/solutions/objectivefunctionC.cpp
===================================================================
--- /issm/trunk/src/c/solutions/objectivefunctionC.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/objectivefunctionC.cpp	(revision 6412)
@@ -55,5 +55,5 @@
 	}
 	else{
-		ISSMERROR("Solution %s not implemented yet",EnumToString(solution_type));
+		_error_("Solution %s not implemented yet",EnumToString(solution_type));
 	}
 
@@ -72,5 +72,5 @@
 	}
 	else{
-		ISSMERROR("Solution %s not implemented yet",EnumToString(solution_type));
+		_error_("Solution %s not implemented yet",EnumToString(solution_type));
 	}
 
Index: /issm/trunk/src/c/solutions/prognostic_core.cpp
===================================================================
--- /issm/trunk/src/c/solutions/prognostic_core.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/prognostic_core.cpp	(revision 6412)
@@ -24,9 +24,9 @@
 	femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum);
 
-	ISSMPRINTF(VerboseSolution(),"   call computational core\n");
+	_printf_(VerboseSolution(),"   call computational core\n");
 	solver_linear(femmodel);
 		
 	if(solution_type==PrognosticSolutionEnum && !control_analysis){
-		ISSMPRINTF(VerboseSolution(),"   saving results\n");
+		_printf_(VerboseSolution(),"   saving results\n");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,ThicknessEnum);
 	}
Index: /issm/trunk/src/c/solutions/steadystate_core.cpp
===================================================================
--- /issm/trunk/src/c/solutions/steadystate_core.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/steadystate_core.cpp	(revision 6412)
@@ -32,16 +32,16 @@
 	for(;;){
 	
-		ISSMPRINTF(VerboseSolution(),"%s%i\n","   computing temperature and velocity for step: ",step);
+		_printf_(VerboseSolution(),"%s%i\n","   computing temperature and velocity for step: ",step);
 		thermal_core(femmodel);
 
-		ISSMPRINTF(VerboseSolution(),"%s\n","   computing new velocity");
+		_printf_(VerboseSolution(),"%s\n","   computing new velocity");
 		diagnostic_core(femmodel);
 
 		if (step>1){
-			ISSMPRINTF(VerboseSolution(),"%s\n","   checking velocity, temperature and pressure convergence");
+			_printf_(VerboseSolution(),"%s\n","   checking velocity, temperature and pressure convergence");
 			if(steadystateconvergence(femmodel)) break;
 		}
 		
-		ISSMPRINTF(VerboseSolution(),"%s\n","   saving velocity, temperature and pressure to check for convergence at next step");
+		_printf_(VerboseSolution(),"%s\n","   saving velocity, temperature and pressure to check for convergence at next step");
 		InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum,VxOldEnum);
 		InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum,VyOldEnum);
@@ -55,5 +55,5 @@
 	
 	if(solution_type==SteadystateSolutionEnum && !control_analysis){
-		ISSMPRINTF(VerboseSolution(),"   saving results\n");
+		_printf_(VerboseSolution(),"   saving results\n");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum);
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum);
Index: /issm/trunk/src/c/solutions/surfaceslope_core.cpp
===================================================================
--- /issm/trunk/src/c/solutions/surfaceslope_core.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/surfaceslope_core.cpp	(revision 6412)
@@ -24,5 +24,5 @@
 	femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum);
 
-	ISSMPRINTF(VerboseSolution(),"%s\n","computing slope...");
+	_printf_(VerboseSolution(),"%s\n","computing slope...");
 
 	/*Call on core computations: */
@@ -33,5 +33,5 @@
 	
 	if(solution_type==SurfaceSlopeSolutionEnum && !control_analysis){
-		ISSMPRINTF(VerboseSolution(),"saving results:\n");
+		_printf_(VerboseSolution(),"saving results:\n");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceSlopeXEnum);
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceSlopeYEnum);
Index: /issm/trunk/src/c/solutions/thermal_core.cpp
===================================================================
--- /issm/trunk/src/c/solutions/thermal_core.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/thermal_core.cpp	(revision 6412)
@@ -41,5 +41,5 @@
 	for(i=0;i<nsteps;i++){
 		
-		if(nsteps)ISSMPRINTF(VerboseSolution(),"time step: %i/%i\n",i+1,nsteps);
+		if(nsteps)_printf_(VerboseSolution(),"time step: %i/%i\n",i+1,nsteps);
 		time=(i+1)*dt;
 
@@ -48,5 +48,5 @@
 
 		if(solution_type==ThermalSolutionEnum && !control_analysis){
-			ISSMPRINTF(VerboseSolution(),"   saving results\n");
+			_printf_(VerboseSolution(),"   saving results\n");
 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,TemperatureEnum,i+1,time);
 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,MeltingRateEnum,i+1,time);
Index: /issm/trunk/src/c/solutions/thermal_core_step.cpp
===================================================================
--- /issm/trunk/src/c/solutions/thermal_core_step.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/thermal_core_step.cpp	(revision 6412)
@@ -14,9 +14,9 @@
 void thermal_core_step(FemModel* femmodel,int step, double time){
 
-	ISSMPRINTF(VerboseSolution(),"   computing temperatures\n");
+	_printf_(VerboseSolution(),"   computing temperatures\n");
 	femmodel->SetCurrentConfiguration(ThermalAnalysisEnum);
 	solver_thermal_nonlinear(femmodel);
 
-	ISSMPRINTF(VerboseSolution(),"   computing melting\n");
+	_printf_(VerboseSolution(),"   computing melting\n");
 	femmodel->SetCurrentConfiguration(MeltingAnalysisEnum);
 	solver_linear(femmodel);
Index: /issm/trunk/src/c/solutions/transient2d_core.cpp
===================================================================
--- /issm/trunk/src/c/solutions/transient2d_core.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/transient2d_core.cpp	(revision 6412)
@@ -50,17 +50,17 @@
 		step+=1;
 
-		ISSMPRINTF(VerboseSolution(),"%s%g%s%i%s%g%s%g\n","time [yr]: ",time/yts,"    iteration number: ",step,"/",floor(finaltime/dt)," dt [yr]: ",dt/yts);
+		_printf_(VerboseSolution(),"%s%g%s%i%s%g%s%g\n","time [yr]: ",time/yts,"    iteration number: ",step,"/",floor(finaltime/dt)," dt [yr]: ",dt/yts);
 
-		ISSMPRINTF(VerboseSolution(),"%s\n","   computing new velocity");
+		_printf_(VerboseSolution(),"%s\n","   computing new velocity");
 		diagnostic_core(femmodel);
 
-		ISSMPRINTF(VerboseSolution(),"%s\n","   computing new thickness");
+		_printf_(VerboseSolution(),"%s\n","   computing new thickness");
 		prognostic_core(femmodel);
 	
-		ISSMPRINTF(VerboseSolution(),"%s\n","   updating geometry");
+		_printf_(VerboseSolution(),"%s\n","   updating geometry");
 		UpdateGeometryx(femmodel->elements, femmodel->nodes,femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters); 
 
 		if(solution_type==Transient2DSolutionEnum && !control_analysis && (step%output_frequency==0)){
-			ISSMPRINTF(VerboseSolution(),"%s\n","   saving results\n");
+			_printf_(VerboseSolution(),"%s\n","   saving results\n");
 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum,step,time); 
 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum,step,time);
@@ -72,5 +72,5 @@
 
 			/*unload results*/
-			ISSMPRINTF(VerboseSolution(),"%s","   saving temporary results");
+			_printf_(VerboseSolution(),"%s","   saving temporary results");
 			OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,&femmodel->results,step,time);
 		}
Index: /issm/trunk/src/c/solutions/transient3d_core.cpp
===================================================================
--- /issm/trunk/src/c/solutions/transient3d_core.cpp	(revision 6411)
+++ /issm/trunk/src/c/solutions/transient3d_core.cpp	(revision 6412)
@@ -50,23 +50,23 @@
 		time+=dt;
 
-		ISSMPRINTF(VerboseSolution(),"%s%g%s%i%s%g%s%g\n","time [yr]: ",time/yts,"    iteration number: ",step,"/",floor(finaltime/dt)," dt [yr]: ",dt/yts);
+		_printf_(VerboseSolution(),"%s%g%s%i%s%g%s%g\n","time [yr]: ",time/yts,"    iteration number: ",step,"/",floor(finaltime/dt)," dt [yr]: ",dt/yts);
 
-		ISSMPRINTF(VerboseSolution(),"   computing temperatures:\n");
+		_printf_(VerboseSolution(),"   computing temperatures:\n");
 		thermal_core_step(femmodel,step,time);
 
-		ISSMPRINTF(VerboseSolution(),"%s\n","   computing new velocity");
+		_printf_(VerboseSolution(),"%s\n","   computing new velocity");
 		diagnostic_core(femmodel);
 
-		ISSMPRINTF(VerboseSolution(),"%s\n","   computing new thickness");
+		_printf_(VerboseSolution(),"%s\n","   computing new thickness");
 		prognostic_core(femmodel);
 	
-		ISSMPRINTF(VerboseSolution(),"   updating geometry\n");
+		_printf_(VerboseSolution(),"   updating geometry\n");
 		UpdateGeometryx(femmodel->elements, femmodel->nodes,femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters); 
 		
-		ISSMPRINTF(VerboseSolution(),"%s\n","   updating vertices positions");
+		_printf_(VerboseSolution(),"%s\n","   updating vertices positions");
 		UpdateVertexPositionsx(femmodel->elements, femmodel->nodes,femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters); 
 
 		if(solution_type==Transient3DSolutionEnum && !control_analysis && (step%output_frequency==0)){
-			ISSMPRINTF(VerboseSolution(),"%s\n","   saving results\n");
+			_printf_(VerboseSolution(),"%s\n","   saving results\n");
 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum,step,time);
 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum,step,time);
@@ -81,5 +81,5 @@
 
 			/*unload results*/
-			ISSMPRINTF(VerboseSolution(),"%s","   saving temporary results");
+			_printf_(VerboseSolution(),"%s","   saving temporary results");
 			OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,&femmodel->results,step,time);
 		}
Index: /issm/trunk/src/c/solvers/solver_diagnostic_nonlinear.cpp
===================================================================
--- /issm/trunk/src/c/solvers/solver_diagnostic_nonlinear.cpp	(revision 6411)
+++ /issm/trunk/src/c/solvers/solver_diagnostic_nonlinear.cpp	(revision 6412)
@@ -69,5 +69,5 @@
 
 		PenaltyConstraintsx(&constraints_converged, &num_unstable_constraints, femmodel->elements,femmodel->nodes,femmodel->vertices,loads,femmodel->materials,femmodel->parameters);
-		ISSMPRINTF(VerboseConvergence(),"   number of unstable constraints: %i\n",num_unstable_constraints);
+		_printf_(VerboseConvergence(),"   number of unstable constraints: %i\n",num_unstable_constraints);
 
 		convergence(&converged,Kff,pf,uf,old_uf,femmodel->parameters); MatFree(&Kff);VecFree(&pf);
@@ -87,5 +87,5 @@
 		if(converged==1)break;
 		if(count>=max_nonlinear_iterations){
-			_printf_("   maximum number of iterations (%i) exceeded\n",max_nonlinear_iterations); 
+			_printf_(true,"   maximum number of iterations (%i) exceeded\n",max_nonlinear_iterations); 
 			break;
 		}
Index: /issm/trunk/src/c/solvers/solver_stokescoupling_nonlinear.cpp
===================================================================
--- /issm/trunk/src/c/solvers/solver_stokescoupling_nonlinear.cpp	(revision 6411)
+++ /issm/trunk/src/c/solvers/solver_stokescoupling_nonlinear.cpp	(revision 6412)
@@ -95,5 +95,5 @@
 		if(converged==1)break;
 		if(count>=max_nonlinear_iterations){
-			_printf_("   maximum number of iterations (%i) exceeded\n",max_nonlinear_iterations); 
+			_printf_(true,"   maximum number of iterations (%i) exceeded\n",max_nonlinear_iterations); 
 			break;
 		}
Index: /issm/trunk/src/c/solvers/solver_thermal_nonlinear.cpp
===================================================================
--- /issm/trunk/src/c/solvers/solver_thermal_nonlinear.cpp	(revision 6411)
+++ /issm/trunk/src/c/solvers/solver_thermal_nonlinear.cpp	(revision 6412)
@@ -44,5 +44,5 @@
 	converged=false;
 
-	ISSMPRINTF(VerboseSolution(),"%s\n","starting direct shooting method");
+	_printf_(VerboseSolution(),"%s\n","starting direct shooting method");
 	InputUpdateFromConstantx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,reset_penalties,ResetPenaltiesEnum);
 	InputUpdateFromConstantx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,false,ConvergedEnum);
@@ -71,5 +71,5 @@
 
 		if (!converged){
-			ISSMPRINTF(VerboseConvergence(),"%s%i\n","   #unstable constraints = ",num_unstable_constraints);
+			_printf_(VerboseConvergence(),"%s%i\n","   #unstable constraints = ",num_unstable_constraints);
 			if (num_unstable_constraints <= min_thermal_constraints)converged=true;
 		}
Index: /issm/trunk/src/c/toolkits/petsc/patches/MatInvert.cpp
===================================================================
--- /issm/trunk/src/c/toolkits/petsc/patches/MatInvert.cpp	(revision 6411)
+++ /issm/trunk/src/c/toolkits/petsc/patches/MatInvert.cpp	(revision 6412)
@@ -29,5 +29,5 @@
 	/*Some checks: */
 	MatGetSize(matrix,&M,&N);
-	if(M!=N) ISSMERROR("trying to invert a non square matrix!");
+	if(M!=N) _error_("trying to invert a non square matrix!");
 
 	/*Create identitiy matrix: */
Index: /issm/trunk/src/c/toolkits/petsc/patches/MatlabVectorToDoubleVector.cpp
===================================================================
--- /issm/trunk/src/c/toolkits/petsc/patches/MatlabVectorToDoubleVector.cpp	(revision 6411)
+++ /issm/trunk/src/c/toolkits/petsc/patches/MatlabVectorToDoubleVector.cpp	(revision 6412)
@@ -54,5 +54,5 @@
 		
 		/*Check that input is actualy a vector*/
-		if (cols!=1) ISSMERROR("input vector of size %ix%i should have only one column",rows,cols);
+		if (cols!=1) _error_("input vector of size %ix%i should have only one column",rows,cols);
 
 		nz=(int)((double)nnz/(double)rows);
@@ -83,5 +83,5 @@
 
 		/*Check that input is actualy a vector*/
-		if (cols!=1) ISSMERROR("input vector of size %ix%i should have only one column",rows,cols);
+		if (cols!=1) _error_("input vector of size %ix%i should have only one column",rows,cols);
 
 		/*allocate and memcpy*/
Index: /issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp
===================================================================
--- /issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp	(revision 6411)
+++ /issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp	(revision 6412)
@@ -55,5 +55,5 @@
 			if(first[0]!='-'){
 				/*This is not good, the option does not have '-'! Get out*/
-				ISSMERROR("%s%s%s","Option ",first," should be preceded by '-'!");
+				_error_("%s%s%s","Option ",first," should be preceded by '-'!");
 			}
 			/*Reduce first to bare option value*/
Index: /issm/trunk/src/c/toolkits/petsc/patches/VecMerge.cpp
===================================================================
--- /issm/trunk/src/c/toolkits/petsc/patches/VecMerge.cpp	(revision 6411)
+++ /issm/trunk/src/c/toolkits/petsc/patches/VecMerge.cpp	(revision 6412)
@@ -35,5 +35,5 @@
 	/*If the dimension of the partitioning vector is not the same as that of vector B, we have a problem: */
 	if ( (row_partition_size !=MB) ){
-		ISSMERROR("Dimensions of partitioning vector incompatible with dimensions of input vector\n");
+		_error_("Dimensions of partitioning vector incompatible with dimensions of input vector\n");
 	}
 
Index: /issm/trunk/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp
===================================================================
--- /issm/trunk/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp	(revision 6411)
+++ /issm/trunk/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp	(revision 6412)
@@ -53,5 +53,5 @@
 
 	/*Some dimensions checks: */
-	if (mA!=nA) ISSMERROR(" trying to take the invert of a non-square matrix!");
+	if (mA!=nA) _error_(" trying to take the invert of a non-square matrix!");
 
 	/* Set default Plapack parameters */
Index: /issm/trunk/src/m/model/collapse.m
===================================================================
--- /issm/trunk/src/m/model/collapse.m	(revision 6411)
+++ /issm/trunk/src/m/model/collapse.m	(revision 6412)
@@ -66,7 +66,8 @@
 
 %Extrusion of Neumann BC
-%in 2d, segmentonnumann is: [grid1 grid2 element]
-numberofneumann2d=size(md.pressureload,1)/md.numlayers;
-md.pressureload=[md.pressureload(1:numberofneumann2d,1:2) md.pressureload(1:numberofneumann2d,5:6)]; %Add two columns on the first layer 
+if ~isnan(md.pressureload),
+	numberofneumann2d=size(md.pressureload,1)/md.numlayers;
+	md.pressureload=[md.pressureload(1:numberofneumann2d,1:2) md.pressureload(1:numberofneumann2d,5:6)]; %Add two columns on the first layer 
+end
 
 %materials
Index: /issm/trunk/src/mex/AddExternalResult/AddExternalResult.cpp
===================================================================
--- /issm/trunk/src/mex/AddExternalResult/AddExternalResult.cpp	(revision 6411)
+++ /issm/trunk/src/mex/AddExternalResult/AddExternalResult.cpp	(revision 6412)
@@ -34,5 +34,5 @@
 	}
 	else{
-		ISSMERROR("type of result not implemented yet in AddExternalResult");
+		_error_("type of result not implemented yet in AddExternalResult");
 	}
 
@@ -49,6 +49,6 @@
 void AddExternalResultUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [results] = %s(results,type,value);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [results] = %s(results,type,value);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/BamgConvertMesh/BamgConvertMesh.cpp
===================================================================
--- /issm/trunk/src/mex/BamgConvertMesh/BamgConvertMesh.cpp	(revision 6411)
+++ /issm/trunk/src/mex/BamgConvertMesh/BamgConvertMesh.cpp	(revision 6412)
@@ -44,17 +44,17 @@
 	/*Check inputs*/
 	if (nels<0){
-		ISSMERROR("Number of elements must be positive, check index number of lines");
+		_error_("Number of elements must be positive, check index number of lines");
 	}
 	if (nods<0){
-		ISSMERROR("Number of nods must be positive, check x and y sizes");
+		_error_("Number of nods must be positive, check x and y sizes");
 	}
 	if (index_rows!=3){
-		ISSMERROR("index should have 3 columns");
+		_error_("index should have 3 columns");
 	}
 	if (y_rows!=nods){
-		ISSMERROR("x and y do not have the same length");
+		_error_("x and y do not have the same length");
 	}
 	if (x_cols>1 || y_cols>1){
-		ISSMERROR("x and y should have only one column");
+		_error_("x and y should have only one column");
 	}
 
@@ -77,10 +77,10 @@
 void BamgConvertMeshUsage(void)
 {
-	_printf_("BAMGCONVERTMESH - convert [x y index] to a bamg geom and mesh geom");
-	_printf_("\n");
-	_printf_("   Usage:\n");
-	_printf_("      [bamggeom bamgmesh]=BamgConvertMesh(index,x,y);\n");
-	_printf_("      index: index of the mesh\n");
-	_printf_("      x,y: coordinates of the nodes\n");
-	_printf_("\n");
+	_printf_(true,"BAMGCONVERTMESH - convert [x y index] to a bamg geom and mesh geom");
+	_printf_(true,"\n");
+	_printf_(true,"   Usage:\n");
+	_printf_(true,"      [bamggeom bamgmesh]=BamgConvertMesh(index,x,y);\n");
+	_printf_(true,"      index: index of the mesh\n");
+	_printf_(true,"      x,y: coordinates of the nodes\n");
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/BamgMesher/BamgMesher.cpp
===================================================================
--- /issm/trunk/src/mex/BamgMesher/BamgMesher.cpp	(revision 6411)
+++ /issm/trunk/src/mex/BamgMesher/BamgMesher.cpp	(revision 6412)
@@ -51,6 +51,6 @@
 
 void BamgMesherUsage(void){
-	_printf_("\n");
-	_printf_("   usage: [bamgmesh,bamggeom]=%s(bamgmesh,bamggeom,bamgoptions);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [bamgmesh,bamggeom]=%s(bamgmesh,bamggeom,bamgoptions);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/BuildNodeSets/BuildNodeSets.cpp
===================================================================
--- /issm/trunk/src/mex/BuildNodeSets/BuildNodeSets.cpp	(revision 6411)
+++ /issm/trunk/src/mex/BuildNodeSets/BuildNodeSets.cpp	(revision 6412)
@@ -41,6 +41,6 @@
 void BuildNodeSetsUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [m.nodesets]=%s(m.nodes);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [m.nodesets]=%s(m.nodes);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/Chaco/Chaco.cpp
===================================================================
--- /issm/trunk/src/mex/Chaco/Chaco.cpp	(revision 6411)
+++ /issm/trunk/src/mex/Chaco/Chaco.cpp	(revision 6412)
@@ -43,5 +43,5 @@
 
 	#ifndef _HAVE_CHACO_ //only works if dakota library has been compiled in.
-	ISSMERROR(" Chaco not available! Cannot carry out Chaco partitioning!");
+	_error_(" Chaco not available! Cannot carry out Chaco partitioning!");
 	#endif
 
@@ -140,7 +140,7 @@
 void ChacoUsage( void )
 {
-	_printf_("\n");
-	_printf_("Usage: [assgn] = Chaco(A,vwgts,ewgts,x,y,z,options,nparts,goal);\n");
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"Usage: [assgn] = Chaco(A,vwgts,ewgts,x,y,z,options,nparts,goal);\n");
+	_printf_(true,"\n");
 }
 
Index: /issm/trunk/src/mex/ConfigureObjects/ConfigureObjects.cpp
===================================================================
--- /issm/trunk/src/mex/ConfigureObjects/ConfigureObjects.cpp	(revision 6411)
+++ /issm/trunk/src/mex/ConfigureObjects/ConfigureObjects.cpp	(revision 6412)
@@ -54,6 +54,6 @@
 void ConfigureObjectsUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [elements,loads, nodes,parameters] = %s(elements,loads,nodes, materials,parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [elements,loads, nodes,parameters] = %s(elements,loads,nodes, materials,parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/ContourToMesh/ContourToMesh.cpp
===================================================================
--- /issm/trunk/src/mex/ContourToMesh/ContourToMesh.cpp	(revision 6411)
+++ /issm/trunk/src/mex/ContourToMesh/ContourToMesh.cpp	(revision 6412)
@@ -56,5 +56,5 @@
 	if((nlhs!=1 && nlhs!=2) || (nrhs!=NRHS)){
 		ContourToMeshUsage();
-		ISSMERROR(" usage. See above");
+		_error_(" usage. See above");
 	}
 
@@ -110,5 +110,5 @@
 		WriteData(PLHS1,in_elem);
 	}
-	else ISSMERROR(" wrong interpolation type");
+	else _error_(" wrong interpolation type");
 
 	/*end module: */
Index: /issm/trunk/src/mex/ControlInputGetGradient/ControlInputGetGradient.cpp
===================================================================
--- /issm/trunk/src/mex/ControlInputGetGradient/ControlInputGetGradient.cpp	(revision 6411)
+++ /issm/trunk/src/mex/ControlInputGetGradient/ControlInputGetGradient.cpp	(revision 6412)
@@ -58,6 +58,6 @@
 void ControlInputGetGradientUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [gradient] = %s(elements,nodes,vertices,loads, materials,parameters,control_type);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [gradient] = %s(elements,nodes,vertices,loads, materials,parameters,control_type);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/ControlInputScaleGradient/ControlInputScaleGradient.cpp
===================================================================
--- /issm/trunk/src/mex/ControlInputScaleGradient/ControlInputScaleGradient.cpp	(revision 6411)
+++ /issm/trunk/src/mex/ControlInputScaleGradient/ControlInputScaleGradient.cpp	(revision 6412)
@@ -63,6 +63,6 @@
 void ControlInputScaleGradientUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,control_type,scaling_factor);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,control_type,scaling_factor);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/ControlInputSetGradient/ControlInputSetGradient.cpp
===================================================================
--- /issm/trunk/src/mex/ControlInputSetGradient/ControlInputSetGradient.cpp	(revision 6411)
+++ /issm/trunk/src/mex/ControlInputSetGradient/ControlInputSetGradient.cpp	(revision 6412)
@@ -63,6 +63,6 @@
 void ControlInputSetGradientUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,control_type,gradient);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,control_type,gradient);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/ControlOptimization/ControlOptimization.cpp
===================================================================
--- /issm/trunk/src/mex/ControlOptimization/ControlOptimization.cpp	(revision 6411)
+++ /issm/trunk/src/mex/ControlOptimization/ControlOptimization.cpp	(revision 6412)
@@ -67,6 +67,6 @@
 void ControlOptimizationUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [search_scalar J] = %s(function_name,xmin,xmax,options,femmodel,step,parameters)\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [search_scalar J] = %s(function_name,xmin,xmax,options,femmodel,step,parameters)\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/CostFunction/CostFunction.cpp
===================================================================
--- /issm/trunk/src/mex/CostFunction/CostFunction.cpp	(revision 6411)
+++ /issm/trunk/src/mex/CostFunction/CostFunction.cpp	(revision 6412)
@@ -59,6 +59,6 @@
 void CostFunctionUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [J] = %s(elements,nodes,vertices,loads, materials, parameters,response);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [J] = %s(elements,nodes,vertices,loads, materials, parameters,response);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/CreateNodalConstraints/CreateNodalConstraints.cpp
===================================================================
--- /issm/trunk/src/mex/CreateNodalConstraints/CreateNodalConstraints.cpp	(revision 6411)
+++ /issm/trunk/src/mex/CreateNodalConstraints/CreateNodalConstraints.cpp	(revision 6412)
@@ -40,6 +40,6 @@
 void CreateNodalConstraintsUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: ys = %s(nodes,analysis_type);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: ys = %s(nodes,analysis_type);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/DakotaResponses/DakotaResponses.cpp
===================================================================
--- /issm/trunk/src/mex/DakotaResponses/DakotaResponses.cpp	(revision 6411)
+++ /issm/trunk/src/mex/DakotaResponses/DakotaResponses.cpp	(revision 6412)
@@ -87,6 +87,6 @@
 void DakotaResponsesUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [responses] = %s(elements,nodes,vertices,loads,materials,parameters,responses_descritpors);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [responses] = %s(elements,nodes,vertices,loads,materials,parameters,responses_descritpors);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/Echo/Echo.cpp
===================================================================
--- /issm/trunk/src/mex/Echo/Echo.cpp	(revision 6411)
+++ /issm/trunk/src/mex/Echo/Echo.cpp	(revision 6412)
@@ -28,6 +28,6 @@
 void EchoUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: %s(m.dataset);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: %s(m.dataset);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/ElementConnectivity/ElementConnectivity.cpp
===================================================================
--- /issm/trunk/src/mex/ElementConnectivity/ElementConnectivity.cpp	(revision 6411)
+++ /issm/trunk/src/mex/ElementConnectivity/ElementConnectivity.cpp	(revision 6412)
@@ -41,6 +41,6 @@
 
 void ElementConnectivityUsage(void) {
-	_printf_("\n");
-	_printf_("   usage: elementconnectivity = %s(elements, nodeconnectivity);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: elementconnectivity = %s(elements, nodeconnectivity);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/GetPId/GetPId.cpp
===================================================================
--- /issm/trunk/src/mex/GetPId/GetPId.cpp	(revision 6411)
+++ /issm/trunk/src/mex/GetPId/GetPId.cpp	(revision 6412)
@@ -29,6 +29,6 @@
 void GetPIdUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: pid=%s();\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: pid=%s();\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.cpp
===================================================================
--- /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.cpp	(revision 6411)
+++ /issm/trunk/src/mex/GetSolutionFromInputs/GetSolutionFromInputs.cpp	(revision 6412)
@@ -57,6 +57,6 @@
 void GetSolutionFromInputsUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [ug] = %s(elements,nodes,vertices,loads, materials,parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [ug] = %s(elements,nodes,vertices,loads, materials,parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/GetVectorFromInputs/GetVectorFromInputs.cpp
===================================================================
--- /issm/trunk/src/mex/GetVectorFromInputs/GetVectorFromInputs.cpp	(revision 6411)
+++ /issm/trunk/src/mex/GetVectorFromInputs/GetVectorFromInputs.cpp	(revision 6412)
@@ -61,6 +61,6 @@
 void GetVectorFromInputsUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [ug] = %s(elements,nodes,vertices,loads, materials,parameters,name_enum,type_enum);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [ug] = %s(elements,nodes,vertices,loads, materials,parameters,name_enum,type_enum);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/Gradj/Gradj.cpp
===================================================================
--- /issm/trunk/src/mex/Gradj/Gradj.cpp	(revision 6411)
+++ /issm/trunk/src/mex/Gradj/Gradj.cpp	(revision 6412)
@@ -60,6 +60,6 @@
 void GradjUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [gradient] = %s(elements,nodes,vertices,loads, materials, parameters,control_type);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [gradient] = %s(elements,nodes,vertices,loads, materials, parameters,control_type);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/InputControlUpdate/InputControlUpdate.cpp
===================================================================
--- /issm/trunk/src/mex/InputControlUpdate/InputControlUpdate.cpp	(revision 6411)
+++ /issm/trunk/src/mex/InputControlUpdate/InputControlUpdate.cpp	(revision 6412)
@@ -63,6 +63,6 @@
 void InputControlUpdateUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,parameters,scalar);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,parameters,scalar);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/InputConvergence/InputConvergence.cpp
===================================================================
--- /issm/trunk/src/mex/InputConvergence/InputConvergence.cpp	(revision 6411)
+++ /issm/trunk/src/mex/InputConvergence/InputConvergence.cpp	(revision 6412)
@@ -80,6 +80,6 @@
 	
 void InputConvergenceUsage(void) {
-	_printf_("\n");
-	_printf_("   usage: convergence=InputConvergence(elements,nodes,vertices,loads,materials,parameters,fieldenums,criterionenums,criterionvalue)\n");
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: convergence=InputConvergence(elements,nodes,vertices,loads,materials,parameters,fieldenums,criterionenums,criterionvalue)\n");
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/InputDuplicate/InputDuplicate.cpp
===================================================================
--- /issm/trunk/src/mex/InputDuplicate/InputDuplicate.cpp	(revision 6411)
+++ /issm/trunk/src/mex/InputDuplicate/InputDuplicate.cpp	(revision 6412)
@@ -54,6 +54,6 @@
 void InputDuplicateUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, original_enum,new_enum);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, original_enum,new_enum);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/InputScale/InputScale.cpp
===================================================================
--- /issm/trunk/src/mex/InputScale/InputScale.cpp	(revision 6411)
+++ /issm/trunk/src/mex/InputScale/InputScale.cpp	(revision 6412)
@@ -60,6 +60,6 @@
 void InputScaleUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, enum_type,scale_factor);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, enum_type,scale_factor);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/InputToResult/InputToResult.cpp
===================================================================
--- /issm/trunk/src/mex/InputToResult/InputToResult.cpp	(revision 6411)
+++ /issm/trunk/src/mex/InputToResult/InputToResult.cpp	(revision 6412)
@@ -24,5 +24,5 @@
 	if((nlhs!=NLHS) || (nrhs!=7 && nrhs!=9)){
 		InputToResultUsage();
-		ISSMERROR(" usage. See above");
+		_error_(" usage. See above");
 	}
 
@@ -73,7 +73,7 @@
 void InputToResultUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, enum_type,step,time);\n",__FUNCT__);
-	_printf_("   usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, enum_type);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, enum_type,step,time);\n",__FUNCT__);
+	_printf_(true,"   usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters, enum_type);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/InputUpdateFromConstant/InputUpdateFromConstant.cpp
===================================================================
--- /issm/trunk/src/mex/InputUpdateFromConstant/InputUpdateFromConstant.cpp	(revision 6411)
+++ /issm/trunk/src/mex/InputUpdateFromConstant/InputUpdateFromConstant.cpp	(revision 6412)
@@ -59,6 +59,6 @@
 void InputUpdateFromConstantUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [elements loads] = %s(elements,nodes,vertices,loads,materials,parameters,constant,name);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [elements loads] = %s(elements,nodes,vertices,loads,materials,parameters,constant,name);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/InputUpdateFromDakota/InputUpdateFromDakota.cpp
===================================================================
--- /issm/trunk/src/mex/InputUpdateFromDakota/InputUpdateFromDakota.cpp	(revision 6411)
+++ /issm/trunk/src/mex/InputUpdateFromDakota/InputUpdateFromDakota.cpp	(revision 6412)
@@ -84,6 +84,6 @@
 void InputUpdateFromDakotaUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [elements loads] = %s(elements,nodes,vertices,loads,materials,parameters,variables,variables_descriptors);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [elements loads] = %s(elements,nodes,vertices,loads,materials,parameters,variables,variables_descriptors);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/InputUpdateFromSolution/InputUpdateFromSolution.cpp
===================================================================
--- /issm/trunk/src/mex/InputUpdateFromSolution/InputUpdateFromSolution.cpp	(revision 6411)
+++ /issm/trunk/src/mex/InputUpdateFromSolution/InputUpdateFromSolution.cpp	(revision 6412)
@@ -58,6 +58,6 @@
 void InputUpdateFromSolutionUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [elements,materials] = %s(elements,nodes,vertices,loads,materials,parameters,solution);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [elements,materials] = %s(elements,nodes,vertices,loads,materials,parameters,solution);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/InputUpdateFromVector/InputUpdateFromVector.cpp
===================================================================
--- /issm/trunk/src/mex/InputUpdateFromVector/InputUpdateFromVector.cpp	(revision 6411)
+++ /issm/trunk/src/mex/InputUpdateFromVector/InputUpdateFromVector.cpp	(revision 6412)
@@ -38,5 +38,5 @@
 	/*Check that type is one of Constant, Vertex or Element: */
 	if ((TypeEnum!=ConstantEnum) && (TypeEnum!=VertexEnum) && (TypeEnum!=ElementEnum)){
-		ISSMERROR("%s%s%s\n","Type of input can only be a constant, a vertex or an element vector.  Right now, you input a ",EnumToString(TypeEnum)," type data for input update");
+		_error_("%s%s%s\n","Type of input can only be a constant, a vertex or an element vector.  Right now, you input a ",EnumToString(TypeEnum)," type data for input update");
 	}
 
@@ -72,6 +72,6 @@
 void InputUpdateFromVectorUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,parameters,vector,name_enum,type_enum);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,parameters,vector,name_enum,type_enum);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/InterpFromGridToMesh/InterpFromGridToMesh.cpp
===================================================================
--- /issm/trunk/src/mex/InterpFromGridToMesh/InterpFromGridToMesh.cpp	(revision 6411)
+++ /issm/trunk/src/mex/InterpFromGridToMesh/InterpFromGridToMesh.cpp	(revision 6412)
@@ -72,21 +72,21 @@
 void InterpFromGridToMeshUsage(void)
 {
-	_printf_("INTERPFROMGRIDTOMESH - interpolation from a grid onto a list of points\n");
-	_printf_("\n");
-	_printf_("   This function is a multi-threaded mex file that interpolates a field\n");
-	_printf_("   defined on a grid onto a list of points\n");
-	_printf_("\n");
-	_printf_("   Usage:\n");
-	_printf_("      data_mesh=InterpFromGridToMesh(x,y,data,x_mesh,y_mesh,default_value);\n");
-	_printf_("\n");
-	_printf_("      data: matrix holding the data to be interpolated onto the mesh.\n");
-	_printf_("      x,y: coordinates of matrix data. (x and y must be in increasing order)\n");
-	_printf_("      x_mesh,y_mesh: coordinates of the points onto which we interpolate.\n");
-	_printf_("      default_value: default value if no data is found (holes).\n");
-	_printf_("      data_mesh: vector of mesh interpolated data.\n");
-	_printf_("\n");
-	_printf_("   Example:\n");
-	_printf_("      load('velocities.mat');\n");
-	_printf_("      md.vx_obs=InterpFromGridToMesh(x_n,y_m,vx,md.x,md.y,0);\n");
-	_printf_("\n");
+	_printf_(true,"INTERPFROMGRIDTOMESH - interpolation from a grid onto a list of points\n");
+	_printf_(true,"\n");
+	_printf_(true,"   This function is a multi-threaded mex file that interpolates a field\n");
+	_printf_(true,"   defined on a grid onto a list of points\n");
+	_printf_(true,"\n");
+	_printf_(true,"   Usage:\n");
+	_printf_(true,"      data_mesh=InterpFromGridToMesh(x,y,data,x_mesh,y_mesh,default_value);\n");
+	_printf_(true,"\n");
+	_printf_(true,"      data: matrix holding the data to be interpolated onto the mesh.\n");
+	_printf_(true,"      x,y: coordinates of matrix data. (x and y must be in increasing order)\n");
+	_printf_(true,"      x_mesh,y_mesh: coordinates of the points onto which we interpolate.\n");
+	_printf_(true,"      default_value: default value if no data is found (holes).\n");
+	_printf_(true,"      data_mesh: vector of mesh interpolated data.\n");
+	_printf_(true,"\n");
+	_printf_(true,"   Example:\n");
+	_printf_(true,"      load('velocities.mat');\n");
+	_printf_(true,"      md.vx_obs=InterpFromGridToMesh(x_n,y_m,vx,md.x,md.y,0);\n");
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/InterpFromMesh2d/InterpFromMesh2d.cpp
===================================================================
--- /issm/trunk/src/mex/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 6411)
+++ /issm/trunk/src/mex/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 6412)
@@ -69,9 +69,9 @@
 	if(nlhs!=NLHS){
 		InterpFromMesh2dUsage();
-		ISSMERROR("InterpFromMeshToMesh2dUsage usage error");
+		_error_("InterpFromMeshToMesh2dUsage usage error");
 	}
 	if((nrhs!=6) && (nrhs!=7) && (nrhs!=8)){
 		InterpFromMesh2dUsage();
-		ISSMERROR("InterpFromMeshToMesh2dUsage usage error");
+		_error_("InterpFromMeshToMesh2dUsage usage error");
 	}
 
@@ -131,8 +131,8 @@
 	/*some checks*/
 	if (x_data_rows!=y_data_rows){
-		ISSMERROR("vectors x and y should have the same length!");
+		_error_("vectors x and y should have the same length!");
 	}
 	if (x_prime_rows!=y_prime_rows){
-		ISSMERROR("vectors x_prime and y_prime should have the same length!");
+		_error_("vectors x_prime and y_prime should have the same length!");
 	}
 	
@@ -154,16 +154,16 @@
 void InterpFromMesh2dUsage(void)
 {
-	_printf_("   usage:\n");
-	_printf_("         data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime);\n\n");
-	_printf_("      or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value);\n\n");
-	_printf_("      or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value,contourname);\n\n");
-	_printf_("   where:\n");
-	_printf_("      x,y: coordinates of the nodes where data is defined\n");
-	_printf_("      index: index of the mesh where data is defined\n");
-	_printf_("      data - vector holding the data to be interpolated onto the points.\n");
-	_printf_("      x_prime,y_prime: coordinates of the mesh grids onto which we interpolate.\n");
-	_printf_("      default_value: a scalar or vector of size length(x_prime).\n");
-	_printf_("      contourname: linear interpolation will happen on all x_interp,y_interp inside the contour, default value will be adopted on the rest of the mesh.\n");
-	_printf_("      data_prime:  vector of prime interpolated data.\n");
-	_printf_("\n");
+	_printf_(true,"   usage:\n");
+	_printf_(true,"         data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime);\n\n");
+	_printf_(true,"      or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value);\n\n");
+	_printf_(true,"      or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value,contourname);\n\n");
+	_printf_(true,"   where:\n");
+	_printf_(true,"      x,y: coordinates of the nodes where data is defined\n");
+	_printf_(true,"      index: index of the mesh where data is defined\n");
+	_printf_(true,"      data - vector holding the data to be interpolated onto the points.\n");
+	_printf_(true,"      x_prime,y_prime: coordinates of the mesh grids onto which we interpolate.\n");
+	_printf_(true,"      default_value: a scalar or vector of size length(x_prime).\n");
+	_printf_(true,"      contourname: linear interpolation will happen on all x_interp,y_interp inside the contour, default value will be adopted on the rest of the mesh.\n");
+	_printf_(true,"      data_prime:  vector of prime interpolated data.\n");
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp
===================================================================
--- /issm/trunk/src/mex/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp	(revision 6411)
+++ /issm/trunk/src/mex/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp	(revision 6412)
@@ -64,16 +64,16 @@
 void InterpFromMeshToGridUsage(void)
 {
-	_printf_("INTERPFROMMESHTOGRID - interpolation of a data defined on a mesh onto a grid\n");
-	_printf_("\n");
-	_printf_("   This function is a multi-threaded mex file that interpolates a field\n");
-	_printf_("   defined on a triangular mesh onto a regular grid\n");
-	_printf_("\n");
-	_printf_("   Usage:\n");
-	_printf_("      [x_m,y_m,griddata]=InterpFromMeshToGrid(index,x,y,data,cornereast,cornernorth,xposting,yposting,nlines,ncols,default_value)\n");
-	_printf_("\n");
-	_printf_("      index,x,y: delaunay triangulation defining the mesh.\n");
-	_printf_("      meshdata: vertex values of data to be interpolated.\n");
-	_printf_("      cornereast,cornernorth,posting,nlines,ncols: parameters that define the grid\n");
-	_printf_("      default_value: value of points located out of the mesh.\n");
-	_printf_("\n");
+	_printf_(true,"INTERPFROMMESHTOGRID - interpolation of a data defined on a mesh onto a grid\n");
+	_printf_(true,"\n");
+	_printf_(true,"   This function is a multi-threaded mex file that interpolates a field\n");
+	_printf_(true,"   defined on a triangular mesh onto a regular grid\n");
+	_printf_(true,"\n");
+	_printf_(true,"   Usage:\n");
+	_printf_(true,"      [x_m,y_m,griddata]=InterpFromMeshToGrid(index,x,y,data,cornereast,cornernorth,xposting,yposting,nlines,ncols,default_value)\n");
+	_printf_(true,"\n");
+	_printf_(true,"      index,x,y: delaunay triangulation defining the mesh.\n");
+	_printf_(true,"      meshdata: vertex values of data to be interpolated.\n");
+	_printf_(true,"      cornereast,cornernorth,posting,nlines,ncols: parameters that define the grid\n");
+	_printf_(true,"      default_value: value of points located out of the mesh.\n");
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp
===================================================================
--- /issm/trunk/src/mex/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 6411)
+++ /issm/trunk/src/mex/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 6412)
@@ -52,9 +52,9 @@
 	if(nlhs!=NLHS){
 		InterpFromMeshToMesh2dUsage();
-		ISSMERROR("InterpFromMeshToMesh2dUsage usage error");
+		_error_("InterpFromMeshToMesh2dUsage usage error");
 	}
 	if((nrhs!=6) & (nrhs!=8)){
 		InterpFromMeshToMesh2dUsage();
-		ISSMERROR("InterpFromMeshToMesh2dUsage usage error");
+		_error_("InterpFromMeshToMesh2dUsage usage error");
 	}
 
@@ -111,11 +111,11 @@
 	if (verbose) printf("Checking inputs\n");
 	if (x_data_rows!=y_data_rows){
-		ISSMERROR("vectors x and y should have the same length!");
+		_error_("vectors x and y should have the same length!");
 	}
 	if (x_interp_rows!=y_interp_rows){
-		ISSMERROR("vectors x_interp and y_interp should have the same length!");
+		_error_("vectors x_interp and y_interp should have the same length!");
 	}
 	if (index_cols!=3){
-		ISSMERROR("index should have 3 columns (input provided has %i columns)",index_cols);
+		_error_("index should have 3 columns (input provided has %i columns)",index_cols);
 	}
 
@@ -137,26 +137,26 @@
 void InterpFromMeshToMesh2dUsage(void)
 {
-	_printf_("INTERFROMMESHTOMESH2D - interpolation from a 2d triangular mesh onto a list of point\n");
-	_printf_("\n");
-	_printf_("   This function is a multi-threaded mex file that interpolates a field\n");
-	_printf_("   defined on a triangular mesh onto a list of point\n");
-	_printf_("\n");
-	_printf_("   Usage:\n");
-	_printf_("         data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp);\n");
-	_printf_("      or data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp,default_value,contourname);\n");
-	_printf_("\n");
-	_printf_("      index: index of the mesh where data is defined\n");
-	_printf_("      x,y: coordinates of the nodes where data is defined\n");
-	_printf_("      data: matrix holding the data to be interpolated onto the mesh. (one column per field)\n");
-	_printf_("      x_interp,y_interp: coordinates of the points onto which we interpolate.\n");
-	_printf_("      if default_value and contourname not specified: linear interpolation will happen on all x_interp,y_interp.\n");
-	_printf_("      if (default_value,contourname) specified: linear interpolation will happen on all x_interp,y_interp inside the contour, default value will be adopted on the rest of the mesh.\n");
-	_printf_("      note that default_value is either a scalar, or a vector of size  length(x_interp)\n");
-	_printf_("      data_interp: vector of mesh interpolated data.\n");
-	_printf_("\n");
-	_printf_("   Example:\n");
-	_printf_("      load('temperature.mat');\n");
-	_printf_("      md.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.x,md.y);\n");
-	_printf_("      md.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.x,md.y,253,'Contour.exp');\n");
-	_printf_("\n");
+	_printf_(true,"INTERFROMMESHTOMESH2D - interpolation from a 2d triangular mesh onto a list of point\n");
+	_printf_(true,"\n");
+	_printf_(true,"   This function is a multi-threaded mex file that interpolates a field\n");
+	_printf_(true,"   defined on a triangular mesh onto a list of point\n");
+	_printf_(true,"\n");
+	_printf_(true,"   Usage:\n");
+	_printf_(true,"         data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp);\n");
+	_printf_(true,"      or data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp,default_value,contourname);\n");
+	_printf_(true,"\n");
+	_printf_(true,"      index: index of the mesh where data is defined\n");
+	_printf_(true,"      x,y: coordinates of the nodes where data is defined\n");
+	_printf_(true,"      data: matrix holding the data to be interpolated onto the mesh. (one column per field)\n");
+	_printf_(true,"      x_interp,y_interp: coordinates of the points onto which we interpolate.\n");
+	_printf_(true,"      if default_value and contourname not specified: linear interpolation will happen on all x_interp,y_interp.\n");
+	_printf_(true,"      if (default_value,contourname) specified: linear interpolation will happen on all x_interp,y_interp inside the contour, default value will be adopted on the rest of the mesh.\n");
+	_printf_(true,"      note that default_value is either a scalar, or a vector of size  length(x_interp)\n");
+	_printf_(true,"      data_interp: vector of mesh interpolated data.\n");
+	_printf_(true,"\n");
+	_printf_(true,"   Example:\n");
+	_printf_(true,"      load('temperature.mat');\n");
+	_printf_(true,"      md.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.x,md.y);\n");
+	_printf_(true,"      md.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.x,md.y,253,'Contour.exp');\n");
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp
===================================================================
--- /issm/trunk/src/mex/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp	(revision 6411)
+++ /issm/trunk/src/mex/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp	(revision 6412)
@@ -76,8 +76,8 @@
 	/*some checks*/
 	if (x_data_rows!=y_data_rows || x_data_rows!=z_data_rows){
-		ISSMERROR("vectors x, y and z should have the same length!");
+		_error_("vectors x, y and z should have the same length!");
 	}
 	if (x_prime_rows!=y_prime_rows || x_prime_rows!=z_prime_rows){
-		ISSMERROR("vectors x_prime, y_prime and z_prime should have the same length!");
+		_error_("vectors x_prime, y_prime and z_prime should have the same length!");
 	}
 	/*get number of elements and number of nodes in the data*/
@@ -98,22 +98,22 @@
 void InterpFromMeshToMesh3dUsage(void)
 {
-	_printf_("INTERPFROMMESHTOMESH3D - interpolation from a 3d hexahedron mesh onto a list of point\n");
-	_printf_("\n");
-	_printf_("   This function is a multi-threaded mex file that interpolates a field\n");
-	_printf_("   defined on a triangular mesh onto a list of point\n");
-	_printf_("\n");
-	_printf_("   Usage:\n");
-	_printf_("      data_prime=InterpFromMeshToMesh3d(index,x,y,z,data,x_prime,y_prime,z_prime,default_value);\n");
-	_printf_("\n");
-	_printf_("      index: index of the mesh where data is defined\n");
-	_printf_("      x,y,z: coordinates of the nodes where data is defined\n");
-	_printf_("      data: matrix holding the data to be interpolated onto the mesh.\n");
-	_printf_("      x_prime,y_prime,z_prime: coordinates of the points onto which we interpolate.\n");
-	_printf_("      default_value: default value if no data is found (holes).\n");
-	_printf_("      data_prime: vector of mesh interpolated data.\n");
-	_printf_("\n");
-	_printf_("   Example:\n");
-	_printf_("      load('temperature.mat');\n");
-	_printf_("      md.temperature=InterpFromMeshToMesh3d(index,x,y,z,temperature,md.x,md.y,md.z,253);\n");
-	_printf_("\n");
+	_printf_(true,"INTERPFROMMESHTOMESH3D - interpolation from a 3d hexahedron mesh onto a list of point\n");
+	_printf_(true,"\n");
+	_printf_(true,"   This function is a multi-threaded mex file that interpolates a field\n");
+	_printf_(true,"   defined on a triangular mesh onto a list of point\n");
+	_printf_(true,"\n");
+	_printf_(true,"   Usage:\n");
+	_printf_(true,"      data_prime=InterpFromMeshToMesh3d(index,x,y,z,data,x_prime,y_prime,z_prime,default_value);\n");
+	_printf_(true,"\n");
+	_printf_(true,"      index: index of the mesh where data is defined\n");
+	_printf_(true,"      x,y,z: coordinates of the nodes where data is defined\n");
+	_printf_(true,"      data: matrix holding the data to be interpolated onto the mesh.\n");
+	_printf_(true,"      x_prime,y_prime,z_prime: coordinates of the points onto which we interpolate.\n");
+	_printf_(true,"      default_value: default value if no data is found (holes).\n");
+	_printf_(true,"      data_prime: vector of mesh interpolated data.\n");
+	_printf_(true,"\n");
+	_printf_(true,"   Example:\n");
+	_printf_(true,"      load('temperature.mat');\n");
+	_printf_(true,"      md.temperature=InterpFromMeshToMesh3d(index,x,y,z,temperature,md.x,md.y,md.z,253);\n");
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/Mergesolutionfromftog/Mergesolutionfromftog.cpp
===================================================================
--- /issm/trunk/src/mex/Mergesolutionfromftog/Mergesolutionfromftog.cpp	(revision 6411)
+++ /issm/trunk/src/mex/Mergesolutionfromftog/Mergesolutionfromftog.cpp	(revision 6412)
@@ -23,5 +23,5 @@
 	if((nlhs!=NLHS) || (nrhs!=4 && nrhs!=5)){
 		MergesolutionfromftogUsage();
-		ISSMERROR(" usage. See above");
+		_error_(" usage. See above");
 	}
 
@@ -57,6 +57,6 @@
 void MergesolutionfromftogUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [ug] = %s(uf,ys,nodesets,parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [ug] = %s(uf,ys,nodesets,parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/MeshProfileIntersection/MeshProfileIntersection.cpp
===================================================================
--- /issm/trunk/src/mex/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 6411)
+++ /issm/trunk/src/mex/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 6412)
@@ -54,5 +54,5 @@
 	//index
 	FetchData(&double_index,&nel,&dummy,INDEX);
-	if(dummy!=3)ISSMERROR(" element triangulation should be of 3 column width!");
+	if(dummy!=3)_error_(" element triangulation should be of 3 column width!");
 	index=(int*)xmalloc(nel*3*sizeof(int));
 	for(i=0;i<nel;i++){
Index: /issm/trunk/src/mex/ModelProcessor/ModelProcessor.cpp
===================================================================
--- /issm/trunk/src/mex/ModelProcessor/ModelProcessor.cpp	(revision 6411)
+++ /issm/trunk/src/mex/ModelProcessor/ModelProcessor.cpp	(revision 6412)
@@ -65,7 +65,7 @@
 	
 void ModelProcessorUsage(void) {
-	_printf_("\n");
-	_printf_("   usage: [elements,grids,constraints,loads,materials,parameters,part,tpart]=ModelProcessor(model,analyses)\n");
-	_printf_("   where: model is an instance of the matlab @model class and analyses is a list of analysis types being performed.\n");
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [elements,grids,constraints,loads,materials,parameters,part,tpart]=ModelProcessor(model,analyses)\n");
+	_printf_(true,"   where: model is an instance of the matlab @model class and analyses is a list of analysis types being performed.\n");
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/NodeConnectivity/NodeConnectivity.cpp
===================================================================
--- /issm/trunk/src/mex/NodeConnectivity/NodeConnectivity.cpp	(revision 6411)
+++ /issm/trunk/src/mex/NodeConnectivity/NodeConnectivity.cpp	(revision 6412)
@@ -39,6 +39,6 @@
 
 void NodeConnectivityUsage(void) {
-	_printf_("\n");
-	_printf_("   usage: connectivity = %s(elements, numnodes);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: connectivity = %s(elements, numnodes);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/NodesDof/NodesDof.cpp
===================================================================
--- /issm/trunk/src/mex/NodesDof/NodesDof.cpp	(revision 6411)
+++ /issm/trunk/src/mex/NodesDof/NodesDof.cpp	(revision 6412)
@@ -40,6 +40,6 @@
 void NodesDofUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [nodes] = %s(nodes,parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [nodes] = %s(nodes,parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/Orth/Orth.cpp
===================================================================
--- /issm/trunk/src/mex/Orth/Orth.cpp	(revision 6411)
+++ /issm/trunk/src/mex/Orth/Orth.cpp	(revision 6412)
@@ -41,6 +41,6 @@
 void OrthUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [newgradj] = %s(gradj,oldgradj);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [newgradj] = %s(gradj,oldgradj);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/OutputResults/OutputResults.cpp
===================================================================
--- /issm/trunk/src/mex/OutputResults/OutputResults.cpp	(revision 6411)
+++ /issm/trunk/src/mex/OutputResults/OutputResults.cpp	(revision 6412)
@@ -63,6 +63,6 @@
 void OutputResultsUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [results] = %s(elements,nodes,vertices,loads,materials,parameters,results);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [results] = %s(elements,nodes,vertices,loads,materials,parameters,results);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/OutputRifts/OutputRifts.cpp
===================================================================
--- /issm/trunk/src/mex/OutputRifts/OutputRifts.cpp	(revision 6411)
+++ /issm/trunk/src/mex/OutputRifts/OutputRifts.cpp	(revision 6412)
@@ -43,6 +43,6 @@
 void OutputRiftsUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [riftproperties] = %s(loads,parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [riftproperties] = %s(loads,parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/ParameterOutput/ParameterOutput.cpp
===================================================================
--- /issm/trunk/src/mex/ParameterOutput/ParameterOutput.cpp	(revision 6411)
+++ /issm/trunk/src/mex/ParameterOutput/ParameterOutput.cpp	(revision 6412)
@@ -56,6 +56,6 @@
 void ParameterOutputUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [Kgg,pg] = %s(eleemnts,nodes,loads,materials,params,analysis_type);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [Kgg,pg] = %s(eleemnts,nodes,loads,materials,params,analysis_type);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/PenaltyConstraints/PenaltyConstraints.cpp
===================================================================
--- /issm/trunk/src/mex/PenaltyConstraints/PenaltyConstraints.cpp	(revision 6411)
+++ /issm/trunk/src/mex/PenaltyConstraints/PenaltyConstraints.cpp	(revision 6412)
@@ -60,6 +60,6 @@
 void PenaltyConstraintsUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [loads, constraints_converged, num_unstable_constraints] = %s(elements,nodes,vertices,loads,materials,params);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [loads, constraints_converged, num_unstable_constraints] = %s(elements,nodes,vertices,loads,materials,params);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/ProcessParams/ProcessParams.cpp
===================================================================
--- /issm/trunk/src/mex/ProcessParams/ProcessParams.cpp	(revision 6411)
+++ /issm/trunk/src/mex/ProcessParams/ProcessParams.cpp	(revision 6412)
@@ -31,6 +31,6 @@
 void ProcessParamsUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [parameters] = %s(parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [parameters] = %s(parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/Qmu/Qmu.cpp
===================================================================
--- /issm/trunk/src/mex/Qmu/Qmu.cpp	(revision 6411)
+++ /issm/trunk/src/mex/Qmu/Qmu.cpp	(revision 6412)
@@ -20,5 +20,5 @@
 
 	#ifndef _HAVE_DAKOTA_ //only works if dakota library has been compiled in.
-	ISSMERROR(" Dakota not available! Cannot carry out qmu analysis!");
+	_error_(" Dakota not available! Cannot carry out qmu analysis!");
 	#endif
 
@@ -48,6 +48,6 @@
 
 void QmuUsage(void){
-	_printf_("\n");
-	_printf_("   usage: %s(femmodel,parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: %s(femmodel,parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/Reduceload/Reduceload.cpp
===================================================================
--- /issm/trunk/src/mex/Reduceload/Reduceload.cpp	(revision 6411)
+++ /issm/trunk/src/mex/Reduceload/Reduceload.cpp	(revision 6412)
@@ -20,5 +20,5 @@
 	if((nlhs!=NLHS) || (nrhs!=4 && nrhs!=5)){
 		ReduceloadUsage();
-		ISSMERROR(" usage. See above");
+		_error_(" usage. See above");
 	}
 
@@ -52,7 +52,7 @@
 void ReduceloadUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [pf] = %s(pf,Kfs,ys,parameters);\n",__FUNCT__);
-	_printf_("          [pf] = %s(pf,Kfs,ys,parameters,ys0_flag);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [pf] = %s(pf,Kfs,ys,parameters);\n",__FUNCT__);
+	_printf_(true,"          [pf] = %s(pf,Kfs,ys,parameters,ys0_flag);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/Reduceloadfromgtof/Reduceloadfromgtof.cpp
===================================================================
--- /issm/trunk/src/mex/Reduceloadfromgtof/Reduceloadfromgtof.cpp	(revision 6411)
+++ /issm/trunk/src/mex/Reduceloadfromgtof/Reduceloadfromgtof.cpp	(revision 6412)
@@ -24,5 +24,5 @@
 	if((nlhs!=NLHS) || (nrhs!=5 && nrhs!=6)){
 		ReduceloadfromgtofUsage();
-		ISSMERROR(" usage. See above");
+		_error_(" usage. See above");
 	}
 
@@ -60,6 +60,6 @@
 void ReduceloadfromgtofUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [pf] = %s(pg,Kfs,ys,nodesets,parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [pf] = %s(pg,Kfs,ys,nodesets,parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/Reducematrixfromgtof/Reducematrixfromgtof.cpp
===================================================================
--- /issm/trunk/src/mex/Reducematrixfromgtof/Reducematrixfromgtof.cpp	(revision 6411)
+++ /issm/trunk/src/mex/Reducematrixfromgtof/Reducematrixfromgtof.cpp	(revision 6412)
@@ -47,6 +47,6 @@
 void ReducematrixfromgtofUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [Kff,Kfs] = %s(Kgg,nodesets,parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [Kff,Kfs] = %s(Kgg,nodesets,parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/Reducevectorgtof/Reducevectorgtof.cpp
===================================================================
--- /issm/trunk/src/mex/Reducevectorgtof/Reducevectorgtof.cpp	(revision 6411)
+++ /issm/trunk/src/mex/Reducevectorgtof/Reducevectorgtof.cpp	(revision 6412)
@@ -44,6 +44,6 @@
 void ReducevectorgtofUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: uf = %s(ug,nodesets,parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: uf = %s(ug,nodesets,parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/Reducevectorgtos/Reducevectorgtos.cpp
===================================================================
--- /issm/trunk/src/mex/Reducevectorgtos/Reducevectorgtos.cpp	(revision 6411)
+++ /issm/trunk/src/mex/Reducevectorgtos/Reducevectorgtos.cpp	(revision 6412)
@@ -44,6 +44,6 @@
 void ReducevectorgtosUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: ys = %s(yg,nodesets,parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: ys = %s(yg,nodesets,parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/Scotch/Scotch.cpp
===================================================================
--- /issm/trunk/src/mex/Scotch/Scotch.cpp	(revision 6411)
+++ /issm/trunk/src/mex/Scotch/Scotch.cpp	(revision 6412)
@@ -25,5 +25,5 @@
 
 #ifndef _HAVE_SCOTCH_ //only works if scotch library has been compiled in.
-	ISSMERROR(" Scotch not available! Cannot carry out Scotch partitioning!");
+	_error_(" Scotch not available! Cannot carry out Scotch partitioning!");
 	#else
 
Index: /issm/trunk/src/mex/Solver/Solver.cpp
===================================================================
--- /issm/trunk/src/mex/Solver/Solver.cpp	(revision 6411)
+++ /issm/trunk/src/mex/Solver/Solver.cpp	(revision 6412)
@@ -75,6 +75,6 @@
 void SolverUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [uf] = %s(Kff,pf,uf0,parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [uf] = %s(Kff,pf,uf0,parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/SpcNodes/SpcNodes.cpp
===================================================================
--- /issm/trunk/src/mex/SpcNodes/SpcNodes.cpp	(revision 6411)
+++ /issm/trunk/src/mex/SpcNodes/SpcNodes.cpp	(revision 6412)
@@ -40,6 +40,6 @@
 void SpcNodesUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [m.node]=%s(m.nodes,m.constraints);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [m.node]=%s(m.nodes,m.constraints);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/SurfaceArea/SurfaceArea.cpp
===================================================================
--- /issm/trunk/src/mex/SurfaceArea/SurfaceArea.cpp	(revision 6411)
+++ /issm/trunk/src/mex/SurfaceArea/SurfaceArea.cpp	(revision 6412)
@@ -55,6 +55,6 @@
 void SurfaceAreaUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [elements] = %s(elements, nodes, vertices, loads, materials, parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp
===================================================================
--- /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp	(revision 6411)
+++ /issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp	(revision 6412)
@@ -30,5 +30,5 @@
 	if((nlhs!=NLHS) || (nrhs!=6 && nrhs!=10)){
 		SystemMatricesUsage();
-		ISSMERROR(" usage. See above");
+		_error_(" usage. See above");
 	}
 
@@ -85,7 +85,7 @@
 void SystemMatricesUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [Kgg,Kff,Kfs,pg,pf,kmax] = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__);
-	_printf_("   usage: [Kgg,Kff,Kfs,pg,pf,kmax] = %s(elements,nodes,vertices,loads,materials,parameters,kflag,pflag,penalty_kflag,penalty_pflag);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [Kgg,Kff,Kfs,pg,pf,kmax] = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__);
+	_printf_(true,"   usage: [Kgg,Kff,Kfs,pg,pf,kmax] = %s(elements,nodes,vertices,loads,materials,parameters,kflag,pflag,penalty_kflag,penalty_pflag);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/Test/Test.cpp
===================================================================
--- /issm/trunk/src/mex/Test/Test.cpp	(revision 6411)
+++ /issm/trunk/src/mex/Test/Test.cpp	(revision 6412)
@@ -13,6 +13,6 @@
 void TestUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: %s(whatever in here);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: %s(whatever in here);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/TimeAdapt/TimeAdapt.cpp
===================================================================
--- /issm/trunk/src/mex/TimeAdapt/TimeAdapt.cpp	(revision 6411)
+++ /issm/trunk/src/mex/TimeAdapt/TimeAdapt.cpp	(revision 6412)
@@ -57,6 +57,6 @@
 void TimeAdaptUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: dt = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: dt = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/TriaSearch/TriaSearch.cpp
===================================================================
--- /issm/trunk/src/mex/TriaSearch/TriaSearch.cpp	(revision 6411)
+++ /issm/trunk/src/mex/TriaSearch/TriaSearch.cpp	(revision 6412)
@@ -56,11 +56,11 @@
 void TriaSearchUsage(void)
 {
-	_printf_("TriaSearch- find triangle holding a point (x0,y0) in a mesh\n");
-	_printf_("\n");
-	_printf_("   Usage:\n");
-	_printf_("         tria=TriaSearch(index,x,y,x0,y0);\n");
-	_printf_("      index,x,y: mesh triangulatrion\n");
-	_printf_("      x0,y0: coordinates of the point for which we are trying to find a triangle\n");
-	_printf_("      x0,y0 can be an array of points\n");
-	_printf_("\n");
+	_printf_(true,"TriaSearch- find triangle holding a point (x0,y0) in a mesh\n");
+	_printf_(true,"\n");
+	_printf_(true,"   Usage:\n");
+	_printf_(true,"         tria=TriaSearch(index,x,y,x0,y0);\n");
+	_printf_(true,"      index,x,y: mesh triangulatrion\n");
+	_printf_(true,"      x0,y0: coordinates of the point for which we are trying to find a triangle\n");
+	_printf_(true,"      x0,y0 can be an array of points\n");
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/UpdateGeometry/UpdateGeometry.cpp
===================================================================
--- /issm/trunk/src/mex/UpdateGeometry/UpdateGeometry.cpp	(revision 6411)
+++ /issm/trunk/src/mex/UpdateGeometry/UpdateGeometry.cpp	(revision 6412)
@@ -59,6 +59,6 @@
 void UpdateGeometryUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/UpdateVertexPositions/UpdateVertexPositions.cpp
===================================================================
--- /issm/trunk/src/mex/UpdateVertexPositions/UpdateVertexPositions.cpp	(revision 6411)
+++ /issm/trunk/src/mex/UpdateVertexPositions/UpdateVertexPositions.cpp	(revision 6412)
@@ -59,6 +59,6 @@
 void UpdateVertexPositionsUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [elements,nodes,vertices,loads,materials,parameters] = %s(elements,nodes,vertices,loads,materials,parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
Index: /issm/trunk/src/mex/VerticesDof/VerticesDof.cpp
===================================================================
--- /issm/trunk/src/mex/VerticesDof/VerticesDof.cpp	(revision 6411)
+++ /issm/trunk/src/mex/VerticesDof/VerticesDof.cpp	(revision 6412)
@@ -37,6 +37,6 @@
 void VerticesDofUsage(void)
 {
-	_printf_("\n");
-	_printf_("   usage: [vertices] = %s(vertices,parameters);\n",__FUNCT__);
-	_printf_("\n");
+	_printf_(true,"\n");
+	_printf_(true,"   usage: [vertices] = %s(vertices,parameters);\n",__FUNCT__);
+	_printf_(true,"\n");
 }
