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]);
129 if(vm.count(
"range"))
131 vector<NekDouble> values;
133 vm[
"range"].as<string>().c_str(), values),
134 "Failed to interpret range string");
137 "Do not have minimum values of xmin,xmax");
139 "Do not have an even number of range values");
141 int nvalues = values.size()/2;
144 rng->doZrange =
false;
145 rng->doYrange =
false;
150 rng->doZrange =
true;
151 rng->zmin = values[4];
152 rng->zmax = values[5];
154 rng->doYrange =
true;
155 rng->ymin = values[2];
156 rng->ymax = values[3];
158 rng->doXrange =
true;
159 rng->xmin = values[0];
160 rng->xmax = values[1];
163 ASSERTL0(
false,
"too many values specfied in range");
169 string firstarg =
"FieldConvert";
170 string verbose =
"-v";
172 argv = (
char**)malloc(2*
sizeof(
char*));
173 argv[0] = (
char *)malloc(firstarg.size()*
sizeof(char));
174 argv[1] = (
char *)malloc(verbose.size()*
sizeof(char));
176 sprintf(argv[0],
"%s",firstarg.c_str());
177 sprintf(argv[1],
"%s",verbose.c_str());
202 if(!expansions.size())
207 m_f->m_exp.resize(1);
211 int NumHomogeneousDir = 0;
214 m_f->m_fld->Import(
m_f->m_inputfiles[fldending][0],
m_f->m_fielddef);
215 NumHomogeneousDir =
m_f->m_fielddef[0]->m_numHomogeneousDir;
219 m_f->m_graph->SetExpansions(
m_f->m_fielddef);
223 if(
m_f->m_session->DefinesSolverInfo(
"HOMOGENEOUS"))
225 std::string HomoStr =
m_f->m_session->GetSolverInfo(
"HOMOGENEOUS");
227 if((HomoStr ==
"HOMOGENEOUS1D") || (HomoStr ==
"Homogeneous1D")
228 || (HomoStr ==
"1D") || (HomoStr ==
"Homo1D"))
230 NumHomogeneousDir = 1;
232 if((HomoStr ==
"HOMOGENEOUS2D") || (HomoStr ==
"Homogeneous2D")
233 || (HomoStr ==
"2D") || (HomoStr ==
"Homo2D"))
235 NumHomogeneousDir = 2;
245 if(vm.count(
"output-points"))
247 nPointsNew = vm[
"output-points"].as<
int>();
251 m_f->m_graph->SetExpansionsToEvenlySpacedPoints(nPointsNew);
254 m_f->m_exp[0] =
m_f->SetUpFirstExpList(NumHomogeneousDir,fldfilegiven);