42 namespace NekMeshUtils
55 vector<ElementSharedPtr> quad;
56 vector<ElementSharedPtr> ptri;
58 for (
int i = 0; i < m_mesh->m_element[2].size(); i++)
60 bool onblsurf =
false;
61 for (
int j = 0; j < m_blsurfs.size(); j++)
63 if (m_mesh->m_element[2][i]->CADSurfId == m_blsurfs[j])
69 if (m_mesh->m_element[2][i]->GetConf().m_e ==
72 quad.push_back(m_mesh->m_element[2][i]);
76 ptri.push_back(m_mesh->m_element[2][i]);
80 map<int, NodeSharedPtr> blpair;
81 for (
int i = 0; i < quad.size(); i++)
83 vector<EdgeSharedPtr> e = quad[i]->GetEdgeList();
84 for (
int j = 0; j < e.size(); j++)
87 if ((e[j]->m_n1->GetNumCadCurve() > 0 &&
88 e[j]->m_n2->GetNumCadCurve() > 0) ||
89 (!(e[j]->m_n1->GetNumCadCurve() > 0) &&
90 !(e[j]->m_n2->GetNumCadCurve() > 0)))
95 if (e[j]->m_n1->GetNumCadCurve() > 0)
97 blpair[e[j]->m_n1->m_id] = e[j]->m_n2;
99 else if (e[j]->m_n2->GetNumCadCurve() > 0)
101 blpair[e[j]->m_n2->m_id] = e[j]->m_n1;
118 for (
int i = 0; i < ptri.size(); i++)
120 vector<NodeSharedPtr> pn(6);
121 vector<NodeSharedPtr> n = ptri[i]->GetVertexList();
123 vector<pair<int, CADSurfSharedPtr> > tmpss = n[0]->GetCADSurfs();
126 for (
int j = 0; j < tmpss.size(); j++)
128 if (tmpss[j].first == ptri[i]->CADSurfId)
130 tmps = tmpss[j].second;
135 if (tmps->IsReversedNormal())
145 for (
int j = 0; j < n.size(); j++)
147 pn[nm[j * 2]] = n[j];
150 it = blpair.find(n[j]->m_id);
151 if (it != blpair.end())
153 pn[nm[j * 2 + 1]] = blpair[n[j]->m_id];
159 vector<pair<int, CADSurfSharedPtr> > surfs =
162 for (
int s = 0; s < surfs.size(); s++)
165 n[j]->GetCADSurfInfo(surfs[s].first));
166 for (
int k = 0; k < 3; k++)
173 sqrt(AN[0] * AN[0] + AN[1] * AN[1] + AN[2] * AN[2]);
175 for (
int k = 0; k < 3; k++)
182 for (
int k = 0; k < 3; k++)
183 np[k] = loc[k] + AN[k] * m_bl;
185 new Node(m_mesh->m_numNodes++, np[0], np[1], np[2]));
186 pn[nm[j * 2 + 1]] = nn;
187 blpair[n[j]->m_id] = nn;
197 m_mesh->m_element[3].push_back(E);
202 vector<NodeSharedPtr> faceNodes;
203 vector<EdgeSharedPtr> edgeList = ptri[i]->GetEdgeList();
205 n, faceNodes, edgeList, ptri[i]->GetConf().m_faceCurveType));
206 vector<FaceSharedPtr> f = E->GetFaceList();
207 for (
int j = 0; j < f.size(); j++)
209 if (f[j]->m_vertexList.size() != 3)
216 m_surftopriface[ptri[i]->GetId()] = f[j];
#define ASSERTL0(condition, msg)
Basic information about an element.
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
Represents a face comprised of three or more edges.
ElementFactory & GetElementFactory()
Represents a point in the domain.
boost::shared_ptr< Node > NodeSharedPtr
boost::shared_ptr< CADSurf > CADSurfSharedPtr
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
boost::shared_ptr< Element > ElementSharedPtr
boost::shared_ptr< Face > FaceSharedPtr
Shared pointer to a face.