54 fprintf(stderr,
"Usage: XmlToTecplot meshfile\n");
58 LibUtilities::SessionReader::RegisterCmdLineFlag(
59 "multi-zone",
"m",
"Output multi-zone format (one element per zone).");
62 = LibUtilities::SessionReader::CreateInstance(argc, argv);
66 string meshfile(argv[argc-1]);
68 = SpatialDomains::MeshGraph::Read(vSession);
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();
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);
#define ASSERTL0(condition, msg)
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
BasisType GetBasisType() const
Return type of expansion basis.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
1D Evenly-spaced points using Lagrange polynomial
boost::shared_ptr< ExpList1D > ExpList1DSharedPtr
Shared pointer to an ExpList1D object.
Defines a specification for a set of points.
boost::shared_ptr< ExpList2D > ExpList2DSharedPtr
Shared pointer to an ExpList2D object.
boost::shared_ptr< ExpList3D > ExpList3DSharedPtr
Shared pointer to an ExpList3D object.
PointsKey GetPointsKey() const
Return distribution of points.
boost::shared_ptr< ExpList3DHomogeneous1D > ExpList3DHomogeneous1DSharedPtr
Shared pointer to an ExpList3DHomogeneous1D object.
int GetNumModes() const
Returns the order of the basis.
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
Describes the specification for a Basis.
std::map< int, ExpansionShPtr > ExpansionMap
std::map< int, ExpansionShPtr >::iterator ExpansionMapIter