Index: /issm/trunk/src/c/Makefile.am
===================================================================
--- /issm/trunk/src/c/Makefile.am	(revision 7738)
+++ /issm/trunk/src/c/Makefile.am	(revision 7739)
@@ -113,16 +113,16 @@
 					./objects/Options/Option.cpp\
 					./objects/Options/Option.h\
-					./objects/Options/OptionsDouble.cpp\
-					./objects/Options/OptionsDouble.h\
-					./objects/Options/OptionsLogical.cpp\
-					./objects/Options/OptionsLogical.h\
-					./objects/Options/OptionsChar.cpp\
-					./objects/Options/OptionsChar.h\
-					./objects/Options/OptionsStruct.cpp\
-					./objects/Options/OptionsStruct.h\
-					./objects/Options/OptionsCell.cpp\
-					./objects/Options/OptionsCell.h\
-					./objects/Options/OptionsUtilities.cpp\
-					./objects/Options/OptionsUtilities.h\
+					./objects/Options/OptionDouble.cpp\
+					./objects/Options/OptionDouble.h\
+					./objects/Options/OptionLogical.cpp\
+					./objects/Options/OptionLogical.h\
+					./objects/Options/OptionChar.cpp\
+					./objects/Options/OptionChar.h\
+					./objects/Options/OptionStruct.cpp\
+					./objects/Options/OptionStruct.h\
+					./objects/Options/OptionCell.cpp\
+					./objects/Options/OptionCell.h\
+					./objects/Options/OptionUtilities.cpp\
+					./objects/Options/OptionUtilities.h\
 					./objects/Gauss/GaussTria.h\
 					./objects/Gauss/GaussTria.cpp\
@@ -390,5 +390,5 @@
 					./io/FetchParams.cpp\
 					./io/FetchNodeSets.cpp\
-					./io/OptionsParse.cpp\
+					./io/OptionParse.cpp\
 					./io/pfopen.cpp\
 					./io/pfclose.cpp\
@@ -754,16 +754,16 @@
 					./objects/Options/Option.cpp\
 					./objects/Options/Option.h\
-					./objects/Options/OptionsDouble.cpp\
-					./objects/Options/OptionsDouble.h\
-					./objects/Options/OptionsLogical.cpp\
-					./objects/Options/OptionsLogical.h\
-					./objects/Options/OptionsChar.cpp\
-					./objects/Options/OptionsChar.h\
-					./objects/Options/OptionsStruct.cpp\
-					./objects/Options/OptionsStruct.h\
-					./objects/Options/OptionsCell.cpp\
-					./objects/Options/OptionsCell.h\
-					./objects/Options/OptionsUtilities.cpp\
-					./objects/Options/OptionsUtilities.h\
+					./objects/Options/OptionDouble.cpp\
+					./objects/Options/OptionDouble.h\
+					./objects/Options/OptionLogical.cpp\
+					./objects/Options/OptionLogical.h\
+					./objects/Options/OptionChar.cpp\
+					./objects/Options/OptionChar.h\
+					./objects/Options/OptionStruct.cpp\
+					./objects/Options/OptionStruct.h\
+					./objects/Options/OptionCell.cpp\
+					./objects/Options/OptionCell.h\
+					./objects/Options/OptionUtilities.cpp\
+					./objects/Options/OptionUtilities.h\
 					./objects/Update.h\
 					./objects/Element.h\
