Index: /issm/trunk/src/c/shared/String/isdistributed.cpp
===================================================================
--- /issm/trunk/src/c/shared/String/isdistributed.cpp	(revision 679)
+++ /issm/trunk/src/c/shared/String/isdistributed.cpp	(revision 679)
@@ -0,0 +1,49 @@
+/*!\file:  isdistributed.cpp
+ * \brief: figure out if a dakota variable descriptor indicates presence of a distributed 
+ * variable. For example: "rho_ice" is not distributed, but "thickness1" is. 
+ * If variable is distributed, return root of the variable name (here, if would be "thickness" 
+ * for variable descriptor "thickness1").
+ */ 
+
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#undef __FUNCT__ 
+#define __FUNCT__ "isdistributed"
+
+int isdistributed(char** proot,char* name){
+
+	int i;
+
+	/*output: */
+	int   distributed=0;
+	char* root=NULL;
+
+	/*intermediary: */
+	for(i=0;i<strlen(name);i++){
+		if (isdigit(name[i])){
+			distributed=1;
+			break;
+		}
+	}
+
+	if(distributed){
+		root=(char*)xmalloc((strlen(name)+1)*sizeof(char));
+		strcpy(root,name);
+	
+		for(i=0;i<strlen(name);i++){
+			if (isdigit(name[i])){
+				root[i]='\0'; //finish the string here.
+				break;
+			}
+		}
+	}
+
+	/*Assign output pointers:*/
+	*proot=root;
+	return distributed;
+}
+
Index: sm/trunk/src/c/shared/String/root.cpp
===================================================================
--- /issm/trunk/src/c/shared/String/root.cpp	(revision 678)
+++ 	(revision )
@@ -1,35 +1,0 @@
-/*!\file: root.cpp
- * \brief get root of a string: ex, "thickness"=root("thickness1");
- */ 
-
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#undef __FUNCT__ 
-#define __FUNCT__ "root"
-
-char* root(char* string){
-
-	int outlength;
-	char* outstring=NULL;
-	int length;
-
-	length=strlen(string);
-
-	outlength=length;
-	for(i=0;i<length;i++){
-		if (isdigit(string[i])){
-			outlength=i;
-			break;
-		}
-	}
-
-	outstring=(char*)xmalloc((outlength+1)*sizeof(char));
-
-	memcpy(outstring,string,outlength*sizeof(char));
-	outstring[outlength]='\0';
-
-}
Index: /issm/trunk/src/c/shared/String/sharedstring.h
===================================================================
--- /issm/trunk/src/c/shared/String/sharedstring.h	(revision 679)
+++ /issm/trunk/src/c/shared/String/sharedstring.h	(revision 679)
@@ -0,0 +1,11 @@
+/*!\file: sharedstring.h
+ * \brief prototypes for sharedstring.h
+ */ 
+
+#ifndef _SHAREDSTRING_H_
+#define  _SHAREDSTRING_H_
+
+int isdistributed(char** proot,char* name);
+
+#endif //ifndef _SHAREDSTRING_H_
+
Index: sm/trunk/src/c/shared/String/suffix.cpp
===================================================================
--- /issm/trunk/src/c/shared/String/suffix.cpp	(revision 678)
+++ 	(revision )
@@ -1,24 +1,0 @@
-/*!\file:  suffix.cpp
- * \brief get numeric suffix of a string
- */ 
-
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#undef __FUNCT__ 
-#define __FUNCT__ "suffix"
-
-int suffix(char* string){
-
-	char* numeric=NULL;
-	int length;
-
-	length=strlen(string);
-
-	for(i=0;i<length;i++){
-		if isdigit(string[i])
-
-}
Index: /issm/trunk/src/c/shared/shared.h
===================================================================
--- /issm/trunk/src/c/shared/shared.h	(revision 678)
+++ /issm/trunk/src/c/shared/shared.h	(revision 679)
@@ -17,4 +17,5 @@
 #include "Numerics/numerics.h"
 #include "Dofs/dofs.h"
+#include "String/sharedstring.h" //to avoid confusion with <string.h> standard header file
 
 
