50 #ifdef HAVE_MUELU_EPETRAEXT
62 long ExtractNonSerializableData(
const Teuchos::ParameterList& inList, Teuchos::ParameterList& serialList, Teuchos::ParameterList& nonSerialList) {
63 using Teuchos::ParameterList;
68 for (ParameterList::ConstIterator it = inList.begin(); it != inList.end(); it++) {
69 const std::string& levelName = it->first;
72 if (inList.isSublist(levelName) && ((levelName.find(
"level ") == 0 && levelName.size() > 6) || levelName.find(
"user data") == 0)) {
73 int levelID = strtol(levelName.substr(6).c_str(), 0, 0);
75 if(levelName.find(
"user data") == std::string::npos) {
77 levelID = strtol(levelName.substr(6).c_str(), 0, 0);
78 if (maxLevel < levelID)
83 const ParameterList& levelList = inList.sublist(levelName);
84 for (ParameterList::ConstIterator it2 = levelList.begin(); it2 != levelList.end(); it2++) {
85 const std::string& name = it2->first;
86 if (name ==
"A" || name ==
"P" || name ==
"R" || name==
"M" || name ==
"K" || name ==
"Nullspace" || name ==
"Coordinates"
87 #ifdef HAVE_MUELU_INTREPID2
88 || name ==
"pcoarsen: element to node map"
91 nonSerialList.sublist(levelName).setEntry(name, it2->second);
93 #ifdef HAVE_MUELU_MATLAB
96 nonSerialList.sublist(levelName).setEntry(name, it2->second);
100 nonSerialList.sublist(levelName).setEntry(name, it2->second);
102 serialList.sublist(levelName).setEntry(name, it2->second);
107 serialList.setEntry(it->first, it->second);
118 char* buf = (
char*) malloc(stream.size() + 1);
119 strcpy(buf, stream.c_str());
120 char* token = strtok(buf, delimChars);
130 char* tokStart = token;
131 char* tokEnd = token + strlen(token) - 1;
132 while(*tokStart ==
' ' && tokStart < tokEnd)
134 while(*tokEnd ==
' ' && tokStart < tokEnd)
137 if(tokStart < tokEnd)
139 std::string finishedToken(tokStart, tokEnd - tokStart);
140 tokenList.push_back(finishedToken);
142 token = strtok(NULL, delimChars);
150 char* str = (
char*) malloc(name.length() + 1);
151 strcpy(str, name.c_str());
153 char* firstWord = strtok(str,
" ");
158 char* secondWord = strtok(NULL,
" ");
163 char* thirdWord = strtok(NULL,
" ");
169 char* tolowerIt = firstWord;
172 *tolowerIt = (char)
tolower(*tolowerIt);
176 if(strstr(firstWord,
"matrix") ||
177 strstr(firstWord,
"multivector") ||
178 strstr(firstWord,
"map") ||
179 strstr(firstWord,
"ordinalvector") ||
180 strstr(firstWord,
"int") ||
181 strstr(firstWord,
"scalar") ||
182 strstr(firstWord,
"double") ||
183 strstr(firstWord,
"complex") ||
184 strstr(firstWord,
"string"))
200 char* str = (
char*) malloc(name.length() + 1);
201 strcpy(str, name.c_str());
203 char* firstWord = strtok(str,
" ");
208 char* secondWord = strtok(NULL,
" ");
213 char* thirdWord = strtok(NULL,
" ");
219 char* tolowerIt = firstWord;
222 *tolowerIt = (char)
tolower(*tolowerIt);
226 if(strstr(firstWord,
"matrix") ||
227 strstr(firstWord,
"multivector") ||
228 strstr(firstWord,
"map") ||
229 strstr(firstWord,
"ordinalvector") ||
230 strstr(firstWord,
"int") ||
231 strstr(firstWord,
"scalar") ||
232 strstr(firstWord,
"double") ||
233 strstr(firstWord,
"complex") ||
234 strstr(firstWord,
"string") ||
235 strstr(firstWord,
"array<go>") ||
236 strstr(firstWord,
"array<lo>") ||
237 strstr(firstWord,
"arrayrcp<lo>") ||
238 strstr(firstWord,
"arrayrcp<go>"))