44 namespace NekMeshUtils
48 std::vector<NodeSharedPtr> &nodeList)
59 bool same = (n == n2 ? (n2 == n3) :
false);
60 ASSERTL0(same,
"Edges are not consistent");
66 nodeList.insert(nodeList.end(),
73 std::reverse(nodeList.begin() + 3 + k * (n - 2),
74 nodeList.begin() + 3 + (k + 1) * (n - 2));
84 "Face nodes of tensor product only supported "
85 "for quadrilaterals.");
88 nodeList.resize(n * n);
100 {0, 1}, {n - 1, n}, {n * n - 1, -1}, {n * (n - 1), -n}};
101 for (
int i = 0; i < 4; ++i)
107 for (
int j = 1; j < n - 1; ++j)
109 nodeList[skips[i][0] + j * skips[i][1]] =
115 for (
int j = 1; j < n - 1; ++j)
117 nodeList[skips[i][0] + j * skips[i][1]] =
124 for (
int i = 1; i < n - 1; ++i)
126 for (
int j = 1; j < n - 1; ++j)
128 nodeList[i * n + j] =
140 std::vector<NodeSharedPtr> nodeList;
146 for (
int k = 0; k < nodeList.size(); ++k)
148 s << std::scientific << std::setprecision(8) <<
" "
149 << nodeList[k]->m_x <<
" " << nodeList[k]->m_y <<
" "
150 << nodeList[k]->m_z <<
" ";
171 int nPoints = order + 1;
181 for (
int i = 0; i < coordDim; ++i)
184 xmap->BwdTrans(geom->GetCoeffs(i), phys[i]);
187 const int nTriPts = nPoints * (nPoints + 1) / 2;
188 const int nTriIntPts = (nPoints - 3) * (nPoints - 2) / 2;
191 for (
int i = 3 + 3*(nPoints-2), cnt = 0; i < nTriPts; ++i, ++cnt)
198 for (
int j = 0; j < coordDim; ++j)
200 x[j] = xmap->PhysEvaluate(xp, phys[j]);
204 new Node(
id++, x[0], x[1], x[2]));
217 int nPoints = order + 1;
227 for (
int i = 0; i < coordDim; ++i)
230 xmap->BwdTrans(geom->GetCoeffs(i), phys[i]);
233 int nQuadIntPts = (nPoints - 2) * (nPoints - 2);
236 for (
int i = 1, cnt = 0; i < nPoints-1; ++i)
238 for (
int j = 1; j < nPoints-1; ++j, ++cnt)
245 for (
int k = 0; k < coordDim; ++k)
247 x[k] = xmap->PhysEvaluate(xp, phys[k]);
251 new Node(
id++, x[0], x[1], x[2]));
259 ASSERTL0(
false,
"Unknown number of vertices");
272 s->ProjectTo(loc,uv);
290 for (
int i = 0; i < nEdge; ++i)
295 for (
int i = 0; i < nEdge; ++i)
314 for (
int j = 0; j < nEdge; j++)
316 std::vector<NodeSharedPtr> ed =
m_edgeList[j]->m_edgeNodes;
319 for (
int k = ed.size() - 1; k >= 0; k--)
321 c->m_points.push_back(ed[k]->
GetGeom(coordDim));
326 for (
int k = 0; k < ed.size(); k++)
328 c->m_points.push_back(ed[k]->
GetGeom(coordDim));
338 m_id, edges, edgeo, c);
347 "Face nodes of tensor product only supported "
348 "for quadrilaterals.");
351 std::vector<NodeSharedPtr> tmp(n * n);
363 {0, 1}, {n - 1, n}, {n * n - 1, -1}, {n * (n - 1), -n}};
364 for (
int i = 0; i < 4; ++i)
370 for (
int j = 1; j < n - 1; ++j)
372 tmp[skips[i][0] + j * skips[i][1]] =
378 for (
int j = 1; j < n - 1; ++j)
380 tmp[skips[i][0] + j * skips[i][1]] =
387 for (
int i = 1; i < n - 1; ++i)
389 for (
int j = 1; j < n - 1; ++j)
396 for (
int k = 0; k < tmp.size(); ++k)
398 c->m_points.push_back(tmp[k]->
GetGeom(coordDim));
403 m_id, edges, edgeo, c);
#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).
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
std::vector< EdgeSharedPtr > m_edgeList
List of corresponding edges.
unsigned int m_id
ID of the face.
boost::shared_ptr< Curve > CurveSharedPtr
boost::shared_ptr< SegGeom > SegGeomSharedPtr
base class for a cad surface
unsigned int GetPointsDim() const
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
boost::shared_ptr< Geometry2D > Geometry2DSharedPtr
NEKMESHUTILS_EXPORT SpatialDomains::Geometry2DSharedPtr GetGeom(int coordDim)
Generate either SpatialDomains::TriGeom or SpatialDomains::QuadGeom for this element.
boost::shared_ptr< CADSurf > CADSurfSharedPtr
2D Evenly-spaced points on a Triangle
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
boost::shared_ptr< Geometry > GeometrySharedPtr
CADObjectSharedPtr m_parentCAD
std::vector< NodeSharedPtr > m_vertexList
List of vertex nodes.
2D Nodal Electrostatic Points on a Triangle