58#include <boost/archive/iterators/base64_from_binary.hpp>
59#include <boost/archive/iterators/binary_from_base64.hpp>
60#include <boost/archive/iterators/transform_width.hpp>
61#include <boost/iostreams/copy.hpp>
62#include <boost/iostreams/filter/zlib.hpp>
63#include <boost/iostreams/filtering_stream.hpp>
65#include <boost/geometry/geometry.hpp>
66#include <boost/geometry/index/rtree.hpp>
67namespace bg = boost::geometry;
85 typedef bg::model::point<NekDouble, 3, bg::cs::cartesian>
BgPoint;
86 typedef bg::model::box<BgPoint>
BgBox;
89 bg::index::rtree<BgRtreeValue, bg::index::rstar<16, 4>>
m_bgTree;
93 std::array<NekDouble, 6> minMax = geom->GetBoundingBox();
94 BgPoint ptMin(minMax[0], minMax[1], minMax[2]);
95 BgPoint ptMax(minMax[3], minMax[4], minMax[5]);
97 std::make_pair(
BgBox(ptMin, ptMax), geom->GetGlobalID()));
245 std::vector<GeomRTree::BgRtreeValue> matches;
247 p->GetCoords(x, y,
z);
253 std::back_inserter(matches));
255 std::vector<int> vals(matches.size());
257 for (
int i = 0; i < matches.size(); ++i)
259 vals[i] = matches[i].second;
291 bool returnval =
true;
303 for (
int i = 0; i < nverts; ++i)
306 if (xval < m_domainRange->m_xmin)
320 if ((ncnt_up == nverts) || (ncnt_low == nverts))
331 for (
int i = 0; i < nverts; ++i)
334 if (yval < m_domainRange->m_ymin)
348 if ((ncnt_up == nverts) || (ncnt_low == nverts))
362 for (
int i = 0; i < nverts; ++i)
366 if (zval < m_domainRange->m_zmin)
380 if ((ncnt_up == nverts) || (ncnt_low == nverts))
393 bool returnval =
true;
404 for (
int i = 0; i < nverts; ++i)
407 if (xval < m_domainRange->m_xmin)
421 if ((ncnt_up == nverts) || (ncnt_low == nverts))
431 for (
int i = 0; i < nverts; ++i)
434 if (yval < m_domainRange->m_ymin)
448 if ((ncnt_up == nverts) || (ncnt_low == nverts))
458 for (
int i = 0; i < nverts; ++i)
462 if (zval < m_domainRange->m_zmin)
476 if ((ncnt_up == nverts) || (ncnt_low == nverts))
504 if (whichItem >= 0 &&
521 std::ostringstream errStream;
522 errStream <<
"Unable to access composite item [" << whichComposite
523 <<
"][" << whichItem <<
"].";
525 std::string testStr = errStream.str();
540 vector<unsigned int> seqVector;
545 parseGood && !seqVector.empty(),
546 (std::string(
"Unable to read composite index range: ") + compositeStr)
549 vector<unsigned int> addedVector;
551 for (
auto iter = seqVector.begin(); iter != seqVector.end(); ++iter)
556 if (
std::find(addedVector.begin(), addedVector.end(), *iter) ==
568 addedVector.push_back(*iter);
570 "Composite not found.");
575 compositeVector[*iter] = composite;
580 (
"Undefined composite: " + std::to_string(*iter)));
604 "Unable to find expansion vector definition for field: ") +
614 "Using Default variable expansion definition for field: ") +
626 const std::string variable)
631 auto iter = expansionMap->find(geom->GetGlobalID());
632 ASSERTL1(iter != expansionMap->end(),
633 "Could not find expansion " +
634 boost::lexical_cast<string>(geom->GetGlobalID()) +
635 " in expansion for variable " + variable);
643 std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef)
645 int i, j, k, cnt, id;
652 for (i = 0; i < fielddef.size(); ++i)
654 for (j = 0; j < fielddef[i]->m_fields.size(); ++j)
656 std::string
field = fielddef[i]->m_fields[j];
674 for (i = 0; i < fielddef.size(); ++i)
677 std::vector<std::string> fields = fielddef[i]->m_fields;
678 std::vector<unsigned int> nmodes = fielddef[i]->m_numModes;
679 std::vector<LibUtilities::BasisType> basis = fielddef[i]->m_basis;
680 bool pointDef = fielddef[i]->m_pointsDef;
681 bool numPointDef = fielddef[i]->m_numPointsDef;
684 std::vector<unsigned int> npoints = fielddef[i]->m_numPoints;
685 std::vector<LibUtilities::PointsType> points = fielddef[i]->m_points;
687 bool UniOrder = fielddef[i]->m_uniOrder;
689 for (j = 0; j < fielddef[i]->m_elementIDs.size(); ++j)
693 id = fielddef[i]->m_elementIDs[j];
695 switch (fielddef[i]->m_shapeType)
699 if (
m_segGeoms.count(fielddef[i]->m_elementIDs[j]) == 0)
705 cnt += fielddef[i]->m_numHomogeneousDir;
709 geom =
m_segGeoms[fielddef[i]->m_elementIDs[j]];
714 if (numPointDef && pointDef)
720 else if (!numPointDef && pointDef)
726 else if (numPointDef && !pointDef)
738 cnt += fielddef[i]->m_numHomogeneousDir;
740 bkeyvec.push_back(bkey);
745 if (
m_triGeoms.count(fielddef[i]->m_elementIDs[j]) == 0)
751 cnt += fielddef[i]->m_numHomogeneousDir;
755 geom =
m_triGeoms[fielddef[i]->m_elementIDs[j]];
759 if (numPointDef && pointDef)
765 else if (!numPointDef && pointDef)
771 else if (numPointDef && !pointDef)
779 bkeyvec.push_back(bkey);
782 nmodes[cnt + 1], LibUtilities::eGaussRadauMAlpha1Beta0);
783 if (numPointDef && pointDef)
789 else if (!numPointDef && pointDef)
795 else if (numPointDef && !pointDef)
799 LibUtilities::eGaussRadauMAlpha1Beta0);
804 bkeyvec.push_back(bkey1);
809 cnt += fielddef[i]->m_numHomogeneousDir;
815 if (
m_quadGeoms.count(fielddef[i]->m_elementIDs[j]) == 0)
821 cnt += fielddef[i]->m_numHomogeneousDir;
828 for (
int b = 0; b < 2; ++b)
834 if (numPointDef && pointDef)
837 npoints[cnt + b], points[b]);
840 else if (!numPointDef && pointDef)
843 nmodes[cnt + b] + 1, points[b]);
846 else if (numPointDef && !pointDef)
855 bkeyvec.push_back(bkey);
861 cnt += fielddef[i]->m_numHomogeneousDir;
868 k = fielddef[i]->m_elementIDs[j];
888 if (numPointDef && pointDef)
894 else if (!numPointDef && pointDef)
900 else if (numPointDef && !pointDef)
911 bkeyvec.push_back(bkey);
916 LibUtilities::eGaussRadauMAlpha1Beta0);
918 if (numPointDef && pointDef)
921 npoints[cnt + 1], points[1]);
924 else if (!numPointDef && pointDef)
927 nmodes[cnt + 1] + 1, points[1]);
930 else if (numPointDef && !pointDef)
934 LibUtilities::eGaussRadauMAlpha1Beta0);
941 bkeyvec.push_back(bkey);
947 LibUtilities::eGaussRadauMAlpha2Beta0);
949 if (numPointDef && pointDef)
952 npoints[cnt + 2], points[2]);
955 else if (!numPointDef && pointDef)
958 nmodes[cnt + 2] + 1, points[2]);
961 else if (numPointDef && !pointDef)
965 LibUtilities::eGaussRadauMAlpha1Beta0);
972 bkeyvec.push_back(bkey);
983 k = fielddef[i]->m_elementIDs[j];
994 for (
int b = 0; b < 2; ++b)
1000 if (numPointDef && pointDef)
1003 npoints[cnt + b], points[b]);
1006 else if (!numPointDef && pointDef)
1009 nmodes[cnt + b] + 1, points[b]);
1012 else if (numPointDef && !pointDef)
1022 bkeyvec.push_back(bkey);
1028 LibUtilities::eGaussRadauMAlpha1Beta0);
1030 if (numPointDef && pointDef)
1033 npoints[cnt + 2], points[2]);
1036 else if (!numPointDef && pointDef)
1039 nmodes[cnt + 2] + 1, points[2]);
1042 else if (numPointDef && !pointDef)
1052 bkeyvec.push_back(bkey);
1063 k = fielddef[i]->m_elementIDs[j];
1065 "Failed to find geometry with same global id");
1068 for (
int b = 0; b < 2; ++b)
1071 nmodes[cnt + b] + 1,
1074 if (numPointDef && pointDef)
1077 npoints[cnt + b], points[b]);
1080 else if (!numPointDef && pointDef)
1083 nmodes[cnt + b] + 1, points[b]);
1086 else if (numPointDef && !pointDef)
1096 bkeyvec.push_back(bkey);
1102 LibUtilities::eGaussRadauMAlpha2Beta0);
1104 if (numPointDef && pointDef)
1107 npoints[cnt + 2], points[2]);
1110 else if (!numPointDef && pointDef)
1113 nmodes[cnt + 2] + 1, points[2]);
1116 else if (numPointDef && !pointDef)
1126 bkeyvec.push_back(bkey);
1137 k = fielddef[i]->m_elementIDs[j];
1149 for (
int b = 0; b < 3; ++b)
1155 if (numPointDef && pointDef)
1158 npoints[cnt + b], points[b]);
1161 else if (!numPointDef && pointDef)
1164 nmodes[cnt + b] + 1, points[b]);
1167 else if (numPointDef && !pointDef)
1177 bkeyvec.push_back(bkey);
1187 ASSERTL0(
false,
"Need to set up for pyramid and prism 3D "
1192 for (k = 0; k < fields.size(); ++k)
1195 if ((*expansionMap).find(
id) != (*expansionMap).end())
1197 (*expansionMap)[id]->m_geomShPtr = geom;
1198 (*expansionMap)[id]->m_basisKeyVector = bkeyvec;
1209 std::vector<LibUtilities::FieldDefinitionsSharedPtr> &fielddef,
1210 std::vector<std::vector<LibUtilities::PointsType>> &pointstype)
1212 int i, j, k, cnt, id;
1219 for (i = 0; i < fielddef.size(); ++i)
1221 for (j = 0; j < fielddef[i]->m_fields.size(); ++j)
1223 std::string
field = fielddef[i]->m_fields[j];
1241 for (i = 0; i < fielddef.size(); ++i)
1244 std::vector<std::string> fields = fielddef[i]->m_fields;
1245 std::vector<unsigned int> nmodes = fielddef[i]->m_numModes;
1246 std::vector<LibUtilities::BasisType> basis = fielddef[i]->m_basis;
1247 bool UniOrder = fielddef[i]->m_uniOrder;
1249 for (j = 0; j < fielddef[i]->m_elementIDs.size(); ++j)
1252 id = fielddef[i]->m_elementIDs[j];
1254 switch (fielddef[i]->m_shapeType)
1258 k = fielddef[i]->m_elementIDs[j];
1260 "Failed to find geometry with same global id.");
1269 cnt += fielddef[i]->m_numHomogeneousDir;
1271 bkeyvec.push_back(bkey);
1276 k = fielddef[i]->m_elementIDs[j];
1278 "Failed to find geometry with same global id.");
1280 for (
int b = 0; b < 2; ++b)
1286 bkeyvec.push_back(bkey);
1292 cnt += fielddef[i]->m_numHomogeneousDir;
1298 k = fielddef[i]->m_elementIDs[j];
1300 "Failed to find geometry with same global id");
1303 for (
int b = 0; b < 2; ++b)
1309 bkeyvec.push_back(bkey);
1315 cnt += fielddef[i]->m_numHomogeneousDir;
1321 k = fielddef[i]->m_elementIDs[j];
1323 "Failed to find geometry with same global id");
1326 for (
int b = 0; b < 3; ++b)
1332 bkeyvec.push_back(bkey);
1343 k = fielddef[i]->m_elementIDs[j];
1345 "Failed to find geometry with same global id");
1348 for (
int b = 0; b < 3; ++b)
1354 bkeyvec.push_back(bkey);
1365 k = fielddef[i]->m_elementIDs[j];
1367 "Failed to find geometry with same global id");
1370 for (
int b = 0; b < 3; ++b)
1376 bkeyvec.push_back(bkey);
1387 k = fielddef[i]->m_elementIDs[j];
1389 "Failed to find geometry with same global id");
1392 for (
int b = 0; b < 3; ++b)
1398 bkeyvec.push_back(bkey);
1408 ASSERTL0(
false,
"Need to set up for pyramid and prism 3D "
1413 for (k = 0; k < fields.size(); ++k)
1416 if ((*expansionMap).find(
id) != (*expansionMap).end())
1418 (*expansionMap)[id]->m_geomShPtr = geom;
1419 (*expansionMap)[id]->m_basisKeyVector = bkeyvec;
1437 for (
auto expIt = it->second->begin(); expIt != it->second->end();
1440 for (
int i = 0; i < expIt->second->m_basisKeyVector.size(); ++i)
1443 expIt->second->m_basisKeyVector[i];
1455 npts = max(npts, 2);
1461 expIt->second->m_basisKeyVector[i] = bkeynew;
1479 for (
auto expIt = it->second->begin(); expIt != it->second->end();
1482 for (
int i = 0; i < expIt->second->m_basisKeyVector.size(); ++i)
1485 expIt->second->m_basisKeyVector[i];
1494 expIt->second->m_basisKeyVector[i] = bkeynew;
1512 for (
auto expIt = it->second->begin(); expIt != it->second->end();
1515 for (
int i = 0; i < expIt->second->m_basisKeyVector.size(); ++i)
1518 expIt->second->m_basisKeyVector[i];
1525 expIt->second->m_basisKeyVector[i] = bkeynew;
1555 for (
auto elemIter = expansionMap->begin(); elemIter != expansionMap->end();
1558 if ((elemIter->second)->m_geomShPtr->GetShapeType() == shape)
1560 (elemIter->second)->m_basisKeyVector = keys;
1604 nummodes + quadoffset,
1608 returnval.push_back(bkey);
1614 nummodes + quadoffset,
1618 returnval.push_back(bkey);
1619 returnval.push_back(bkey);
1625 nummodes + quadoffset,
1629 returnval.push_back(bkey);
1630 returnval.push_back(bkey);
1631 returnval.push_back(bkey);
1637 nummodes + quadoffset,
1641 returnval.push_back(bkey);
1644 nummodes + quadoffset - 1,
1645 LibUtilities::eGaussRadauMAlpha1Beta0);
1649 returnval.push_back(bkey1);
1655 nummodes + quadoffset,
1659 returnval.push_back(bkey);
1662 nummodes + quadoffset - 1,
1663 LibUtilities::eGaussRadauMAlpha1Beta0);
1666 returnval.push_back(bkey1);
1671 nummodes + quadoffset - 1,
1672 LibUtilities::eGaussRadauMAlpha1Beta0);
1675 returnval.push_back(bkey2);
1680 nummodes + quadoffset - 1,
1681 LibUtilities::eGaussRadauMAlpha2Beta0);
1684 returnval.push_back(bkey2);
1691 nummodes + quadoffset,
1695 returnval.push_back(bkey);
1696 returnval.push_back(bkey);
1699 nummodes + quadoffset,
1700 LibUtilities::eGaussRadauMAlpha2Beta0);
1703 returnval.push_back(bkey1);
1709 nummodes + quadoffset,
1713 returnval.push_back(bkey);
1714 returnval.push_back(bkey);
1717 nummodes + quadoffset - 1,
1718 LibUtilities::eGaussRadauMAlpha1Beta0);
1721 returnval.push_back(bkey1);
1727 "Expansion not defined in switch for this shape");
1744 returnval.push_back(bkey);
1753 returnval.push_back(bkey);
1754 returnval.push_back(bkey);
1764 returnval.push_back(bkey);
1767 nummodes, LibUtilities::eGaussRadauMAlpha1Beta0);
1770 returnval.push_back(bkey1);
1780 returnval.push_back(bkey);
1781 returnval.push_back(bkey);
1782 returnval.push_back(bkey);
1788 "Expansion not defined in switch for this shape");
1806 returnval.push_back(bkey);
1816 returnval.push_back(bkey);
1817 returnval.push_back(bkey);
1827 returnval.push_back(bkey);
1828 returnval.push_back(bkey);
1829 returnval.push_back(bkey);
1835 "Expansion not defined in switch for this shape");
1853 returnval.push_back(bkey);
1863 returnval.push_back(bkey);
1866 nummodes, LibUtilities::eGaussRadauMAlpha1Beta0);
1870 returnval.push_back(bkey1);
1880 returnval.push_back(bkey);
1881 returnval.push_back(bkey);
1891 returnval.push_back(bkey);
1894 nummodes, LibUtilities::eGaussRadauMAlpha1Beta0);
1898 returnval.push_back(bkey1);
1901 nummodes, LibUtilities::eGaussRadauMAlpha2Beta0);
1909 "Expansion not defined in switch for this shape");
1927 returnval.push_back(bkey);
1937 returnval.push_back(bkey);
1938 returnval.push_back(bkey);
1948 returnval.push_back(bkey);
1949 returnval.push_back(bkey);
1950 returnval.push_back(bkey);
1956 "Expansion not defined in switch for this shape");
1973 returnval.push_back(bkey);
1982 returnval.push_back(bkey);
1983 returnval.push_back(bkey);
1992 returnval.push_back(bkey);
1993 returnval.push_back(bkey);
1994 returnval.push_back(bkey);
2000 "Expansion not defined in switch for this shape");
2017 returnval.push_back(bkey);
2026 returnval.push_back(bkey);
2027 returnval.push_back(bkey);
2036 returnval.push_back(bkey);
2037 returnval.push_back(bkey);
2038 returnval.push_back(bkey);
2044 "Expansion not defined in switch for this shape");
2061 returnval.push_back(bkey);
2070 returnval.push_back(bkey);
2071 returnval.push_back(bkey);
2080 returnval.push_back(bkey);
2081 returnval.push_back(bkey);
2082 returnval.push_back(bkey);
2088 "Expansion not defined in switch for this shape");
2105 returnval.push_back(bkey);
2114 returnval.push_back(bkey);
2115 returnval.push_back(bkey);
2124 returnval.push_back(bkey);
2125 returnval.push_back(bkey);
2126 returnval.push_back(bkey);
2132 "Expansion not defined in switch for this shape");
2149 returnval.push_back(bkey);
2158 returnval.push_back(bkey);
2159 returnval.push_back(bkey);
2168 returnval.push_back(bkey);
2169 returnval.push_back(bkey);
2170 returnval.push_back(bkey);
2176 "Expansion not defined in switch for this shape");
2193 returnval.push_back(bkey);
2199 returnval.push_back(bkey1);
2205 "Expansion not defined in switch for this shape");
2222 returnval.push_back(bkey1);
2228 returnval.push_back(bkey);
2234 "Expansion not defined in switch for this shape");
2251 returnval.push_back(bkey);
2257 returnval.push_back(bkey1);
2263 "Expansion not defined in switch for this shape");
2272 ASSERTL0(
false,
"Expansion type not defined");
2285 ExpansionType type_z,
const int nummodes_x,
const int nummodes_y,
2286 const int nummodes_z)
2296 ASSERTL0(
false,
"Homogeneous expansion not defined for this shape");
2302 ASSERTL0(
false,
"Homogeneous expansion not defined for this shape");
2316 returnval.push_back(bkey1);
2326 returnval.push_back(bkey1);
2336 returnval.push_back(bkey1);
2346 returnval.push_back(bkey1);
2356 returnval.push_back(bkey1);
2362 ASSERTL0(
false,
"Homogeneous expansion can be of Fourier "
2363 "or Chebyshev type only");
2376 returnval.push_back(bkey2);
2386 returnval.push_back(bkey2);
2396 returnval.push_back(bkey2);
2406 returnval.push_back(bkey2);
2416 returnval.push_back(bkey2);
2422 ASSERTL0(
false,
"Homogeneous expansion can be of Fourier "
2423 "or Chebyshev type only");
2436 returnval.push_back(bkey3);
2446 returnval.push_back(bkey3);
2456 returnval.push_back(bkey3);
2466 returnval.push_back(bkey3);
2476 returnval.push_back(bkey3);
2482 ASSERTL0(
false,
"Homogeneous expansion can be of Fourier "
2483 "or Chebyshev type only");
2492 ASSERTL0(
false,
"Homogeneous expansion not defined for this shape");
2498 ASSERTL0(
false,
"Homogeneous expansion not defined for this shape");
2503 ASSERTL0(
false,
"Expansion not defined in switch for this shape");
2524 for (
auto &compIter :
d.second)
2527 for (
auto &x : compIter.second->m_geomVec)
2529 if (x->GetGeomFactors()->GetGtype() !=
2535 int id = x->GetGlobalID();
2536 (*returnval)[id] = expansionElementShPtr;
2540 for (
auto &x : compIter.second->m_geomVec)
2542 if (x->GetGeomFactors()->GetGtype() ==
2548 int id = x->GetGlobalID();
2549 (*returnval)[id] = expansionElementShPtr;
2563 if (comp->m_geomVec.size() == 0)
2570 map<LibUtilities::ShapeType, pair<string, string>> compMap;
2583 int shapeDim = firstGeom->GetShapeDim();
2585 ? compMap[firstGeom->GetShapeType()].second
2586 : compMap[firstGeom->GetShapeType()].first;
2588 std::vector<unsigned int> idxList;
2589 std::transform(comp->m_geomVec.begin(), comp->m_geomVec.end(),
2590 std::back_inserter(idxList),
2610 bool updateExpansion =
false;
2613 for (
int i = 0; i < geomVecIter->GetNumVerts(); ++i)
2616 geomVecIter->GetVertex(i)->GetCoords(coords);
2617 updateExpansion = region->
v_Contains(coords);
2621 if (updateExpansion)
2624 auto expInfoID = expansionMap->find(geomVecIter->GetGlobalID());
2627 std::vector<unsigned int> nModes = region->
GetNumModes();
2628 (expInfoID->second)->m_basisKeyVector =
2632 ->m_basisKeyVector.begin()
2640 std::vector<unsigned int> nModes = region->
GetNumModes();
2641 std::vector<unsigned int> nPoints = region->
GetNumPoints();
2642 for (
auto basis = expInfoID->second->m_basisKeyVector.begin();
2643 basis != expInfoID->second->m_basisKeyVector.end();
2648 basis->GetPointsType());
2650 basis->GetBasisType(), nModes[cnt], pkey));
2653 (expInfoID->second)->m_basisKeyVector = updatedBasisKey;
2655 updateExpansion =
false;
2676 for (
auto compVecIter = pRefinement->second.begin();
2677 compVecIter != pRefinement->second.end(); ++compVecIter)
2679 for (
auto geomVecIter = compVecIter->second->m_geomVec.begin();
2680 geomVecIter != compVecIter->second->m_geomVec.end();
2691 if (region->first == pRefinement->first)
2713 TiXmlElement *refinementTypes =
m_session->GetElement(
"NEKTAR/REFINEMENTS");
2715 if (refinementTypes)
2717 TiXmlElement *refinement = refinementTypes->FirstChildElement();
2718 ASSERTL0(refinement,
"Unable to find entries in REFINEMENTS tag "
2720 std::string refType = refinement->Value();
2726 std::vector<NekDouble> coord1Vector, coord2Vector;
2727 std::vector<unsigned int> nModesVector, nPointsVector;
2730 const char *idStr = refinement->Attribute(
"REF");
2731 ASSERTL0(idStr,
"REF was not defined in REFINEMENT section "
2734 unsigned id = boost::lexical_cast<unsigned int>(idStr);
2737 const char *radiusStr = refinement->Attribute(
"RADIUS");
2738 ASSERTL0(radiusStr,
"RADIUS was not defined in REFINEMENT "
2739 "section of input");
2741 NekDouble radius = std::stod(radiusStr);
2744 const char *c1Str = refinement->Attribute(
"COORDINATE1");
2745 ASSERTL0(c1Str,
"COORDINATE1 was not defined in REFINEMENT"
2746 "section of input");
2748 std::string coord1String = c1Str;
2751 ASSERTL0(valid,
"Unable to correctly parse the axes "
2752 "values for COORDINATE1");
2755 "Number of coordinates do not match the space "
2756 "dimension for COORDINATE1");
2759 const char *rType = refinement->Attribute(
"TYPE");
2760 ASSERTL0(rType,
"TYPE was not defined in REFINEMENT "
2761 "section of input");
2764 const char *c2Str = refinement->Attribute(
"COORDINATE2");
2766 if (strcmp(rType,
"STANDARD") == 0)
2768 ASSERTL0(c2Str,
"COORDINATE2 was not defined in REFINEMENT "
2769 "section of input");
2771 std::string coord2String = c2Str;
2774 ASSERTL0(valid,
"Unable to correctly parse the axes "
2775 "values for COORDINATE2");
2777 "Number of coordinates do not match the space "
2778 "dimension for COORDINATE2");
2784 "The mesh dimension must match the space dimension");
2786 else if (strcmp(rType,
"SPHERE") == 0)
2789 ASSERTL0(!c2Str,
"COORDINATE2 should not be defined in "
2790 "REFINEMENT section of input for the "
2793 coord2Vector.clear();
2798 "Invalid refinement type");
2805 const char *nModesStr = refinement->Attribute(
"NUMMODES");
2806 ASSERTL0(nModesStr,
"NUMMODES was not defined in "
2807 "Refinement section of input");
2809 std::string numModesStr = nModesStr;
2813 "Unable to correctly parse the number of modes");
2816 const char *nPointsStr = refinement->Attribute(
"NUMPOINTS");
2817 ASSERTL0(nPointsStr,
"NUMPOINTS was not defined in "
2818 "Refinement section of input");
2820 std::string numPointsStr = nPointsStr;
2824 "Unable to correctly parse the number of modes");
2828 const char *nModesStr = refinement->Attribute(
"NUMMODES");
2830 "NUMMODES was not defined in Refinement "
2831 "section of input");
2833 std::string numModesStr = nModesStr;
2838 m_session->GetInterpreter(), numModesStr);
2839 n_modesRef = (int)nummodesEqn.
Evaluate();
2843 n_modesRef = boost::lexical_cast<int>(numModesStr);
2845 nModesVector.push_back(n_modesRef);
2846 nPointsVector.clear();
2850 if (strcmp(rType,
"STANDARD") == 0)
2860 coord2Vector, nModesVector, nPointsVector);
2869 coord2Vector, nModesVector, nPointsVector);
2877 coord2Vector, nModesVector, nPointsVector);
2887 nModesVector, nPointsVector);
2891 refinement = refinement->NextSiblingElement(
"R");
2898 "Unable to find REFINEMENTS tag in file");
2905 TiXmlElement *expansionTypes =
m_session->GetElement(
"NEKTAR/EXPANSIONS");
2907 expansionTypes,
m_session->GetTimeLevel());
2909 ASSERTL0(expansionTypes,
"Unable to find EXPANSIONS tag in file.");
2914 TiXmlElement *expansion = expansionTypes->FirstChildElement();
2915 ASSERTL0(expansion,
"Unable to find entries in EXPANSIONS tag in "
2917 std::string expType = expansion->Value();
2918 std::vector<std::string> vars =
m_session->GetVariables();
2939 map<int, bool> domainCompList;
2942 for (
auto &c :
d.second)
2944 domainCompList[c.first] =
false;
2947 map<std::string, map<int, bool>> fieldDomainCompList;
2952 std::string compositeStr = expansion->Attribute(
"COMPOSITE");
2953 ASSERTL0(compositeStr.length() > 3,
2954 "COMPOSITE must be specified in expansion definition");
2955 int beg = compositeStr.find_first_of(
"[");
2956 int end = compositeStr.find_first_of(
"]");
2957 std::string compositeListStr =
2958 compositeStr.substr(beg + 1, end - beg - 1);
2960 map<int, CompositeSharedPtr> compositeVector;
2964 const char *fStr = expansion->Attribute(
"FIELDS");
2965 std::vector<std::string> fieldStrings;
2969 std::string fieldStr = fStr;
2972 ASSERTL0(valid,
"Unable to correctly parse the field "
2973 "string in ExpansionTypes.");
2989 for (i = 0; i < fieldStrings.size(); ++i)
2991 if (vars.size() && std::count(vars.begin(), vars.end(),
2992 fieldStrings[i]) == 0)
2994 ASSERTL0(
false,
"Variable '" + fieldStrings[i] +
2995 "' defined in EXPANSIONS is not"
2996 " defined in VARIABLES.");
3006 fieldDomainCompList[fieldStrings[i]] =
3008 for (
auto c = compositeVector.begin();
3009 c != compositeVector.end(); ++c)
3011 fieldDomainCompList.find(fieldStrings[i])
3012 ->second.find(c->first)
3018 for (
auto c = compositeVector.begin();
3019 c != compositeVector.end(); ++c)
3021 if (fieldDomainCompList.find(fieldStrings[i])
3022 ->second.find(c->first)
3025 fieldDomainCompList.find(fieldStrings[i])
3026 ->second.find(c->first)
3032 "Expansion vector for "
3035 "' is already setup for C[" +
3036 to_string(c->first) +
"].");
3052 fieldDomainCompList[
"DefaultVar"] = domainCompList;
3053 for (
auto c = compositeVector.begin();
3054 c != compositeVector.end(); ++c)
3056 fieldDomainCompList.find(
"DefaultVar")
3057 ->second.find(c->first)
3063 for (
auto c = compositeVector.begin();
3064 c != compositeVector.end(); ++c)
3066 if (fieldDomainCompList.find(
"DefaultVar")
3067 ->second.find(c->first)
3070 fieldDomainCompList.find(
"DefaultVar")
3071 ->second.find(c->first)
3076 ASSERTL0(
false,
"Default expansion already "
3078 to_string(c->first) +
"].");
3092 const char *tStr = expansion->Attribute(
"TYPE");
3096 std::string typeStr = tStr;
3098 const std::string *endStr =
3100 const std::string *expStr =
3103 ASSERTL0(expStr != endStr,
"Invalid expansion type.");
3118 const char *nStr = expansion->Attribute(
"NUMMODES");
3119 ASSERTL0(nStr,
"NUMMODES was not defined in EXPANSION "
3120 "section of input");
3121 std::string nummodesStr = nStr;
3128 m_session->GetInterpreter(), nummodesStr);
3129 num_modes = (int)nummodesEqn.
Evaluate();
3133 num_modes = boost::lexical_cast<int>(nummodesStr);
3141 const char *bTypeStr = expansion->Attribute(
"BASISTYPE");
3142 ASSERTL0(bTypeStr,
"TYPE or BASISTYPE was not defined in "
3143 "EXPANSION section of input");
3144 std::string basisTypeStr = bTypeStr;
3147 std::vector<std::string> basisStrings;
3148 std::vector<LibUtilities::BasisType> basis;
3150 basisTypeStr.c_str(), basisStrings);
3152 "Unable to correctly parse the basis types.");
3153 for (vector<std::string>::size_type i = 0;
3154 i < basisStrings.size(); i++)
3157 for (
unsigned int j = 0;
3171 "Unable to correctly parse the basis type: ")
3172 .append(basisStrings[i])
3175 const char *nModesStr = expansion->Attribute(
"NUMMODES");
3176 ASSERTL0(nModesStr,
"NUMMODES was not defined in EXPANSION "
3177 "section of input");
3179 std::string numModesStr = nModesStr;
3180 std::vector<unsigned int> numModes;
3184 "Unable to correctly parse the number of modes.");
3185 ASSERTL0(numModes.size() == basis.size(),
3186 "information for num modes does not match the "
3189 const char *pTypeStr = expansion->Attribute(
"POINTSTYPE");
3190 ASSERTL0(pTypeStr,
"POINTSTYPE was not defined in "
3191 "EXPANSION section of input");
3192 std::string pointsTypeStr = pTypeStr;
3194 std::vector<std::string> pointsStrings;
3195 std::vector<LibUtilities::PointsType> points;
3199 "Unable to correctly parse the points types.");
3200 for (vector<std::string>::size_type i = 0;
3201 i < pointsStrings.size(); i++)
3204 for (
unsigned int j = 0;
3218 "Unable to correctly parse the points type: ")
3219 .append(pointsStrings[i])
3223 const char *nPointsStr = expansion->Attribute(
"NUMPOINTS");
3224 ASSERTL0(nPointsStr,
"NUMPOINTS was not defined in "
3225 "EXPANSION section of input");
3226 std::string numPointsStr = nPointsStr;
3227 std::vector<unsigned int> numPoints;
3231 "Unable to correctly parse the number of points.");
3232 ASSERTL0(numPoints.size() == numPoints.size(),
3233 "information for num points does not match the "
3236 for (
int i = 0; i < basis.size(); ++i)
3242 basis[i], numModes[i], pkey));
3247 const char *refIDsStr = expansion->Attribute(
"REFIDS");
3250 vector<NekDouble> refIDsVector;
3251 string refIDsString = refIDsStr;
3254 ASSERTL0(valid,
"Unable to correctly parse the ids "
3258 for (
auto iter = refIDsVector.begin();
3259 iter != refIDsVector.end(); ++iter)
3270 for (
auto compVecIter = compositeVector.begin();
3271 compVecIter != compositeVector.end(); ++compVecIter)
3273 for (
auto geomVecIter =
3274 compVecIter->second->m_geomVec.begin();
3275 geomVecIter != compVecIter->second->m_geomVec.end();
3279 expansionMap->find((*geomVecIter)->GetGlobalID());
3281 x != expansionMap->end(),
3283 std::to_string((*geomVecIter)->GetGlobalID()) +
3287 (x->second)->m_basisKeyVector =
3289 *geomVecIter, expansion_type, num_modes);
3293 ASSERTL0((*geomVecIter)->GetShapeDim() ==
3295 " There is an incompatible expansion "
3296 "dimension with geometry dimension");
3297 (x->second)->m_basisKeyVector = basiskeyvec;
3302 expansion = expansion->NextSiblingElement(
"E");
3308 for (
auto f = fieldDomainCompList.begin();
3309 f != fieldDomainCompList.end(); ++f)
3311 if (f->first !=
"DefaultVar")
3313 for (
auto c = f->second.begin(); c != f->second.end(); ++c)
3315 if (c->second ==
false &&
3316 fieldDomainCompList.find(
"DefaultVar")
3317 ->second.find(c->first)
3322 for (
auto geomVecIter =
3324 ->second->m_geomVec.begin();
3326 ->second->m_geomVec.end();
3332 (*geomVecIter)->GetGlobalID());
3337 (*geomVecIter)->GetGlobalID());
3339 (xField->second)->m_basisKeyVector =
3340 (xDefaultVar->second)->m_basisKeyVector;
3346 "Using Default expansion definition for "
3351 to_string(c->first) +
"].")
3354 ASSERTL0(c->second,
"There is no expansion defined for "
3356 f->first +
"' in C[" +
3357 to_string(c->first) +
"].");
3363 for (i = 0; i < vars.size(); ++i)
3376 "Using Default expansion definition for field "
3383 ASSERTL0(
false,
"Variable '" + vars[i] +
3385 " in FIELDS attribute of EXPANSIONS"
3415 else if (expType ==
"H")
3423 map<int, bool> domainCompList;
3426 for (
auto &c :
d.second)
3428 domainCompList[c.first] =
false;
3431 map<std::string, map<int, bool>> fieldDomainCompList;
3436 std::string compositeStr = expansion->Attribute(
"COMPOSITE");
3437 ASSERTL0(compositeStr.length() > 3,
3438 "COMPOSITE must be specified in expansion definition");
3439 int beg = compositeStr.find_first_of(
"[");
3440 int end = compositeStr.find_first_of(
"]");
3441 std::string compositeListStr =
3442 compositeStr.substr(beg + 1, end - beg - 1);
3444 map<int, CompositeSharedPtr> compositeVector;
3448 const char *fStr = expansion->Attribute(
"FIELDS");
3449 std::vector<std::string> fieldStrings;
3453 std::string fieldStr = fStr;
3456 ASSERTL0(valid,
"Unable to correctly parse the field "
3457 "string in ExpansionTypes.");
3473 for (i = 0; i < fieldStrings.size(); ++i)
3475 if (vars.size() && std::count(vars.begin(), vars.end(),
3476 fieldStrings[i]) == 0)
3478 ASSERTL0(
false,
"Variable '" + fieldStrings[i] +
3479 "' defined in EXPANSIONS is not"
3480 " defined in VARIABLES.");
3490 fieldDomainCompList[fieldStrings[i]] =
3492 for (
auto c = compositeVector.begin();
3493 c != compositeVector.end(); ++c)
3495 fieldDomainCompList.find(fieldStrings[i])
3496 ->second.find(c->first)
3502 for (
auto c = compositeVector.begin();
3503 c != compositeVector.end(); ++c)
3505 if (fieldDomainCompList.find(fieldStrings[i])
3506 ->second.find(c->first)
3509 fieldDomainCompList.find(fieldStrings[i])
3510 ->second.find(c->first)
3516 "Expansion vector for "
3519 "' is already setup for C[" +
3520 to_string(c->first) +
"].");
3536 fieldDomainCompList[
"DefaultVar"] = domainCompList;
3537 for (
auto c = compositeVector.begin();
3538 c != compositeVector.end(); ++c)
3540 fieldDomainCompList.find(
"DefaultVar")
3541 ->second.find(c->first)
3547 for (
auto c = compositeVector.begin();
3548 c != compositeVector.end(); ++c)
3550 if (fieldDomainCompList.find(
"DefaultVar")
3551 ->second.find(c->first)
3554 fieldDomainCompList.find(
"DefaultVar")
3555 ->second.find(c->first)
3560 ASSERTL0(
false,
"Default expansion already "
3562 to_string(c->first) +
"].");
3574 int num_modes_x = 0;
3575 int num_modes_y = 0;
3576 int num_modes_z = 0;
3580 const char *tStr_x = expansion->Attribute(
"TYPE-X");
3584 std::string typeStr = tStr_x;
3586 const std::string *endStr =
3588 const std::string *expStr =
3591 ASSERTL0(expStr != endStr,
"Invalid expansion type.");
3594 const char *nStr = expansion->Attribute(
"NUMMODES-X");
3595 ASSERTL0(nStr,
"NUMMODES-X was not defined in EXPANSION "
3596 "section of input");
3597 std::string nummodesStr = nStr;
3605 m_session->GetInterpreter(), nummodesStr);
3606 num_modes_x = (int)nummodesEqn.
Evaluate();
3610 num_modes_x = boost::lexical_cast<int>(nummodesStr);
3614 const char *tStr_y = expansion->Attribute(
"TYPE-Y");
3618 std::string typeStr = tStr_y;
3620 const std::string *endStr =
3622 const std::string *expStr =
3625 ASSERTL0(expStr != endStr,
"Invalid expansion type.");
3628 const char *nStr = expansion->Attribute(
"NUMMODES-Y");
3629 ASSERTL0(nStr,
"NUMMODES-Y was not defined in EXPANSION "
3630 "section of input");
3631 std::string nummodesStr = nStr;
3638 m_session->GetInterpreter(), nummodesStr);
3639 num_modes_y = (int)nummodesEqn.
Evaluate();
3643 num_modes_y = boost::lexical_cast<int>(nummodesStr);
3647 const char *tStr_z = expansion->Attribute(
"TYPE-Z");
3651 std::string typeStr = tStr_z;
3653 const std::string *endStr =
3655 const std::string *expStr =
3658 ASSERTL0(expStr != endStr,
"Invalid expansion type.");
3661 const char *nStr = expansion->Attribute(
"NUMMODES-Z");
3662 ASSERTL0(nStr,
"NUMMODES-Z was not defined in EXPANSION "
3663 "section of input");
3664 std::string nummodesStr = nStr;
3671 m_session->GetInterpreter(), nummodesStr);
3672 num_modes_z = (int)nummodesEqn.
Evaluate();
3676 num_modes_z = boost::lexical_cast<int>(nummodesStr);
3680 for (
auto compVecIter = compositeVector.begin();
3681 compVecIter != compositeVector.end(); ++compVecIter)
3683 for (
auto geomVecIter =
3684 compVecIter->second->m_geomVec.begin();
3685 geomVecIter != compVecIter->second->m_geomVec.end();
3688 for (
auto expVecIter = expansionMap->begin();
3689 expVecIter != expansionMap->end(); ++expVecIter)
3692 (expVecIter->second)->m_basisKeyVector =
3694 *geomVecIter, expansion_type_x,
3695 expansion_type_y, expansion_type_z,
3696 num_modes_x, num_modes_y, num_modes_z);
3701 expansion = expansion->NextSiblingElement(
"H");
3707 for (
auto f = fieldDomainCompList.begin();
3708 f != fieldDomainCompList.end(); ++f)
3710 if (f->first !=
"DefaultVar")
3712 for (
auto c = f->second.begin(); c != f->second.end(); ++c)
3714 if (c->second ==
false &&
3715 fieldDomainCompList.find(
"DefaultVar")
3716 ->second.find(c->first)
3721 for (
auto geomVecIter =
3723 ->second->m_geomVec.begin();
3725 ->second->m_geomVec.end();
3731 (*geomVecIter)->GetGlobalID());
3736 (*geomVecIter)->GetGlobalID());
3738 (xField->second)->m_basisKeyVector =
3739 (xDefaultVar->second)->m_basisKeyVector;
3745 "Using Default expansion definition for "
3750 to_string(c->first) +
"].")
3753 ASSERTL0(c->second,
"There is no expansion defined for "
3755 f->first +
"' in C[" +
3756 to_string(c->first) +
"].");
3762 for (i = 0; i < vars.size(); ++i)
3775 "Using Default expansion definition for field "
3782 ASSERTL0(
false,
"Variable '" + vars[i] +
3784 " in FIELDS attribute of EXPANSIONS"
3805 std::vector<LibUtilities::FieldDefinitionsSharedPtr> fielddefs;
3809 std::shared_ptr<LibUtilities::FieldIOXml> f =
3810 make_shared<LibUtilities::FieldIOXml>(
m_session->GetComm(),
3815 cout <<
" Number of elements: " << fielddefs.size() << endl;
3818 else if (expType ==
"F")
3820 ASSERTL0(expansion->Attribute(
"FILE"),
3821 "Attribute FILE expected for type F expansion");
3822 std::string filenameStr = expansion->Attribute(
"FILE");
3824 "A filename must be specified for the FILE "
3825 "attribute of expansion");
3827 std::vector<LibUtilities::FieldDefinitionsSharedPtr> fielddefs;
3830 f->Import(filenameStr, fielddefs);
3835 ASSERTL0(
false,
"Expansion type not defined");
3854 for (
auto &compIter :
d.second)
3856 for (
auto &geomIter : compIter.second->m_geomVec)
3858 triGeomShPtr = std::dynamic_pointer_cast<TriGeom>(geomIter);
3859 quadGeomShPtr = std::dynamic_pointer_cast<QuadGeom>(geomIter);
3861 if (triGeomShPtr || quadGeomShPtr)
3865 for (
int i = 0; i < triGeomShPtr->GetNumEdges(); i++)
3867 if (triGeomShPtr->GetEdge(i)->GetGlobalID() ==
3868 edge->GetGlobalID())
3870 ret->push_back(make_pair(triGeomShPtr, i));
3875 else if (quadGeomShPtr)
3877 for (
int i = 0; i < quadGeomShPtr->GetNumEdges(); i++)
3879 if (quadGeomShPtr->GetEdge(i)->GetGlobalID() ==
3880 edge->GetGlobalID())
3882 ret->push_back(make_pair(quadGeomShPtr, i));
3916 for (
int i = 0; i < kNfaces; ++i)
3918 int faceId = element->GetFace(i)->GetGlobalID();
3927 tmp->push_back(make_pair(element, i));
3932 it->second->push_back(make_pair(element, i));
3946 std::map<int, MeshEntity> elements;
3955 e.
list.push_back(i.second->GetVertex(0)->GetGlobalID());
3956 e.
list.push_back(i.second->GetVertex(1)->GetGlobalID());
3968 e.
list.push_back(i.second->GetEdge(0)->GetGlobalID());
3969 e.
list.push_back(i.second->GetEdge(1)->GetGlobalID());
3970 e.
list.push_back(i.second->GetEdge(2)->GetGlobalID());
3978 e.
list.push_back(i.second->GetEdge(0)->GetGlobalID());
3979 e.
list.push_back(i.second->GetEdge(1)->GetGlobalID());
3980 e.
list.push_back(i.second->GetEdge(2)->GetGlobalID());
3981 e.
list.push_back(i.second->GetEdge(3)->GetGlobalID());
3993 e.
list.push_back(i.second->GetFace(0)->GetGlobalID());
3994 e.
list.push_back(i.second->GetFace(1)->GetGlobalID());
3995 e.
list.push_back(i.second->GetFace(2)->GetGlobalID());
3996 e.
list.push_back(i.second->GetFace(3)->GetGlobalID());
4004 e.
list.push_back(i.second->GetFace(0)->GetGlobalID());
4005 e.
list.push_back(i.second->GetFace(1)->GetGlobalID());
4006 e.
list.push_back(i.second->GetFace(2)->GetGlobalID());
4007 e.
list.push_back(i.second->GetFace(3)->GetGlobalID());
4008 e.
list.push_back(i.second->GetFace(4)->GetGlobalID());
4016 e.
list.push_back(i.second->GetFace(0)->GetGlobalID());
4017 e.
list.push_back(i.second->GetFace(1)->GetGlobalID());
4018 e.
list.push_back(i.second->GetFace(2)->GetGlobalID());
4019 e.
list.push_back(i.second->GetFace(3)->GetGlobalID());
4020 e.
list.push_back(i.second->GetFace(4)->GetGlobalID());
4028 e.
list.push_back(i.second->GetFace(0)->GetGlobalID());
4029 e.
list.push_back(i.second->GetFace(1)->GetGlobalID());
4030 e.
list.push_back(i.second->GetFace(2)->GetGlobalID());
4031 e.
list.push_back(i.second->GetFace(3)->GetGlobalID());
4032 e.
list.push_back(i.second->GetFace(4)->GetGlobalID());
4033 e.
list.push_back(i.second->GetFace(5)->GetGlobalID());
4050 std::pair<LibUtilities::ShapeType, vector<int>> tmp;
4051 tmp.first = comp.second->m_geomVec[0]->GetShapeType();
4053 tmp.second.resize(comp.second->m_geomVec.size());
4054 for (
size_t i = 0; i < tmp.second.size(); ++i)
4056 tmp.second[i] = comp.second->m_geomVec[i]->GetGlobalID();
4059 ret[comp.first] = tmp;
#define ASSERTL0(condition, msg)
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Describes the specification for a Basis.
int GetNumPoints() const
Return points order at which basis is defined.
BasisType GetBasisType() const
Return type of expansion basis.
int GetNumModes() const
Returns the order of the basis.
PointsType GetPointsType() const
Return type of quadrature.
NekDouble Evaluate() const
static std::shared_ptr< FieldIO > CreateForFile(const LibUtilities::SessionReaderSharedPtr session, const std::string &filename)
Construct a FieldIO object for a given input filename.
Provides a generic Factory class.
Defines a specification for a set of points.
static void GetXMLElementTimeLevel(TiXmlElement *&element, const size_t timeLevel, const bool enableCheck=true)
Get XML elment time level (Parallel-in-Time)
static DataSourceSharedPtr create(const std::string &fn)
Create a new XML data source based on the filename.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
static std::string GenerateSeqString(const std::vector< T > &v)
Generate a compressed comma-separated string representation of a vector of unsigned integers.
static bool GenerateVector(const std::string &str, std::vector< T > &out)
Takes a comma-separated string and converts it to entries in a vector.
static bool GenerateSeqVector(const std::string &str, std::vector< unsigned int > &out)
Takes a comma-separated compressed string and converts it to entries in a vector.
LibUtilities::ShapeType GetShapeType(void)
Get the geometric shape type of this object.
PointGeomSharedPtr GetVertex(int i) const
Returns vertex i of this object.
int GetCoordim() const
Return the coordinate dimension of this object (i.e. the dimension of the space in which this object ...
int GetNumVerts() const
Get the number of vertices of this object.
void SetDomainRange(NekDouble xmin, NekDouble xmax, NekDouble ymin=NekConstants::kNekUnsetDouble, NekDouble ymax=NekConstants::kNekUnsetDouble, NekDouble zmin=NekConstants::kNekUnsetDouble, NekDouble zmax=NekConstants::kNekUnsetDouble)
bool CheckRange(Geometry2D &geom)
Check if goemetry is in range definition if activated.
void FillBoundingBoxTree()
std::map< int, RefRegion * > m_refRegion
Link the refinement id with the surface region data.
PrismGeomMap m_prismGeoms
void PopulateFaceToElMap(Geometry3DSharedPtr element, int kNfaces)
Given a 3D geometry object #element, populate the face to element map m_faceToElMap which maps faces ...
void SetRefinementInfo(ExpansionInfoMapShPtr &expansionMap)
This function sets the expansion #exp in map with entry #variable.
void SetExpansionInfoToEvenlySpacedPoints(int npoints=0)
Sets expansions to have equispaced points.
LibUtilities::SessionReaderSharedPtr m_session
std::map< int, CompositeMap > m_domain
void SetPartition(SpatialDomains::MeshGraphSharedPtr graph)
std::unique_ptr< GeomRTree > m_boundingBoxTree
ExpansionInfoMapShPtr SetUpExpansionInfoMap()
void SetExpansionInfoToPointOrder(int npts)
Reset expansion to have specified point order npts.
std::map< int, CompositeMap > m_refComposite
Link the refinement id with the composites.
void GetCompositeList(const std::string &compositeStr, CompositeMap &compositeVector) const
CompositeMap m_meshComposites
const ExpansionInfoMap & GetExpansionInfo(const std::string variable="DefaultVar")
GeometryLinkSharedPtr GetElementsFromEdge(Geometry1DSharedPtr edge)
GeometrySharedPtr GetCompositeItem(int whichComposite, int whichItem)
ExpansionInfoMapShPtrMap m_expansionMapShPtrMap
void PRefinementElmts(ExpansionInfoMapShPtr &expansionMap, RefRegion *®ion, GeometrySharedPtr geomVecIter)
Perform the p-refinement in the selected elements.
MovementSharedPtr m_movement
std::string GetCompositeString(CompositeSharedPtr comp)
Returns a string representation of a composite.
void ResetExpansionInfoToBasisKey(ExpansionInfoMapShPtr &expansionMap, LibUtilities::ShapeType shape, LibUtilities::BasisKeyVector &keys)
void SetExpansionInfoToNumModes(int nmodes)
Reset expansion to have specified polynomial order nmodes.
std::unordered_map< int, GeometryLinkSharedPtr > m_faceToElMap
void SetExpansionInfo(std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef)
Sets expansions given field definitions.
std::map< int, MeshEntity > CreateMeshEntities()
Create mesh entities for this graph.
LibUtilities::BasisKeyVector DefineBasisKeyFromExpansionTypeHomo(GeometrySharedPtr in, ExpansionType type_x, ExpansionType type_y, ExpansionType type_z, const int nummodes_x, const int nummodes_y, const int nummodes_z)
CompositeDescriptor CreateCompositeDescriptor()
GeometryLinkSharedPtr GetElementsFromFace(Geometry2DSharedPtr face)
void ReadRefinementInfo()
Read refinement info.
void SetBasisKey(LibUtilities::ShapeType shape, LibUtilities::BasisKeyVector &keys, std::string var="DefaultVar")
Sets the basis key for all expansions of the given shape.
std::map< int, std::string > m_compositesLabels
std::vector< int > GetElementsContainingPoint(PointGeomSharedPtr p)
static LibUtilities::BasisKeyVector DefineBasisKeyFromExpansionType(GeometrySharedPtr in, ExpansionType type, const int order)
LibUtilities::DomainRangeShPtr m_domainRange
Derived class for the refinement surface region.
Abstract base class for the refinement surface region.
virtual bool v_Contains(const Array< OneD, NekDouble > &coords)=0
Pure virtual fuction.
std::vector< unsigned int > GetNumPoints()
Get the number of quadrature points to update expansion.
std::vector< unsigned int > GetNumModes()
Get the number of modes to update expansion.
Derived class for the refinement surface region.
Derived class for the refinement surface region.
Derived class for the refinement surface region.
std::vector< BasisKey > BasisKeyVector
Name for a vector of BasisKeys.
const char *const BasisTypeMap[]
std::shared_ptr< FieldIO > FieldIOSharedPtr
const std::string kPointsTypeStr[]
std::shared_ptr< DomainRange > DomainRangeShPtr
static DomainRangeShPtr NullDomainRangeShPtr
@ SIZE_PointsType
Length of enum list.
@ eFourierEvenlySpaced
1D Evenly-spaced points using Fourier Fit
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
@ eGaussGaussChebyshev
1D Gauss-Gauss-Chebyshev quadrature points
@ ePolyEvenlySpaced
1D Evenly-spaced points using Lagrange polynomial
@ eGaussGaussLegendre
1D Gauss-Gauss-Legendre quadrature points
@ eFourierSingleModeSpaced
1D Non Evenly-spaced points for Single Mode analysis
@ eModified_B
Principle Modified Functions .
@ eGauss_Lagrange
Lagrange Polynomials using the Gauss points.
@ eOrtho_A
Principle Orthogonal Functions .
@ eModified_C
Principle Modified Functions .
@ eGLL_Lagrange
Lagrange for SEM basis .
@ SIZE_BasisType
Length of enum list.
@ eFourierSingleMode
Fourier ModifiedExpansion with just the first mode .
@ eChebyshev
Chebyshev Polynomials.
@ eOrtho_C
Principle Orthogonal Functions .
@ eModifiedPyr_C
Principle Modified Functions.
@ eOrtho_B
Principle Orthogonal Functions .
@ eModified_A
Principle Modified Functions .
@ eFourierHalfModeIm
Fourier Modified expansions with just the imaginary part of the first mode .
@ eFourierHalfModeRe
Fourier Modified expansions with just the real part of the first mode .
@ eFourier
Fourier Expansion .
static const NekDouble kNekUnsetDouble
std::shared_ptr< QuadGeom > QuadGeomSharedPtr
std::map< int, std::pair< LibUtilities::ShapeType, std::vector< int > > > CompositeDescriptor
std::shared_ptr< std::vector< std::pair< GeometrySharedPtr, int > > > GeometryLinkSharedPtr
std::shared_ptr< Composite > CompositeSharedPtr
std::shared_ptr< ExpansionInfoMap > ExpansionInfoMapShPtr
@ eDeformed
Geometry is curved or has non-constant factors.
std::shared_ptr< ExpansionInfo > ExpansionInfoShPtr
const std::string kExpansionTypeStr[]
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
std::shared_ptr< PointGeom > PointGeomSharedPtr
std::shared_ptr< Geometry2D > Geometry2DSharedPtr
std::shared_ptr< Geometry > GeometrySharedPtr
std::shared_ptr< TriGeom > TriGeomSharedPtr
MeshGraphFactory & GetMeshGraphFactory()
std::shared_ptr< Geometry1D > Geometry1DSharedPtr
std::map< int, ExpansionInfoShPtr > ExpansionInfoMap
std::shared_ptr< Geometry3D > Geometry3DSharedPtr
std::map< int, CompositeSharedPtr > CompositeMap
InputIterator find(InputIterator first, InputIterator last, InputIterator startingpoint, const EqualityComparable &value)
std::vector< double > z(NPUPPER)
std::vector< double > d(NPUPPER *NPUPPER)
std::vector< unsigned int > list
bg::model::point< NekDouble, 3, bg::cs::cartesian > BgPoint
bg::model::box< BgPoint > BgBox
std::pair< BgBox, int > BgRtreeValue
void InsertGeom(GeometrySharedPtr const &geom)
bg::index::rtree< BgRtreeValue, bg::index::rstar< 16, 4 > > m_bgTree