Index: /issm/trunk/src/m/model/ismodelselfconsistent.m
===================================================================
--- /issm/trunk/src/m/model/ismodelselfconsistent.m	(revision 8584)
+++ /issm/trunk/src/m/model/ismodelselfconsistent.m	(revision 8585)
@@ -10,5 +10,5 @@
 if nargin~=1,
 	help ismodelselfconsistent
-	error('ismodelselfconsistent error message: wrong usage');
+	message('ismodelselfconsistent message message: wrong usage');
 end
 %}}}
@@ -22,15 +22,15 @@
 	disp('         md.verbose=verbose;');
 	disp(' ');
-	error(['field verbose should be of class ''verbose'' ']);
+	message(['field verbose should be of class ''verbose'' ']);
 end
 %}}}
 %COUNTER {{{1
 if md.counter<3,
-	error(['model ' md.name ' is not correctly configured. You forgot one step in the following sequence (mesh, geography, parameterize,setelementstype)!']);
+	message(['model ' md.name ' is not correctly configured. You forgot one step in the following sequence (mesh, geography, parameterize,setelementstype)!']);
 end
 %}}}
 %NAME{{{1
 if isempty(md.name),
-	error(['model is not correctly configured: missing name!']);
+	message(['model is not correctly configured: missing name!']);
 end
 %}}}
@@ -43,5 +43,5 @@
 end
 if any(~ismember(1:md.numberofnodes,sort(unique(md.elements(:)))));
-	error('orphan nodes have been found. Check the mesh');
+	message('orphan nodes have been found. Check the mesh');
 end
 %}}}
@@ -65,5 +65,5 @@
 	checksize(md,fields,[NaN 6]);
 else
-	error('dim should be either 2 3');
+	message('dim should be either 2 3');
 end
 checkvalues(md,{'pressureload(:,end)'},[WaterEnum() AirEnum() IceEnum()]);
