45 using namespace Nektar;
47 int main(
int argc,
char *argv[])
49 Array<OneD,NekDouble> fce;
50 Array<OneD,NekDouble> xc0,xc1,xc2;
54 fprintf(stderr,
"Usage: XmlToTecplot meshfile\n");
59 "multi-zone",
"m",
"Output multi-zone format (one element per zone).");
66 string meshfile(argv[argc-1]);
76 for (it = emap.begin(); it != emap.end(); ++it)
78 for (
int i = 0; i < it->second->m_basisKeyVector.size(); ++i)
92 int expdim = graphShPt->GetMeshDimension();
93 Array<OneD, MultiRegions::ExpListSharedPtr> Exp(1);
106 if(vSession->DefinesSolverInfo(
"HOMOGENEOUS"))
108 std::string HomoStr = vSession->GetSolverInfo(
"HOMOGENEOUS");
112 HomoStr ==
"HOMOGENEOUS1D" || HomoStr ==
"Homogeneous1D" ||
113 HomoStr ==
"1D" || HomoStr ==
"Homo1D",
114 "Only 3DH1D supported for XML output currently.");
117 vSession->LoadParameter(
"HomModesZ", nplanes);
125 NekDouble lz = vSession->GetParameter(
"LZ");
129 vSession, Bkey, lz,
false,
false, graphShPt);
148 ASSERTL0(
false,
"Expansion dimension not recognised");
156 string outfile(strtok(argv[argc-1],
"."));
158 ofstream outstrm(outfile.c_str());
160 Exp[0]->WriteTecplotHeader(outstrm);
162 if (vSession->DefinesCmdLineArgument(
"multi-zone"))
164 int nExp = Exp[0]->GetExpSize();
166 for (
int i = 0; i < nExp; ++i)
168 Exp[0]->WriteTecplotZone (outstrm, i);
169 Exp[0]->WriteTecplotConnectivity(outstrm, i);
174 Exp[0]->WriteTecplotZone (outstrm);
175 Exp[0]->WriteTecplotConnectivity(outstrm);