Index: /issm/trunk/src/c/io/OptionParse.cpp
===================================================================
--- /issm/trunk/src/c/io/OptionParse.cpp	(revision 7739)
+++ /issm/trunk/src/c/io/OptionParse.cpp	(revision 7739)
@@ -0,0 +1,234 @@
+/*\file OptionParse.c
+ *\brief: functions to parse the mex options.
+ */
+#ifdef HAVE_CONFIG_H
+    #include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "./io.h"
+#include "../shared/shared.h"
+#include "../include/include.h"
+
+#ifdef _SERIAL_
+#include <mex.h>
+
+/*FUNCTION OptionParse{{{1*/
+Option* OptionParse(char* name, const mxArray* prhs[]){
+
+	Option *oobject = NULL;
+	mxArray       *lhs[1];
+
+	/*parse the value according to the matlab data type  */
+	if      (mxIsDouble(prhs[0]))
+		oobject=(Option*)OptionDoubleParse(name,prhs);
+	else if (mxIsLogical(prhs[0]))
+		oobject=(Option*)OptionLogicalParse(name,prhs);
+	else if (mxIsChar(prhs[0]))
+		oobject=(Option*)OptionCharParse(name,prhs);
+	else if (mxIsStruct(prhs[0]))
+		oobject=(Option*)OptionStructParse(name,prhs);
+	else if (mxIsCell(prhs[0]))
+		oobject=(Option*)OptionCellParse(name,prhs);
+	else {
+		_printf_(true,"  Converting value of option \"%s\" from unrecognized class \"%s\" to class \"%s\".\n",name,mxGetClassName(prhs[0]),"struct");
+		if (!mexCallMATLAB(1,lhs,1,(mxArray**)prhs,"struct")) {
+			oobject=(Option*)OptionStructParse(name,(const mxArray**)lhs);
+			mxDestroyArray(lhs[0]);
+		}
+		else _error_("Second argument value of option \"%s\" is of unrecognized class \"%s\".",name,mxGetClassName(prhs[0]));
+	}
+
+	return(oobject);
+}/*}}}*/
+/*FUNCTION OptionDoubleParse {{{1*/
+OptionDouble* OptionDoubleParse( char* name, const mxArray* prhs[]){
+
+	OptionDouble *odouble = NULL;
+	const mwSize  *ipt     = NULL;
+
+	/*check and parse the name  */
+	odouble=new OptionDouble;
+	odouble->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
+	strcpy(odouble->name,name);
+
+	/*check and parse the value  */
+	if (!mxIsDouble(prhs[0])){
+		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",odouble->name,"double",odouble->name,mxGetClassName(prhs[0]));
+	}
+
+	odouble->numel=mxGetNumberOfElements(prhs[0]);
+	odouble->ndims=mxGetNumberOfDimensions(prhs[0]);
+	ipt           =mxGetDimensions(prhs[0]);
+	odouble->size =(int *) xmalloc(odouble->ndims*sizeof(int));
+	for (int i=0; i<odouble->ndims; i++) odouble->size[i]=(int)ipt[i];
+
+	//  note that FetchData does not correctly handle ndims >= 3
+	if (odouble->ndims > 2) {
+		_printf_(true,"WARNING -- option \"%s\" of class \"%s\" has ndims=%d and will be skipped.\n",odouble->name,mxGetClassName(prhs[0]),odouble->ndims);
+	}
+	else FetchData(&odouble->values,NULL,NULL,prhs[0]);
+
+	return(odouble);
+}/*}}}*/
+/*FUNCTION OptionLogicalParse {{{1*/
+OptionLogical* OptionLogicalParse( char* name, const mxArray* prhs[]){
+
+	OptionLogical *ological = NULL;
+	const mwSize   *ipt      = NULL;
+	bool            btemp;
+
+	/*check and parse the name  */
+	ological=new OptionLogical;
+	ological->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
+	strcpy(ological->name,name);
+
+	/*check and parse the value  */
+	if (!mxIsLogical(prhs[0])){
+		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ological->name,"logical",ological->name,mxGetClassName(prhs[0]));
+	}
+
+	ological->numel=mxGetNumberOfElements(prhs[0]);
+	ological->ndims=mxGetNumberOfDimensions(prhs[0]);
+	ipt            =mxGetDimensions(prhs[0]);
+	ological->size =(int *) xmalloc(ological->ndims*sizeof(int));
+	for (int i=0; i<ological->ndims; i++) ological->size[i]=(int)ipt[i];
+
+	//  note that FetchData does not correctly handle non-scalar logicals
+	if (ological->ndims > 2 || ological->size[0] > 1 || ological->size[1] > 1) {
+		_printf_(true,"WARNING -- option \"%s\" of class \"%s\" is more than [1x1] and will be skipped.\n",ological->name,mxGetClassName(prhs[0]));
+	}
+	else {
+		//FetchData(&ological->values,prhs[0]);
+		//could be memory leak until FetchData handles logical arrays
+		ological->values=(bool *) xmalloc(sizeof(bool));
+		FetchData(ological->values,prhs[0]);
+	}
+
+	return(ological);
+}/*}}}*/
+/*FUNCTION OptionCharParse {{{1*/
+OptionChar* OptionCharParse( char* name, const mxArray* prhs[]){
+
+	OptionChar  *ochar = NULL;
+	const mwSize *ipt   = NULL;
+
+	/*check and parse the name  */
+	ochar=new OptionChar;
+	ochar->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
+	strcpy(ochar->name,name);
+
+	/*check and parse the value  */
+	if (!mxIsChar(prhs[0])){
+		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ochar->name,"char",ochar->name,mxGetClassName(prhs[0]));
+	}
+
+	ochar->numel=mxGetNumberOfElements(prhs[0]);
+	ochar->ndims=mxGetNumberOfDimensions(prhs[0]);
+	ipt         =mxGetDimensions(prhs[0]);
+	ochar->size =(int *) xmalloc(ochar->ndims*sizeof(int));
+	for(int i=0; i<ochar->ndims; i++) ochar->size[i]=(int)ipt[i];
+
+	//note that FetchData does not correctly handle ndims >= 2 or multiple rows
+	if (ochar->ndims > 2 || ochar->size[0] > 1) {
+		_printf_(true,"WARNING -- option \"%s\" of class \"%s\" is more than [1xn] and will be skipped.\n",ochar->name,mxGetClassName(prhs[0]));
+	}
+	else FetchData(&ochar->values,prhs[0]);
+
+	return(ochar);
+}/*}}}*/
+/*FUNCTION OptionStructParse {{{1*/
+OptionStruct* OptionStructParse( char* name, const mxArray* prhs[]){
+
+	int            i;
+	char           namei[161];
+	OptionStruct *ostruct    = NULL;
+	Option *oobject    = NULL;
+	const mwSize  *ipt        = NULL;
+	const mxArray *structi;
+	mwIndex        sindex;
+
+	/*check and parse the name  */
+	ostruct=new OptionStruct;
+	ostruct->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
+	strcpy(ostruct->name,name);
+
+	/*check and parse the value  */
+	if (!mxIsStruct(prhs[0])){
+		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ostruct->name,"struct",ostruct->name,mxGetClassName(prhs[0]));
+	}
+
+	ostruct->numel=mxGetNumberOfElements(prhs[0]);
+	ostruct->ndims=mxGetNumberOfDimensions(prhs[0]);
+	ipt           =mxGetDimensions(prhs[0]);
+	ostruct->size =(int *) xmalloc(ostruct->ndims*sizeof(int));
+	for (i=0; i<ostruct->ndims; i++) ostruct->size[i]=(int)ipt[i];
+	if (ostruct->numel) ostruct->values=(Options**) xmalloc(ostruct->numel*sizeof(Options *));
+
+	/*loop through and process each element of the struct array  */
+	for (sindex=0; sindex<ostruct->numel; sindex++) {
+		ostruct->values[sindex]=new Options;
+
+		/*loop through and process each field for the element  */
+		for (i=0; i<mxGetNumberOfFields(prhs[0]); i++) {
+			sprintf(namei,"%s.%s",name,mxGetFieldNameByNumber(prhs[0],i));
+			structi=mxGetFieldByNumber(prhs[0],sindex,i);
+
+			oobject=(Option*)OptionParse(namei,&structi);
+			ostruct->values[sindex]->AddObject((Object*)oobject);
+			oobject=NULL;
+		}
+	}
+
+	return(ostruct);
+}/*}}}*/
+/*FUNCTION OptionCellParse {{{1*/
+OptionCell* OptionCellParse( char* name, const mxArray* prhs[]){
+
+	int            i;
+	int           *dims;
+	char           namei[161];
+	char           cstr[81];
+	OptionCell   *ocell      = NULL;
+	Option *oobject    = NULL;
+	const mwSize  *ipt        = NULL;
+	const mxArray *celli;
+	mwIndex        cindex;
+
+	/*check and parse the name  */
+	ocell=new OptionCell;
+	ocell->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
+	strcpy(ocell->name,name);
+
+	/*check and parse the value  */
+	if (!mxIsCell(prhs[0])){
+		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ocell->name,"cell",ocell->name,mxGetClassName(prhs[0]));
+	}
+
+	ocell->numel=mxGetNumberOfElements(prhs[0]);
+	ocell->ndims=mxGetNumberOfDimensions(prhs[0]);
+	ipt         =mxGetDimensions(prhs[0]);
+	ocell->size =(int *) xmalloc(ocell->ndims*sizeof(int));
+	for (i=0; i<ocell->ndims; i++)
+		ocell->size[i]=(int)ipt[i];
+	ocell->values=new Options;
+
+	/*loop through and process each element of the cell array  */
+	dims=(int *) xmalloc(ocell->ndims*sizeof(int));
+	for (cindex=0; cindex<ocell->numel; cindex++) {
+		ColumnWiseDimsFromIndex(dims,(int)cindex,ocell->size,ocell->ndims);
+		StringFromDims(cstr,dims,ocell->ndims);
+		sprintf(namei,"%s%s",name,cstr);
+		celli=mxGetCell(prhs[0],cindex);
+
+		oobject=(Option*)OptionParse(namei,&celli);
+		ocell->values->AddObject((Object*)oobject);
+		oobject=NULL;
+	}
+	xfree((void**)&dims);
+
+	return(ocell);
+}/*}}}*/
+
+#endif
Index: sm/trunk/src/c/io/OptionsParse.cpp
===================================================================
--- /issm/trunk/src/c/io/OptionsParse.cpp	(revision 7738)
+++ 	(revision )
@@ -1,234 +1,0 @@
-/*\file OptionsParse.c
- *\brief: functions to parse the mex options.
- */
-#ifdef HAVE_CONFIG_H
-    #include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "./io.h"
-#include "../shared/shared.h"
-#include "../include/include.h"
-
-#ifdef _SERIAL_
-#include <mex.h>
-
-/*FUNCTION OptionParse{{{1*/
-Option* OptionParse(char* name, const mxArray* prhs[]){
-
-	Option *oobject = NULL;
-	mxArray       *lhs[1];
-
-	/*parse the value according to the matlab data type  */
-	if      (mxIsDouble(prhs[0]))
-		oobject=(Option*)OptionsDoubleParse(name,prhs);
-	else if (mxIsLogical(prhs[0]))
-		oobject=(Option*)OptionsLogicalParse(name,prhs);
-	else if (mxIsChar(prhs[0]))
-		oobject=(Option*)OptionsCharParse(name,prhs);
-	else if (mxIsStruct(prhs[0]))
-		oobject=(Option*)OptionsStructParse(name,prhs);
-	else if (mxIsCell(prhs[0]))
-		oobject=(Option*)OptionsCellParse(name,prhs);
-	else {
-		_printf_(true,"  Converting value of option \"%s\" from unrecognized class \"%s\" to class \"%s\".\n",name,mxGetClassName(prhs[0]),"struct");
-		if (!mexCallMATLAB(1,lhs,1,(mxArray**)prhs,"struct")) {
-			oobject=(Option*)OptionsStructParse(name,(const mxArray**)lhs);
-			mxDestroyArray(lhs[0]);
-		}
-		else _error_("Second argument value of option \"%s\" is of unrecognized class \"%s\".",name,mxGetClassName(prhs[0]));
-	}
-
-	return(oobject);
-}/*}}}*/
-/*FUNCTION OptionsDoubleParse {{{1*/
-OptionsDouble* OptionsDoubleParse( char* name, const mxArray* prhs[]){
-
-	OptionsDouble *odouble = NULL;
-	const mwSize  *ipt     = NULL;
-
-	/*check and parse the name  */
-	odouble=new OptionsDouble;
-	odouble->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
-	strcpy(odouble->name,name);
-
-	/*check and parse the value  */
-	if (!mxIsDouble(prhs[0])){
-		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",odouble->name,"double",odouble->name,mxGetClassName(prhs[0]));
-	}
-
-	odouble->numel=mxGetNumberOfElements(prhs[0]);
-	odouble->ndims=mxGetNumberOfDimensions(prhs[0]);
-	ipt           =mxGetDimensions(prhs[0]);
-	odouble->size =(int *) xmalloc(odouble->ndims*sizeof(int));
-	for (int i=0; i<odouble->ndims; i++) odouble->size[i]=(int)ipt[i];
-
-	//  note that FetchData does not correctly handle ndims >= 3
-	if (odouble->ndims > 2) {
-		_printf_(true,"WARNING -- option \"%s\" of class \"%s\" has ndims=%d and will be skipped.\n",odouble->name,mxGetClassName(prhs[0]),odouble->ndims);
-	}
-	else FetchData(&odouble->values,NULL,NULL,prhs[0]);
-
-	return(odouble);
-}/*}}}*/
-/*FUNCTION OptionsLogicalParse {{{1*/
-OptionsLogical* OptionsLogicalParse( char* name, const mxArray* prhs[]){
-
-	OptionsLogical *ological = NULL;
-	const mwSize   *ipt      = NULL;
-	bool            btemp;
-
-	/*check and parse the name  */
-	ological=new OptionsLogical;
-	ological->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
-	strcpy(ological->name,name);
-
-	/*check and parse the value  */
-	if (!mxIsLogical(prhs[0])){
-		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ological->name,"logical",ological->name,mxGetClassName(prhs[0]));
-	}
-
-	ological->numel=mxGetNumberOfElements(prhs[0]);
-	ological->ndims=mxGetNumberOfDimensions(prhs[0]);
-	ipt            =mxGetDimensions(prhs[0]);
-	ological->size =(int *) xmalloc(ological->ndims*sizeof(int));
-	for (int i=0; i<ological->ndims; i++) ological->size[i]=(int)ipt[i];
-
-	//  note that FetchData does not correctly handle non-scalar logicals
-	if (ological->ndims > 2 || ological->size[0] > 1 || ological->size[1] > 1) {
-		_printf_(true,"WARNING -- option \"%s\" of class \"%s\" is more than [1x1] and will be skipped.\n",ological->name,mxGetClassName(prhs[0]));
-	}
-	else {
-		//FetchData(&ological->values,prhs[0]);
-		//could be memory leak until FetchData handles logical arrays
-		ological->values=(bool *) xmalloc(sizeof(bool));
-		FetchData(ological->values,prhs[0]);
-	}
-
-	return(ological);
-}/*}}}*/
-/*FUNCTION OptionsCharParse {{{1*/
-OptionsChar* OptionsCharParse( char* name, const mxArray* prhs[]){
-
-	OptionsChar  *ochar = NULL;
-	const mwSize *ipt   = NULL;
-
-	/*check and parse the name  */
-	ochar=new OptionsChar;
-	ochar->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
-	strcpy(ochar->name,name);
-
-	/*check and parse the value  */
-	if (!mxIsChar(prhs[0])){
-		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ochar->name,"char",ochar->name,mxGetClassName(prhs[0]));
-	}
-
-	ochar->numel=mxGetNumberOfElements(prhs[0]);
-	ochar->ndims=mxGetNumberOfDimensions(prhs[0]);
-	ipt         =mxGetDimensions(prhs[0]);
-	ochar->size =(int *) xmalloc(ochar->ndims*sizeof(int));
-	for(int i=0; i<ochar->ndims; i++) ochar->size[i]=(int)ipt[i];
-
-	//note that FetchData does not correctly handle ndims >= 2 or multiple rows
-	if (ochar->ndims > 2 || ochar->size[0] > 1) {
-		_printf_(true,"WARNING -- option \"%s\" of class \"%s\" is more than [1xn] and will be skipped.\n",ochar->name,mxGetClassName(prhs[0]));
-	}
-	else FetchData(&ochar->values,prhs[0]);
-
-	return(ochar);
-}/*}}}*/
-/*FUNCTION OptionsStructParse {{{1*/
-OptionsStruct* OptionsStructParse( char* name, const mxArray* prhs[]){
-
-	int            i;
-	char           namei[161];
-	OptionsStruct *ostruct    = NULL;
-	Option *oobject    = NULL;
-	const mwSize  *ipt        = NULL;
-	const mxArray *structi;
-	mwIndex        sindex;
-
-	/*check and parse the name  */
-	ostruct=new OptionsStruct;
-	ostruct->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
-	strcpy(ostruct->name,name);
-
-	/*check and parse the value  */
-	if (!mxIsStruct(prhs[0])){
-		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ostruct->name,"struct",ostruct->name,mxGetClassName(prhs[0]));
-	}
-
-	ostruct->numel=mxGetNumberOfElements(prhs[0]);
-	ostruct->ndims=mxGetNumberOfDimensions(prhs[0]);
-	ipt           =mxGetDimensions(prhs[0]);
-	ostruct->size =(int *) xmalloc(ostruct->ndims*sizeof(int));
-	for (i=0; i<ostruct->ndims; i++) ostruct->size[i]=(int)ipt[i];
-	if (ostruct->numel) ostruct->values=(Options**) xmalloc(ostruct->numel*sizeof(Options *));
-
-	/*loop through and process each element of the struct array  */
-	for (sindex=0; sindex<ostruct->numel; sindex++) {
-		ostruct->values[sindex]=new Options;
-
-		/*loop through and process each field for the element  */
-		for (i=0; i<mxGetNumberOfFields(prhs[0]); i++) {
-			sprintf(namei,"%s.%s",name,mxGetFieldNameByNumber(prhs[0],i));
-			structi=mxGetFieldByNumber(prhs[0],sindex,i);
-
-			oobject=(Option*)OptionParse(namei,&structi);
-			ostruct->values[sindex]->AddObject((Object*)oobject);
-			oobject=NULL;
-		}
-	}
-
-	return(ostruct);
-}/*}}}*/
-/*FUNCTION OptionsCellParse {{{1*/
-OptionsCell* OptionsCellParse( char* name, const mxArray* prhs[]){
-
-	int            i;
-	int           *dims;
-	char           namei[161];
-	char           cstr[81];
-	OptionsCell   *ocell      = NULL;
-	Option *oobject    = NULL;
-	const mwSize  *ipt        = NULL;
-	const mxArray *celli;
-	mwIndex        cindex;
-
-	/*check and parse the name  */
-	ocell=new OptionsCell;
-	ocell->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
-	strcpy(ocell->name,name);
-
-	/*check and parse the value  */
-	if (!mxIsCell(prhs[0])){
-		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ocell->name,"cell",ocell->name,mxGetClassName(prhs[0]));
-	}
-
-	ocell->numel=mxGetNumberOfElements(prhs[0]);
-	ocell->ndims=mxGetNumberOfDimensions(prhs[0]);
-	ipt         =mxGetDimensions(prhs[0]);
-	ocell->size =(int *) xmalloc(ocell->ndims*sizeof(int));
-	for (i=0; i<ocell->ndims; i++)
-		ocell->size[i]=(int)ipt[i];
-	ocell->values=new Options;
-
-	/*loop through and process each element of the cell array  */
-	dims=(int *) xmalloc(ocell->ndims*sizeof(int));
-	for (cindex=0; cindex<ocell->numel; cindex++) {
-		ColumnWiseDimsFromIndex(dims,(int)cindex,ocell->size,ocell->ndims);
-		StringFromDims(cstr,dims,ocell->ndims);
-		sprintf(namei,"%s%s",name,cstr);
-		celli=mxGetCell(prhs[0],cindex);
-
-		oobject=(Option*)OptionParse(namei,&celli);
-		ocell->values->AddObject((Object*)oobject);
-		oobject=NULL;
-	}
-	xfree((void**)&dims);
-
-	return(ocell);
-}/*}}}*/
-
-#endif
Index: /issm/trunk/src/c/io/io.h
===================================================================
--- /issm/trunk/src/c/io/io.h	(revision 7738)
+++ /issm/trunk/src/c/io/io.h	(revision 7739)
@@ -59,9 +59,9 @@
 
 Option* OptionParse(char* name, const mxArray* prhs[]);
