45 namespace NekMeshUtils
56 vector<NodeSharedPtr> pNodeList,
58 :
Element(pConf, GetNumNodes(pConf), pNodeList.size())
68 map<pair<int, int>,
int> edgeNodeMap;
70 edgeNodeMap[pair<int, int>(1, 2)] = 5;
71 edgeNodeMap[pair<int, int>(2, 3)] = 5 + n;
72 edgeNodeMap[pair<int, int>(3, 4)] = 5 + 2 * n;
73 edgeNodeMap[pair<int, int>(4, 1)] = 5 + 3 * n;
78 for (
int i = 0; i < 4; ++i)
82 sum += (pNodeList[o]->m_x - pNodeList[i]->m_x) *
83 (pNodeList[o]->m_y + pNodeList[i]->m_y);
87 for (it = edgeNodeMap.begin(); it != edgeNodeMap.end(); ++it)
89 vector<NodeSharedPtr> edgeNodes;
92 for (
int j = it->second; j < it->second + n; ++j)
94 edgeNodes.push_back(pNodeList[j - 1]);
98 pNodeList[it->first.second - 1],
122 int locVert = edgeId;
123 if (edge->m_n1 ==
m_vertex[locVert])
127 else if (edge->m_n2 ==
m_vertex[locVert])
133 ASSERTL1(
false,
"Edge is not connected to this quadrilateral.");
165 int nPoints = order + 1;
175 for (
int i = 0; i < coordDim; ++i)
178 xmap->BwdTrans(geom->GetCoeffs(i), phys[i]);
181 int nQuadIntPts = (nPoints - 2) * (nPoints - 2);
184 for (
int i = 1, cnt = 0; i < nPoints-1; ++i)
186 for (
int j = 1; j < nPoints-1; ++j, ++cnt)
193 for (
int k = 0; k < coordDim; ++k)
195 x[k] = xmap->PhysEvaluate(xp, phys[k]);
199 new Node(
id++, x[0], x[1], x[2]));
210 for (
int i = 0; i < 4; ++i)
212 edges[i] =
m_edge[i]->GetGeom(coordDim);
213 verts[i] =
m_vertex[i]->GetGeom(coordDim);
223 m_id, verts, edges, edgeorient);
230 int n =
m_edge[0]->GetNodeCount();
231 nodeList.resize(n * n);
237 nodeList[n * (n - 1)] =
m_vertex[3];
241 {0, 1}, {n - 1, n}, {n * n - 1, -1}, {n * (n - 1), -n}};
242 for (
int i = 0; i < 4; ++i)
248 for (
int j = 1; j < n - 1; ++j)
250 nodeList[skips[i][0] + j * skips[i][1]] =
251 m_edge[i]->m_edgeNodes[n - 2 - j];
256 for (
int j = 1; j < n - 1; ++j)
258 nodeList[skips[i][0] + j * skips[i][1]] =
259 m_edge[i]->m_edgeNodes[j - 1];
265 for (
int i = 1; i < n - 1; ++i)
267 for (
int j = 1; j < n - 1; ++j)
269 nodeList[i * n + j] =
285 return (n + 1) * (n + 1);
bool m_faceNodes
Denotes whether the element contains face nodes. For 2D elements, if this is true then the element co...
Basic information about an element.
Represents an edge which joins two points.
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
static NEKMESHUTILS_EXPORT unsigned int GetNumNodes(ElmtConfig pConf)
Return the number of nodes defining a quadrilateral.
virtual NEKMESHUTILS_EXPORT SpatialDomains::GeometrySharedPtr GetGeom(int coordDim)
Generate a Nektar++ geometry object for this element.
boost::shared_ptr< QuadGeom > QuadGeomSharedPtr
ElementFactory & GetElementFactory()
ElmtConfig m_conf
Contains configuration of the element.
static StdRegions::Orientation GetEdgeOrientation(const SegGeom &edge1, const SegGeom &edge2)
Get the orientation of edge1.
std::vector< int > m_taglist
List of integers specifying properties of the element.
LibUtilities::PointsType m_edgeCurveType
Distribution of points in edges.
unsigned int m_order
Order of the element.
std::vector< NodeSharedPtr > m_vertex
List of element vertex nodes.
unsigned int m_dim
Dimension of the element.
bool m_volumeNodes
Denotes whether the element contains volume (i.e. interior) nodes. These are not supported by either ...
boost::shared_ptr< SegGeom > SegGeomSharedPtr
std::vector< EdgeSharedPtr > m_edge
List of element edges.
unsigned int GetPointsDim() const
PointsManagerT & PointsManager(void)
Defines a specification for a set of points.
std::vector< NodeSharedPtr > m_volumeNodes
List of element volume nodes.
virtual NEKMESHUTILS_EXPORT StdRegions::Orientation GetEdgeOrient(int edgeId, EdgeSharedPtr edge)
Get the edge orientation of edge with respect to the local element, which lies at edge index edgeId...
std::string m_tag
Tag character describing the element.
boost::shared_ptr< Edge > EdgeSharedPtr
Shared pointer to an edge.
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
unsigned int m_id
ID of the element.
LibUtilities::PointsType m_curveType
Volume curve type.
bool m_reorient
Denotes whether the element needs to be re-orientated for a spectral element framework.
virtual NEKMESHUTILS_EXPORT void MakeOrder(int order, SpatialDomains::GeometrySharedPtr geom, LibUtilities::PointsType pType, int coordDim, int &id, bool justConfig=false)
Insert interior (i.e. volume) points into this element to make the geometry an order order representa...
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
boost::shared_ptr< PointGeom > PointGeomSharedPtr
Base class for element definitions.
virtual NEKMESHUTILS_EXPORT void GetCurvedNodes(std::vector< NodeSharedPtr > &nodeList) const
get list of volume interior nodes
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.