45 #include <boost/geometry.hpp>
46 #include <boost/geometry/geometries/box.hpp>
47 #include <boost/geometry/geometries/point.hpp>
48 #include <boost/geometry/index/rtree.hpp>
50 namespace bg = boost::geometry;
51 namespace bgi = boost::geometry::index;
53 typedef bg::model::point<double, 3, bg::cs::cartesian>
point;
54 typedef bg::model::box<point>
box;
55 typedef std::pair<box, unsigned int>
boxI;
60 namespace NekMeshUtils
65 NekDouble xmin = numeric_limits<double>::max(),
66 xmax = -1.0 * numeric_limits<double>::max(),
67 ymin = numeric_limits<double>::max(),
68 ymax = -1.0 * numeric_limits<double>::max(),
69 zmin = numeric_limits<double>::max(),
70 zmax = -1.0 * numeric_limits<double>::max();
72 vector<NodeSharedPtr> ns = el->GetVertexList();
73 for (
int i = 0; i < ns.size(); i++)
75 xmin = min(xmin, ns[i]->m_x);
76 xmax = max(xmax, ns[i]->m_x);
77 ymin = min(ymin, ns[i]->m_y);
78 ymax = max(ymax, ns[i]->m_y);
79 zmin = min(zmin, ns[i]->m_z);
80 zmax = max(zmax, ns[i]->m_z);
83 return box(
point(xmin - ov, ymin - ov, zmin - ov),
84 point(xmax + ov, ymax + ov, zmax + ov));
89 NekDouble xmin = numeric_limits<double>::max(),
90 xmax = -1.0 * numeric_limits<double>::max(),
91 ymin = numeric_limits<double>::max(),
92 ymax = -1.0 * numeric_limits<double>::max(),
93 zmin = numeric_limits<double>::max(),
94 zmax = -1.0 * numeric_limits<double>::max();
96 for (
int j = 0; j < els.size(); j++)
98 vector<NodeSharedPtr> ns = els[j]->GetVertexList();
99 for (
int i = 0; i < ns.size(); i++)
101 xmin = min(xmin, ns[i]->m_x);
102 xmax = max(xmax, ns[i]->m_x);
103 ymin = min(ymin, ns[i]->m_y);
104 ymax = max(ymax, ns[i]->m_y);
105 zmin = min(zmin, ns[i]->m_z);
106 zmax = max(zmax, ns[i]->m_z);
110 return box(
point(xmin - ov, ymin - ov, zmin - ov),
111 point(xmax + ov, ymax + ov, zmax + ov));
116 return box(
point(n->m_x - ov, n->m_y - ov, n->m_z - ov),
117 point(n->m_x + ov, n->m_y + ov, n->m_z + ov));
131 for (bit = m_blData.begin(); bit != m_blData.end(); bit++)
133 vector<blInfoSharedPtr> infos = m_nToNInfo[bit->first];
134 for (
int i = 0; i < infos.size(); i++)
136 if (bit->second->bl > infos[i]->bl + 1)
138 cout <<
"non smooth error " << bit->second->bl <<
" "
139 << infos[i]->bl << endl;
144 for (
int i = 0; i < m_mesh->m_element[3].size(); i++)
147 if (!IsPrismValid(el))
149 cout <<
"validity error " << el->GetId() << endl;
158 map<NodeSharedPtr, NodeSharedPtr> BLMesh::GetSymNodes()
160 map<NodeSharedPtr, NodeSharedPtr> ret;
163 for (bit = m_blData.begin(); bit != m_blData.end(); bit++)
165 if (!bit->second->onSym)
173 bit->second->pNode->SetCADSurf(bit->second->symsurf, s, uv);
174 ret[bit->first] = bit->second->pNode;
181 vector<NodeSharedPtr> ns1 = el->GetVertexList();
185 V[0] = n->m_x - ns1[0]->m_x;
186 V[1] = n->m_y - ns1[0]->m_y;
187 V[2] = n->m_z - ns1[0]->m_z;
189 NekDouble Vmag = sqrt(V[0] * V[0] + V[1] * V[1] + V[2] * V[2]);
191 NekDouble ang = (N1[0] * V[0] + N1[1] * V[1] + N1[2] * V[2]) / Vmag;
196 void BLMesh::GrowLayers()
211 map<int, vector<ElementSharedPtr> > psElements;
212 for (
int i = 0; i < m_mesh->m_element[2].size(); i++)
216 find(m_blsurfs.begin(), m_blsurfs.end(), el->m_parentCAD->GetId());
219 m_symSurfs.begin(), m_symSurfs.end(), el->m_parentCAD->GetId());
221 if (f == m_blsurfs.end() && s == m_symSurfs.end())
223 psElements[el->m_parentCAD->GetId()].push_back(el);
226 for (
int i = 0; i < m_psuedoSurface.size(); i++)
228 psElements[m_psuedoSurface[i]->m_parentCAD->GetId()].push_back(
232 bgi::rtree<boxI, bgi::quadratic<16> > TopTree;
233 map<int, bgi::rtree<boxI, bgi::quadratic<16> > > SubTrees;
239 for (
int l = 1; l < m_layer; l++)
241 NekDouble delta = (m_layerT[l] - m_layerT[l - 1]);
244 map<int, vector<ElementSharedPtr> >
::iterator it;
245 for (it = psElements.begin(); it != psElements.end(); it++)
247 TopTree.insert(make_pair(
GetBox(it->second, m_bl), it->first));
248 vector<boxI> toInsert;
249 for (
int i = 0; i < it->second.size(); i++)
251 toInsert.push_back(make_pair(
GetBox(it->second[i], m_bl), i));
253 SubTrees[it->first].insert(toInsert.begin(), toInsert.end());
256 for (bit = m_blData.begin(); bit != m_blData.end(); bit++)
258 if (bit->second->stopped)
263 vector<boxI> results;
264 TopTree.query(bgi::intersects(
point(bit->second->pNode->m_x,
265 bit->second->pNode->m_y,
266 bit->second->pNode->m_z)),
267 back_inserter(results));
269 for (
int i = 0; i < results.size(); i++)
272 bit->second->surfs.find(results[i].second);
273 if (f == bit->second->surfs.end())
276 surfs.insert(results[i].second);
282 for (iit = surfs.begin(); iit != surfs.end(); iit++)
285 SubTrees[*iit].query(
286 bgi::intersects(
GetBox(bit->second->pNode, m_bl)),
287 back_inserter(results));
288 for (
int i = 0; i < results.size(); i++)
290 if (
Infont(bit->second->pNode,
291 psElements[*iit][results[i].second]))
294 Proximity(bit->second->pNode,
295 psElements[*iit][results[i].second]);
296 if (prox < delta * 2.5)
300 bit->second->stopped =
true;
320 for (bit = m_blData.begin(); bit != m_blData.end(); bit++)
322 if (bit->second->stopped)
328 bool shouldStop =
false;
329 vector<blInfoSharedPtr> ne = m_nToNInfo[bit->first];
330 for (
int i = 0; i < ne.size(); i++)
332 if (ne[i]->bl < bit->second->bl)
340 bit->second->stopped =
true;
344 bit->second->AlignNode(m_layerT[l]);
353 return (a * b > 0.0);
358 return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
363 vector<NodeSharedPtr> ns = el->GetVertexList();
366 E0[0] = ns[1]->m_x - ns[0]->m_x;
367 E0[1] = ns[1]->m_y - ns[0]->m_y;
368 E0[2] = ns[1]->m_z - ns[0]->m_z;
370 E1[0] = ns[2]->m_x - ns[0]->m_x;
371 E1[1] = ns[2]->m_y - ns[0]->m_y;
372 E1[2] = ns[2]->m_z - ns[0]->m_z;
386 NekDouble s = b * e - c * d, t = b * d - a * e;
400 t = (e >= 0 ? 0 : (-e >= c ? 1 : -e / c));
406 s = (d >= 0 ? 0 : (-d >= a ? 1 : -d / a));
437 s = (numer >= denom ? 1 : numer / denom);
444 new Node(0, B[0] + s * E0[0] + t * E1[0], B[1] + s * E0[1] + t * E1[1],
445 B[2] + s * E0[2] + t * E1[2]));
447 return n->Distance(point);
452 vector<NodeSharedPtr> ns1 = e1->GetVertexList();
453 vector<NodeSharedPtr> ns2 = e2->GetVertexList();
454 if (ns1[0] == ns2[0] || ns1[0] == ns2[1] || ns1[0] == ns2[2] ||
455 ns1[1] == ns2[0] || ns1[1] == ns2[1] || ns1[1] == ns2[2] ||
456 ns1[2] == ns2[0] || ns1[2] == ns2[1] || ns1[2] == ns2[2])
464 N1[0] = (ns1[1]->m_y - ns1[0]->m_y) * (ns1[2]->m_z - ns1[0]->m_z) -
465 (ns1[2]->m_y - ns1[0]->m_y) * (ns1[1]->m_z - ns1[0]->m_z);
466 N1[1] = -1.0 * ((ns1[1]->m_x - ns1[0]->m_x) * (ns1[2]->m_z - ns1[0]->m_z) -
467 (ns1[2]->m_x - ns1[0]->m_x) * (ns1[1]->m_z - ns1[0]->m_z));
468 N1[2] = (ns1[1]->m_x - ns1[0]->m_x) * (ns1[2]->m_y - ns1[0]->m_y) -
469 (ns1[2]->m_x - ns1[0]->m_x) * (ns1[1]->m_y - ns1[0]->m_y);
471 N2[0] = (ns2[1]->m_y - ns2[0]->m_y) * (ns2[2]->m_z - ns2[0]->m_z) -
472 (ns2[2]->m_y - ns2[0]->m_y) * (ns2[1]->m_z - ns2[0]->m_z);
473 N2[1] = -1.0 * ((ns2[1]->m_x - ns2[0]->m_x) * (ns2[2]->m_z - ns2[0]->m_z) -
474 (ns2[2]->m_x - ns2[0]->m_x) * (ns2[1]->m_z - ns2[0]->m_z));
475 N2[2] = (ns2[1]->m_x - ns2[0]->m_x) * (ns2[2]->m_y - ns2[0]->m_y) -
476 (ns2[2]->m_x - ns2[0]->m_x) * (ns2[1]->m_y - ns2[0]->m_y);
479 (N1[0] * ns1[0]->m_x + N1[1] * ns1[0]->m_y + N1[2] * ns1[0]->m_z);
481 (N2[0] * ns2[0]->m_x + N2[1] * ns2[0]->m_y + N2[2] * ns2[0]->m_z);
486 N2[0] * ns1[0]->m_x + N2[1] * ns1[0]->m_y + N2[2] * ns1[0]->m_z + d2;
488 N2[0] * ns1[1]->m_x + N2[1] * ns1[1]->m_y + N2[2] * ns1[1]->m_z + d2;
490 N2[0] * ns1[2]->m_x + N2[1] * ns1[2]->m_y + N2[2] * ns1[2]->m_z + d2;
493 N1[0] * ns2[0]->m_x + N1[1] * ns2[0]->m_y + N1[2] * ns2[0]->m_z + d1;
495 N1[0] * ns2[1]->m_x + N1[1] * ns2[1]->m_y + N1[2] * ns2[1]->m_z + d1;
497 N1[0] * ns2[2]->m_x + N1[1] * ns2[2]->m_y + N1[2] * ns2[2]->m_z + d1;
499 if (
sign(dv1[0], dv1[1]) &&
sign(dv1[1], dv1[2]))
503 if (
sign(dv2[0], dv2[1]) &&
sign(dv2[1], dv2[2]))
509 D[0] = N1[1] * N2[2] - N1[2] * N2[1];
510 D[1] = -1.0 * (N1[0] * N2[2] - N1[2] * N2[0]);
511 D[2] = N1[0] * N2[1] - N1[0] * N2[1];
513 int base1 = 0, base2 = 0;
514 if (!
sign(dv2[0], dv2[1]) &&
sign(dv2[1], dv2[2]))
518 else if (!
sign(dv2[1], dv2[2]) &&
sign(dv2[2], dv2[0]))
522 else if (!
sign(dv2[2], dv2[0]) &&
sign(dv2[0], dv2[1]))
528 cout <<
"base not set" << endl;
531 if (!
sign(dv1[0], dv1[1]) &&
sign(dv1[1], dv1[2]))
535 else if (!
sign(dv1[1], dv1[2]) &&
sign(dv1[2], dv1[0]))
539 else if (!
sign(dv1[2], dv1[0]) &&
sign(dv1[0], dv1[1]))
545 cout <<
"base not set" << endl;
550 p1[0] = D[0] * ns1[0]->m_x + D[1] * ns1[0]->m_y + D[2] * ns1[0]->m_z;
551 p1[1] = D[0] * ns1[1]->m_x + D[1] * ns1[1]->m_y + D[2] * ns1[1]->m_z;
552 p1[2] = D[0] * ns1[2]->m_x + D[1] * ns1[2]->m_y + D[2] * ns1[2]->m_z;
554 p2[0] = D[0] * ns2[0]->m_x + D[1] * ns2[0]->m_y + D[2] * ns2[0]->m_z;
555 p2[1] = D[0] * ns2[1]->m_x + D[1] * ns2[1]->m_y + D[2] * ns2[1]->m_z;
556 p2[2] = D[0] * ns2[2]->m_x + D[1] * ns2[2]->m_y + D[2] * ns2[2]->m_z;
576 t11 = p1[o1] + (p1[base1] - p1[o1]) * dv1[o1] / (dv1[o1] - dv1[base1]);
577 t12 = p1[o2] + (p1[base1] - p1[o2]) * dv1[o2] / (dv1[o2] - dv1[base1]);
595 t21 = p2[o1] + (p2[base2] - p2[o1]) * dv2[o1] / (dv2[o1] - dv2[base2]);
596 t22 = p2[o2] + (p2[base2] - p2[o2]) * dv2[o2] / (dv2[o2] - dv2[base2]);
613 if (!
sign(t21 - t11, t22 - t11) || !
sign(t21 - t12, t22 - t12))
621 void BLMesh::Shrink()
629 vector<ElementSharedPtr> inv;
630 for (
int i = 0; i < m_mesh->m_element[3].size(); i++)
633 if (!IsPrismValid(el))
639 smsh = (inv.size() > 0);
641 for (
int i = 0; i < inv.size(); i++)
644 vector<blInfoSharedPtr> bls;
645 vector<NodeSharedPtr> ns = t->GetVertexList();
646 for (
int j = 0; j < ns.size(); j++)
648 bls.push_back(m_blData[ns[j]]);
655 for (
int j = 0; j < 3; j++)
657 mx = max(mx, bls[j]->bl);
659 ASSERTL0(mx > 0,
"shrinking to nothing");
660 for (
int j = 0; j < 3; j++)
667 bls[j]->AlignNode(m_layerT[bls[j]->bl]);
669 if (!IsPrismValid(inv[i]))
680 for (bit = m_blData.begin(); bit != m_blData.end(); bit++)
682 vector<blInfoSharedPtr> infos = m_nToNInfo[bit->first];
683 for (
int i = 0; i < infos.size(); i++)
685 if (bit->second->bl > infos[i]->bl + 1)
688 bit->second->AlignNode(m_layerT[bit->second->bl]);
699 NekDouble mn = numeric_limits<double>::max();
700 NekDouble mx = -1.0 * numeric_limits<double>::max();
701 vector<NodeSharedPtr> ns = el->GetVertexList();
703 for (
int j = 0; j < ns.size(); j++)
722 for (
int j = 0; j < 6; j++)
736 dxdz(0, 0) * (dxdz(1, 1) * dxdz(2, 2) - dxdz(2, 1) * dxdz(1, 2)) -
737 dxdz(0, 1) * (dxdz(1, 0) * dxdz(2, 2) - dxdz(2, 0) * dxdz(1, 2)) +
738 dxdz(0, 2) * (dxdz(1, 0) * dxdz(2, 1) - dxdz(2, 0) * dxdz(1, 1));
739 mn = min(mn, jacDet);
740 mx = max(mx, jacDet);
752 void BLMesh::BuildElements()
755 map<CADOrientation::Orientation, vector<int> > baseTri;
756 map<CADOrientation::Orientation, vector<int> > topTri;
786 for (
int i = 0; i < m_mesh->m_element[2].size(); i++)
790 find(m_blsurfs.begin(), m_blsurfs.end(), el->m_parentCAD->GetId());
792 if (f == m_blsurfs.end())
798 vector<NodeSharedPtr> tn(3);
799 vector<NodeSharedPtr> pn(6);
800 vector<NodeSharedPtr> n = el->GetVertexList();
803 for (
int j = 0; j < 3; j++)
805 pn[baseTri[o][j]] = n[j];
806 pn[topTri[o][j]] = m_blData[n[j]]->pNode;
807 tn[j] = m_blData[n[j]]->pNode;
811 tags.push_back(m_id);
816 m_mesh->m_element[3].push_back(E);
821 m_psuedoSurface.push_back(T);
823 T->m_parentCAD = el->m_parentCAD;
829 NekDouble BLMesh::Visability(vector<ElementSharedPtr> tris,
832 NekDouble mn = numeric_limits<double>::max();
834 for (
int i = 0; i < tris.size(); i++)
837 NekDouble dt = tmp[0] * N[0] + tmp[1] * N[1] + tmp[2] * N[2];
846 vector<Array<OneD, NekDouble> > N;
847 for (
int i = 0; i < tris.size(); i++)
849 N.push_back(tris[i]->Normal(
true));
852 vector<NekDouble> w(N.size());
855 for (
int i = 0; i < N.size(); i++)
857 w[i] = 1.0 / N.size();
860 for (
int i = 0; i < N.size(); i++)
862 Np[0] += w[i] * N[i][0];
863 Np[1] += w[i] * N[i][1];
864 Np[2] += w[i] * N[i][2];
866 NekDouble mag = sqrt(Np[0] * Np[0] + Np[1] * Np[1] + Np[2] * Np[2]);
875 vector<NekDouble> a(N.size());
876 while (fabs(dot - 1) > 1e-6)
885 for (
int i = 0; i < N.size(); i++)
888 Np[0] * N[i][0] + Np[1] * N[i][1] + Np[2] * N[i][2];
889 if (fabs(dot2 - 1) < 1e-9)
891 a[i] = dot2 / fabs(dot2) * 1e-9;
902 for (
int i = 0; i < N.size(); i++)
904 w[i] = w[i] * a[i] / aSum;
908 for (
int i = 0; i < N.size(); i++)
914 for (
int i = 0; i < N.size(); i++)
916 NpN[0] += w[i] * N[i][0];
917 NpN[1] += w[i] * N[i][1];
918 NpN[2] += w[i] * N[i][2];
920 mag = sqrt(NpN[0] * NpN[0] + NpN[1] * NpN[1] + NpN[2] * NpN[2]);
925 Np[0] = 0.8 * NpN[0] + (1.0 - 0.8) * Np[0];
926 Np[1] = 0.8 * NpN[1] + (1.0 - 0.8) * Np[1];
927 Np[2] = 0.8 * NpN[2] + (1.0 - 0.8) * Np[2];
928 mag = sqrt(Np[0] * Np[0] + Np[1] * Np[1] + Np[2] * Np[2]);
933 dot = Np[0] * Nplast[0] + Np[1] * Nplast[1] + Np[2] * Nplast[2];
937 cout <<
"run out of iterations" << endl;
948 NekDouble a = 2.0 * (1.0 - m_prog) / (1.0 - pow(m_prog, m_layer + 1));
950 m_layerT[0] = a * m_prog * m_bl;
951 for (
int i = 1; i < m_layer; i++)
953 m_layerT[i] = m_layerT[i - 1] + a * pow(m_prog, i) * m_bl;
956 if(m_mesh->m_verbose)
958 cout <<
"First layer height " << m_layerT[0] << endl;
970 for (it = m_mesh->m_vertexSet.begin(); it != m_mesh->m_vertexSet.end();
973 vector<pair<int, CADSurfSharedPtr> > ss = (*it)->GetCADSurfs();
974 vector<unsigned int> surfs;
975 for (
int i = 0; i < ss.size(); i++)
977 surfs.push_back(ss[i].first);
979 sort(surfs.begin(), surfs.end());
980 vector<unsigned int> inter, diff;
982 set_intersection(m_blsurfs.begin(), m_blsurfs.end(), surfs.begin(),
983 surfs.end(), back_inserter(inter));
984 set_symmetric_difference(inter.begin(), inter.end(), surfs.begin(),
985 surfs.end(), back_inserter(diff));
988 if (inter.size() > 0)
993 bln->stopped =
false;
1002 ASSERTL0(diff.size() <= 1,
"not setup for curve bl refinement");
1003 symSurfs.insert(diff[0]);
1004 bln->symsurf = diff[0];
1012 m_blData[(*it)] = bln;
1019 for (
int i = 0; i < m_mesh->m_element[2].size(); i++)
1022 find(m_blsurfs.begin(), m_blsurfs.end(),
1023 m_mesh->m_element[2][i]->m_parentCAD->GetId());
1025 if (f == m_blsurfs.end())
1031 vector<NodeSharedPtr> ns = m_mesh->m_element[2][i]->GetVertexList();
1032 for (
int j = 0; j < ns.size(); j++)
1034 m_blData[ns[j]]->els.push_back(m_mesh->m_element[2][i]);
1035 m_blData[ns[j]]->surfs.insert(
1036 m_mesh->m_element[2][i]->m_parentCAD->GetId());
1041 for (bit = m_blData.begin(); bit != m_blData.end(); bit++)
1044 bit->second->N = GetNormal(bit->second->els);
1046 if (Visability(bit->second->els, bit->second->N) < 0.0)
1048 cerr <<
"failed " << bit->first->m_x <<
" " << bit->first->m_y
1049 <<
" " << bit->first->m_z <<
" "
1050 << Visability(bit->second->els, bit->second->N) << endl;
1055 for (
int k = 0; k < 3; k++)
1057 loc[k] += bit->second->N[k] * m_layerT[0];
1060 bit->second->pNode = boost::shared_ptr<Node>(
1061 new Node(m_mesh->m_numNodes++, loc[0], loc[1], loc[2]));
1062 bit->second->bl = 0;
1065 m_symSurfs = vector<unsigned int>(symSurfs.begin(), symSurfs.end());
1069 for (bit = m_blData.begin(); bit != m_blData.end(); bit++)
1071 if (!bit->second->onSym)
1078 m_mesh->m_cad->GetSurf(bit->second->symsurf)->ProjectTo(loc, uv);
1081 m_mesh->m_cad->GetSurf(bit->second->symsurf)->P(uv);
1084 N[0] = nl[0] - bit->first->m_x;
1085 N[1] = nl[1] - bit->first->m_y;
1086 N[2] = nl[2] - bit->first->m_z;
1088 NekDouble mag = sqrt(N[0] * N[0] + N[1] * N[1] + N[2] * N[2]);
1094 bit->second->AlignNode(m_layerT[0]);
1099 for (bit = m_blData.begin(); bit != m_blData.end(); bit++)
1102 added.insert(bit->first->m_id);
1103 for (
int i = 0; i < bit->second->els.size(); i++)
1105 vector<NodeSharedPtr> ns = bit->second->els[i]->GetVertexList();
1106 for (
int j = 0; j < ns.size(); j++)
1109 if (t == added.end())
1111 m_nToNInfo[bit->first].push_back(m_blData[ns[j]]);
1117 for (
int l = 0; l < 10; l++)
1119 for (bit = m_blData.begin(); bit != m_blData.end(); bit++)
1121 if (bit->first->GetNumCADSurf() > 1)
1127 vector<blInfoSharedPtr> data = m_nToNInfo[bit->first];
1129 for (
int i = 0; i < data.size(); i++)
1131 NekDouble d = bit->first->Distance(data[i]->oNode);
1133 sumV[0] += data[i]->N[0] / d;
1134 sumV[1] += data[i]->N[1] / d;
1135 sumV[2] += data[i]->N[2] / d;
1141 sqrt(sumV[0] * sumV[0] + sumV[1] * sumV[1] + sumV[2] * sumV[2]);
1148 N[0] = (1.0 - 0.8) * bit->second->N[0] + 0.8 * sumV[0];
1149 N[1] = (1.0 - 0.8) * bit->second->N[1] + 0.8 * sumV[1];
1150 N[2] = (1.0 - 0.8) * bit->second->N[2] + 0.8 * sumV[2];
1152 mag = sqrt(N[0] * N[0] + N[1] * N[1] + N[2] * N[2]);
1158 bit->second->AlignNode(m_layerT[0]);
1176 ASSERTL0(failed == 0,
"some normals failed to generate");
1187 VandermondeI.Invert();
static NekDouble ang(NekDouble x, NekDouble y)
#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.
#define sign(a, b)
return the sign(b)*a
ElementFactory & GetElementFactory()
SharedMatrix GetVandermondeForDeriv(int dir)
Return the Vandermonde matrix of the derivative of the basis functions for the nodal distribution...
bg::model::box< point > box
bool Infont(NodeSharedPtr n, ElementSharedPtr el)
boost::shared_ptr< Node > NodeSharedPtr
PointsManagerT & PointsManager(void)
Defines a specification for a set of points.
box GetBox(NodeSharedPtr n, NekDouble ov)
Specialisation of the NodalUtil class to support nodal prismatic elements.
bg::model::point< double, 3, bg::cs::cartesian > point
T Dot(int n, const T *w, const T *x)
vvtvp (vector times vector times vector): z = w*x*y
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
boost::shared_ptr< CADSurf > CADSurfSharedPtr
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
std::pair< box, unsigned int > boxI
SharedMatrix GetVandermonde()
Return the Vandermonde matrix for the nodal distribution.
boost::shared_ptr< blInfo > blInfoSharedPtr
InputIterator find(InputIterator first, InputIterator last, InputIterator startingpoint, const EqualityComparable &value)
boost::shared_ptr< Element > ElementSharedPtr
3D electrostatically spaced points on a Prism