-OptionsDouble*   OptionsDoubleParse( char* name, const mxArray* prhs[]);
-OptionsLogical*  OptionsLogicalParse( char* name, const mxArray* prhs[]);
-OptionsChar*     OptionsCharParse( char* name, const mxArray* prhs[]);
-OptionsStruct*   OptionsStructParse( char* name, const mxArray* prhs[]);
-OptionsCell*     OptionsCellParse( char* name, const mxArray* prhs[]);
+OptionDouble*   OptionDoubleParse( char* name, const mxArray* prhs[]);
+OptionLogical*  OptionLogicalParse( char* name, const mxArray* prhs[]);
+OptionChar*     OptionCharParse( char* name, const mxArray* prhs[]);
+OptionStruct*   OptionStructParse( char* name, const mxArray* prhs[]);
+OptionCell*     OptionCellParse( char* name, const mxArray* prhs[]);
 
 #endif
Index: /issm/trunk/src/c/objects/Options/OptionCell.cpp
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionCell.cpp	(revision 7739)
+++ /issm/trunk/src/c/objects/Options/OptionCell.cpp	(revision 7739)
@@ -0,0 +1,127 @@
+/*!\file OptionCell.cpp
+ * \brief: implementation of the optionscell object
+ */
+
+/*Headers:*/
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include <string.h>
+#include "../objects.h"
+#include "../../shared/shared.h"
+#include "../../Container/Container.h"
+#include "../../include/include.h"
+/*}}}*/
+
+/*Constructors/destructor/copy*/
+/*FUNCTION OptionCell::OptionCell(){{{1*/
+OptionCell::OptionCell(){
+
+	values    =NULL;
+
+}
+/*}}}*/
+/*FUNCTION OptionCell::~OptionCell(){{{1*/
+OptionCell::~OptionCell(){
+
+	if (values){
+		delete values;
+		values    =NULL;
+	}
+
+}
+/*}}}*/
+
+/*Other*/
+/*FUNCTION OptionCell::Echo {{{1*/
+void  OptionCell::Echo(){
+
+	char cstr[81];
+	bool flag     = true;
+
+	_printf_(flag,"OptionCell Echo:\n");
+	Option::Echo();
+
+	if (values && size) {
+		StringFromSize(cstr,size,ndims);
+		_printf_(flag,"        values: %s %s\n" ,cstr,"cell");
+	}
+	else _printf_(flag,"        values: [empty]\n" );
+}
+/*}}}*/
+/*FUNCTION OptionCell::DeepEcho() {{{1*/
+void  OptionCell::DeepEcho(){
+
+	char  indent[81]="";
+
+	OptionCell::DeepEcho(indent);
+
+	return;
+}
+/*}}}*/
+/*FUNCTION OptionCell::DeepEcho(char* indent) {{{1*/
+void  OptionCell::DeepEcho(char* indent){
+
+	int   i;
+	int*  dims;
+	char  indent2[81];
+	char  cstr[81];
+	bool  flag=true;
+
+	_printf_(flag,"%sOptionCell DeepEcho:\n",indent);
+	Option::DeepEcho(indent);
+
+	strcpy(indent2,indent);
+	strcat(indent2,"  ");
+
+	if (values->Size()) {
+		dims=(int *) xmalloc(ndims*sizeof(int));
+		for (i=0; i<values->Size(); i++) {
+			ColumnWiseDimsFromIndex(dims,i,size,ndims);
+			StringFromDims(cstr,dims,ndims);
+			_printf_(flag,"%s        values: %s begin\n" ,indent,cstr);
+			((Option *)values->GetObjectByOffset(i))->DeepEcho(indent2);
+			_printf_(flag,"%s        values: %s end\n"   ,indent,cstr);
+		}
+		xfree((void**)&dims);
+	}
+	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+}
+/*}}}*/
+/*FUNCTION OptionCell::Name {{{1*/
+char* OptionCell::Name(){
+
+	return(Option::Name());
+}
+/*}}}*/
+/*FUNCTION OptionCell::NumEl {{{1*/
+int   OptionCell::NumEl(){
+
+	return(Option::NumEl());
+}
+/*}}}*/
+/*FUNCTION OptionCell::NDims {{{1*/
+int   OptionCell::NDims(){
+
+	return(Option::NDims());
+}
+/*}}}*/
+/*FUNCTION OptionCell::Size {{{1*/
+int*  OptionCell::Size(){
+
+	return(Option::Size());
+}
+/*}}}*/
+/*FUNCTION OptionCell::Get {{{1*/
+//void* OptionCell::Get(){
+
+//	;
+
+//	return;
+//}
+/*}}}*/
Index: /issm/trunk/src/c/objects/Options/OptionCell.h
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionCell.h	(revision 7739)
+++ /issm/trunk/src/c/objects/Options/OptionCell.h	(revision 7739)
@@ -0,0 +1,49 @@
+/*! \file OptionCell.h 
+ *  \brief: header file for optionscell object
+ */
+
+#ifndef _OPTIONSCELL_H_
+#define _OPTIONSCELL_H_
+
+/*Headers:{{{1*/
+#include "../../include/include.h"
+#include "../../shared/Exceptions/exceptions.h"
+#include "../../EnumDefinitions/EnumDefinitions.h"
+
+#include "./Option.h"
+/*}}}*/
+
+class OptionCell: public Option {
+
+	public:
+
+		Options* values;
+
+		/*OptionCell constructors, destructors {{{1*/
+		OptionCell();
+		~OptionCell();
+		/*}}}*/
+		/*Object virtual functions definitions:{{{1*/
+		void  Echo();
+		void  DeepEcho();
+		void  DeepEcho(char* indent);
+		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");};
+		/*}}}*/
+
+		/*virtual functions: */
+		char* Name();
+		int   NumEl();
+		int   NDims();
+		int*  Size();
+//		Object* Get();
+//  get by single index, multiple index, simple find, recursive find
+
+};
+#endif  /* _OPTIONSCELL_H */
+
Index: /issm/trunk/src/c/objects/Options/OptionChar.cpp
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionChar.cpp	(revision 7739)
+++ /issm/trunk/src/c/objects/Options/OptionChar.cpp	(revision 7739)
@@ -0,0 +1,136 @@
+/*!\file OptionChar.cpp
+ * \brief: implementation of the optionschar object
+ */
+
+/*Headers:*/
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include <string.h>
+#include "../objects.h"
+#include "../../shared/shared.h"
+#include "../../Container/Container.h"
+#include "../../include/include.h"
+/*}}}*/
+
+/*Constructors/destructor/copy*/
+/*FUNCTION OptionChar::OptionChar(){{{1*/
+OptionChar::OptionChar(){
+
+	values    =NULL;
+
+}
+/*}}}*/
+/*FUNCTION OptionChar::~OptionChar(){{{1*/
+OptionChar::~OptionChar(){
+
+	if (values) xfree((void**)&values);
+
+}
+/*}}}*/
+
+/*Other*/
+/*FUNCTION OptionChar::Echo {{{1*/
+void  OptionChar::Echo(){
+
+	char  cstr[81];
+	bool  flag=true;
+
+	_printf_(flag,"OptionChar Echo:\n");
+	Option::Echo();
+
+	if (values && size) {
+//		if (numel == 1) {
+		if (1) {
+//			_printf_(flag,"        values: \"%s\"\n" ,values[0]);
+			_printf_(flag,"        values: \"%s\"\n" ,values);
+		}
+		else {
+			StringFromSize(cstr,size,ndims);
+			_printf_(flag,"        values: %s %s\n" ,cstr,"char");
+		}
+	}
+	else _printf_(flag,"        values: [empty]\n" );
+}
+/*}}}*/
+/*FUNCTION OptionChar::DeepEcho() {{{1*/
+void  OptionChar::DeepEcho(){
+
+	char  indent[81]="";
+
+	OptionChar::DeepEcho(indent);
+
+	return;
+}
+/*}}}*/
+/*FUNCTION OptionChar::DeepEcho(char* indent) {{{1*/
+void  OptionChar::DeepEcho(char* indent){
+
+	int   i;
+	int*  dims;
+	char  indent2[81];
+	char  cstr[81];
+	bool  flag=true;
+
+	_printf_(flag,"%sOptionChar DeepEcho:\n",indent);
+	Option::DeepEcho(indent);
+
+	strcpy(indent2,indent);
+	strcat(indent2,"  ");
+
+	if (values) {
+//		if (numel == 1) {
+		if (1) {
+//			_printf_(flag,"%s        values: \"%s\"\n" ,indent,values[0]);
+			_printf_(flag,"%s        values: \"%s\"\n" ,indent,values);
+		}
+		else {
+			dims=(int *) xmalloc(ndims*sizeof(int));
+			for (i=0; i<numel; i++) {
+				RowWiseDimsFromIndex(dims,i,size,ndims);
+				StringFromDims(cstr,dims,ndims);
+				_printf_(flag,"%s        values%s: \"%s\"\n" ,indent,cstr,values[i]);
+			}
+			xfree((void**)&dims);
+		}
+	}
+	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+}
+/*}}}*/
+/*FUNCTION OptionChar::Name {{{1*/
+char* OptionChar::Name(){
+
+	return(Option::Name());
+}
+/*}}}*/
+/*FUNCTION OptionChar::NumEl {{{1*/
+int   OptionChar::NumEl(){
+
+	return(Option::NumEl());
+}
+/*}}}*/
+/*FUNCTION OptionChar::NDims {{{1*/
+int   OptionChar::NDims(){
+
+	return(Option::NDims());
+}
+/*}}}*/
+/*FUNCTION OptionChar::Size {{{1*/
+int*  OptionChar::Size(){
+
+	return(Option::Size());
+}
+/*}}}*/
+/*FUNCTION OptionChar::Get {{{1*/
+//void* OptionChar::Get(){
+
+//	;
+
+//	return;
+//}
+/*}}}*/
Index: /issm/trunk/src/c/objects/Options/OptionChar.h
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionChar.h	(revision 7739)
+++ /issm/trunk/src/c/objects/Options/OptionChar.h	(revision 7739)
@@ -0,0 +1,49 @@
+/*! \file OptionChar.h 
+ *  \brief: header file for optionschar object
+ */
+
+#ifndef _OPTIONSCHAR_H_
+#define _OPTIONSCHAR_H_
+
+/*Headers:{{{1*/
+#include "../../include/include.h"
+#include "../../shared/Exceptions/exceptions.h"
+#include "../../EnumDefinitions/EnumDefinitions.h"
+
+#include "./Option.h"
+/*}}}*/
+
+class OptionChar: public Option {
+
+	public:
+
+		char* values;
+
+		/*OptionChar constructors, destructors {{{1*/
+		OptionChar();
+		~OptionChar();
+		/*}}}*/
+		/*Object virtual functions definitions:{{{1*/
+		void  Echo();
+		void  DeepEcho();
+		void  DeepEcho(char* indent);
+		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");};
+		/*}}}*/
+
+		/*virtual functions: */
+		char* Name();
+		int   NumEl();
+		int   NDims();
+		int*  Size();
+//		Object* Get();
+//  get by single index, multiple index, simple find, recursive find
+
+};
+#endif  /* _OPTIONSCHAR_H */
+
Index: /issm/trunk/src/c/objects/Options/OptionDouble.cpp
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionDouble.cpp	(revision 7739)
+++ /issm/trunk/src/c/objects/Options/OptionDouble.cpp	(revision 7739)
@@ -0,0 +1,128 @@
+/*!\file OptionDouble.cpp
+ * \brief: implementation of the optionsdouble object
+ */
+
+/*Headers:*/
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include <string.h>
+#include "../objects.h"
+#include "../../shared/shared.h"
+#include "../../Container/Container.h"
+#include "../../include/include.h"
+/*}}}*/
+
+/*Constructors/destructor/copy*/
+/*FUNCTION OptionDouble::OptionDouble(){{{1*/
+OptionDouble::OptionDouble(){
+
+	values    =NULL;
+
+}
+/*}}}*/
+/*FUNCTION OptionDouble::~OptionDouble(){{{1*/
+OptionDouble::~OptionDouble(){
+
+	if (values) xfree((void**)&values);
+
+}
+/*}}}*/
+
+/*Other*/
+/*FUNCTION OptionDouble::Echo {{{1*/
+void  OptionDouble::Echo(){
+
+	char  cstr[81];
+	bool  flag=true;
+
+	_printf_(flag,"OptionDouble Echo:\n");
+	Option::Echo();
+
+	if (values && size) {
+		if(numel == 1) _printf_(flag,"        values: %g\n" ,values[0]);
+		else {
+			StringFromSize(cstr,size,ndims);
+			_printf_(flag,"        values: %s %s\n" ,cstr,"double");
+		}
+	}
+	else _printf_(flag,"        values: [empty]\n" );
+}
+/*}}}*/
+/*FUNCTION OptionDouble::DeepEcho() {{{1*/
+void  OptionDouble::DeepEcho(){
+
+	char  indent[81]="";
+
+	OptionDouble::DeepEcho(indent);
+
+	return;
+}
+/*}}}*/
+/*FUNCTION OptionDouble::DeepEcho(char* indent) {{{1*/
+void  OptionDouble::DeepEcho(char* indent){
+
+	int   i;
+	int*  dims;
+	char  indent2[81];
+	char  cstr[81];
+	bool  flag=true;
+
+	_printf_(flag,"%sOptionDouble DeepEcho:\n",indent);
+	Option::DeepEcho(indent);
+
+	strcpy(indent2,indent);
+	strcat(indent2,"  ");
+
+	if (values) {
+		dims=(int *) xmalloc(ndims*sizeof(int));
+		if(numel==1) _printf_(flag,"%s        values: %g\n" ,indent,values[0]);
+		else{
+			for (i=0; i<numel; i++) {
+				RowWiseDimsFromIndex(dims,i,size,ndims);
+				StringFromDims(cstr,dims,ndims);
+				_printf_(flag,"%s        values%s: %g\n" ,indent,cstr,values[i]);
+			}
+		}
+		xfree((void**)&dims);
+	}
+	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+}
+/*}}}*/
+/*FUNCTION OptionDouble::Name {{{1*/
+char* OptionDouble::Name(){
+
+	return(Option::Name());
+}
+/*}}}*/
+/*FUNCTION OptionDouble::NumEl {{{1*/
+int   OptionDouble::NumEl(){
+
+	return(Option::NumEl());
+}
+/*}}}*/
+/*FUNCTION OptionDouble::NDims {{{1*/
+int   OptionDouble::NDims(){
+
+	return(Option::NDims());
+}
+/*}}}*/
+/*FUNCTION OptionDouble::Size {{{1*/
+int*  OptionDouble::Size(){
+
+	return(Option::Size());
+}
+/*}}}*/
+/*FUNCTION OptionDouble::Get {{{1*/
+//void* OptionDouble::Get(){
+
+//	;
+
+//	return;
+//}
+/*}}}*/
Index: /issm/trunk/src/c/objects/Options/OptionDouble.h
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionDouble.h	(revision 7739)
+++ /issm/trunk/src/c/objects/Options/OptionDouble.h	(revision 7739)
@@ -0,0 +1,49 @@
+/*! \file OptionDouble.h 
+ *  \brief: header file for optionsdouble object
+ */
+
+#ifndef _OPTIONSDOUBLE_H_
+#define _OPTIONSDOUBLE_H_
+
+/*Headers:{{{1*/
+#include "../../include/include.h"
+#include "../../shared/Exceptions/exceptions.h"
+#include "../../EnumDefinitions/EnumDefinitions.h"
+
+#include "./Option.h"
+/*}}}*/
+
+class OptionDouble: public Option {
+
+	public:
+
+		double* values;
+
+		/*OptionDouble constructors, destructors {{{1*/
+		OptionDouble();
+		~OptionDouble();
+		/*}}}*/
+		/*Object virtual functions definitions:{{{1*/
+		void  Echo();
+		void  DeepEcho();
+		void  DeepEcho(char* indent);
+		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");};
+		/*}}}*/
+
+		/*virtual functions: */
+		char* Name();
+		int   NumEl();
+		int   NDims();
+		int*  Size();
+//		Object* Get();
+//  get by single index, multiple index, simple find, recursive find
+
+};
+#endif  /* _OPTIONSDOUBLE_H */
+
Index: /issm/trunk/src/c/objects/Options/OptionLogical.cpp
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionLogical.cpp	(revision 7739)
+++ /issm/trunk/src/c/objects/Options/OptionLogical.cpp	(revision 7739)
@@ -0,0 +1,128 @@
+/*!\file OptionLogical.cpp
+ * \brief: implementation of the optionslogical object
+ */
+
+/*Headers:*/
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include <string.h>
+#include "../objects.h"
+#include "../../shared/shared.h"
+#include "../../Container/Container.h"
+#include "../../include/include.h"
+/*}}}*/
+
+/*Constructors/destructor/copy*/
+/*FUNCTION OptionLogical::OptionLogical(){{{1*/
+OptionLogical::OptionLogical(){
+
+	values    =NULL;
+
+}
+/*}}}*/
+/*FUNCTION OptionLogical::~OptionLogical(){{{1*/
+OptionLogical::~OptionLogical(){
+
+	if (values) xfree((void**)&values);
+
+}
+/*}}}*/
+
+/*Other*/
+/*FUNCTION OptionLogical::Echo {{{1*/
+void  OptionLogical::Echo(){
+
+	char  cstr[81];
+	bool  flag=true;
+
+	_printf_(flag,"OptionLogical Echo:\n");
+	Option::Echo();
+
+	if (values && size) {
+		if(numel == 1) _printf_(flag,"        values: %s\n" ,(values[0] ? "true" : "false"));
+		else{
+			StringFromSize(cstr,size,ndims);
+			_printf_(flag,"        values: %s %s\n" ,cstr,"logical");
+		}
+	}
+	else _printf_(flag,"        values: [empty]\n" );
+}
+/*}}}*/
+/*FUNCTION OptionLogical::DeepEcho() {{{1*/
+void  OptionLogical::DeepEcho(){
+
+	char  indent[81]="";
+
+	OptionLogical::DeepEcho(indent);
+
+	return;
+}
+/*}}}*/
+/*FUNCTION OptionLogical::DeepEcho(char* indent) {{{1*/
+void  OptionLogical::DeepEcho(char* indent){
+
+	int   i;
+	int*  dims;
+	char  indent2[81];
+	char  cstr[81];
+	bool  flag=true;
+
+	_printf_(flag,"%sOptionLogical DeepEcho:\n",indent);
+	Option::DeepEcho(indent);
+
+	strcpy(indent2,indent);
+	strcat(indent2,"  ");
+
+	if (values) {
+		if(numel==1) _printf_(flag,"%s        values: %s\n" ,indent,(values[0] ? "true" : "false"));
+		else{
+			dims=(int *) xmalloc(ndims*sizeof(int));
+			for (i=0; i<numel; i++) {
+				RowWiseDimsFromIndex(dims,i,size,ndims);
+				StringFromDims(cstr,dims,ndims);
+				_printf_(flag,"%s        values%s: %s\n" ,indent,cstr,(values[i] ? "true" : "false"));
+			}
+			xfree((void**)&dims);
+		}
+	}
+	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+}
+/*}}}*/
+/*FUNCTION OptionLogical::Name {{{1*/
+char* OptionLogical::Name(){
+
+	return(Option::Name());
+}
+/*}}}*/
+/*FUNCTION OptionLogical::NumEl {{{1*/
+int   OptionLogical::NumEl(){
+
+	return(Option::NumEl());
+}
+/*}}}*/
+/*FUNCTION OptionLogical::NDims {{{1*/
+int   OptionLogical::NDims(){
+
+	return(Option::NDims());
+}
+/*}}}*/
+/*FUNCTION OptionLogical::Size {{{1*/
+int*  OptionLogical::Size(){
+
+	return(Option::Size());
+}
+/*}}}*/
+/*FUNCTION OptionLogical::Get {{{1*/
+//void* OptionLogical::Get(){
+
+//	;
+
+//	return;
+//}
+/*}}}*/
Index: /issm/trunk/src/c/objects/Options/OptionLogical.h
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionLogical.h	(revision 7739)
+++ /issm/trunk/src/c/objects/Options/OptionLogical.h	(revision 7739)
@@ -0,0 +1,49 @@
+/*! \file OptionLogical.h 
+ *  \brief: header file for optionslogical object
+ */
+
+#ifndef _OPTIONSLOGICAL_H_
+#define _OPTIONSLOGICAL_H_
+
+/*Headers:{{{1*/
+#include "../../include/include.h"
+#include "../../shared/Exceptions/exceptions.h"
+#include "../../EnumDefinitions/EnumDefinitions.h"
+
+#include "./Option.h"
+/*}}}*/
+
+class OptionLogical: public Option {
+
+	public:
+
+		bool* values;
+
+		/*OptionLogical constructors, destructors {{{1*/
+		OptionLogical();
+		~OptionLogical();
+		/*}}}*/
+		/*Object virtual functions definitions:{{{1*/
+		void  Echo();
+		void  DeepEcho();
+		void  DeepEcho(char* indent);
+		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");};
+		/*}}}*/
+
+		/*virtual functions: */
+		char* Name();
+		int   NumEl();
+		int   NDims();
+		int*  Size();
+//		Object* Get();
+//  get by single index, multiple index, simple find, recursive find
+
+};
+#endif  /* _OPTIONSLOGICAL_H */
+
Index: /issm/trunk/src/c/objects/Options/OptionStruct.cpp
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionStruct.cpp	(revision 7739)
+++ /issm/trunk/src/c/objects/Options/OptionStruct.cpp	(revision 7739)
@@ -0,0 +1,135 @@
+/*!\file OptionStruct.cpp
+ * \brief: implementation of the optionsstruct object
+ */
+
+/*Headers:*/
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include <string.h>
+#include "../objects.h"
+#include "../../shared/shared.h"
+#include "../../Container/Container.h"
+#include "../../include/include.h"
+/*}}}*/
+
+/*Constructors/destructor/copy*/
+/*FUNCTION OptionStruct::OptionStruct(){{{1*/
+OptionStruct::OptionStruct(){
+
+	values    =NULL;
+
+}
+/*}}}*/
+/*FUNCTION OptionStruct::~OptionStruct(){{{1*/
+OptionStruct::~OptionStruct(){
+
+	int   i;
+
+	if(values){
+		for(i=0; i<numel; i++) {
+			delete values[i];
+			values[i] =NULL;
+		}
+		xfree((void**)&values);
+	}
+
+}
+/*}}}*/
+
+/*Other*/
+/*FUNCTION OptionStruct::Echo {{{1*/
+void  OptionStruct::Echo(){
+
+	char  cstr[81];
+	bool  flag=true;
+
+	_printf_(flag,"OptionStruct Echo:\n");
+	Option::Echo();
+
+	if (values && size) {
+		StringFromSize(cstr,size,ndims);
+		_printf_(flag,"        values: %s %s\n" ,cstr,"struct");
+	}
+	else _printf_(flag,"        values: [empty]\n" );
+}
+/*}}}*/
+/*FUNCTION OptionStruct::DeepEcho() {{{1*/
+void  OptionStruct::DeepEcho(){
+
+	char  indent[81]="";
+
+	OptionStruct::DeepEcho(indent);
+
+	return;
+}
+/*}}}*/
+/*FUNCTION OptionStruct::DeepEcho(char* indent) {{{1*/
+void  OptionStruct::DeepEcho(char* indent){
+
+	int   i,j;
+	int*  dims;
+	char  indent2[81];
+	char  cstr[81];
+	bool  flag=true;
+
+	_printf_(flag,"%sOptionStruct DeepEcho:\n",indent);
+	Option::DeepEcho(indent);
+
+	strcpy(indent2,indent);
+	strcat(indent2,"  ");
+
+	if (values) {
+		dims=(int *)xmalloc(ndims*sizeof(int));
+		for (i=0; i<numel; i++) {
+			ColumnWiseDimsFromIndex(dims,i,size,ndims);
+			StringFromDims(cstr,dims,ndims);
+			if (values[i]->Size()){
+				_printf_(flag,"%s        values: %s begin\n" ,indent,cstr);
+				for (j=0; j<values[i]->Size(); j++) ((Option *)values[i]->GetObjectByOffset(j))->DeepEcho(indent2);
+				_printf_(flag,"%s        values: %s end\n"   ,indent,cstr);
+			}
+			else _printf_(flag,"%s        values: %s [empty]\n" ,indent,cstr);
+		}
+		xfree((void**)&dims);
+	}
+	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+}
+/*}}}*/
+/*FUNCTION OptionStruct::Name {{{1*/
+char* OptionStruct::Name(){
+
+	return(Option::Name());
+}
+/*}}}*/
+/*FUNCTION OptionStruct::NumEl {{{1*/
+int   OptionStruct::NumEl(){
+
+	return(Option::NumEl());
+}
+/*}}}*/
+/*FUNCTION OptionStruct::NDims {{{1*/
+int   OptionStruct::NDims(){
+
+	return(Option::NDims());
+}
+/*}}}*/
+/*FUNCTION OptionStruct::Size {{{1*/
+int*  OptionStruct::Size(){
+
+	return(Option::Size());
+}
+/*}}}*/
+/*FUNCTION OptionStruct::Get {{{1*/
+//void* OptionStruct::Get(){
+
+//	;
+
+//	return;
+//}
+/*}}}*/
Index: /issm/trunk/src/c/objects/Options/OptionStruct.h
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionStruct.h	(revision 7739)
+++ /issm/trunk/src/c/objects/Options/OptionStruct.h	(revision 7739)
@@ -0,0 +1,49 @@
+/*! \file OptionStruct.h 
+ *  \brief: header file for optionsstruct object
+ */
+
+#ifndef _OPTIONSSTRUCT_H_
+#define _OPTIONSSTRUCT_H_
+
+/*Headers:{{{1*/
+#include "../../include/include.h"
+#include "../../shared/Exceptions/exceptions.h"
+#include "../../EnumDefinitions/EnumDefinitions.h"
+
+#include "./Option.h"
+/*}}}*/
+
+class OptionStruct: public Option {
+
+	public:
+
+		Options** values;
+
+		/*OptionStruct constructors, destructors {{{1*/
+		OptionStruct();
+		~OptionStruct();
+		/*}}}*/
+		/*Object virtual functions definitions:{{{1*/
+		void  Echo();
+		void  DeepEcho();
+		void  DeepEcho(char* indent);
+		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");};
+		/*}}}*/
+
+		/*virtual functions: */
+		char* Name();
+		int   NumEl();
+		int   NDims();
+		int*  Size();
+//		Object* Get();
+//  get by single index, multiple index, simple find, recursive find
+
+};
+#endif  /* _OPTIONSSTRUCT_H */
+
Index: /issm/trunk/src/c/objects/Options/OptionUtilities.cpp
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionUtilities.cpp	(revision 7739)
+++ /issm/trunk/src/c/objects/Options/OptionUtilities.cpp	(revision 7739)
@@ -0,0 +1,114 @@
+/*!\file OptionUtilities.cpp
+ * \brief: implementation of the options utilities
+ */
+
+/*Headers:*/
+/*{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include <string.h>
+#include "../objects.h"
+#include "../../shared/shared.h"
+#include "../../Container/Container.h"
+#include "../../include/include.h"
+/*}}}*/
+
+/*FUNCTION ColumnWiseDimsFromIndex{{{1*/
+int ColumnWiseDimsFromIndex(int* dims,int index,int* size,int ndims){
+
+	int   i;
+	int   aprod=1;
+
+	/*check for index too large  */
+	for (i=0;i<ndims;i++) aprod*=size[i];
+	if (index >= aprod) _error_("Index %d exceeds number of elements %d.",index,aprod);
+
+	/*calculate the dimensions (being careful of integer division)  */
+	for (i=ndims-1; i>=0; i--) {
+		aprod=(int)(((double)aprod+0.5)/(double)size[i]);
+		dims[i]=(int)floor(((double)index+0.5)/(double)aprod);
+		index-=dims[i]*aprod;
+	}
+
+	return(0);
+}/*}}}*/
+/*FUNCTION IndexFromColumnWiseDims{{{1*/
+int IndexFromColumnWiseDims(int* dims, int* size, int ndims) {
+
+	int   i;
+	int   index=0;
+
+	/*check for any dimension too large  */
+	for (i=0;i<ndims;i++){
+		if (dims[i] >= size[i]) _error_("Dimension %d of %d exceeds size of %d.",i,dims[i],size[i]);
+	}
+
+	/*calculate the index  */
+	for (i=ndims-1; i>=0; i--){
+		index*=size[i];
+		index+=dims[i];
+	}
+
+	return(index);
+}/*}}}*/
+/*FUNCTION RowWiseDimsFromIndex{{{1*/
+int RowWiseDimsFromIndex(int* dims, int index, int* size, int ndims) {
+
+	int   i;
+	int   aprod=1;
+
+	/*check for index too large  */
+	for (i=0; i<ndims; i++) aprod*=size[i];
+	if (index >= aprod) _error_("Index %d exceeds number of elements %d.",index,aprod);
+
+	/*calculate the dimensions (being careful of integer division)  */
+	for (i=0; i<ndims; i++) {
+		aprod=(int)(((double)aprod+0.5)/(double)size[i]);
+		dims[i]=(int)floor(((double)index+0.5)/(double)aprod);
+		index-=dims[i]*aprod;
+	}
+
+	return(0);
+}/*}}}*/
+/*FUNCTION IndexFromRowWiseDims{{{1*/
+int IndexFromRowWiseDims(int* dims, int* size, int ndims) {
+
+	int   i;
+	int   index=0;
+
+	/*check for any dimension too large  */
+	for (i=0; i<ndims; i++){
+		if (dims[i] >= size[i]) _error_("Dimension %d of %d exceeds size of %d.",i,dims[i],size[i]);
+	}
+
+	/*calculate the index  */
+	for (i=0; i<ndims; i++) {
+		index*=size[i];
+		index+=dims[i];
+	}
+
+	return(index);
+}/*}}}*/
+/*FUNCTION StringFromDims{{{1*/
+int StringFromDims(char* cstr, int* dims, int ndims) {
+
+	sprintf(&cstr[0],"[");
+	for(int i=0; i<ndims-1; i++) sprintf(&cstr[strlen(cstr)],"%d,",dims[i]);
+	sprintf(&cstr[strlen(cstr)],"%d]",dims[ndims-1]);
+
+	return(0);
+}/*}}}*/
+/*FUNCTION StringFromSize{{{1*/
+int StringFromSize(char* cstr, int* size, int ndims) {
+
+	sprintf(&cstr[0],"[");
+	for(int i=0; i<ndims-1; i++) sprintf(&cstr[strlen(cstr)],"%dx",size[i]);
+	sprintf(&cstr[strlen(cstr)],"%d]",size[ndims-1]);
+
+	return(0);
+}/*}}}*/
Index: /issm/trunk/src/c/objects/Options/OptionUtilities.h
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionUtilities.h	(revision 7739)
+++ /issm/trunk/src/c/objects/Options/OptionUtilities.h	(revision 7739)
@@ -0,0 +1,24 @@
+/*! \file OptionUtilities.h 
+ *  \brief: header file for options utilities
+ */
+
+#ifndef _OPTIONSUTILITIES_H_
+#define _OPTIONSUTILITIES_H_
+
+/*Headers:{{{1*/
+#include "../../include/include.h"
+#include "../../shared/Exceptions/exceptions.h"
+#include "../../EnumDefinitions/EnumDefinitions.h"
+
+#include "./Option.h"
+/*}}}*/
+
+int ColumnWiseDimsFromIndex(int* dims, int index, int* size, int ndims);
+int IndexFromColumnWiseDims(int* dims, int* size, int ndims);
+int RowWiseDimsFromIndex(int* dims, int index, int* size, int ndims);
+int IndexFromRowWiseDims(int* dims, int* size, int ndims);
+int StringFromDims(char* cstr, int* dims, int ndims);
+int StringFromSize(char* cstr, int* size, int ndims);
+
+#endif  /* _OPTIONSUTILITIES_H */
+
Index: sm/trunk/src/c/objects/Options/OptionsCell.cpp
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionsCell.cpp	(revision 7738)
+++ 	(revision )
@@ -1,127 +1,0 @@
-/*!\file OptionsCell.cpp
- * \brief: implementation of the optionscell object
- */
-
-/*Headers:*/
-/*{{{1*/
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "stdio.h"
-#include <string.h>
-#include "../objects.h"
-#include "../../shared/shared.h"
-#include "../../Container/Container.h"
-#include "../../include/include.h"
-/*}}}*/
-
-/*Constructors/destructor/copy*/
-/*FUNCTION OptionsCell::OptionsCell(){{{1*/
-OptionsCell::OptionsCell(){
-
-	values    =NULL;
-
-}
-/*}}}*/
-/*FUNCTION OptionsCell::~OptionsCell(){{{1*/
-OptionsCell::~OptionsCell(){
-
-	if (values){
-		delete values;
-		values    =NULL;
-	}
-
-}
-/*}}}*/
-
-/*Other*/
-/*FUNCTION OptionsCell::Echo {{{1*/
-void  OptionsCell::Echo(){
-
-	char cstr[81];
-	bool flag     = true;
-
-	_printf_(flag,"OptionsCell Echo:\n");
-	Option::Echo();
-
-	if (values && size) {
-		StringFromSize(cstr,size,ndims);
-		_printf_(flag,"        values: %s %s\n" ,cstr,"cell");
-	}
-	else _printf_(flag,"        values: [empty]\n" );
-}
-/*}}}*/
-/*FUNCTION OptionsCell::DeepEcho() {{{1*/
-void  OptionsCell::DeepEcho(){
-
-	char  indent[81]="";
-
-	OptionsCell::DeepEcho(indent);
-
-	return;
-}
-/*}}}*/
-/*FUNCTION OptionsCell::DeepEcho(char* indent) {{{1*/
-void  OptionsCell::DeepEcho(char* indent){
-
-	int   i;
-	int*  dims;
-	char  indent2[81];
-	char  cstr[81];
-	bool  flag=true;
-
-	_printf_(flag,"%sOptionsCell DeepEcho:\n",indent);
-	Option::DeepEcho(indent);
-
-	strcpy(indent2,indent);
-	strcat(indent2,"  ");
-
-	if (values->Size()) {
-		dims=(int *) xmalloc(ndims*sizeof(int));
-		for (i=0; i<values->Size(); i++) {
-			ColumnWiseDimsFromIndex(dims,i,size,ndims);
-			StringFromDims(cstr,dims,ndims);
-			_printf_(flag,"%s        values: %s begin\n" ,indent,cstr);
-			((Option *)values->GetObjectByOffset(i))->DeepEcho(indent2);
-			_printf_(flag,"%s        values: %s end\n"   ,indent,cstr);
-		}
-		xfree((void**)&dims);
-	}
-	else _printf_(flag,"%s        values: [empty]\n" ,indent);
-}
-/*}}}*/
-/*FUNCTION OptionsCell::Name {{{1*/
-char* OptionsCell::Name(){
-
-	return(Option::Name());
-}
-/*}}}*/
-/*FUNCTION OptionsCell::NumEl {{{1*/
-int   OptionsCell::NumEl(){
-
-	return(Option::NumEl());
-}
-/*}}}*/
-/*FUNCTION OptionsCell::NDims {{{1*/
-int   OptionsCell::NDims(){
-
-	return(Option::NDims());
-}
-/*}}}*/
-/*FUNCTION OptionsCell::Size {{{1*/
-int*  OptionsCell::Size(){
-
-	return(Option::Size());
-}
-/*}}}*/
-/*FUNCTION OptionsCell::Get {{{1*/
-//void* OptionsCell::Get(){
-
-//	;
-
-//	return;
-//}
-/*}}}*/
Index: sm/trunk/src/c/objects/Options/OptionsCell.h
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionsCell.h	(revision 7738)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*! \file OptionsCell.h 
- *  \brief: header file for optionscell object
- */
-
-#ifndef _OPTIONSCELL_H_
-#define _OPTIONSCELL_H_
-
-/*Headers:{{{1*/
-#include "../../include/include.h"
-#include "../../shared/Exceptions/exceptions.h"
-#include "../../EnumDefinitions/EnumDefinitions.h"
-
-#include "./Option.h"
-/*}}}*/
-
-class OptionsCell: public Option {
-
-	public:
-
-		Options* values;
-
-		/*OptionsCell constructors, destructors {{{1*/
-		OptionsCell();
-		~OptionsCell();
-		/*}}}*/
-		/*Object virtual functions definitions:{{{1*/
-		void  Echo();
-		void  DeepEcho();
-		void  DeepEcho(char* indent);
-		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");};
-		/*}}}*/
-
-		/*virtual functions: */
-		char* Name();
-		int   NumEl();
-		int   NDims();
-		int*  Size();
-//		Object* Get();
-//  get by single index, multiple index, simple find, recursive find
-
-};
-#endif  /* _OPTIONSCELL_H */
-
Index: sm/trunk/src/c/objects/Options/OptionsChar.cpp
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionsChar.cpp	(revision 7738)
+++ 	(revision )
@@ -1,136 +1,0 @@
-/*!\file OptionsChar.cpp
- * \brief: implementation of the optionschar object
- */
-
-/*Headers:*/
-/*{{{1*/
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "stdio.h"
-#include <string.h>
-#include "../objects.h"
-#include "../../shared/shared.h"
-#include "../../Container/Container.h"
-#include "../../include/include.h"
-/*}}}*/
-
-/*Constructors/destructor/copy*/
-/*FUNCTION OptionsChar::OptionsChar(){{{1*/
-OptionsChar::OptionsChar(){
-
-	values    =NULL;
-
-}
-/*}}}*/
-/*FUNCTION OptionsChar::~OptionsChar(){{{1*/
-OptionsChar::~OptionsChar(){
-
-	if (values) xfree((void**)&values);
-
-}
-/*}}}*/
-
-/*Other*/
-/*FUNCTION OptionsChar::Echo {{{1*/
-void  OptionsChar::Echo(){
-
-	char  cstr[81];
-	bool  flag=true;
-
-	_printf_(flag,"OptionsChar Echo:\n");
-	Option::Echo();
-
-	if (values && size) {
-//		if (numel == 1) {
-		if (1) {
-//			_printf_(flag,"        values: \"%s\"\n" ,values[0]);
-			_printf_(flag,"        values: \"%s\"\n" ,values);
-		}
-		else {
-			StringFromSize(cstr,size,ndims);
-			_printf_(flag,"        values: %s %s\n" ,cstr,"char");
-		}
-	}
-	else _printf_(flag,"        values: [empty]\n" );
-}
-/*}}}*/
-/*FUNCTION OptionsChar::DeepEcho() {{{1*/
-void  OptionsChar::DeepEcho(){
-
-	char  indent[81]="";
-
-	OptionsChar::DeepEcho(indent);
-
-	return;
-}
-/*}}}*/
-/*FUNCTION OptionsChar::DeepEcho(char* indent) {{{1*/
-void  OptionsChar::DeepEcho(char* indent){
-
-	int   i;
-	int*  dims;
-	char  indent2[81];
-	char  cstr[81];
-	bool  flag=true;
-
-	_printf_(flag,"%sOptionsChar DeepEcho:\n",indent);
-	Option::DeepEcho(indent);
-
-	strcpy(indent2,indent);
-	strcat(indent2,"  ");
-
-	if (values) {
-//		if (numel == 1) {
-		if (1) {
-//			_printf_(flag,"%s        values: \"%s\"\n" ,indent,values[0]);
-			_printf_(flag,"%s        values: \"%s\"\n" ,indent,values);
-		}
-		else {
-			dims=(int *) xmalloc(ndims*sizeof(int));
-			for (i=0; i<numel; i++) {
-				RowWiseDimsFromIndex(dims,i,size,ndims);
-				StringFromDims(cstr,dims,ndims);
-				_printf_(flag,"%s        values%s: \"%s\"\n" ,indent,cstr,values[i]);
-			}
-			xfree((void**)&dims);
-		}
-	}
-	else _printf_(flag,"%s        values: [empty]\n" ,indent);
-}
-/*}}}*/
-/*FUNCTION OptionsChar::Name {{{1*/
-char* OptionsChar::Name(){
-
-	return(Option::Name());
-}
-/*}}}*/
-/*FUNCTION OptionsChar::NumEl {{{1*/
-int   OptionsChar::NumEl(){
-
-	return(Option::NumEl());
-}
-/*}}}*/
-/*FUNCTION OptionsChar::NDims {{{1*/
-int   OptionsChar::NDims(){
-
-	return(Option::NDims());
-}
-/*}}}*/
-/*FUNCTION OptionsChar::Size {{{1*/
-int*  OptionsChar::Size(){
-
-	return(Option::Size());
-}
-/*}}}*/
-/*FUNCTION OptionsChar::Get {{{1*/
-//void* OptionsChar::Get(){
-
-//	;
-
-//	return;
-//}
-/*}}}*/
Index: sm/trunk/src/c/objects/Options/OptionsChar.h
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionsChar.h	(revision 7738)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*! \file OptionsChar.h 
- *  \brief: header file for optionschar object
- */
-
-#ifndef _OPTIONSCHAR_H_
-#define _OPTIONSCHAR_H_
-
-/*Headers:{{{1*/
-#include "../../include/include.h"
-#include "../../shared/Exceptions/exceptions.h"
-#include "../../EnumDefinitions/EnumDefinitions.h"
-
-#include "./Option.h"
-/*}}}*/
-
-class OptionsChar: public Option {
-
-	public:
-
-		char* values;
-
-		/*OptionsChar constructors, destructors {{{1*/
-		OptionsChar();
-		~OptionsChar();
-		/*}}}*/
-		/*Object virtual functions definitions:{{{1*/
-		void  Echo();
-		void  DeepEcho();
-		void  DeepEcho(char* indent);
-		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");};
-		/*}}}*/
-
-		/*virtual functions: */
-		char* Name();
-		int   NumEl();
-		int   NDims();
-		int*  Size();
-//		Object* Get();
-//  get by single index, multiple index, simple find, recursive find
-
-};
-#endif  /* _OPTIONSCHAR_H */
-
Index: sm/trunk/src/c/objects/Options/OptionsDouble.cpp
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionsDouble.cpp	(revision 7738)
+++ 	(revision )
@@ -1,128 +1,0 @@
-/*!\file OptionsDouble.cpp
- * \brief: implementation of the optionsdouble object
- */
-
-/*Headers:*/
-/*{{{1*/
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "stdio.h"
-#include <string.h>
-#include "../objects.h"
-#include "../../shared/shared.h"
-#include "../../Container/Container.h"
-#include "../../include/include.h"
-/*}}}*/
-
-/*Constructors/destructor/copy*/
-/*FUNCTION OptionsDouble::OptionsDouble(){{{1*/
-OptionsDouble::OptionsDouble(){
-
-	values    =NULL;
-
-}
-/*}}}*/
-/*FUNCTION OptionsDouble::~OptionsDouble(){{{1*/
-OptionsDouble::~OptionsDouble(){
-
-	if (values) xfree((void**)&values);
-
-}
-/*}}}*/
-
-/*Other*/
-/*FUNCTION OptionsDouble::Echo {{{1*/
-void  OptionsDouble::Echo(){
-
-	char  cstr[81];
-	bool  flag=true;
-
-	_printf_(flag,"OptionsDouble Echo:\n");
-	Option::Echo();
-
-	if (values && size) {
-		if(numel == 1) _printf_(flag,"        values: %g\n" ,values[0]);
-		else {
-			StringFromSize(cstr,size,ndims);
-			_printf_(flag,"        values: %s %s\n" ,cstr,"double");
-		}
-	}
-	else _printf_(flag,"        values: [empty]\n" );
-}
-/*}}}*/
-/*FUNCTION OptionsDouble::DeepEcho() {{{1*/
-void  OptionsDouble::DeepEcho(){
-
-	char  indent[81]="";
-
-	OptionsDouble::DeepEcho(indent);
-
-	return;
-}
-/*}}}*/
-/*FUNCTION OptionsDouble::DeepEcho(char* indent) {{{1*/
-void  OptionsDouble::DeepEcho(char* indent){
-
-	int   i;
-	int*  dims;
-	char  indent2[81];
-	char  cstr[81];
-	bool  flag=true;
-
-	_printf_(flag,"%sOptionsDouble DeepEcho:\n",indent);
-	Option::DeepEcho(indent);
-
-	strcpy(indent2,indent);
-	strcat(indent2,"  ");
-
-	if (values) {
-		dims=(int *) xmalloc(ndims*sizeof(int));
-		if(numel==1) _printf_(flag,"%s        values: %g\n" ,indent,values[0]);
-		else{
-			for (i=0; i<numel; i++) {
-				RowWiseDimsFromIndex(dims,i,size,ndims);
-				StringFromDims(cstr,dims,ndims);
-				_printf_(flag,"%s        values%s: %g\n" ,indent,cstr,values[i]);
-			}
-		}
-		xfree((void**)&dims);
-	}
-	else _printf_(flag,"%s        values: [empty]\n" ,indent);
-}
-/*}}}*/
-/*FUNCTION OptionsDouble::Name {{{1*/
-char* OptionsDouble::Name(){
-
-	return(Option::Name());
-}
-/*}}}*/
-/*FUNCTION OptionsDouble::NumEl {{{1*/
-int   OptionsDouble::NumEl(){
-
-	return(Option::NumEl());
-}
-/*}}}*/
-/*FUNCTION OptionsDouble::NDims {{{1*/
-int   OptionsDouble::NDims(){
-
-	return(Option::NDims());
-}
-/*}}}*/
-/*FUNCTION OptionsDouble::Size {{{1*/
-int*  OptionsDouble::Size(){
-
-	return(Option::Size());
-}
-/*}}}*/
-/*FUNCTION OptionsDouble::Get {{{1*/
-//void* OptionsDouble::Get(){
-
-//	;
-
-//	return;
-//}
-/*}}}*/
Index: sm/trunk/src/c/objects/Options/OptionsDouble.h
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionsDouble.h	(revision 7738)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*! \file OptionsDouble.h 
- *  \brief: header file for optionsdouble object
- */
-
-#ifndef _OPTIONSDOUBLE_H_
-#define _OPTIONSDOUBLE_H_
-
-/*Headers:{{{1*/
-#include "../../include/include.h"
-#include "../../shared/Exceptions/exceptions.h"
-#include "../../EnumDefinitions/EnumDefinitions.h"
-
-#include "./Option.h"
-/*}}}*/
-
-class OptionsDouble: public Option {
-
-	public:
-
-		double* values;
-
-		/*OptionsDouble constructors, destructors {{{1*/
-		OptionsDouble();
-		~OptionsDouble();
-		/*}}}*/
-		/*Object virtual functions definitions:{{{1*/
-		void  Echo();
-		void  DeepEcho();
-		void  DeepEcho(char* indent);
-		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");};
-		/*}}}*/
-
-		/*virtual functions: */
-		char* Name();
-		int   NumEl();
-		int   NDims();
-		int*  Size();
-//		Object* Get();
-//  get by single index, multiple index, simple find, recursive find
-
-};
-#endif  /* _OPTIONSDOUBLE_H */
-
Index: sm/trunk/src/c/objects/Options/OptionsLogical.cpp
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionsLogical.cpp	(revision 7738)
+++ 	(revision )
@@ -1,128 +1,0 @@
-/*!\file OptionsLogical.cpp
- * \brief: implementation of the optionslogical object
- */
-
-/*Headers:*/
-/*{{{1*/
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "stdio.h"
-#include <string.h>
-#include "../objects.h"
-#include "../../shared/shared.h"
-#include "../../Container/Container.h"
-#include "../../include/include.h"
-/*}}}*/
-
-/*Constructors/destructor/copy*/
-/*FUNCTION OptionsLogical::OptionsLogical(){{{1*/
-OptionsLogical::OptionsLogical(){
-
-	values    =NULL;
-
-}
-/*}}}*/
-/*FUNCTION OptionsLogical::~OptionsLogical(){{{1*/
-OptionsLogical::~OptionsLogical(){
-
-	if (values) xfree((void**)&values);
-
-}
-/*}}}*/
-
-/*Other*/
-/*FUNCTION OptionsLogical::Echo {{{1*/
-void  OptionsLogical::Echo(){
-
-	char  cstr[81];
-	bool  flag=true;
-
-	_printf_(flag,"OptionsLogical Echo:\n");
-	Option::Echo();
-
-	if (values && size) {
-		if(numel == 1) _printf_(flag,"        values: %s\n" ,(values[0] ? "true" : "false"));
-		else{
-			StringFromSize(cstr,size,ndims);
-			_printf_(flag,"        values: %s %s\n" ,cstr,"logical");
-		}
-	}
-	else _printf_(flag,"        values: [empty]\n" );
-}
-/*}}}*/
-/*FUNCTION OptionsLogical::DeepEcho() {{{1*/
-void  OptionsLogical::DeepEcho(){
-
-	char  indent[81]="";
-
-	OptionsLogical::DeepEcho(indent);
-
-	return;
-}
-/*}}}*/
-/*FUNCTION OptionsLogical::DeepEcho(char* indent) {{{1*/
-void  OptionsLogical::DeepEcho(char* indent){
-
-	int   i;
-	int*  dims;
-	char  indent2[81];
-	char  cstr[81];
-	bool  flag=true;
-
-	_printf_(flag,"%sOptionsLogical DeepEcho:\n",indent);
-	Option::DeepEcho(indent);
-
-	strcpy(indent2,indent);
-	strcat(indent2,"  ");
-
-	if (values) {
-		if(numel==1) _printf_(flag,"%s        values: %s\n" ,indent,(values[0] ? "true" : "false"));
-		else{
-			dims=(int *) xmalloc(ndims*sizeof(int));
-			for (i=0; i<numel; i++) {
-				RowWiseDimsFromIndex(dims,i,size,ndims);
-				StringFromDims(cstr,dims,ndims);
-				_printf_(flag,"%s        values%s: %s\n" ,indent,cstr,(values[i] ? "true" : "false"));
-			}
-			xfree((void**)&dims);
-		}
-	}
-	else _printf_(flag,"%s        values: [empty]\n" ,indent);
-}
-/*}}}*/
-/*FUNCTION OptionsLogical::Name {{{1*/
-char* OptionsLogical::Name(){
-
-	return(Option::Name());
-}
-/*}}}*/
-/*FUNCTION OptionsLogical::NumEl {{{1*/
-int   OptionsLogical::NumEl(){
-
-	return(Option::NumEl());
-}
-/*}}}*/
-/*FUNCTION OptionsLogical::NDims {{{1*/
-int   OptionsLogical::NDims(){
-
-	return(Option::NDims());
-}
-/*}}}*/
-/*FUNCTION OptionsLogical::Size {{{1*/
-int*  OptionsLogical::Size(){
-
-	return(Option::Size());
-}
-/*}}}*/
-/*FUNCTION OptionsLogical::Get {{{1*/
-//void* OptionsLogical::Get(){
-
-//	;
-
-//	return;
-//}
-/*}}}*/
Index: sm/trunk/src/c/objects/Options/OptionsLogical.h
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionsLogical.h	(revision 7738)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*! \file OptionsLogical.h 
- *  \brief: header file for optionslogical object
- */
-
-#ifndef _OPTIONSLOGICAL_H_
-#define _OPTIONSLOGICAL_H_
-
-/*Headers:{{{1*/
-#include "../../include/include.h"
-#include "../../shared/Exceptions/exceptions.h"
-#include "../../EnumDefinitions/EnumDefinitions.h"
-
-#include "./Option.h"
-/*}}}*/
-
-class OptionsLogical: public Option {
-
-	public:
-
-		bool* values;
-
-		/*OptionsLogical constructors, destructors {{{1*/
-		OptionsLogical();
-		~OptionsLogical();
-		/*}}}*/
-		/*Object virtual functions definitions:{{{1*/
-		void  Echo();
-		void  DeepEcho();
-		void  DeepEcho(char* indent);
-		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");};
-		/*}}}*/
-
-		/*virtual functions: */
-		char* Name();
-		int   NumEl();
-		int   NDims();
-		int*  Size();
-//		Object* Get();
-//  get by single index, multiple index, simple find, recursive find
-
-};
-#endif  /* _OPTIONSLOGICAL_H */
-
Index: sm/trunk/src/c/objects/Options/OptionsStruct.cpp
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionsStruct.cpp	(revision 7738)
+++ 	(revision )
@@ -1,135 +1,0 @@
-/*!\file OptionsStruct.cpp
- * \brief: implementation of the optionsstruct object
- */
-
-/*Headers:*/
-/*{{{1*/
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "stdio.h"
-#include <string.h>
-#include "../objects.h"
-#include "../../shared/shared.h"
-#include "../../Container/Container.h"
-#include "../../include/include.h"
-/*}}}*/
-
-/*Constructors/destructor/copy*/
-/*FUNCTION OptionsStruct::OptionsStruct(){{{1*/
-OptionsStruct::OptionsStruct(){
-
-	values    =NULL;
-
-}
-/*}}}*/
-/*FUNCTION OptionsStruct::~OptionsStruct(){{{1*/
-OptionsStruct::~OptionsStruct(){
-
-	int   i;
-
-	if(values){
-		for(i=0; i<numel; i++) {
-			delete values[i];
-			values[i] =NULL;
-		}
-		xfree((void**)&values);
-	}
-
-}
-/*}}}*/
-
-/*Other*/
-/*FUNCTION OptionsStruct::Echo {{{1*/
-void  OptionsStruct::Echo(){
-
-	char  cstr[81];
-	bool  flag=true;
-
-	_printf_(flag,"OptionsStruct Echo:\n");
-	Option::Echo();
-
-	if (values && size) {
-		StringFromSize(cstr,size,ndims);
-		_printf_(flag,"        values: %s %s\n" ,cstr,"struct");
-	}
-	else _printf_(flag,"        values: [empty]\n" );
-}
-/*}}}*/
-/*FUNCTION OptionsStruct::DeepEcho() {{{1*/
-void  OptionsStruct::DeepEcho(){
-
-	char  indent[81]="";
-
-	OptionsStruct::DeepEcho(indent);
-
-	return;
-}
-/*}}}*/
-/*FUNCTION OptionsStruct::DeepEcho(char* indent) {{{1*/
-void  OptionsStruct::DeepEcho(char* indent){
-
-	int   i,j;
-	int*  dims;
-	char  indent2[81];
-	char  cstr[81];
-	bool  flag=true;
-
-	_printf_(flag,"%sOptionsStruct DeepEcho:\n",indent);
-	Option::DeepEcho(indent);
-
-	strcpy(indent2,indent);
-	strcat(indent2,"  ");
-
-	if (values) {
-		dims=(int *)xmalloc(ndims*sizeof(int));
-		for (i=0; i<numel; i++) {
-			ColumnWiseDimsFromIndex(dims,i,size,ndims);
-			StringFromDims(cstr,dims,ndims);
-			if (values[i]->Size()){
-				_printf_(flag,"%s        values: %s begin\n" ,indent,cstr);
-				for (j=0; j<values[i]->Size(); j++) ((Option *)values[i]->GetObjectByOffset(j))->DeepEcho(indent2);
-				_printf_(flag,"%s        values: %s end\n"   ,indent,cstr);
-			}
-			else _printf_(flag,"%s        values: %s [empty]\n" ,indent,cstr);
-		}
-		xfree((void**)&dims);
-	}
-	else _printf_(flag,"%s        values: [empty]\n" ,indent);
-}
-/*}}}*/
-/*FUNCTION OptionsStruct::Name {{{1*/
-char* OptionsStruct::Name(){
-
-	return(Option::Name());
-}
-/*}}}*/
-/*FUNCTION OptionsStruct::NumEl {{{1*/
-int   OptionsStruct::NumEl(){
-
-	return(Option::NumEl());
-}
-/*}}}*/
-/*FUNCTION OptionsStruct::NDims {{{1*/
-int   OptionsStruct::NDims(){
-
-	return(Option::NDims());
-}
-/*}}}*/
-/*FUNCTION OptionsStruct::Size {{{1*/
-int*  OptionsStruct::Size(){
-
-	return(Option::Size());
-}
-/*}}}*/
-/*FUNCTION OptionsStruct::Get {{{1*/
-//void* OptionsStruct::Get(){
-
-//	;
-
-//	return;
-//}
-/*}}}*/
Index: sm/trunk/src/c/objects/Options/OptionsStruct.h
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionsStruct.h	(revision 7738)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*! \file OptionsStruct.h 
- *  \brief: header file for optionsstruct object
- */
-
-#ifndef _OPTIONSSTRUCT_H_
-#define _OPTIONSSTRUCT_H_
-
-/*Headers:{{{1*/
-#include "../../include/include.h"
-#include "../../shared/Exceptions/exceptions.h"
-#include "../../EnumDefinitions/EnumDefinitions.h"
-
-#include "./Option.h"
-/*}}}*/
-
-class OptionsStruct: public Option {
-
-	public:
-
-		Options** values;
-
-		/*OptionsStruct constructors, destructors {{{1*/
-		OptionsStruct();
-		~OptionsStruct();
-		/*}}}*/
-		/*Object virtual functions definitions:{{{1*/
-		void  Echo();
-		void  DeepEcho();
-		void  DeepEcho(char* indent);
-		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");};
-		/*}}}*/
-
-		/*virtual functions: */
-		char* Name();
-		int   NumEl();
-		int   NDims();
-		int*  Size();
-//		Object* Get();
-//  get by single index, multiple index, simple find, recursive find
-
-};
-#endif  /* _OPTIONSSTRUCT_H */
-
Index: sm/trunk/src/c/objects/Options/OptionsUtilities.cpp
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionsUtilities.cpp	(revision 7738)
+++ 	(revision )
@@ -1,114 +1,0 @@
-/*!\file OptionsUtilities.cpp
- * \brief: implementation of the options utilities
- */
-
-/*Headers:*/
-/*{{{1*/
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "stdio.h"
-#include <string.h>
-#include "../objects.h"
-#include "../../shared/shared.h"
-#include "../../Container/Container.h"
-#include "../../include/include.h"
-/*}}}*/
-
-/*FUNCTION ColumnWiseDimsFromIndex{{{1*/
-int ColumnWiseDimsFromIndex(int* dims,int index,int* size,int ndims){
-
-	int   i;
-	int   aprod=1;
-
-	/*check for index too large  */
-	for (i=0;i<ndims;i++) aprod*=size[i];
-	if (index >= aprod) _error_("Index %d exceeds number of elements %d.",index,aprod);
-
-	/*calculate the dimensions (being careful of integer division)  */
-	for (i=ndims-1; i>=0; i--) {
-		aprod=(int)(((double)aprod+0.5)/(double)size[i]);
-		dims[i]=(int)floor(((double)index+0.5)/(double)aprod);
-		index-=dims[i]*aprod;
-	}
-
-	return(0);
-}/*}}}*/
-/*FUNCTION IndexFromColumnWiseDims{{{1*/
-int IndexFromColumnWiseDims(int* dims, int* size, int ndims) {
-
-	int   i;
-	int   index=0;
-
-	/*check for any dimension too large  */
-	for (i=0;i<ndims;i++){
-		if (dims[i] >= size[i]) _error_("Dimension %d of %d exceeds size of %d.",i,dims[i],size[i]);
-	}
-
-	/*calculate the index  */
-	for (i=ndims-1; i>=0; i--){
-		index*=size[i];
-		index+=dims[i];
-	}
-
-	return(index);
-}/*}}}*/
-/*FUNCTION RowWiseDimsFromIndex{{{1*/
-int RowWiseDimsFromIndex(int* dims, int index, int* size, int ndims) {
-
-	int   i;
-	int   aprod=1;
-
-	/*check for index too large  */
-	for (i=0; i<ndims; i++) aprod*=size[i];
-	if (index >= aprod) _error_("Index %d exceeds number of elements %d.",index,aprod);
-
-	/*calculate the dimensions (being careful of integer division)  */
-	for (i=0; i<ndims; i++) {
-		aprod=(int)(((double)aprod+0.5)/(double)size[i]);
-		dims[i]=(int)floor(((double)index+0.5)/(double)aprod);
-		index-=dims[i]*aprod;
-	}
-
-	return(0);
-}/*}}}*/
-/*FUNCTION IndexFromRowWiseDims{{{1*/
-int IndexFromRowWiseDims(int* dims, int* size, int ndims) {
-
-	int   i;
-	int   index=0;
-
-	/*check for any dimension too large  */
-	for (i=0; i<ndims; i++){
-		if (dims[i] >= size[i]) _error_("Dimension %d of %d exceeds size of %d.",i,dims[i],size[i]);
-	}
-
-	/*calculate the index  */
-	for (i=0; i<ndims; i++) {
-		index*=size[i];
-		index+=dims[i];
-	}
-
-	return(index);
-}/*}}}*/
-/*FUNCTION StringFromDims{{{1*/
-int StringFromDims(char* cstr, int* dims, int ndims) {
-
-	sprintf(&cstr[0],"[");
-	for(int i=0; i<ndims-1; i++) sprintf(&cstr[strlen(cstr)],"%d,",dims[i]);
-	sprintf(&cstr[strlen(cstr)],"%d]",dims[ndims-1]);
-
-	return(0);
-}/*}}}*/
-/*FUNCTION StringFromSize{{{1*/
-int StringFromSize(char* cstr, int* size, int ndims) {
-
-	sprintf(&cstr[0],"[");
-	for(int i=0; i<ndims-1; i++) sprintf(&cstr[strlen(cstr)],"%dx",size[i]);
-	sprintf(&cstr[strlen(cstr)],"%d]",size[ndims-1]);
-
-	return(0);
-}/*}}}*/
Index: sm/trunk/src/c/objects/Options/OptionsUtilities.h
===================================================================
--- /issm/trunk/src/c/objects/Options/OptionsUtilities.h	(revision 7738)
+++ 	(revision )
@@ -1,24 +1,0 @@
-/*! \file OptionsUtilities.h 
- *  \brief: header file for options utilities
- */
-
-#ifndef _OPTIONSUTILITIES_H_
-#define _OPTIONSUTILITIES_H_
-
-/*Headers:{{{1*/
-#include "../../include/include.h"
-#include "../../shared/Exceptions/exceptions.h"
-#include "../../EnumDefinitions/EnumDefinitions.h"
-
-#include "./Option.h"
-/*}}}*/
-
-int ColumnWiseDimsFromIndex(int* dims, int index, int* size, int ndims);
-int IndexFromColumnWiseDims(int* dims, int* size, int ndims);
-int RowWiseDimsFromIndex(int* dims, int index, int* size, int ndims);
-int IndexFromRowWiseDims(int* dims, int* size, int ndims);
-int StringFromDims(char* cstr, int* dims, int ndims);
-int StringFromSize(char* cstr, int* size, int ndims);
-
-#endif  /* _OPTIONSUTILITIES_H */
-
Index: /issm/trunk/src/c/objects/objects.h
===================================================================
--- /issm/trunk/src/c/objects/objects.h	(revision 7738)
+++ /issm/trunk/src/c/objects/objects.h	(revision 7739)
@@ -65,10 +65,10 @@
 /*Option parsing objects: */
 #include "./Options/Option.h"
-#include "./Options/OptionsDouble.h"
-#include "./Options/OptionsLogical.h"
-#include "./Options/OptionsChar.h"
-#include "./Options/OptionsStruct.h"
-#include "./Options/OptionsCell.h"
-#include "./Options/OptionsUtilities.h"
+#include "./Options/OptionDouble.h"
+#include "./Options/OptionLogical.h"
+#include "./Options/OptionChar.h"
+#include "./Options/OptionStruct.h"
+#include "./Options/OptionCell.h"
+#include "./Options/OptionUtilities.h"
 
 /*Inputs: */
