Index: /issm/trunk/src/c/shared/Numerics/Synchronize.sh
===================================================================
--- /issm/trunk/src/c/shared/Numerics/Synchronize.sh	(revision 6301)
+++ /issm/trunk/src/c/shared/Numerics/Synchronize.sh	(revision 6301)
@@ -0,0 +1,40 @@
+#!/bin/bash
+#Synchronize Verbosity
+#first remove existing files
+rm $ISSM_TIER/src/m/shared/Verb*.m
+
+echo "Synchronizing Verbosity levels..."
+
+#Get all lines of Verbosity.cpp
+cat Verbosity.cpp | grep "bool" | grep "GetVerbosityLevel()" | awk '{ printf "%s %s\n", NR, $0 }' > temp
+
+#get number of lines in temp
+NUMBEROFLINES=$(wc -l temp | awk '{printf("%s",$1);}');
+
+# go through the lines of temp
+for (( i=1 ; i<=$NUMBEROFLINES ; i++ )); do
+
+	#Get name of the line i
+	FILENAME=$(cat temp | grep "^[ ]*$i " | awk '{printf("%s",$3);}');
+	ENUM=$(cat temp | grep "^[ ]*$i " | awk '{printf("%s",$7);}');
+
+	#Add Verbosity Matlab file{{{
+	cat <<END > $ISSM_TIER"/src/m/shared/"$(echo $FILENAME".m")
+function bool=$(echo $FILENAME)()
+%$(echo $FILENAME | awk {'print toupper($1)'}) - Enum of $(echo $NAME)
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/shared/Numerics/Synchronize.sh
+%            Please read src/c/shared/Numerics/README for more information
+%
+%   Usage:
+%      bool=$FILENAME()
+
+bool=logical(bitand(GetVerbosityLevel(),$ENUM));
+END
+#}}}
+
+done
+#clean up{{{
+rm temp
+#}}}
Index: /issm/trunk/src/c/shared/Numerics/Verbosity.cpp
===================================================================
--- /issm/trunk/src/c/shared/Numerics/Verbosity.cpp	(revision 6300)
+++ /issm/trunk/src/c/shared/Numerics/Verbosity.cpp	(revision 6301)
@@ -1,25 +1,64 @@
+
 /*include*/
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+   #include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
 #include "./Verbosity.h"
+#include "../../include/macros.h"
+#include "../Exceptions/exceptions.h"
+#ifdef _SERIAL_
+#include <mex.h>
+#endif
+/*}}}*/
 
-/*Element macros*/
-#define MODULE 1 /*2^0 -> 000000001*/
-#define CONVER 2 /*2^1 -> 000000010*/
-#define PROCES 4 /*2^2 -> 000000100*/
-#define SOLVER 8 /*2^3 -> 000001000*/
+/*Verbosityt levels*/
+bool VerbModule   (void){return (GetVerbosityLevel() & 1 );}/* 2^0 -> 000000001*/
+bool VerbConverge (void){return (GetVerbosityLevel() & 2 );}/* 2^1 -> 000000010*/
+bool VerbModProc  (void){return (GetVerbosityLevel() & 4 );}/* 2^2 -> 000000100*/
+bool VerbSolver   (void){return (GetVerbosityLevel() & 8 );}/* 2^3 -> 000001000*/
 
-bool IsModuleVerbosity(int level){
-	if(level & MODULE) return true;
-	else return false;
-}
-bool IsConvergenceVerbosity(int level){
-	if(level & CONVER) return true;
-	else return false;
-}
-bool IsModelProcessorVerbosity(int level){
-	if(level & PROCES) return true;
-	else return false;
-}
-bool IsSolverVerbosity(int level){
-	if(level & SOLVER) return true;
-	else return false;
-}
+/*Verbosity Setup*/
+static int verbositylevel=-1;
+/*FUNCTION SetVerbosityLevel {{{1*/
+void SetVerbosityLevel(int level){
+
+	if(level<0) ISSMERROR("vebosity level should be a positive integer (user provided %i)",level);
+
+#ifdef _SERIAL_
+
+	mxArray* output=NULL;
+	mxArray* input=NULL;
+	input=mxCreateDoubleScalar((double)level);
+
+	mexCallMATLAB(0,&output,1,&input,"SetVerbosityLevel");
+#else
+
+	verbositylevel = level;
+
+#endif
+
+}/*}}}*/
+/*FUNCTION GetVerbosityLevel {{{1*/
+int  GetVerbosityLevel(void){
+
+#ifdef _SERIAL_
+
+	mxArray* output=NULL;
+	mxArray* input=NULL;
+	double   level;
+
+	mexCallMATLAB(1,&output,0,&input,"GetVerbosityLevel");
+	level=mxGetScalar(output);
+
+	verbositylevel = (int)level;
+
+#else
+
+	ISSMASSERT(verbositylevel>=0);
+	return verbositylevel;
+
+#endif
+}/*}}}*/
Index: /issm/trunk/src/c/shared/Numerics/Verbosity.h
===================================================================
--- /issm/trunk/src/c/shared/Numerics/Verbosity.h	(revision 6300)
+++ /issm/trunk/src/c/shared/Numerics/Verbosity.h	(revision 6301)
@@ -6,8 +6,11 @@
 #define _VERBOSITY_H_
 
-bool IsModuleVerbosity(int level);
-bool IsConvergenceVerbosity(int level);
-bool IsModelProcessorVerbosity(int level);
-bool IsSolverVerbosity(int level);
+void SetVerbosityLevel(int level);
+int  GetVerbosityLevel(void);
+
+bool VerbModule(void);
+bool VerbConvergence(void);
+bool VerbModelProcessor(void);
+bool VerbSolver(void);
 
 #endif
