40 #include <boost/iostreams/filtering_streambuf.hpp> 
   41 #include <boost/iostreams/copy.hpp> 
   42 #include <boost/iostreams/filter/gzip.hpp> 
   43 namespace io = boost::iostreams;
 
   62                                                "Writes a Nektar++ xml file.");
 
   67         true, 
"0", 
"Compress output file and append a .gz extension.");
 
   69         true, 
"0", 
"Attempt to load resulting mesh and create meshgraph.");
 
   79     const std::map<int, boost::shared_ptr<T> > &tmp =
 
   80         graph->GetAllElementsOfType<T>();
 
   81     typename std::map<int, boost::shared_ptr<T> >::const_iterator it1, it2;
 
   86     for (it1 = tmp.begin(), it2 = tmp.end(); it1 != it2; ++it1)
 
   90         geom->Reset(curvedEdges, curvedFaces);
 
   98         cout << 
"OutputNekpp: Writing file..." << endl;
 
  102     TiXmlDeclaration *decl = 
new TiXmlDeclaration(
"1.0", 
"utf-8", 
"");
 
  103     doc.LinkEndChild(decl);
 
  105     TiXmlElement *root = 
new TiXmlElement(
"NEKTAR");
 
  106     doc.LinkEndChild(root);
 
  109     TiXmlElement *geomTag = 
new TiXmlElement(
"GEOMETRY");
 
  110     geomTag->SetAttribute(
"DIM", 
m_mesh->m_expDim);
 
  111     geomTag->SetAttribute(
"SPACE", 
m_mesh->m_spaceDim);
 
  112     root->LinkEndChild(geomTag);
 
  125     string filename = 
m_config[
"outfile"].as<
string>();
 
  131         ofstream fout(filename.c_str(),
 
  132                       std::ios_base::out | std::ios_base::binary);
 
  134         std::stringstream decompressed;
 
  136         io::filtering_streambuf<io::output> out;
 
  137         out.push(io::gzip_compressor());
 
  139         io::copy(decompressed, out);
 
  145         doc.SaveFile(filename);
 
  153         vector<string> filenames(1);
 
  154         filenames[0] = filename;
 
  161         TestElmts<SpatialDomains::SegGeom>(graphShPt);
 
  162         TestElmts<SpatialDomains::TriGeom>(graphShPt);
 
  163         TestElmts<SpatialDomains::QuadGeom>(graphShPt);
 
  164         TestElmts<SpatialDomains::TetGeom>(graphShPt);
 
  165         TestElmts<SpatialDomains::PrismGeom>(graphShPt);
 
  166         TestElmts<SpatialDomains::PyrGeom>(graphShPt);
 
  167         TestElmts<SpatialDomains::HexGeom>(graphShPt);
 
  173     bool UnCompressed = 
m_config[
"uncompress"].as<
bool>();
 
  175     TiXmlElement *verTag = 
new TiXmlElement(
"VERTEX");
 
  178     std::set<NodeSharedPtr> tmp(
m_mesh->m_vertexSet.begin(),
 
  179                                 m_mesh->m_vertexSet.end());
 
  183         for (it = tmp.begin(); it != tmp.end(); ++it)
 
  187             s << scientific << setprecision(8) << n->m_x << 
" " << n->m_y << 
" " 
  189             TiXmlElement *v = 
