Execute boundary layer meshing.
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++)
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];
157 Array<OneD, NekDouble> AN(3);
159 vector<pair<int, CADSurfSharedPtr> > surfs =
162 for (
int s = 0; s < surfs.size(); s++)
164 Array<OneD, NekDouble> N = surfs[s].second->N(
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++)
180 Array<OneD, NekDouble> loc = n[j]->GetLoc();
181 Array<OneD, NekDouble> np(3);
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)
#define ASSERTL0(condition, msg)
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.
MeshSharedPtr m_mesh
Mesh object containing surface mesh.
ElementFactory & GetElementFactory()
NekDouble m_bl
Thickness of the boundary layer.
std::map< int, FaceSharedPtr > m_surftopriface
Map from surface element ID to opposite face of prism.
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.
std::vector< unsigned int > m_blsurfs
List of surfaces onto which boundary layers are placed.