42 static std::string
npts = LibUtilities::SessionReader::RegisterCmdLineArgument(
43 "NumberOfPoints",
"n",
"Define number of points to dump output");
83 cout <<
"Processing input xml file" << endl;
88 bool fldfilegiven =
true;
91 if(
m_f->m_inputfiles.count(
"fld") != 0)
95 else if(
m_f->m_inputfiles.count(
"chk") != 0)
99 else if (
m_f->m_inputfiles.count(
"rst") != 0)
105 fldfilegiven =
false;
108 string xml_ending =
"xml";
109 string xml_gz_ending =
"xml.gz";
112 std::vector<std::string> files;
114 for (
int i = 0; i <
m_f->m_inputfiles[xml_ending].size(); ++i)
116 files.push_back(
m_f->m_inputfiles[xml_ending][i]);
120 for (
int j =0; j <
m_f->m_inputfiles[xml_gz_ending].size(); ++j)
122 files.push_back(
m_f->m_inputfiles[xml_gz_ending][j]);
130 if(vm.count(
"range"))
132 vector<NekDouble> values;
134 vm[
"range"].as<string>().c_str(), values),
135 "Failed to interpret range string");
138 "Do not have minimum values of xmin,xmax");
140 "Do not have an even number of range values");
142 int nvalues = values.size()/2;
146 rng->m_doZrange =
false;
147 rng->m_doYrange =
false;
148 rng->m_checkShape =
false;
153 rng->m_doZrange =
true;
154 rng->m_zmin = values[4];
155 rng->m_zmax = values[5];
157 rng->m_doYrange =
true;
158 rng->m_ymin = values[2];
159 rng->m_ymax = values[3];
161 rng->m_doXrange =
true;
162 rng->m_xmin = values[0];
163 rng->m_xmax = values[1];
166 ASSERTL0(
false,
"too many values specfied in range");
171 if(vm.count(
"onlyshape"))
177 rng->m_doXrange =
false;
178 rng->m_doYrange =
false;
179 rng->m_doZrange =
false;
182 rng->m_checkShape =
true;
185 boost::to_upper_copy(vm[
"onlyshape"].as<string>());
190 boost::to_upper(shapeval);
191 if(shapematch.compare(shapeval) == 0)
197 ASSERTL0(i != LibUtilities::SIZE_ShapeType,
198 "Failed to find shape type in -onlyshape command line "
205 string firstarg =
"FieldConvert";
206 string verbose =
"-v";
208 argv = (
char**)malloc(2*
sizeof(
char*));
209 argv[0] = (
char *)malloc(firstarg.size()*
sizeof(char));
210 argv[1] = (
char *)malloc(verbose.size()*
sizeof(char));
212 sprintf(argv[0],
"%s",firstarg.c_str());
213 sprintf(argv[1],
"%s",verbose.c_str());
238 if(!expansions.size())
243 m_f->m_exp.resize(1);
247 int NumHomogeneousDir = 0;
250 m_f->m_fld->Import(
m_f->m_inputfiles[fldending][0],
m_f->m_fielddef);
251 NumHomogeneousDir =
m_f->m_fielddef[0]->m_numHomogeneousDir;
255 m_f->m_graph->SetExpansions(
m_f->m_fielddef);
259 if(
m_f->m_session->DefinesSolverInfo(
"HOMOGENEOUS"))
261 std::string HomoStr =
m_f->m_session->GetSolverInfo(
"HOMOGENEOUS");
263 if((HomoStr ==
"HOMOGENEOUS1D") || (HomoStr ==
"Homogeneous1D")
264 || (HomoStr ==
"1D") || (HomoStr ==
"Homo1D"))
266 NumHomogeneousDir = 1;
268 if((HomoStr ==
"HOMOGENEOUS2D") || (HomoStr ==
"Homogeneous2D")
269 || (HomoStr ==
"2D") || (HomoStr ==
"Homo2D"))
271 NumHomogeneousDir = 2;
281 if(vm.count(
"output-points"))
283 nPointsNew = vm[
"output-points"].as<
int>();
287 m_f->m_graph->SetExpansionsToEvenlySpacedPoints(nPointsNew);
290 m_f->m_exp[0] =
m_f->SetUpFirstExpList(NumHomogeneousDir,fldfilegiven);