55 #include <boost/algorithm/string.hpp>
56 #include <boost/graph/adjacency_list.hpp>
57 #include <boost/graph/adjacency_iterator.hpp>
58 #include <boost/graph/detail/edge.hpp>
59 #include <boost/format.hpp>
63 namespace LibUtilities
69 Loki::NoDestroy > Type;
70 return Type::Instance();
76 m_comm(pSession->GetComm()),
77 m_weightingRequired(false)
92 "Too few elements for this many processes.");
106 TiXmlDeclaration * decl =
new TiXmlDeclaration(
"1.0",
"utf-8",
"");
107 vNew.LinkEndChild(decl);
109 TiXmlElement* vElmtNektar;
110 vElmtNektar =
new TiXmlElement(
"NEKTAR");
112 int rank =
m_comm->GetRowComm()->GetRank();
115 vNew.LinkEndChild(vElmtNektar);
117 std::string dirname = pSession->GetSessionName() +
"_xml";
118 fs::path pdirname(dirname);
120 boost::format pad(
"P%1$07d.xml");
122 fs::path pFilename(pad.str());
124 if(!fs::is_directory(dirname))
126 fs::create_directory(dirname);
129 fs::path fullpath = pdirname / pFilename;
138 TiXmlDeclaration * decl =
new TiXmlDeclaration(
"1.0",
"utf-8",
"");
139 vNew.LinkEndChild(decl);
141 TiXmlElement* vElmtNektar;
142 vElmtNektar =
new TiXmlElement(
"NEKTAR");
146 vNew.LinkEndChild(vElmtNektar);
148 std::string dirname = pSession->GetSessionName() +
"_xml";
149 fs::path pdirname(dirname);
151 boost::format pad(
"P%1$07d.xml");
153 fs::path pFilename(pad.str());
155 fs::path fullpath = pdirname / pFilename;
157 if(!fs::is_directory(dirname))
159 fs::create_directory(dirname);
172 composites[it->first] = it->second.list;
185 TiXmlElement *expansionTypes = pSession->GetElement(
"Nektar/Expansions");
188 TiXmlElement *expansion = expansionTypes->FirstChildElement();
189 std::string expType = expansion->Value();
194 ASSERTL0(
false,
"Expansion type not defined or not supported at the moment");
206 std::vector<unsigned int> composite;
207 std::vector<unsigned int> nummodes;
208 std::vector<std::string> fieldName;
210 const char *nModesStr = expansion->Attribute(
"NUMMODES");
211 ASSERTL0(nModesStr,
"NUMMODES was not defined in EXPANSION section of input");
212 std::string numModesStr = nModesStr;
214 ASSERTL0(valid,
"Unable to correctly parse the number of modes.");
216 if (nummodes.size() == 1)
218 for (
int i = 1; i <
m_dim; i++)
220 nummodes.push_back( nummodes[0] );
223 ASSERTL0(nummodes.size() ==
m_dim,
"Number of modes should match mesh dimension");
226 const char *fStr = expansion->Attribute(
"FIELDS");
229 std::string fieldStr = fStr;
231 ASSERTL0(valid,
"Unable to correctly parse the field string in ExpansionTypes.");
233 for (
int i = 0; i < fieldName.size(); ++i)
245 fieldName.push_back(
"DefaultVar");
251 "Omitting field variables and explicitly listing " \
252 "them in different ExpansionTypes is wrong practise");
259 std::string compositeStr = expansion->Attribute(
"COMPOSITE");
260 ASSERTL0(compositeStr.length() > 3,
"COMPOSITE must be specified in expansion definition");
261 int beg = compositeStr.find_first_of(
"[");
262 int end = compositeStr.find_first_of(
"]");
263 std::string compositeListStr = compositeStr.substr(beg+1,end-beg-1);
265 ASSERTL0(parseGood && !composite.empty(),
266 (std::string(
"Unable to read composite index range: ") + compositeListStr).c_str());
270 for (
int i = 0; i < composite.size(); ++i)
272 for (
int j = 0; j < fieldName.size(); j++)
278 expansion = expansion->NextSiblingElement(
"E");
288 TiXmlElement *vGeometry, *vSubElement;
291 vGeometry = pSession->GetElement(
"Nektar/Geometry");
292 m_dim = atoi(vGeometry->Attribute(
"DIM"));
295 vSubElement = pSession->GetElement(
"Nektar/Geometry/Vertex");
298 std::string attr[] = {
"XSCALE",
"YSCALE",
"ZSCALE",
299 "XMOVE",
"YMOVE",
"ZMOVE" };
300 for (i = 0; i < 6; ++i)
302 const char *val = vSubElement->Attribute(attr[i].c_str());
309 x = vSubElement->FirstChildElement();
311 if (x->FirstAttribute())
313 i = x->FirstAttribute()->IntValue();
317 TiXmlAttribute* y = x->FirstAttribute();
318 ASSERTL0(y,
"Failed to get attribute.");
320 v.
id = y->IntValue();
321 ASSERTL0(v.
id == i++,
"Vertex IDs not sequential.");
322 std::vector<std::string> vCoords;
323 std::string vCoordStr = x->FirstChild()->ToText()->Value();
324 boost::split(vCoords, vCoordStr, boost::is_any_of(
"\t "));
325 v.
x = atof(vCoords[0].c_str());
326 v.
y = atof(vCoords[1].c_str());
327 v.
z = atof(vCoords[2].c_str());
329 x = x->NextSiblingElement();
335 vSubElement = pSession->GetElement(
"Nektar/Geometry/Edge");
336 ASSERTL0(vSubElement,
"Cannot read edges");
337 x = vSubElement->FirstChildElement();
341 TiXmlAttribute* y = x->FirstAttribute();
342 ASSERTL0(y,
"Failed to get attribute.");
344 e.
id = y->IntValue();
346 ASSERTL0(e.
id == i++,
"Edge IDs not sequential.");
347 std::vector<std::string> vVertices;
348 std::string vVerticesString = x->FirstChild()->ToText()->Value();
349 boost::split(vVertices, vVerticesString, boost::is_any_of(
"\t "));
350 e.
list.push_back(atoi(vVertices[0].c_str()));
351 e.
list.push_back(atoi(vVertices[1].c_str()));
353 x = x->NextSiblingElement();
360 vSubElement = pSession->GetElement(
"Nektar/Geometry/Face");
361 ASSERTL0(vSubElement,
"Cannot read faces.");
362 x = vSubElement->FirstChildElement();
366 TiXmlAttribute* y = x->FirstAttribute();
367 ASSERTL0(y,
"Failed to get attribute.");
369 f.
id = y->IntValue();
370 f.
type = x->Value()[0];
371 ASSERTL0(f.
id == i++,
"Face IDs not sequential.");
372 std::vector<std::string> vEdges;
373 std::string vEdgeStr = x->FirstChild()->ToText()->Value();
374 boost::split(vEdges, vEdgeStr, boost::is_any_of(
"\t "));
375 for (
int i = 0; i < vEdges.size(); ++i)
377 f.
list.push_back(atoi(vEdges[i].c_str()));
380 x = x->NextSiblingElement();
385 vSubElement = pSession->GetElement(
"Nektar/Geometry/Element");
386 ASSERTL0(vSubElement,
"Cannot read elements.");
387 x = vSubElement->FirstChildElement();
391 TiXmlAttribute* y = x->FirstAttribute();
392 ASSERTL0(y,
"Failed to get attribute.");
394 e.
id = y->IntValue();
395 ASSERTL0(e.
id == i++,
"Element IDs not sequential.");
396 std::vector<std::string> vItems;
397 std::string vItemStr = x->FirstChild()->ToText()->Value();
398 boost::split(vItems, vItemStr, boost::is_any_of(
"\t "));
399 for (
int i = 0; i < vItems.size(); ++i)
401 e.
list.push_back(atoi(vItems[i].c_str()));
403 e.
type = x->Value()[0];
405 x = x->NextSiblingElement();
409 if (pSession->DefinesElement(
"Nektar/Geometry/Curved"))
411 vSubElement = pSession->GetElement(
"Nektar/Geometry/Curved");
412 x = vSubElement->FirstChildElement();
418 "Failed to get attribute ID");
419 c.
type = std::string(x->Attribute(
"TYPE"));
421 "Failed to get attribute TYPE");
423 "Failed to get attribute NUMPOINTS");
424 c.
data = x->FirstChild()->ToText()->Value();
429 "Failed to get attribute EDGEID");
434 "Failed to get attribute FACEID");
438 ASSERTL0(
false,
"Unknown curve type.");
441 x = x->NextSiblingElement();
446 vSubElement = pSession->GetElement(
"Nektar/Geometry/Composite");
447 ASSERTL0(vSubElement,
"Cannot read composites.");
448 x = vSubElement->FirstChildElement();
452 TiXmlAttribute* y = x->FirstAttribute();
453 ASSERTL0(y,
"Failed to get attribute.");
455 c.
id = y->IntValue();
456 std::string vSeqStr = x->FirstChild()->ToText()->Value();
458 std::string::size_type indxBeg = vSeqStr.find_first_of(
'[') + 1;
459 std::string::size_type indxEnd = vSeqStr.find_last_of(
']') - 1;
460 vSeqStr = vSeqStr.substr(indxBeg, indxEnd - indxBeg + 1);
462 std::vector<unsigned int> vSeq;
465 for (
int i = 0; i < vSeq.size(); ++i)
467 c.
list.push_back(vSeq[i]);
470 x = x->NextSiblingElement();
474 vSubElement = pSession->GetElement(
"Nektar/Geometry/Domain");
475 ASSERTL0(vSubElement,
"Cannot read domain");
476 std::string vSeqStr = vSubElement->FirstChild()->ToText()->Value();
477 std::string::size_type indxBeg = vSeqStr.find_first_of(
'[') + 1;
478 std::string::size_type indxEnd = vSeqStr.find_last_of(
']') - 1;
479 vSeqStr = vSeqStr.substr(indxBeg, indxEnd - indxBeg + 1);
485 int nElmt = boost::num_vertices(
m_mesh);
488 out <<
"# Partition information:" << std::endl;
489 out <<
"# No. elements : " << nElmt << std::endl;
490 out <<
"# No. partitions: " << nPart << std::endl;
491 out <<
"# ID nElmt nLocDof nBndDof" << std::endl;
494 std::vector<int> partElmtCount(nPart, 0);
495 std::vector<int> partLocCount (nPart, 0);
496 std::vector<int> partBndCount (nPart, 0);
498 std::map<int, int> elmtSizes;
499 std::map<int, int> elmtBndSizes;
501 for (
unsigned int i = 0; i <
m_domain.size(); ++i)
509 " Number of directional" \
510 " modes in expansion spec for composite id = " +
511 boost::lexical_cast<std::string>(cId) +
513 boost::lexical_cast<std::string>(it->first) +
514 " does not correspond to mesh dimension");
516 int na = it->second[0];
517 int nb = it->second[1];
532 elmtSizes[elid] = weight;
533 elmtBndSizes[elid] = bndWeight;
538 for (boost::tie(vertit, vertit_end) = boost::vertices(
m_mesh);
539 vertit != vertit_end; ++vertit)
541 int partId =
m_mesh[*vertit].partition;
542 partElmtCount[partId]++;
543 partLocCount [partId] += elmtSizes[
m_mesh[*vertit].id];
544 partBndCount [partId] += elmtBndSizes[m_mesh[*vertit].id];
547 for (
int i = 0; i < nPart; ++i)
549 out << i <<
" " << partElmtCount[i] <<
" " << partLocCount[i] <<
" " << partBndCount[i] << std::endl;
555 if (!pSession->DefinesElement(
"Nektar/Conditions/SolverInfo"))
562 TiXmlElement* solverInfoElement =
563 pSession->GetElement(
"Nektar/Conditions/SolverInfo");
565 TiXmlElement* solverInfo =
566 solverInfoElement->FirstChildElement(
"I");
567 ASSERTL0(solverInfo,
"Cannot read SolverInfo tags");
572 ASSERTL0(solverInfo->Attribute(
"PROPERTY"),
573 "Missing PROPERTY attribute in solver info "
575 std::string solverProperty =
576 solverInfo->Attribute(
"PROPERTY");
578 "Solver info properties must have a non-empty "
581 std::string solverPropertyUpper =
582 boost::to_upper_copy(solverProperty);
586 ASSERTL0(solverInfo->Attribute(
"VALUE"),
587 "Missing VALUE attribute in solver info section. ");
588 std::string solverValue = solverInfo->Attribute(
"VALUE");
590 "Solver info properties must have a non-empty value");
592 std::string propertyValueUpper =
593 boost::to_upper_copy(solverValue);
595 if (solverPropertyUpper ==
"WEIGHTPARTITIONS")
597 if (propertyValueUpper !=
"UNIFORM")
603 solverInfo = solverInfo->NextSiblingElement(
"I");
630 for (
unsigned int i = 0; i <
m_domain.size(); ++i)
638 " Number of directional" \
639 " modes in expansion spec for composite id = " +
640 boost::lexical_cast<std::string>(cId) +
642 boost::lexical_cast<std::string>(it->first) +
643 " does not correspond to mesh dimension");
645 int na = it->second[0];
673 std::map<int, int> vGraphEdges;
680 pGraph[v].partition = 0;
693 if (vGraphEdges.find(eId) != vGraphEdges.end())
695 BoostEdge e = boost::add_edge( p, vGraphEdges[eId], pGraph).first;
700 vGraphEdges[eId] = p;
708 std::vector<BoostSubGraph>& pLocalPartition)
711 int nGraphVerts = boost::num_vertices(pGraph);
712 int nGraphEdges = boost::num_edges(pGraph);
716 Array<OneD, int> part(nGraphVerts,0);
718 if (
m_comm->GetRowComm()->TreatAsRankZero())
722 int nWeight = nGraphVerts;
724 Array<OneD, int> xadj(nGraphVerts+1,0);
725 Array<OneD, int> adjncy(2*nGraphEdges);
726 Array<OneD, int> vwgt(nWeight, 1);
727 Array<OneD, int> vsize(nGraphVerts, 1);
728 for ( boost::tie(vertit, vertit_end) = boost::vertices(pGraph);
729 vertit != vertit_end;
732 for ( boost::tie(adjvertit, adjvertit_end) = boost::adjacent_vertices(*vertit,pGraph);
733 adjvertit != adjvertit_end;
736 adjncy[acnt++] = *adjvertit;
743 vwgt[pGraph[*vertit].id ] = pGraph[*vertit].weight[0];
747 vwgt[pGraph[*vertit].id] = 1;
759 if(
m_comm->GetColumnComm()->GetRank() == 0)
770 for (i = 1; i <
m_comm->GetColumnComm()->GetSize(); ++i)
772 m_comm->GetColumnComm()->Send(i, part);
778 m_comm->GetColumnComm()->Recv(0, part);
782 m_comm->GetColumnComm()->Block();
786 for (i = 1; i <
m_comm->GetRowComm()->GetSize(); ++i)
788 m_comm->GetRowComm()->Send(i, part);
795 "Error in calling metis to partition graph.");
800 m_comm->GetRowComm()->Recv(0, part);
805 pLocalPartition.resize(nCols);
806 for (i = 0; i < nCols; ++i)
808 pLocalPartition[i] = pGraph.create_subgraph();
813 for ( boost::tie(vertit, vertit_end) = boost::vertices(pGraph);
814 vertit != vertit_end;
817 pGraph[*vertit].partition = part[i];
818 pGraph[*vertit].partid = boost::num_vertices(pLocalPartition[part[i]]);
819 boost::add_vertex(i, pLocalPartition[part[i]]);
827 unsigned int cnt = 0;
831 for (i = 0; i < nParts; ++i)
833 cnt = std::count(pPart.begin(), pPart.end(), i);
847 for (i = 0; i < pPart.num_elements(); ++i)
849 pPart[i] = i % nParts;
858 TiXmlElement* pNektar)
861 std::string vDim = pSession->GetElement(
"Nektar/Geometry")->Attribute(
"DIM");
862 std::string vSpace = pSession->GetElement(
"Nektar/Geometry")->Attribute(
"SPACE");
863 std::string vPart = boost::lexical_cast<std::string>(pGraph[*boost::vertices(pGraph).first].partition);
864 TiXmlElement* vElmtGeometry =
new TiXmlElement(
"GEOMETRY");
865 vElmtGeometry->SetAttribute(
"DIM", vDim);
866 vElmtGeometry->SetAttribute(
"SPACE", vSpace);
867 vElmtGeometry->SetAttribute(
"PARTITION", vPart);
869 TiXmlElement *vVertex =
new TiXmlElement(
"VERTEX");
870 TiXmlElement *vEdge =
new TiXmlElement(
"EDGE");
871 TiXmlElement *vFace =
new TiXmlElement(
"FACE");
872 TiXmlElement *vElement =
new TiXmlElement(
"ELEMENT");
873 TiXmlElement *vCurved =
new TiXmlElement(
"CURVED");
874 TiXmlElement *vComposite =
new TiXmlElement(
"COMPOSITE");
875 TiXmlElement *vDomain =
new TiXmlElement(
"DOMAIN");
883 std::map<int, MeshEntity> vComposites;
884 std::map<int, MeshEntity> vElements;
885 std::map<int, MeshEntity> vEdges;
886 std::map<int, MeshEntity> vFaces;
887 std::map<int, MeshVertex> vVertices;
893 for ( boost::tie(vertit, vertit_end) = boost::vertices(pGraph);
894 vertit != vertit_end;
897 id = pGraph[*vertit].id;
901 std::map<int, MeshEntity> * vNext = &vElements;
907 for (vIt = vNext->begin(); vIt != vNext->end(); vIt++)
909 for (
unsigned int j = 0; j < vIt->second.list.size(); ++j)
911 id = vIt->second.list[j];
920 for (vIt = vNext->begin(); vIt != vNext->end(); vIt++)
922 for (
unsigned int j = 0; j < vIt->second.list.size(); ++j)
924 id = vIt->second.list[j];
933 for (vIt = vNext->begin(); vIt != vNext->end(); vIt++)
935 for (
unsigned int j = 0; j < vIt->second.list.size(); ++j)
937 id = vIt->second.list[j];
945 for (vVertIt = vVertices.begin(); vVertIt != vVertices.end(); vVertIt++)
947 x =
new TiXmlElement(
"V");
948 x->SetAttribute(
"ID", vVertIt->first);
949 std::stringstream vCoords;
950 vCoords.precision(12);
951 vCoords << std::setw(15) << vVertIt->second.x
952 << std::setw(15) << vVertIt->second.y
953 << std::setw(15) << vVertIt->second.z <<
" ";
954 y =
new TiXmlText(vCoords.str());
956 vVertex->LinkEndChild(x);
964 vVertex->SetAttribute(vAttrIt->first, vAttrIt->second);
969 for (vIt = vEdges.begin(); vIt != vEdges.end(); vIt++)
971 x =
new TiXmlElement(
"E");
972 x->SetAttribute(
"ID", vIt->first);
973 std::stringstream vVertices;
974 vVertices << std::setw(10) << vIt->second.list[0]
975 << std::setw(10) << vIt->second.list[1] <<
" ";
976 y =
new TiXmlText(vVertices.str());
978 vEdge->LinkEndChild(x);
984 for (vIt = vFaces.begin(); vIt != vFaces.end(); vIt++)
986 std::string vType(
"F");
987 vType[0] = vIt->second.type;
988 x =
new TiXmlElement(vType);
989 x->SetAttribute(
"ID", vIt->first);
990 std::stringstream vListStr;
991 for (
unsigned int i = 0; i < vIt->second.list.size(); ++i)
993 vListStr << std::setw(10) << vIt->second.list[i];
996 y =
new TiXmlText(vListStr.str());
998 vFace->LinkEndChild(x);
1002 for (vIt = vElements.begin(); vIt != vElements.end(); vIt++)
1004 std::string vType(
"T");
1005 vType[0] = vIt->second.type;
1006 x =
new TiXmlElement(vType.c_str());
1007 x->SetAttribute(
"ID", vIt->first);
1008 std::stringstream vEdges;
1009 for (
unsigned i = 0; i < vIt->second.list.size(); ++i)
1011 vEdges << std::setw(10) << vIt->second.list[i];
1014 y =
new TiXmlText(vEdges.str());
1016 vElement->LinkEndChild(x);
1021 std::map<MeshCurvedKey, MeshCurved>::const_iterator vItCurve;
1028 if (vEdges.find(c.
entityid) != vEdges.end() ||
1029 vFaces.find(c.
entityid) != vFaces.end())
1032 x->SetAttribute(
"ID", c.
id);
1035 x->SetAttribute(
"EDGEID", c.
entityid);
1039 x->SetAttribute(
"FACEID", c.
entityid);
1041 x->SetAttribute(
"TYPE", c.
type);
1042 x->SetAttribute(
"NUMPOINTS", c.
npoints);
1043 y =
new TiXmlText(c.
data);
1045 vCurved->LinkEndChild(x);
1057 std::string vCompositeStr =
"";
1058 for (
unsigned int j = 0; j < vIt->second.list.size(); ++j)
1061 switch (vIt->second.type)
1064 if (vVertices.find(vIt->second.list[j]) == vVertices.end())
1070 if (vEdges.find(vIt->second.list[j]) == vEdges.end())
1076 if (vFaces.find(vIt->second.list[j]) == vFaces.end())
1082 if (vElements.find(vIt->second.list[j]) == vElements.end())
1091 if (last_idx + 1 == vIt->second.list[j])
1101 vCompositeStr +=
"-" + boost::lexical_cast<std::string>(last_idx);
1106 vCompositeStr += comma ?
"," :
"";
1107 vCompositeStr += boost::lexical_cast<std::string>(vIt->second.list[j]);
1108 last_idx = vIt->second.list[j];
1114 vCompositeStr +=
"-" + boost::lexical_cast<std::string>(last_idx);
1117 if (vCompositeStr.length() > 0)
1119 vComposites[vIt->first] = vIt->second;
1120 x =
new TiXmlElement(
"C");
1121 x->SetAttribute(
"ID", vIt->first);
1122 vCompositeStr =
"X[" + vCompositeStr +
"]";
1123 vCompositeStr[0] = vIt->second.type;
1124 y =
new TiXmlText(vCompositeStr.c_str());
1126 vComposite->LinkEndChild(x);
1130 std::string vDomainListStr;
1132 for (
unsigned int i = 0; i <
m_domain.size(); ++i)
1134 if (vComposites.find(
m_domain[i]) != vComposites.end())
1136 vDomainListStr += comma ?
"," :
"";
1138 vDomainListStr += boost::lexical_cast<std::string>(
m_domain[i]);
1141 vDomainListStr =
"C[" + vDomainListStr +
"]";
1142 TiXmlText* vDomainList =
new TiXmlText(vDomainListStr);
1143 vDomain->LinkEndChild(vDomainList);
1145 vElmtGeometry->LinkEndChild(vVertex);
1148 vElmtGeometry->LinkEndChild(vEdge);
1152 vElmtGeometry->LinkEndChild(vFace);
1154 vElmtGeometry->LinkEndChild(vElement);
1157 vElmtGeometry->LinkEndChild(vCurved);
1159 vElmtGeometry->LinkEndChild(vComposite);
1160 vElmtGeometry->LinkEndChild(vDomain);
1162 pNektar->LinkEndChild(vElmtGeometry);
1164 if (pSession->DefinesElement(
"Nektar/Conditions"))
1166 std::set<int> vBndRegionIdList;
1167 TiXmlElement* vConditions =
new TiXmlElement(*pSession->GetElement(
"Nektar/Conditions"));
1168 TiXmlElement* vBndRegions = vConditions->FirstChildElement(
"BOUNDARYREGIONS");
1169 TiXmlElement* vBndConditions = vConditions->FirstChildElement(
"BOUNDARYCONDITIONS");
1170 TiXmlElement* vItem;
1174 TiXmlElement* vNewBndRegions =
new TiXmlElement(
"BOUNDARYREGIONS");
1175 vItem = vBndRegions->FirstChildElement();
1178 std::string vSeqStr = vItem->FirstChild()->ToText()->Value();
1179 std::string::size_type indxBeg = vSeqStr.find_first_of(
'[') + 1;
1180 std::string::size_type indxEnd = vSeqStr.find_last_of(
']') - 1;
1181 vSeqStr = vSeqStr.substr(indxBeg, indxEnd - indxBeg + 1);
1182 std::vector<unsigned int> vSeq;
1184 std::string vListStr;
1186 for (
unsigned int i = 0; i < vSeq.size(); ++i)
1188 if (vComposites.find(vSeq[i]) != vComposites.end())
1190 vListStr += comma ?
"," :
"";
1192 vListStr += boost::lexical_cast<std::string>(vSeq[i]);
1195 int p = atoi(vItem->Attribute(
"ID"));
1196 if (vListStr.length() == 0)
1198 vBndRegions->RemoveChild(vItem);
1202 vListStr =
"C[" + vListStr +
"]";
1203 TiXmlText* vList =
new TiXmlText(vListStr);
1204 TiXmlElement* vNewElement =
new TiXmlElement(
"B");
1205 vNewElement->SetAttribute(
"ID", p);
1206 vNewElement->LinkEndChild(vList);
1207 vNewBndRegions->LinkEndChild(vNewElement);
1208 vBndRegionIdList.insert(p);
1214 vItem = vItem->NextSiblingElement();
1216 vConditions->ReplaceChild(vBndRegions, *vNewBndRegions);
1221 vItem = vBndConditions->FirstChildElement();
1225 if ((x = vBndRegionIdList.find(atoi(vItem->Attribute(
"REF")))) != vBndRegionIdList.end())
1227 vItem->SetAttribute(
"REF", *x);
1231 vBndConditions->RemoveChild(vItem);
1233 vItem = vItem->NextSiblingElement();
1236 pNektar->LinkEndChild(vConditions);
1240 TiXmlElement* vSrc = pSession->GetElement(
"Nektar")
1241 ->FirstChildElement();
1244 std::string vName = boost::to_upper_copy(vSrc->ValueStr());
1245 if (vName !=
"GEOMETRY" && vName !=
"CONDITIONS")
1247 pNektar->LinkEndChild(
new TiXmlElement(*vSrc));
1249 vSrc = vSrc->NextSiblingElement();
1260 for ( boost::tie(vertit, vertit_end) = boost::vertices(
m_localPartition[procid]);
1261 vertit != vertit_end;
1280 weight = bndWeight ?
1285 weight = bndWeight ?
1290 weight = bndWeight ?
1295 weight = bndWeight ?
1300 weight = bndWeight ?
1305 weight = bndWeight ?
1310 weight = bndWeight ?