new TiXmlElement(
"V");
 
  190             v->SetAttribute(
"ID", n->m_id);
 
  191             v->LinkEndChild(
new TiXmlText(s.str()));
 
  192             verTag->LinkEndChild(v);
 
  197         std::vector<LibUtilities::MeshVertex> vertInfo;
 
  198         for (it = tmp.begin(); it != tmp.end(); ++it)
 
  206             vertInfo.push_back(v);
 
  210         verTag->SetAttribute(
"COMPRESSED",
 
  212         verTag->SetAttribute(
"BITSIZE",
 
  215         verTag->LinkEndChild(
new TiXmlText(vertStr));
 
  218     pRoot->LinkEndChild(verTag);
 
  223     bool UnCompressed = 
m_config[
"uncompress"].as<
bool>();
 
  225     if (
m_mesh->m_expDim >= 2)
 
  227         TiXmlElement *verTag = 
new TiXmlElement(
"EDGE");
 
  230         std::set<EdgeSharedPtr> tmp(
m_mesh->m_edgeSet.begin(),
 
  234             for (it = tmp.begin(); it != tmp.end(); ++it)
 
  239                 s << setw(5) << ed->m_n1->m_id << 
"  " << ed->m_n2->m_id
 
  241                 TiXmlElement *e = 
new TiXmlElement(
"E");
 
  242                 e->SetAttribute(
"ID", ed->m_id);
 
  243                 e->LinkEndChild(
new TiXmlText(s.str()));
 
  244                 verTag->LinkEndChild(e);
 
  249             std::vector<LibUtilities::MeshEdge> edgeInfo;
 
  250             for (it = tmp.begin(); it != tmp.end(); ++it)
 
  256                 e.
v0 = ed->m_n1->m_id;
 
  257                 e.
v1 = ed->m_n2->m_id;
 
  259                 edgeInfo.push_back(e);
 
  264             verTag->SetAttribute(
 
  266             verTag->SetAttribute(
"BITSIZE",
 
  268             verTag->LinkEndChild(
new TiXmlText(edgeStr));
 
  270         pRoot->LinkEndChild(verTag);
 
  276     bool UnCompressed = 
m_config[
"uncompress"].as<
bool>();
 
  278     if (
m_mesh->m_expDim == 3)
 
  280         TiXmlElement *verTag = 
new TiXmlElement(
"FACE");
 
  282         std::set<FaceSharedPtr> tmp(
m_mesh->m_faceSet.begin(),
 
  287             for (it = tmp.begin(); it != tmp.end(); ++it)
 
  292                 for (
int j = 0; j < fa->m_edgeList.size(); ++j)
 
  294                     s << setw(10) << fa->m_edgeList[j]->m_id;
 
  297                 switch (fa->m_vertexList.size())
 
  300                         f = 
new TiXmlElement(
"T");
 
  303                         f = 
new TiXmlElement(
"Q");
 
  308                 f->SetAttribute(
"ID", fa->m_id);
 
  309                 f->LinkEndChild(
new TiXmlText(s.str()));
 
  310                 verTag->LinkEndChild(f);
 
  315             std::vector<LibUtilities::MeshTri> TriFaceInfo;
 
  316             std::vector<LibUtilities::MeshQuad> QuadFaceInfo;
 
  318             for (it = tmp.begin(); it != tmp.end(); ++it)
 
  322                 switch (fa->m_edgeList.size())
 
  328                         for (
int i = 0; i < 3; ++i)
 
  330                             f.
e[i] = fa->m_edgeList[i]->m_id;
 
  332                         TriFaceInfo.push_back(f);
 
  339                         for (
int i = 0; i < 4; ++i)
 
  341                             f.
e[i] = fa->m_edgeList[i]->m_id;
 
  343                         QuadFaceInfo.push_back(f);
 
  347                         ASSERTL0(
false, 
"Unkonwn face type");
 
  351             if (TriFaceInfo.size())
 
  353                 std::string vType(
"T");
 
  354                 TiXmlElement *x = 
new TiXmlElement(vType);
 
  361                 x->SetAttribute(
"BITSIZE",
 
  363                 x->LinkEndChild(
new TiXmlText(faceStr));
 
  364                 verTag->LinkEndChild(x);
 
  367             if (QuadFaceInfo.size())
 
  369                 std::string vType(
"Q");
 
  370                 TiXmlElement *x = 
new TiXmlElement(vType);
 
  377                 x->SetAttribute(
"BITSIZE",
 
  379                 x->LinkEndChild(
new TiXmlText(faceStr));
 
  380                 verTag->LinkEndChild(x);
 
  383         pRoot->LinkEndChild(verTag);
 
  389     bool UnCompressed = 
m_config[
"uncompress"].as<
bool>();
 
  391     TiXmlElement *verTag           = 
new TiXmlElement(
"ELEMENT");
 
  392     vector<ElementSharedPtr> &elmt = 
m_mesh->m_element[
m_mesh->m_expDim];
 
  396         for (
int i = 0; i < elmt.size(); ++i)
 
  398             TiXmlElement *elm_tag = 
new TiXmlElement(elmt[i]->GetTag());
 
  399             elm_tag->SetAttribute(
"ID", elmt[i]->GetId());
 
  400             elm_tag->LinkEndChild(
new TiXmlText(elmt[i]->
GetXmlString()));
 
  401             verTag->LinkEndChild(elm_tag);
 
  406         std::vector<LibUtilities::MeshEdge> SegInfo;
 
  407         std::vector<LibUtilities::MeshTri> TriInfo;
 
  408         std::vector<LibUtilities::MeshQuad> QuadInfo;
 
  409         std::vector<LibUtilities::MeshTet> TetInfo;
 
  410         std::vector<LibUtilities::MeshPyr> PyrInfo;
 
  411         std::vector<LibUtilities::MeshPrism> PrismInfo;
 
  412         std::vector<LibUtilities::MeshHex> HexInfo;
 
  414         for (
int i = 0; i < elmt.size(); ++i)
 
  416             switch (elmt[i]->GetTag()[0])
 
  421                     e.
id = elmt[i]->GetId();
 
  422                     e.
v0 = elmt[i]->GetVertex(0)->m_id;
 
  423                     e.
v1 = elmt[i]->GetVertex(1)->m_id;
 
  424                     SegInfo.push_back(e);
 
  430                     e.
id = elmt[i]->GetId();
 
  431                     for (
int j = 0; j < 3; ++j)
 
  433                         e.
e[j] = elmt[i]->GetEdge(j)->m_id;
 
  435                     TriInfo.push_back(e);
 
  441                     e.
id = elmt[i]->GetId();
 
  442                     for (
int j = 0; j < 4; ++j)
 
  444                         e.
e[j] = elmt[i]->GetEdge(j)->m_id;
 
  446                     QuadInfo.push_back(e);
 
  452                     e.
id = elmt[i]->GetId();
 
  453                     for (
int j = 0; j < 4; ++j)
 
  455                         e.
f[j] = elmt[i]->GetFace(j)->m_id;
 
  457                     TetInfo.push_back(e);
 
  463                     e.
id = elmt[i]->GetId();
 
  464                     for (
int j = 0; j < 5; ++j)
 
  466                         e.
f[j] = elmt[i]->GetFace(j)->m_id;
 
  468                     PyrInfo.push_back(e);
 
  474                     e.
id = elmt[i]->GetId();
 
  475                     for (
int j = 0; j < 5; ++j)
 
  477                         e.
f[j] = elmt[i]->GetFace(j)->m_id;
 
  479                     PrismInfo.push_back(e);
 
  485                     e.
id = elmt[i]->GetId();
 
  486                     for (
int j = 0; j < 6; ++j)
 
  488                         e.
f[j] = elmt[i]->GetFace(j)->m_id;
 
  490                     HexInfo.push_back(e);
 
  494                     ASSERTL0(
false, 
"Unknown element type");
 
  500             std::string vType(
"S");
 
  501             TiXmlElement *x = 
new TiXmlElement(vType);
 
  504             x->SetAttribute(
"COMPRESSED",
 
  506             x->SetAttribute(
"BITSIZE",
 
  508             x->LinkEndChild(
new TiXmlText(Str));
 
  509             verTag->LinkEndChild(x);
 
  514             std::string vType(
"T");
 
  515             TiXmlElement *x = 
new TiXmlElement(vType);
 
  518             x->SetAttribute(
"COMPRESSED",
 
  520             x->SetAttribute(
"BITSIZE",
 
  522             x->LinkEndChild(
new TiXmlText(Str));
 
  523             verTag->LinkEndChild(x);
 
  528             std::string vType(
"Q");
 
  529             TiXmlElement *x = 
new TiXmlElement(vType);
 
  532             x->SetAttribute(
"COMPRESSED",
 
  534             x->SetAttribute(
"BITSIZE",
 
  536             x->LinkEndChild(
new TiXmlText(Str));
 
  537             verTag->LinkEndChild(x);
 
  542             std::string vType(
"A");
 
  543             TiXmlElement *x = 
new TiXmlElement(vType);
 
  546             x->SetAttribute(
"COMPRESSED",
 
  548             x->SetAttribute(
"BITSIZE",
 
  550             x->LinkEndChild(
new TiXmlText(Str));
 
  551             verTag->LinkEndChild(x);
 
  556             std::string vType(
"P");
 
  557             TiXmlElement *x = 
new TiXmlElement(vType);
 
  560             x->SetAttribute(
"COMPRESSED",
 
  562             x->SetAttribute(
"BITSIZE",
 
  564             x->LinkEndChild(
new TiXmlText(Str));
 
  565             verTag->LinkEndChild(x);
 
  568         if (PrismInfo.size())
 
  570             std::string vType(
"R");
 
  571             TiXmlElement *x = 
new TiXmlElement(vType);
 
  574             x->SetAttribute(
"COMPRESSED",
 
  576             x->SetAttribute(
"BITSIZE",
 
  578             x->LinkEndChild(
new TiXmlText(Str));
 
  579             verTag->LinkEndChild(x);
 
  584             std::string vType(
"H");
 
  585             TiXmlElement *x = 
new TiXmlElement(vType);
 
  588             x->SetAttribute(
"COMPRESSED",
 
  590             x->SetAttribute(
"BITSIZE",
 
  592             x->LinkEndChild(
new TiXmlText(Str));
 
  593             verTag->LinkEndChild(x);
 
  597     pRoot->LinkEndChild(verTag);
 
  602     bool UnCompressed = 
m_config[
"uncompress"].as<
bool>();
 
  610         for (it = 
m_mesh->m_edgeSet.begin(); it != 
m_mesh->m_edgeSet.end();
 
  613             if ((*it)->m_edgeNodes.size() > 0)
 
  620     else if (
m_mesh->m_expDim == 1)
 
  622         for (
int i = 0; i < 
m_mesh->m_element[1].size(); ++i)
 
  624             if (
m_mesh->m_element[1][i]->GetVolumeNodes().size() > 0)
 
  634     TiXmlElement *curved = 
new TiXmlElement(
"CURVED");
 
  638         for (it = 
m_mesh->m_edgeSet.begin(); it != 
m_mesh->m_edgeSet.end();
 
  641             if ((*it)->m_edgeNodes.size() > 0)
 
  643                 TiXmlElement *e = 
new TiXmlElement(
"E");
 
  644                 e->SetAttribute(
"ID", edgecnt++);
 
  645                 e->SetAttribute(
"EDGEID", (*it)->m_id);
 
  646                 e->SetAttribute(
"NUMPOINTS", (*it)->GetNodeCount());
 
  649                 TiXmlText *t0 = 
new TiXmlText((*it)->GetXmlCurveString());
 
  651                 curved->LinkEndChild(e);
 
  665                 if ((*it)->GetVolumeNodes().size() > 0)
 
  667                     TiXmlElement *e = 
new TiXmlElement(
"E");
 
  668                     e->SetAttribute(
"ID", facecnt++);
 
  669                     e->SetAttribute(
"EDGEID", (*it)->GetId());
 
  670                     e->SetAttribute(
"NUMPOINTS", (*it)->GetNodeCount());
 
  675                     TiXmlText *t0 = 
new TiXmlText((*it)->GetXmlCurveString());
 
  677                     curved->LinkEndChild(e);
 
  682         else if (
m_mesh->m_expDim == 2 && 
m_mesh->m_spaceDim == 3)
 
  690                 if ((*it)->GetVolumeNodes().size() > 0)
 
  692                     TiXmlElement *e = 
new TiXmlElement(
"F");
 
  693                     e->SetAttribute(
"ID", facecnt++);
 
  694                     e->SetAttribute(
"FACEID", (*it)->GetId());
 
  695                     e->SetAttribute(
"NUMPOINTS", (*it)->GetNodeCount());
 
  700                     TiXmlText *t0 = 
new TiXmlText((*it)->GetXmlCurveString());
 
  702                     curved->LinkEndChild(e);
 
  706         else if (
m_mesh->m_expDim == 3)
 
  709             for (it2 = 
m_mesh->m_faceSet.begin();
 
  710                  it2 != 
m_mesh->m_faceSet.end();
 
  713                 if ((*it2)->m_faceNodes.size() > 0)
 
  715                     TiXmlElement *f = 
new TiXmlElement(
"F");
 
  716                     f->SetAttribute(
"ID", facecnt++);
 
  717                     f->SetAttribute(
"FACEID", (*it2)->m_id);
 
  718                     f->SetAttribute(
"NUMPOINTS", (*it2)->GetNodeCount());
 
  722                     TiXmlText *t0 = 
new TiXmlText((*it2)->GetXmlCurveString());
 
  724                     curved->LinkEndChild(f);
 
  731         std::vector<LibUtilities::MeshCurvedInfo> edgeinfo;
 
  732         std::vector<LibUtilities::MeshCurvedInfo> faceinfo;
 
  739         for (it = 
m_mesh->m_edgeSet.begin(); it != 
m_mesh->m_edgeSet.end();
 
  742             if ((*it)->m_edgeNodes.size() > 0)
 
  745                 cinfo.
id       = edgecnt++;
 
  747                 cinfo.
npoints  = (*it)->m_edgeNodes.size() + 2;
 
  748                 cinfo.
ptype    = (*it)->m_curveType;
 
  752                 edgeinfo.push_back(cinfo);
 
  754                 std::vector<NodeSharedPtr> nodeList;
 
  755                 (*it)->GetCurvedNodes(nodeList);
 
  758                 for (
int i = 0; i < nodeList.size(); ++i)
 
  760                     pair<NodeSet::iterator, bool> testIns =
 
  761                         cvertlist.insert(nodeList[i]);
 
  765                         (*(testIns.first))->m_id = newidx;
 
  769                         v.
x  = nodeList[i]->m_x;
 
  770                         v.
y  = nodeList[i]->m_y;
 
  771                         v.
z = nodeList[i]->m_z;
 
  772                         curvedpts.
pts.push_back(v);
 
  776                     curvedpts.
index.push_back((*(testIns.first))->m_id);
 
  794                 if ((*it)->GetVolumeNodes().size() > 0)
 
  797                     cinfo.
id       = facecnt++;
 
  799                     cinfo.
npoints  = (*it)->GetNodeCount();
 
  800                     cinfo.
ptype    = (*it)->GetCurveType();
 
  804                     edgeinfo.push_back(cinfo);
 
  807                     vector<NodeSharedPtr> tmp;
 
  808                     (*it)->GetCurvedNodes(tmp);
 
  810                     for (
int i = 0; i < tmp.size(); ++i)
 
  812                         pair<NodeSet::iterator, bool> testIns =
 
  813                             cvertlist.insert(tmp[i]);
 
  817                             (*(testIns.first))->m_id = newidx;
 
  824                             curvedpts.
pts.push_back(v);
 
  827                         curvedpts.
index.push_back((*(testIns.first))->m_id);
 
  834         else if (
m_mesh->m_expDim == 2 && 
m_mesh->m_spaceDim == 3)
 
  842                 if ((*it)->GetVolumeNodes().size() > 0)
 
  845                     cinfo.
id       = facecnt++;
 
  847                     cinfo.
npoints  = (*it)->GetNodeCount();
 
  848                     cinfo.
ptype    = (*it)->GetCurveType();
 
  852                     faceinfo.push_back(cinfo);
 
  855                     vector<NodeSharedPtr> tmp;
 
  856                     (*it)->GetCurvedNodes(tmp);
 
  858                     for (
int i = 0; i < tmp.size(); ++i)
 
  860                         pair<NodeSet::iterator, bool> testIns =
 
  861                             cvertlist.insert(tmp[i]);
 
  865                             (*(testIns.first))->m_id = newidx;
 
  872                             curvedpts.
pts.push_back(v);
 
  875                         curvedpts.
index.push_back((*(testIns.first))->m_id);
 
  881         else if (
m_mesh->m_expDim == 3)
 
  884             for (it2 = 
m_mesh->m_faceSet.begin();
 
  885                  it2 != 
m_mesh->m_faceSet.end();
 
  888                 if ((*it2)->m_faceNodes.size() > 0)
 
  890                     vector<NodeSharedPtr> tmp;
 
  891                     (*it2)->GetCurvedNodes(tmp);
 
  894                     cinfo.
id       = facecnt++;
 
  897                     cinfo.
ptype    = (*it2)->m_curveType;
 
  901                     faceinfo.push_back(cinfo);
 
  903                     for (
int i = 0; i < tmp.size(); ++i)
 
  905                         pair<NodeSet::iterator, bool> testIns =
 
  906                             cvertlist.insert(tmp[i]);
 
  910                             (*(testIns.first))->m_id = newidx;
 
  917                             curvedpts.
pts.push_back(v);
 
  920                         curvedpts.
index.push_back((*(testIns.first))->m_id);
 
  930             curved->SetAttribute(
 
  932             curved->SetAttribute(
"BITSIZE",
 
  935             TiXmlElement *x = 
new TiXmlElement(
"E");
 
  939             x->LinkEndChild(
new TiXmlText(dataStr));
 
  940             curved->LinkEndChild(x);
 
  945             curved->SetAttribute(
 
  947             curved->SetAttribute(
"BITSIZE",
 
  950             TiXmlElement *x = 
new TiXmlElement(
"F");
 
  954             x->LinkEndChild(
new TiXmlText(dataStr));
 
  955             curved->LinkEndChild(x);
 
  958         if (edgeinfo.size() || faceinfo.size())
 
  960             TiXmlElement *x = 
new TiXmlElement(
"DATAPOINTS");
 
  961             x->SetAttribute(
"ID", curvedpts.
id);
 
  963             TiXmlElement *subx = 
new TiXmlElement(
"INDEX");
 
  967             subx->LinkEndChild(
new TiXmlText(dataStr));
 
  968             x->LinkEndChild(subx);
 
  970             subx = 
new TiXmlElement(
"POINTS");
 
  973             subx->LinkEndChild(
new TiXmlText(dataStr));
 
  974             x->LinkEndChild(subx);
 
  976             curved->LinkEndChild(x);
 
  979     pRoot->LinkEndChild(curved);
 
  984     TiXmlElement *verTag = 
new TiXmlElement(
"COMPOSITE");
 
  989     for (it = 
m_mesh->m_composite.begin(); it != 
m_mesh->m_composite.end();
 
  992         if (it->second->m_items.size() > 0)
 
  994             TiXmlElement *comp_tag = 
new TiXmlElement(
"C"); 
 
  998             for (it2 = 
m_mesh->m_condition.begin();
 
  999                  it2 != 
m_mesh->m_condition.end();
 
 1011                 for (
int i = 0; i < c->m_composite.size(); ++i)
 
 1013                     if (c->m_composite[i] == j)
 
 1020             doSort = doSort && it->second->m_reorder;
 
 1021             comp_tag->SetAttribute(
"ID", it->second->m_id);
 
 1022             if (it->second->m_label.size())
 
 1024                 comp_tag->SetAttribute(
"LABEL", it->second->m_label);
 
 1026             comp_tag->LinkEndChild(
 
 1027                 new TiXmlText(it->second->GetXmlString(doSort)));
 
 1028             verTag->LinkEndChild(comp_tag);
 
 1032             cout << 
"Composite " << it->second->m_id << 
" " 
 1033                  << 
"contains nothing." << endl;
 
 1037     pRoot->LinkEndChild(verTag);
 
 1043     TiXmlElement *domain = 
new TiXmlElement(
"DOMAIN");
 
 1047     for (it = 
m_mesh->m_composite.begin(); it != 
m_mesh->m_composite.end();
 
 1050         if (it->second->m_items[0]->GetDim() == 
m_mesh->m_expDim)
 
 1052             if (list.length() > 0)
 
 1056             list += boost::lexical_cast<std::string>(it->second->m_id);
 
 1059     domain->LinkEndChild(
new TiXmlText(
" C[" + list + 
"] "));
 
 1060     pRoot->LinkEndChild(domain);
 
 1066     TiXmlElement *expansions = 
new TiXmlElement(
"EXPANSIONS");
 
 1069     for (it = 
m_mesh->m_composite.begin(); it != 
m_mesh->m_composite.end();
 
 1072         if (it->second->m_items[0]->GetDim() == 
m_mesh->m_expDim)
 
 1074             TiXmlElement *exp = 
new TiXmlElement(
"E");
 
 1077                 "C[" + boost::lexical_cast<std::string>(it->second->m_id) +
 
 1079             exp->SetAttribute(
"NUMMODES", 4);
 
 1080             exp->SetAttribute(
"TYPE", 
"MODIFIED");
 
 1082             if (
m_mesh->m_fields.size() == 0)
 
 1084                 exp->SetAttribute(
"FIELDS", 
"u");
 
 1089                 for (
int i = 0; i < 
m_mesh->m_fields.size(); ++i)
 
 1091                     fstr += 
m_mesh->m_fields[i] + 
",";
 
 1093                 fstr = fstr.substr(0, fstr.length() - 1);
 
 1094                 exp->SetAttribute(
"FIELDS", fstr);
 
 1097             expansions->LinkEndChild(exp);
 
 1100     pRoot->LinkEndChild(expansions);
 
 1105     TiXmlElement *conditions         = 
new TiXmlElement(
"CONDITIONS");
 
 1106     TiXmlElement *boundaryregions    = 
new TiXmlElement(
"BOUNDARYREGIONS");
 
 1107     TiXmlElement *boundaryconditions = 
new TiXmlElement(
"BOUNDARYCONDITIONS");
 
 1108     TiXmlElement *variables          = 
new TiXmlElement(
"VARIABLES");
 
 1111     for (it = 
m_mesh->m_condition.begin(); it != 
m_mesh->m_condition.end();
 
 1118         TiXmlElement *b = 
new TiXmlElement(
"B");
 
 1119         b->SetAttribute(
"ID", boost::lexical_cast<string>(it->first));
 
 1121         for (
int i = 0; i < c->m_composite.size(); ++i)
 
 1123             tmp += boost::lexical_cast<
string>(c->m_composite[i]) + 
",";
 
 1126         tmp = tmp.substr(0, tmp.length() - 1);
 
 1128         TiXmlText *t0 = 
new TiXmlText(
"C[" + tmp + 
"]");
 
 1129         b->LinkEndChild(t0);
 
 1130         boundaryregions->LinkEndChild(b);
 
 1132         TiXmlElement *region = 
new TiXmlElement(
"REGION");
 
 1133         region->SetAttribute(
"REF", boost::lexical_cast<string>(it->first));
 
 1135         for (
int i = 0; i < c->type.size(); ++i)
 
 1157             TiXmlElement *tag = 
new TiXmlElement(tagId);
 
 1158             tag->SetAttribute(
"VAR", c->field[i]);
 
 1159             tag->SetAttribute(
"VALUE", c->value[i]);
 
 1163                 tag->SetAttribute(
"USERDEFINEDTYPE", 
"H");
 
 1166             region->LinkEndChild(tag);
 
 1169         boundaryconditions->LinkEndChild(region);
 
 1172     for (
int i = 0; i < 
m_mesh->m_fields.size(); ++i)
 
 1174         TiXmlElement *v = 
new TiXmlElement(
"V");
 
 1175         v->SetAttribute(
"ID", boost::lexical_cast<std::string>(i));
 
 1176         TiXmlText *t0 = 
new TiXmlText(
m_mesh->m_fields[i]);
 
 1177         v->LinkEndChild(t0);
 
 1178         variables->LinkEndChild(v);
 
 1181     if (
m_mesh->m_fields.size() > 0)
 
 1183         conditions->LinkEndChild(variables);
 
 1186     if (
m_mesh->m_condition.size() > 0)
 
 1188         conditions->LinkEndChild(boundaryregions);
 
 1189         conditions->LinkEndChild(boundaryconditions);
 
 1192     pRoot->LinkEndChild(conditions);
 
void WriteXmlCurves(TiXmlElement *pRoot)
Writes the  section of the XML file if needed. 
 
#define ASSERTL0(condition, msg)
 
virtual void Process()
Write mesh to output file. 
 
pair< ModuleType, string > ModuleKey
 
static boost::shared_ptr< MeshGraph > Read(const LibUtilities::SessionReaderSharedPtr &pSession, DomainRangeShPtr &rng=NullDomainRangeShPtr)
 
NekInt64 ptoffset
the id of point data map (currently always 0 since we are using just one set). 
 
void WriteXmlFaces(TiXmlElement *pRoot)
Writes the  section of the XML file if needed. 
 
Abstract base class for output modules. 
 
const std::string kPointsTypeStr[]
 
void WriteXmlNodes(TiXmlElement *pRoot)
Writes the  section of the XML file. 
 
std::vector< NekInt64 > index
id of this Point set 
 
map< string, ConfigOption > m_config
List of configuration values. 
 
MeshSharedPtr m_mesh
Mesh object. 
 
void TestElmts(SpatialDomains::MeshGraphSharedPtr &graph)
 
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
 
NekInt64 entityid
Id of this curved information. 
 
boost::unordered_set< NodeSharedPtr, NodeHash > NodeSet
 
std::string GetCompressString(void)
 
static SessionReaderSharedPtr CreateInstance(int argc, char *argv[])
Creates an instance of the SessionReader class. 
 
string GetXmlString(char tag, vector< unsigned int > &ids)
 
NekInt64 npoints
The entity id corresponding to the global edge/curve. 
 
boost::shared_ptr< Node > NodeSharedPtr
 
boost::shared_ptr< Condition > ConditionSharedPtr
 
int ZlibEncodeToBase64Str(std::vector< T > &in, std::string &out64)
 
Represents a command-line configuration option. 
 
NekInt64 ptype
point offset of data entry for this curve 
 
void WriteXmlExpansions(TiXmlElement *pRoot)
Writes the  section of the XML file. 
 
boost::shared_ptr< Edge > EdgeSharedPtr
Shared pointer to an edge. 
 
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
 
std::string GetBitSizeStr(void)
 
boost::shared_ptr< Mesh > MeshSharedPtr
Shared pointer to a mesh. 
 
void WriteXmlDomain(TiXmlElement *pRoot)
Writes the  section of the XML file. 
 
void WriteXmlComposites(TiXmlElement *pRoot)
Writes the  section of the XML file. 
 
void WriteXmlElements(TiXmlElement *pRoot)
Writes the  section of the XML file. 
 
NekInt64 ptid
The number of points in this curved entity. 
 
std::vector< MeshVertex > pts
mapping to access pts value. 
 
InputIterator find(InputIterator first, InputIterator last, InputIterator startingpoint, const EqualityComparable &value)
 
void WriteXmlConditions(TiXmlElement *pRoot)
Writes the  section of the XML file. 
 
boost::unordered_map< int, CurveSharedPtr > CurveMap
 
boost::shared_ptr< Face > FaceSharedPtr
Shared pointer to a face. 
 
void WriteXmlEdges(TiXmlElement *pRoot)
Writes the  section of the XML file. 
 
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
 
boost::shared_ptr< Geometry > GeometrySharedPtr
 
ModuleFactory & GetModuleFactory()
 
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.