@@ -101,5 +101,5 @@
 %THICKNESS = SURFACE - BED {{{1
 if any((md.thickness-md.surface+md.bed)>tolerance),
-	error(['model not consistent: model ' md.name ' violates the equality thickness=surface-bed!']);
+	message(['model not consistent: model ' md.name ' violates the equality thickness=surface-bed!']);
 end
 %GROUNDING LINE MIGRATION {{{1
@@ -107,8 +107,8 @@
 if (md.gl_migration~=NoneEnum),
 	if (md.dim==3 | strcmpi(md.cluster.name,'none')),
-		error(['model ' md.name ' requesting grounding line migration, but grounding line module only implemented for 2d models and parallel runs!']);
+		message(['model ' md.name ' requesting grounding line migration, but grounding line module only implemented for 2d models and parallel runs!']);
 	end
 	if isnan(md.bathymetry),
-		error(['model not consistent: model ' md.name ' requesting grounding line migration, but bathymetry is absent!']);
+		message(['model not consistent: model ' md.name ' requesting grounding line migration, but bathymetry is absent!']);
 	end
 end
@@ -118,12 +118,12 @@
 if md.numrifts,
 	if ~(md.dim==2),
-		error(['model not consistent: models with rifts are only supported in 2d for now!']);
+		message(['model not consistent: models with rifts are only supported in 2d for now!']);
 	end
 	if ~isstruct(md.rifts),
-		error(['model not consistent: md.rifts should be a structure!']);
+		message(['model not consistent: md.rifts should be a structure!']);
 	end
 	if ~isempty(find(md.segmentmarkers>=2)),
 		%We have segments with rift markers, but no rift structure!
-		error(['model not consistent: model ' md.name ' should be processed for rifts (run meshprocessrifts)!']);
+		message(['model not consistent: model ' md.name ' should be processed for rifts (run meshprocessrifts)!']);
 	end
 	%Check that rifts are filled with proper material
@@ -131,5 +131,5 @@
 else
 	if ~isnans(md.rifts),
-		error(['model not consistent: md.rifts shoud be NaN since md.numrifts is 0!']);
+		message(['model not consistent: md.rifts shoud be NaN since md.numrifts is 0!']);
 	end
 end
@@ -137,25 +137,25 @@
 %FLAGS (0 or 1){{{1
 if ~ismember(md.artificial_diffusivity,[0 1 2]),
-	error('model not consistent: artificial_diffusivity should be a scalar (0 or 1 or 2)');
+	message('model not consistent: artificial_diffusivity should be a scalar (0 or 1 or 2)');
 end
 if ~ismember(md.prognostic_DG,[0 1]),
-	error('model not consistent: prognostic_DG should be a scalar (1 or 0)');
+	message('model not consistent: prognostic_DG should be a scalar (1 or 0)');
 end
 if ~ismember(md.lowmem,[0 1]),
-	error(['model not consistent: model ' md.name ' lowmem field should be 0 or 1']);
+	message(['model not consistent: model ' md.name ' lowmem field should be 0 or 1']);
 end
 if ~ismember(md.time_adapt,[0 1]),
-	error(['model not consistent: model ' md.name ' time_adapt field should be 0 or 1']);
+	message(['model not consistent: model ' md.name ' time_adapt field should be 0 or 1']);
 end
 if ~ismember(md.hydrostatic_adjustment,[AbsoluteEnum IncrementalEnum]),
-	error(['model not consistent: model ' md.name ' hydrostatic_adjustment field should be AbsoluteEnum or IncrementalEnum']);
+	message(['model not consistent: model ' md.name ' hydrostatic_adjustment field should be AbsoluteEnum or IncrementalEnum']);
 end
 if ~ismember(md.rheology_law,[NoneEnum PatersonEnum ArrheniusEnum]),
-	error(['model not consistent: model ' md.name ' rheology_law field should be NoneEnum, PatersonEnum or ArrheniusEnum']);
+	message(['model not consistent: model ' md.name ' rheology_law field should be NoneEnum, PatersonEnum or ArrheniusEnum']);
 end
 %}}}
 %PARAMETEROUTPUT {{{1
 if md.numoutput~=length(md.parameteroutput),
-	error('model not consistent: numoutput should be the same size as parameteroutput');
+	message('model not consistent: numoutput should be the same size as parameteroutput');
 end
 %}}}
@@ -163,10 +163,10 @@
 if (md.dim==2),
 	if md.connectivity<9, 
-		error('model not consistent: connectivity should be at least 9 for 2d models');
+		message('model not consistent: connectivity should be at least 9 for 2d models');
 	end
 end
 if md.dim==3,
 	if md.connectivity<24, 
-		error('model not consistent: connectivity should be at least 24 for 3d models');
+		message('model not consistent: connectivity should be at least 24 for 3d models');
 	end
 end
@@ -213,5 +213,5 @@
 		pos=find(md.thickness<=0);
 		if any(find(md.spcthickness(pos,1)==0)),
-			error(['model not consistent: model ' md.name ' has some nodes with 0 thickness']);
+			message(['model not consistent: model ' md.name ' has some nodes with 0 thickness']);
 		end
 	end
@@ -225,32 +225,32 @@
 if md.qmu_analysis,
 	if md.qmu_params.evaluation_concurrency~=1,
-		error(['model not consistent: concurrency should be set to 1 when running dakota in library mode']);
+		message(['model not consistent: concurrency should be set to 1 when running dakota in library mode']);
 	end
 	if ~isempty(md.part),
 		if numel(md.part)~=md.numberofnodes,
-			error(['model not consistent: user supplied partition for qmu analysis should have size md.numberofnodes x 1 ']);
+			message(['model not consistent: user supplied partition for qmu analysis should have size md.numberofnodes x 1 ']);
 		end
 		if find(md.part)>=md.numberofnodes,
-			error(['model not consistent: user supplied partition should be indexed from 0 (c-convention)']);
+			message(['model not consistent: user supplied partition should be indexed from 0 (c-convention)']);
 		end
 		if min(md.part)~=0,
-			error(['model not consistent: partition vector not indexed from 0 on']);
+			message(['model not consistent: partition vector not indexed from 0 on']);
 		end
 		if max(md.part)>=md.numberofnodes,
-			error(['model not consistent: partition vector cannot have maximum index larger than number of nodes']);
+			message(['model not consistent: partition vector cannot have maximum index larger than number of nodes']);
 		end
 		if ~isempty(find(md.part<0)),
-			error(['model not consistent: partition vector cannot have values less than 0']);
+			message(['model not consistent: partition vector cannot have values less than 0']);
 		end
 		if ~isempty(find(md.part>=md.npart)),
-			error(['model not consistent: partition vector cannot have values more than md.npart-1']);
+			message(['model not consistent: partition vector cannot have values more than md.npart-1']);
 		end
 		if max(md.part)>=md.npart,
-			error(['model not consistent: for qmu analysis, partitioning vector cannot go over npart, number of partition areas']);
+			message(['model not consistent: for qmu analysis, partitioning vector cannot go over npart, number of partition areas']);
 		end
 	end
 	if ~md.qmu_relax,
 		if md.eps_rel>1.1*10^-5,
-			error(['model not consistent: for qmu analysis, eps_rel should be least than 10^-5, 10^-15 being a better value']);
+			message(['model not consistent: for qmu analysis, eps_rel should be least than 10^-5, 10^-15 being a better value']);
 		end
 	end
@@ -260,5 +260,5 @@
 	if ~strcmpi(md.cluster.name,'none'),
 		if md.waitonlock==0,
-			error(['model is not correctly configured: waitonlock should be activated when running qmu in parallel mode!']);
+			message(['model is not correctly configured: waitonlock should be activated when running qmu in parallel mode!']);
 		end
 	end
@@ -271,20 +271,20 @@
 
 	if md.dt<=0,
-		error('model not consistent: field dt must be positive for a transient run')
+		message('model not consistent: field dt must be positive for a transient run')
 	end
 	if(md.cfl_coefficient>1 | md.cfl_coefficient<0),
-		error(['model not consistent: model ' md.name ' cfl_coefficient field should between  0 and 1']);
+		message(['model not consistent: model ' md.name ' cfl_coefficient field should between  0 and 1']);
 	end
 	if(md.cfl_coefficient>1 | md.cfl_coefficient<0),
-		error(['model not consistent: model ' md.name ' cfl_coefficient field should between  0 and 1']);
+		message(['model not consistent: model ' md.name ' cfl_coefficient field should between  0 and 1']);
 	end
 	if ~ismember(md.isdiagnostic,[0 1]),
-		error('model not consistent: isdiagnostic should be a scalar (1 or 0)');
+		message('model not consistent: isdiagnostic should be a scalar (1 or 0)');
 	end
 	if ~ismember(md.isprognostic,[0 1]),
-		error('model not consistent: isprognostic should be a scalar (1 or 0)');
+		message('model not consistent: isprognostic should be a scalar (1 or 0)');
 	end
 	if ~ismember(md.isthermal,[0 1]),
-		error('model not consistent: isthermal should be a scalar (1 or 0)');
+		message('model not consistent: isthermal should be a scalar (1 or 0)');
 	end
 
@@ -300,5 +300,5 @@
 	for i=1:length(forcingnames),
 		if md.forcings.(forcingnames{i})(end,:)~=sort(md.forcings.(forcingnames{i})(end,:)),
-			error(['model not consistent: model ' md.name ' forcings.' forcingnames{i} ' columns should be chronological']);
+			message(['model not consistent: model ' md.name ' forcings.' forcingnames{i} ' columns should be chronological']);
 		end
 	end
@@ -311,10 +311,10 @@
 	%NDT
 	if md.dt~=0,
-		error(['model not consistent: for a steadystate computation, dt must be zero.']);
+		message(['model not consistent: for a steadystate computation, dt must be zero.']);
 	end
 
 	%eps: 
 	if isnan(md.eps_rel),
-		error(['model not consistent: for a steadystate computation, eps_rel (relative convergence criterion) must be defined!']);
+		message(['model not consistent: for a steadystate computation, eps_rel (relative convergence criterion) must be defined!']);
 	end
 end
@@ -323,18 +323,17 @@
 if md.solution_type==GroundingLineMigration2DSolutionEnum,
 	if strcmpi(md.cluster.name,'none'),
-		error(['model not consistent: ' md.solution_type ' is only implemented in parallel mode !'])
+		message(['model not consistent: ' md.solution_type ' is only implemented in parallel mode !'])
 	end
 
 	if md.dt<=0,
-		error('model not consistent: field dt must be positive for a transient run')
-	end
-
-	%recursive call to ismodelselfconsistent
+		message('model not consistent: field dt must be positive for a transient run')
+	end
+
 	if (md.dim~=2),
-		error(['model not consistent: for a ' md.solution_type ' computation, the grounding line module is only implemented in 2d !'])
+		message(['model not consistent: for a ' md.solution_type ' computation, the grounding line module is only implemented in 2d !'])
 	end
 
 	if(md.cfl_coefficient>1 | md.cfl_coefficient<0),
-		error(['model not consistent: model ' md.name ' cfl_coefficient field should between  0 and 1']);
+		message(['model not consistent: model ' md.name ' cfl_coefficient field should between  0 and 1']);
 	end
 end
@@ -343,9 +342,9 @@
 if (md.solution_type == FlaimSolutionEnum),
 	if ~exist(md.fm_tracks,'file')
-		error(['model not consistent: fm_tracks file ''' md.fm_tracks ''' must exist.']);
+		message(['model not consistent: fm_tracks file ''' md.fm_tracks ''' must exist.']);
 	end
 	%   probably going to need some checks on fm_flightreqs here
 	if (numel(md.fm_criterion) ~= md.numberofnodes) && (numel(md.fm_criterion) ~= md.numberofelements)
-		error(['model not consistent: fm_criterion vector must have number of nodes (' int2str(md.numberofnodes) ') or elements (' int2str(md.numberofelements) ') values, not ' int2str(numel(md.fm_criterion)) ' values.']);
+		message(['model not consistent: fm_criterion vector must have number of nodes (' int2str(md.numberofnodes) ') or elements (' int2str(md.numberofelements) ') values, not ' int2str(numel(md.fm_criterion)) ' values.']);
 	end
 end
@@ -359,4 +358,6 @@
 end
 %}}}
+
+	if modelconsistency==false, error(['model not consistent']); end
 end
 
@@ -370,5 +371,5 @@
 			%SINGULAR
 			if ~any(sum(md.spcvelocity(:,1:2),2)==2),
-				error(['model not consistent: model ' md.name ' is not well posed (singular). You need at least one node with fixed velocity!'])
+				message(['model not consistent: model ' md.name ' is not well posed (singular). You need at least one node with fixed velocity!'])
 			end
 
@@ -377,5 +378,5 @@
 				pos=find(md.thickness<=0);
 				if any(find(md.spcthickness(pos,1)==0)),
-					error(['model not consistent: model ' md.name ' has some nodes with 0 thickness']);
+					message(['model not consistent: model ' md.name ' has some nodes with 0 thickness']);
 				end
 			end
@@ -384,5 +385,5 @@
 			%CHECK THAT EACH LINES CONTAINS ONLY NAN VALUES OR NO NAN VALUES
 			if any(sum(isnan(md.diagnostic_ref),2)~=0 & sum(isnan(md.diagnostic_ref),2)~=6),
-				error(['model not consistent: model ' md.name ' has problem with rotated spc. Each line of diagnostic_ref should contain either only NaN values or no NaN values']);
+				message(['model not consistent: model ' md.name ' has problem with rotated spc. Each line of diagnostic_ref should contain either only NaN values or no NaN values']);
 			end
 			%CHECK THAT THE TWO VECTORS PROVIDED ARE ORTHOGONAL
@@ -391,5 +392,5 @@
 				if any(dot(md.diagnostic_ref(pos,1:3),md.diagnostic_ref(pos,4:6))),
 					dot(md.diagnostic_ref(pos,1:3),md.diagnostic_ref(pos,4:6))
-					error(['model not consistent: model ' md.name ' has problem with rotated spc. Vectors in diagnostic_ref (colums 1 to 3 and 4 to 6) must be orthogonal']);
+					message(['model not consistent: model ' md.name ' has problem with rotated spc. Vectors in diagnostic_ref (colums 1 to 3 and 4 to 6) must be orthogonal']);
 				end
 
@@ -399,5 +400,5 @@
 				pos=find(sum(isnan(md.diagnostic_ref),2)==0  & md.nodeonmacayeal);
 				if any(md.diagnostic_ref(pos,3:5)~=0);
-					error(['model not consistent: model ' md.name ' has problem with rotated spc. The rotation should be in the (x,y) plane for 2D diagnostic models (nodeonmacayeal)']);
+					message(['model not consistent: model ' md.name ' has problem with rotated spc. The rotation should be in the (x,y) plane for 2D diagnostic models (nodeonmacayeal)']);
 				end
 			end
@@ -421,5 +422,5 @@
 			end
 			if (md.ismacayealpattyn==0 && md.ishutter==0 && md.isstokes==0),
-				error(['model not consistent: no elements type set for this model. at least one of ismacayealpattyn, ishutter and isstokes need to be =1']);
+				message(['model not consistent: no elements type set for this model. at least one of ismacayealpattyn, ishutter and isstokes need to be =1']);
 			end
 			
@@ -435,5 +436,5 @@
 			end
 			if (md.ismacayealpattyn==0 && md.ishutter==0 && md.isstokes==0),
-				error(['model not consistent: no elements type set for this model. at least one of ismacayealpattyn, ishutter and isstokes need to be =1']);
+				message(['model not consistent: no elements type set for this model. at least one of ismacayealpattyn, ishutter and isstokes need to be =1']);
 			end
 			%}}}
@@ -469,5 +470,5 @@
 			if (md.dim==2),
 				if isnan(find(~md.spcthickness(:,1))),
-					error(['model not consistent: model ' md.name ' is totally constrained for prognostic, no need to solve!']);
+					message(['model not consistent: model ' md.name ' is totally constrained for prognostic, no need to solve!']);
 				end
 			end
@@ -487,5 +488,5 @@
 					return;
 				else
-					error(['model not consistent: for a ' EnumToString(md.solution_type) ' computation, the model must be 3d, extrude it first!'])
+					message(['model not consistent: for a ' EnumToString(md.solution_type) ' computation, the model must be 3d, extrude it first!'])
 				end
 			end
@@ -493,5 +494,5 @@
 			%CHECK THAT WE ARE NOT FULLY CONSTRAINED
 			if isnan(find(~md.spctemperature(:,1))),
-				error(['model not consistent: model ' md.name ' is totally constrained for temperature, no need to solve!']);
+				message(['model not consistent: model ' md.name ' is totally constrained for temperature, no need to solve!']);
 			end
 
@@ -525,5 +526,5 @@
 					return;
 				else
-					error(['model not consistent: for a ' EnumToString(md.solution_type) ' computation, the model must be 3d, extrude it first!'])
+					message(['model not consistent: for a ' EnumToString(md.solution_type) ' computation, the model must be 3d, extrude it first!'])
 				end
 			end
@@ -531,5 +532,5 @@
 			%CHECK THAT WE ARE NOT FULLY CONSTRAINED
 			if isnan(find(~md.spctemperature(:,1))),
-				error(['model not consistent: model ' md.name ' is totally constrained for temperature, no need to solve!']);
+				message(['model not consistent: model ' md.name ' is totally constrained for temperature, no need to solve!']);
 			end
 
@@ -570,5 +571,5 @@
 			%	if ~md.prognostic_DG,
 			%		if any(md.spcthickness(find(md.nodeonboundary))~=1),		 
-			%			error(['model not consistent: model ' md.name ' should have all the nodes on boundary constrained in field spcthickness']);			 
+			%			message(['model not consistent: model ' md.name ' should have all the nodes on boundary constrained in field spcthickness']);			 
 			%		end 
 			%	end
@@ -576,5 +577,5 @@
 			%Triangle with zero velocity
 			if any(sum(abs(md.vx(md.elements)),2)==0 & sum(abs(md.vy(md.elements)),2)==0)
-				error('model not consistent: at least one triangle has all its vertices with a zero velocity');
+				message('model not consistent: at least one triangle has all its vertices with a zero velocity');
 			end
 			%}}}
@@ -588,5 +589,5 @@
 			%SPC
 			if any(md.spcvelocity(find(md.nodeonboundary),[1:2])~=1),
-				error(['model not consistent: model ' md.name ' should have all the nodes on boundary constrained in field spcvelocity']);
+				message(['model not consistent: model ' md.name ' should have all the nodes on boundary constrained in field spcvelocity']);
 			end
 			%}}}
@@ -597,5 +598,5 @@
 		otherwise
 			disp(['WARNING: no check implemented for analysis ' EnumToString(analysis_enum) '!']);
-			error('stop')
+			message('stop')
 	end
 
@@ -610,5 +611,5 @@
 		eval(['field=md.' fields{i} ';']);
 		if length(field)~=fieldlength,
-			error(['model not consistent: field ' fields{i} ' length should be ' num2str(fieldlength)]);
+			message(['model not consistent: field ' fields{i} ' length should be ' num2str(fieldlength)]);
 		end
 	end
@@ -622,9 +623,9 @@
 		if isnan(fieldsize(1)),
 			if (size(field,2)~=fieldsize(2)),
-				error(['model not consistent: field ' fields{i} ' should have ' num2str(fieldsize(2)) ' columns']);
+				message(['model not consistent: field ' fields{i} ' should have ' num2str(fieldsize(2)) ' columns']);
 			end
 		elseif isnan(fieldsize(2)),
 			if (size(field,1)~=fieldsize(1)),
-				error(['model not consistent: field ' fields{i} ' should have ' num2str(fieldsize(1)) ' rows']);
+				message(['model not consistent: field ' fields{i} ' should have ' num2str(fieldsize(1)) ' rows']);
 			end
 		else
@@ -646,5 +647,5 @@
 					disp('!!! ');
 				end
-				error(['model not consistent: field ' fields{i} ' size should be ' num2str(fieldsize(1)) ' x ' num2str(fieldsize(2))]);
+				message(['model not consistent: field ' fields{i} ' size should be ' num2str(fieldsize(1)) ' x ' num2str(fieldsize(2))]);
 			end
 		end
@@ -658,5 +659,5 @@
 		eval(['field=reshape(md.' fields{i} ',[prod(size(md.' fields{i} ')) 1]);']);
 		if any(isnan(field)),
-			error(['model not consistent: NaN values found in field ' fields{i}]);
+			message(['model not consistent: NaN values found in field ' fields{i}]);
 		end
 	end
@@ -669,5 +670,5 @@
 		eval(['field=reshape(md.' fields{i} ',[prod(size(md.' fields{i} ')) 1]);']);
 		if any(~isreal(field)),
-			error(['model not consistent: complex values found in field ' fields{i}]);
+			message(['model not consistent: complex values found in field ' fields{i}]);
 		end
 	end
@@ -680,5 +681,5 @@
 		eval(['field=reshape(md.' fields{i} ',[prod(size(md.' fields{i} ')) 1]);']);
 		if any(field<=lowerbound),
-			error(['model not consistent: field ' fields{i} ' should have values stricly above ' num2str(lowerbound)]);
+			message(['model not consistent: field ' fields{i} ' should have values stricly above ' num2str(lowerbound)]);
 		end
 	end
@@ -691,5 +692,5 @@
 		eval(['field=reshape(md.' fields{i} ',[prod(size(md.' fields{i} ')) 1]);']);
 		if any(field<lowerbound),
-			error(['model not consistent: field ' fields{i} ' should have values above ' num2str(lowerbound)]);
+			message(['model not consistent: field ' fields{i} ' should have values above ' num2str(lowerbound)]);
 		end
 	end
@@ -702,5 +703,5 @@
 		eval(['field=reshape(md.' fields{i} ',[prod(size(md.' fields{i} ')) 1]);']);
 		if any(field>=upperbound),
-			error(['model not consistent: field ' fields{i} ' should have values stricly below ' num2str(upperbound)]);
+			message(['model not consistent: field ' fields{i} ' should have values stricly below ' num2str(upperbound)]);
 		end
 	end
@@ -713,5 +714,5 @@
 		eval(['field=reshape(md.' fields{i} ',[prod(size(md.' fields{i} ')) 1]);']);
 		if any(field>upperbound),
-			error(['model not consistent: field ' fields{i} ' should have values below ' num2str(upperbound)]);
+			message(['model not consistent: field ' fields{i} ' should have values below ' num2str(upperbound)]);
 		end
 	end
@@ -724,7 +725,36 @@
 		eval(['field=reshape(md.' fields{i} ',[prod(size(md.' fields{i} ')) 1]);']);
 		if any(~ismember(field,values)),
-			error(['model not consistent: field ' fields{i} ' should have values in ' num2str(values)]);
-		end
-	end
-end
-%}}}
+			message(['model not consistent: field ' fields{i} ' should have values in ' num2str(values)]);
+		end
+	end
+end
+%}}}
+
+%error messages
+%modelconsistency{{{1
+function flag=modelconsistency(flag_in)
+
+	persistent consistency;
+
+	if nargin==1 & nargout==0,
+		%OK model is inconsistent, set flag as false
+		consistency=false;
+	elseif nargin==0 & nargout==1,
+		if isempty(consistency),
+			%modelinconsistent has never been called, model is consistent
+			consistency=true;
+		end
+	else
+		message('Bad usage');
+	end
+
+	flag=consistency;
+end
+%}}}
+%message{{{1
+function message(string)
+
+	disp(string);
+	modelconsistency(false);
+end
+%}}}
