43 namespace NekMeshUtils
47 std::vector<NodeSharedPtr> &nodeList)
58 bool same = (n == n2 ? (n2 == n3) :
false);
59 ASSERTL0(same,
"Edges are not consistent");
65 nodeList.insert(nodeList.end(),
72 std::reverse(nodeList.begin() + 3 + k * (n - 2),
73 nodeList.begin() + 3 + (k + 1) * (n - 2));
83 "Face nodes of tensor product only supported " 84 "for quadrilaterals.");
87 nodeList.resize(n * n);
99 {0, 1}, {n - 1, n}, {n * n - 1, -1}, {n * (n - 1), -n}};
100 for (
int i = 0; i < 4; ++i)
106 for (
int j = 1; j < n - 1; ++j)
108 nodeList[skips[i][0] + j * skips[i][1]] =
114 for (
int j = 1; j < n - 1; ++j)
116 nodeList[skips[i][0] + j * skips[i][1]] =
123 for (
int i = 1; i < n - 1; ++i)
125 for (
int j = 1; j < n - 1; ++j)
127 nodeList[i * n + j] =
139 std::vector<NodeSharedPtr> nodeList;
145 for (
int k = 0; k < nodeList.size(); ++k)
147 s << std::scientific << std::setprecision(8) <<
" " 148 << nodeList[k]->m_x <<
" " << nodeList[k]->m_y <<
" " 149 << nodeList[k]->m_z <<
" ";
170 int nPoints = order + 1;
180 for (
int i = 0; i < coordDim; ++i)
183 xmap->BwdTrans(geom->GetCoeffs(i), phys[i]);
186 const int nTriPts = nPoints * (nPoints + 1) / 2;
187 const int nTriIntPts = (nPoints - 3) * (nPoints - 2) / 2;
190 for (
int i = 3 + 3*(nPoints-2), cnt = 0; i < nTriPts; ++i, ++cnt)
197 for (
int j = 0; j < coordDim; ++j)
199 x[j] = xmap->PhysEvaluate(xp, phys[j]);
203 new Node(
id++, x[0], x[1], x[2]));
216 int nPoints = order + 1;
226 for (
int i = 0; i < coordDim; ++i)
229 xmap->BwdTrans(geom->GetCoeffs(i), phys[i]);
232 int nQuadIntPts = (nPoints - 2) * (nPoints - 2);
235 for (
int i = 1, cnt = 0; i < nPoints-1; ++i)
237 for (
int j = 1; j < nPoints-1; ++j, ++cnt)
244 for (
int k = 0; k < coordDim; ++k)
246 x[k] = xmap->PhysEvaluate(xp, phys[k]);
250 new Node(
id++, x[0], x[1], x[2]));
258 ASSERTL0(
false,
"Unknown number of vertices");
288 for (
int i = 0; i < nEdge; ++i)
293 for (
int i = 0; i < nEdge; ++i)
312 for (
int j = 0; j < nEdge; j++)
314 std::vector<NodeSharedPtr> ed =
m_edgeList[j]->m_edgeNodes;
317 for (
int k = ed.size() - 1; k >= 0; k--)
319 c->m_points.push_back(ed[k]->
GetGeom(coordDim));
324 for (
int k = 0; k < ed.size(); k++)
326 c->m_points.push_back(ed[k]->
GetGeom(coordDim));
345 "Face nodes of tensor product only supported " 346 "for quadrilaterals.");
349 std::vector<NodeSharedPtr> tmp(n * n);
361 {0, 1}, {n - 1, n}, {n * n - 1, -1}, {n * (n - 1), -n}};
362 for (
int i = 0; i < 4; ++i)
368 for (
int j = 1; j < n - 1; ++j)
370 tmp[skips[i][0] + j * skips[i][1]] =
376 for (
int j = 1; j < n - 1; ++j)
378 tmp[skips[i][0] + j * skips[i][1]] =
385 for (
int i = 1; i < n - 1; ++i)
387 for (
int j = 1; j < n - 1; ++j)
394 for (
int k = 0; k < tmp.size(); ++k)
396 c->m_points.push_back(tmp[k]->
GetGeom(coordDim));
std::shared_ptr< CADSurf > CADSurfSharedPtr
#define ASSERTL0(condition, msg)
NEKMESHUTILS_EXPORT void GetCurvedNodes(std::vector< NodeSharedPtr > &nodeList)
Assemble a list of nodes on curved face.
void MakeOrder(int order, SpatialDomains::GeometrySharedPtr geom, LibUtilities::PointsType pType, int coordDim, int &id)
Make this face an order order face.
std::vector< NodeSharedPtr > m_faceNodes
List of face-interior nodes defining the shape of the face.
NEKMESHUTILS_EXPORT unsigned int GetNodeCount() const
Returns the total number of nodes (vertices, edge nodes and face nodes).
std::shared_ptr< Geometry2D > Geometry2DSharedPtr
std::vector< EdgeSharedPtr > m_edgeList
List of corresponding edges.
unsigned int GetPointsDim() const
unsigned int m_id
ID of the face.
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
std::shared_ptr< Geometry > GeometrySharedPtr
base class for a cad surface
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
PointsManagerT & PointsManager(void)
NEKMESHUTILS_EXPORT std::string GetXmlCurveString()
Generates a string listing the coordinates of all nodes associated with this face.
Defines a specification for a set of points.
LibUtilities::PointsType m_curveType
Distribution of points in this face.
2D Nodal Fekete Points on a Triangle
NEKMESHUTILS_EXPORT SpatialDomains::Geometry2DSharedPtr GetGeom(int coordDim)
Generate either SpatialDomains::TriGeom or SpatialDomains::QuadGeom for this element.
std::shared_ptr< Curve > CurveSharedPtr
2D Evenly-spaced points on a Triangle
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
std::shared_ptr< SegGeom > SegGeomSharedPtr
CADObjectSharedPtr m_parentCAD
std::vector< NodeSharedPtr > m_vertexList
List of vertex nodes.
2D Nodal Electrostatic Points on a Triangle