41 const real_t ip = diff * normal;
53 const Vector origin, normal;
57 std::vector<int> *r2o;
59 std::vector<std::array<int, 8>> *perm;
63 Vector const& normal_, std::vector<int> *r2o_,
64 Mesh *mesh, std::vector<std::array<int, 8>> *refPerm) :
66 meshOrig(mesh), r2o(r2o_), perm(refPerm)
84 const bool reflected = (*r2o)[elem] < 0;
85 const int originalElem = reflected ? -1 - (*r2o)[elem] : (*r2o)[elem];
99 a->
Eval(V, *T_orig, ip);
111 const std::array<int, 8>&
p = (*perm)[elem];
120 b[0] = (*ir)[
p[0]].x;
121 b[1] = (*ir)[
p[0]].y;
122 b[2] = (*ir)[
p[0]].z;
127 A(0,0) = (*ir)[
p[1]].x -
b[0];
128 A(1,0) = (*ir)[
p[1]].y -
b[1];
129 A(2,0) = (*ir)[
p[1]].z -
b[2];
132 A(0,1) = (*ir)[
p[3]].x -
b[0];
133 A(1,1) = (*ir)[
p[3]].y -
b[1];
134 A(2,1) = (*ir)[
p[3]].z -
b[2];
137 A(0,2) = (*ir)[
p[4]].x -
b[0];
138 A(1,2) = (*ir)[
p[4]].y -
b[1];
139 A(2,2) = (*ir)[
p[4]].z -
b[2];
155 a->
Eval(V, *T_orig, ipo);
166 std::array<int, 8> &perm)
168 std::map<int, int> h2inv;
169 const int n = perm.size();
171 for (
int i=0; i<n; ++i)
176 for (
int i=0; i<n; ++i)
178 perm[i] = h2inv[h1[i]];
191 HexMeshBuilder(
int nv,
int ne) : v2f(nv)
193 mesh =
new Mesh(3, nv, ne);
224 int AddVertex(
const real_t *coords)
const
235 int AddElement(
Array<int> const& vertices,
const bool reorder);
238 std::vector<std::array<int, 8>> refPerm;
241 std::vector<std::vector<int>> faces;
242 std::vector<std::set<int>> v2f;
243 std::vector<std::vector<int>> f2e;
244 std::array<std::array<int, 4>, 6> f2v;
245 std::array<std::array<int, 2>, 12> e2v;
247 int FindFourthVertexOnFace(
Array<int> const& hex,
248 std::vector<int>
const& v3)
const;
254 void ReverseHexFace(
Array<int> & hex,
const int face)
const;
255 int FindHexFace(
Array<int> const& hex, std::vector<int>
const& face)
const;
257 bool ReorderHex_faceOrientations(
Array<int> & hex)
const;
258 void SaveHexFaces(
const int elem,
Array<int> const& hex);
261int HexMeshBuilder::AddElement(
Array<int> const& vertices,
const bool reorder)
263 MFEM_ASSERT(vertices.
Size() == 8,
"Hexahedron must have 8 vertices");
271 bool reordered =
true;
275 reordered = ReorderHex_faceOrientations(rvert);
277 MFEM_VERIFY(iter < 5,
"");
281 std::array<int, 8> perm_e;
283 refPerm.push_back(perm_e);
287 refPerm.push_back(std::array<int, 8> {0, 1, 2, 3, 4, 5, 6, 7});
290 SaveHexFaces(mesh->
GetNE(), rvert);
298int HexMeshBuilder::FindFourthVertexOnFace(
Array<int> const& hex,
299 std::vector<int>
const& v3)
const
302 for (
int f=0;
f<6; ++
f)
304 bool all3found =
true;
306 for (
int i=0; i<3; ++i)
311 for (
int j=0; j<4; ++j)
313 if (hex[f2v[
f][j]] == v3[i])
328 MFEM_ASSERT(f0 == -1,
"");
333 MFEM_VERIFY(f0 >= 0,
"");
338 for (
int j=0; j<4; ++j)
341 for (
int i=0; i<3; ++i)
344 if (hex[f2v[f0][j]] == v3[i])
352 MFEM_ASSERT(v == -1,
"");
357 MFEM_VERIFY(v >= 0,
"");
362void HexMeshBuilder::ReorderHex(
Array<int> & hex)
const
364 MFEM_VERIFY(hex.
Size() == 8,
"hex");
368 const int v0 = hex.
Min();
370 std::map<int, int> v2hex0;
372 for (
int i=0; i<hex.
Size(); ++i)
378 std::vector<int> v0e;
379 for (
int e=0; e<12; ++e)
381 if (v0 == hex[e2v[e][0]] || v0 == hex[e2v[e][1]])
387 MFEM_VERIFY(v0e.size() == 3,
"");
389 std::vector<int> v0n;
392 if (v0 == hex[e2v[e][0]])
394 v0n.push_back(hex[e2v[e][1]]);
398 v0n.push_back(hex[e2v[e][0]]);
402 MFEM_VERIFY(v0n.size() == 3,
"");
404 sort(v0n.begin(), v0n.end());
412 std::vector<int> v3(3);
416 h[2] = FindFourthVertexOnFace(hex, v3);
420 h[5] = FindFourthVertexOnFace(hex, v3);
424 h[7] = FindFourthVertexOnFace(hex, v3);
430 h[6] = FindFourthVertexOnFace(hex, v3);
435void HexMeshBuilder::ReverseHexZ(
Array<int> & hex)
const
449void HexMeshBuilder::ReverseHexY(
Array<int> & hex)
const
463void HexMeshBuilder::ReverseHexX(
Array<int> & hex)
const
478void HexMeshBuilder::ReverseHexFace(
Array<int> & hex,
const int face)
const
480 const int f = 2 * (face / 2);
495int HexMeshBuilder::FindHexFace(
Array<int> const& hex,
496 std::vector<int>
const& face)
const
499 for (
int f=0;
f<6; ++
f)
501 std::vector<int> fv(4);
502 for (
int i=0; i<4; ++i)
504 fv[i] = hex[f2v[
f][i]];
507 sort(fv.begin(), fv.end());
511 MFEM_VERIFY(localFace == -1,
"");
516 MFEM_VERIFY(localFace >= 0,
"");
521bool HexMeshBuilder::ReorderHex_faceOrientations(
Array<int> & hex)
const
523 std::vector<int> localFacesFound, globalFacesFound;
524 for (
int f=0;
f<6; ++
f)
526 std::vector<int> fv(4);
527 for (
int i=0; i<4; ++i)
529 fv[i] = hex[f2v[
f][i]];
532 sort(fv.begin(), fv.end());
534 const int vmin = fv[0];
536 for (
auto gf : v2f[vmin])
546 globalFacesFound.push_back(globalFace);
547 localFacesFound.push_back(
f);
551 const int numFoundFaces = globalFacesFound.size();
553 for (
int ff=0; ff<numFoundFaces; ++ff)
555 const int globalFace = globalFacesFound[ff];
556 const int localFace = localFacesFound[ff];
558 MFEM_VERIFY(f2e[globalFace].size() == 1,
"");
559 const int neighborElem = f2e[globalFace][0];
563 const int neighborLocalFace = FindHexFace(neighborElemVert, faces[globalFace]);
565 std::vector<int> fv(4);
566 std::vector<int> nv(4);
567 for (
int i=0; i<4; ++i)
569 fv[i] = hex[f2v[localFace][i]];
570 nv[i] = neighborElemVert[f2v[neighborLocalFace][i]];
577 for (id0 = 0; id0 < 4; id0++)
579 if (fv[id0] == nv[0])
585 MFEM_VERIFY(id0 < 4,
"");
587 bool same = (fv[(id0+1) % 4] == nv[1]);
592 ReverseHexFace(hex, localFace);
600void HexMeshBuilder::SaveHexFaces(
const int elem,
Array<int> const& hex)
602 for (
int f=0;
f<6; ++
f)
604 std::vector<int> fv(4);
605 for (
int i=0; i<4; ++i)
607 fv[i] = hex[f2v[
f][i]];
610 sort(fv.begin(), fv.end());
612 const int vmin = fv[0];
614 for (
auto gf : v2f[vmin])
622 if (globalFace == -1)
626 globalFace = faces.size() - 1;
628 std::vector<int> firstElem = {elem};
629 f2e.push_back(firstElem);
634 MFEM_VERIFY(f2e[globalFace].size() == 1 &&
635 f2e[globalFace][0] != elem,
"");
636 f2e[globalFace].push_back(elem);
639 MFEM_VERIFY(faces.size() == f2e.size(),
"");
640 v2f[vmin].insert(globalFace);
658 for (
int i=0; i<3; ++i)
660 L += (v0[i] - v1[i]) * (v0[i] - v1[i]);
665 if (diam < 0.0 || L < diam) { diam = L; }
672 Vector const& normal, std::vector<int> & el)
674 const real_t relTol = 1.0e-6;
677 for (
int e=0; e<mesh.
GetNE(); ++e)
683 bool onplane =
false;
687 for (
int i=0; i<3; ++i)
689 diff[i] = vcrd[i] - origin[i];
692 if (std::abs(diff * normal) < relTol * diam)
698 if (onplane) { el.push_back(e); }
704 Vector const& normal, std::vector<int> & elOrder)
706 const int ne = mesh.
GetNE();
707 elOrder.assign(ne, -1);
709 std::vector<bool> elementMarked;
711 elementMarked.assign(ne,
false);
713 std::vector<int> layer;
716 if (layer.size() == 0)
719 for (
int i=0; i<ne; ++i)
734 elementMarked[e] =
true;
737 if (cnt == ne) {
break; }
739 std::set<int> layerNext;
745 if (!elementMarked[n]) { layerNext.insert(n); }
749 MFEM_VERIFY(layerNext.size() > 0,
"");
752 layer.reserve(layerNext.size());
753 for (
auto e : layerNext)
759 MFEM_VERIFY(cnt == ne,
"");
766 std::vector<std::array<int, 8>> &hexPerm,
767 std::vector<int> &elOrder)
769 MFEM_VERIFY(mesh.
Dimension() == 3,
"Only 3D meshes can be reflected");
773 for (
int i=0; i<mesh.
GetNE(); i++)
782 if (i == 0 || length < minLength)
788 const real_t relTol = 1.0e-6;
791 std::set<int> planeVertices;
792 for (
int i=0; i<mesh.
GetNV(); i++)
797 const real_t ip = diff * normal;
798 if (std::abs(ip) < relTol * minLength)
800 planeVertices.insert(i);
804 const int nv = mesh.
GetNV();
805 const int ne = mesh.
GetNE();
807 std::vector<int> r2o;
809 const int nv_reflected = (2*nv) - planeVertices.size();
811 HexMeshBuilder builder(nv_reflected, 2*ne);
813 r2o.assign(2*ne, -2-ne);
815 std::vector<int> v2r;
816 v2r.assign(mesh.
GetNV(), -1);
819 for (
int v=0; v<mesh.
GetNV(); v++)
824 for (
int v=0; v<mesh.
GetNV(); v++)
827 if (planeVertices.find(v) == planeVertices.end())
831 for (
int i=0; i<3; ++i)
838 v2r[v] = builder.AddVertex(vr.
GetData());
844 for (
int eidx=0; eidx<mesh.
GetNE(); eidx++)
846 const int e = elOrder[eidx];
852 MFEM_VERIFY(elvert.
Size() == 8,
"Only hexahedral elements are supported");
854 const int copiedElem = builder.AddElement(elvert,
false);
859 for (
int i=0; i<elvert.
Size(); ++i)
861 const int v = elvert[i];
862 rvert[i] = (v2r[v] == -1) ? v : v2r[v];
865 const int newElem = builder.AddElement(rvert, onPlane);
866 r2o[newElem] = -1 - e;
869 Mesh *reflected = builder.mesh;
872 MFEM_VERIFY((
int) r2o.size() == reflected->
GetNE(),
"");
873 for (
int i = 0; i < (int) r2o.size(); ++i)
875 const int e = (r2o[i] >= 0) ? r2o[i] : -1 - r2o[i];
890 std::map<std::pair<int, int>,
int> mapBE;
891 for (
int i=0; i<mesh.
GetNBE(); ++i)
896 MFEM_VERIFY(v.
Size() == 4,
"Boundary elements must be quadrilateral");
898 const int v1 = v.
Min();
900 for (
int j=0; j<v.
Size(); ++j)
908 const int v2 = v[(v1i + 2) % 4];
910 mapBE[std::pair<int, int>(v1, v2)] = i;
917 for (
int j=0; j<v.
Size(); ++j)
919 rv[j] = (v2r[v[j]] == -1) ? v[j] : v2r[v[j]];
926 if (rv1 == -1 || rv[j] < rv1)
936 const int rv2 = rv[(rv1i + 2) % 4];
938 mapBE[std::pair<int, int>(rv1, rv2)] = i;
953 for (
int i=0; i<reflected->
GetNBE(); ++i)
958 MFEM_VERIFY(rv.
Size() == 4,
"Boundary elements must be quadrilateral");
962 const int v1 = rv.
Min();
964 for (
int j=0; j<rv.
Size(); ++j)
972 const int v2 = rv[(v1i + 2) % 4];
974 const int originalBE = mapBE[std::pair<int, int>(v1, v2)];
996 reflected->
SetCurvature(order, discont, sdim, ordering);
1003 ReflectedCoefficient rc(nodesCoef, origin, normal, &r2o, &mesh,
1007 *reflected_nodes = newReflectedNodes;
1010 hexPerm = builder.refPerm;
1016 const array<int, 8> &hexperm,
1017 std::array<int, 3> &dir, std::array<int, 3> &dims,
1022 const std::array<int, 8> &hexPerm)
1032 std::array<int, 3> dims, dir;
1044 for (
int i=0; i<dims[0]; ++i)
1046 for (
int j=0; j<dims[1]; ++j)
1048 for (
int k=0; k<dims[2]; ++k)
1050 const int old = permArray(i,j,k);
1051 const int i0 = old / ((ny + 1) * (nz + 1));
1052 const int j0 = (old - (i0 * (ny + 1) * (nz + 1))) / (nz + 1);
1053 const int k0 = old - (i0 * (ny + 1) * (nz + 1)) - (j0 * (nz+1));
1055 const real_t w = (*patch)(i0,j0,k0,3);
1056 for (
int l=0; l<3; ++l) { vr[l] = (*patch)(i0,j0,k0,l) / w; }
1060 for (
int l=0; l<3; ++l) { (*rpatch)(i,j,k,l) = vr[l] * w; }
1061 (*rpatch)(i,j,k,3) = w;
1072 "Only 3D NURBS meshes can be reflected");
1082 const int pnv = patchTopo.
GetNV();
1084 for (
int p=0;
p<patchesOriginal.
Size(); ++
p)
1087 const int nx = p2g.
nx();
1088 const int ny = p2g.
ny();
1089 const int nz = p2g.
nz();
1094 for (
int l=0; l<3; ++l)
1096 const int os = l * pnv;
1097 vert_coord[vert[0] + os] = (*patchesOriginal[
p])(0,0,0,l);
1098 vert_coord[vert[1] + os] = (*patchesOriginal[
p])(nx,0,0,l);
1099 vert_coord[vert[2] + os] = (*patchesOriginal[
p])(nx,ny,0,l);
1100 vert_coord[vert[3] + os] = (*patchesOriginal[
p])(0,ny,0,l);
1101 vert_coord[vert[4] + os] = (*patchesOriginal[
p])(0,0,nz,l);
1102 vert_coord[vert[5] + os] = (*patchesOriginal[
p])(nx,0,nz,l);
1103 vert_coord[vert[6] + os] = (*patchesOriginal[
p])(nx,ny,nz,l);
1104 vert_coord[vert[7] + os] = (*patchesOriginal[
p])(0,ny,nz,l);
1110 std::vector<std::array<int, 8>> hexPerm;
1111 std::vector<int> elOrder;
1117 for (
int p=0;
p<patchesOriginal.
Size(); ++
p)
1119 const int p_orig = elOrder[
p];
1121 const int nx = p2g.
nx();
1122 const int ny = p2g.
ny();
1123 const int nz = p2g.
nz();
1125 patches.
Append(patchesOriginal[p_orig]);
1127 origin, normal, hexPerm[(2 *
p) + 1]));
1131 delete reflectedPatchTopo;
1133 for (
auto patch : patches) {
delete patch; }
1143 const char *mesh_file =
"../../data/pipe-nurbs.mesh";
1144 bool visualization = 1;
1150 int visport = 19916;
1154 args.
AddOption(&mesh_file,
"-m",
"--mesh",
1155 "Mesh file to use.");
1156 args.
AddOption(&normal,
"-n",
"--normal",
1157 "Normal vector of plane.");
1158 args.
AddOption(&origin,
"-o",
"--origin",
1159 "A point in the plane.");
1160 args.
AddOption(&visualization,
"-vis",
"--visualization",
"-no-vis",
1161 "--no-visualization",
1162 "Enable or disable GLVis visualization.");
1163 args.
AddOption(&visport,
"-p",
"--send-port",
"Socket for GLVis.");
1172 MFEM_VERIFY(std::abs(normal.
Norml2() - 1.0) < 1.0e-14,
"");
1174 Mesh mesh(mesh_file, 0, 0);
1176 Mesh *reflected{
nullptr};
1185 std::vector<std::array<int, 8>> hexPerm;
1186 std::vector<int> elOrder;
1191 ofstream mesh_ofs(
"reflected.mesh");
1192 mesh_ofs.precision(8);
1193 reflected->Print(mesh_ofs);
1200 sol_sock.precision(8);
1201 sol_sock <<
"mesh\n" << *reflected << flush;
1212 const int id2d = idx - (4 * ijk[2]);
1214 ijk[0] = (ijk[1] == 0) ? id2d : 3 - id2d;
1218 const array<int, 8> &hexperm,
1219 std::array<int, 3> &dir, std::array<int, 3> &dims,
1222 int prinV[4] = {0, 1, 3, 4};
1229 std::array<int, 3> newIJK[4];
1230 for (
int i = 0; i < 4; ++i)
1232 newPrinV[i] = hexperm[prinV[i]];
1238 for (
int i = 0; i < 3; ++i)
1241 for (
int j = 0; j < 3; ++j)
1243 const int d = newIJK[i + 1][j] - newIJK[0][j];
1246 MFEM_VERIFY(!iset,
"");
1247 MFEM_VERIFY(d == 1 || d == -1,
"");
1254 MFEM_VERIFY(iset,
"");
1256 dims[i] =
dim[dir[i]];
1259 MFEM_VERIFY(dir[0] + dir[1] + dir[2] == 3,
"");
1261 permArray.
SetSize(dims[0], dims[1], dims[2]);
1265 for (
int i = 0; i < dims[0]; ++i)
1266 for (
int j = 0; j < dims[1]; ++j)
1267 for (
int k = 0; k < dims[2]; ++k)
1273 for (
int m = 0; m < 3; ++m)
1275 const int d = dir[m];
1278 old_ijk[d] =
dim[d] - 1 - new_ijk[m];
1282 old_ijk[d] = new_ijk[m];
1286 permArray(i, j, k) =
1287 old_ijk[2] + (old_ijk[1] *
dim[2]) + (old_ijk[0] *
dim[1] *
dim[2]);
void SetSize(int n1, int n2, int n3)
Set the 3D array size to n1 x n2 x n3.
T Min() const
Find the minimal element in the array, using the comparison operator < for class T.
int Size() const
Return the logical size of the array.
int Append(const T &el)
Append element 'el' to array, resize if necessary.
Data type dense matrix using column-major storage.
Abstract data type element.
virtual void GetVertices(Array< int > &v) const =0
Get the indices defining the vertices.
virtual void SetVertices(const Array< int > &v)=0
Set the indices defining the vertices.
int GetOrder() const
Return the order (polynomial degree) of the FE collection, corresponding to the order/degree returned...
Class FiniteElementSpace - responsible for providing FEM view of the mesh, mainly managing the set of...
Ordering::Type GetOrdering() const
Return the ordering method.
const FiniteElementCollection * FEColl() const
const IntegrationRule * GetVertices(int GeomType) const
Return an IntegrationRule consisting of all vertices of the given Geometry::Type, GeomType.
Class for grid function - Vector with associated FE space.
FiniteElementSpace * FESpace()
virtual void ProjectCoefficient(Coefficient &coeff, ProjectType type=ProjectType::DEFAULT)
Project coeff Coefficient to this GridFunction. The projection computation depends on the choice of t...
Class for integration point with weight.
Class for an integration rule - an Array of IntegrationPoint.
A vector of knots in one dimension, with B-spline basis functions of a prescribed order.
Arbitrary order "L2-conforming" discontinuous finite elements.
void SetVertices(const Vector &vert_coord)
Element * NewElement(int geom)
int AddBdrElement(Element *elem)
NURBSExtension * NURBSext
Optional NURBS mesh extension.
Array< int > FindFaceNeighbors(const int elem) const
Returns the sorted, unique indices of elements sharing a face with element elem, including elem.
Geometry::Type GetBdrElementGeometry(int i) const
int GetAttribute(int i) const
Return the attribute of element i.
void GetElementVertices(int i, Array< int > &v) const
Returns the indices of the vertices of element i.
int GetBdrAttribute(int i) const
Return the attribute of boundary element i.
void SetAttribute(int i, int attr)
Set the attribute of element i.
void FinalizeTopology(bool generate_bdr=true)
Finalize the construction of the secondary topology (connectivity) data of a Mesh.
int AddVertex(real_t x, real_t y=0.0, real_t z=0.0)
int GetNE() const
Returns number of elements.
int Dimension() const
Dimension of the reference space used within the elements.
const Element * GetBdrElement(int i) const
Return pointer to the i'th boundary element object.
virtual void SetCurvature(int order, bool discont=false, int space_dim=-1, int ordering=1, int pyr_type=1)
Set the curvature of the mesh nodes using the given polynomial degree.
int AddElement(Element *elem)
void GetElementTransformation(int i, IsoparametricTransformation *ElTr) const
Builds the transformation defining the i-th element in ElTr. ElTr must be allocated in advance and wi...
int SpaceDimension() const
Dimension of the physical space containing the mesh.
void GetNURBSPatches(Array< NURBSPatch * > &patches)
void GetNodes(Vector &node_coord) const
int GetNV() const
Returns number of vertices. Vertices are only at the corners of elements, where you would expect them...
void GetEdgeVertices(int i, Array< int > &vert) const
Returns the indices of the vertices of edge i.
int GetNBE() const
Returns number of boundary elements.
virtual void Finalize(bool refine=false, bool fix_orientation=false)
Finalize the construction of a general Mesh.
void GetElementEdges(int i, Array< int > &edges, Array< int > &cor) const
Return the indices and the orientations of all edges of element i.
void SetBdrAttribute(int i, int attr)
Set the attribute of boundary element i.
const real_t * GetVertex(int i) const
Return pointer to vertex i's coordinates.
void RemoveUnusedVertices()
Remove unused vertices and rebuild mesh connectivity.
NURBSExtension generally contains multiple NURBSPatch objects spanning an entire Mesh....
Mesh GetPatchTopology() const
Returns a deep copy of the patch topology mesh.
Mapping for mesh vertices and NURBS space DOFs on a patch.
void SetPatchDofMap(int p, const KnotVector *kv[])
Set NURBS space DOF map for patch p with KnotVectors kv.
A NURBS patch can be 1D, 2D, or 3D, and is defined as a tensor product of KnotVectors.
KnotVector * GetKV(int dir)
void Parse()
Parse the command-line options. Note that this function expects all the options provided through the ...
void PrintUsage(std::ostream &out) const
Print the usage message.
void PrintOptions(std::ostream &out) const
Print the options.
void AddOption(bool *var, const char *enable_short_name, const char *enable_long_name, const char *disable_short_name, const char *disable_long_name, const char *description, bool required=false)
Add a boolean option and set 'var' to receive the value. Enable/disable tags are used to set the bool...
bool Good() const
Return true if the command line options were parsed successfully.
Base class for vector Coefficients that optionally depend on time and space.
virtual void Eval(Vector &V, ElementTransformation &T, const IntegrationPoint &ip)=0
Evaluate the vector coefficient in the element described by T at the point ip, storing the result in ...
Vector coefficient defined by a vector GridFunction.
real_t Norml2() const
Returns the l2 norm of the vector.
real_t * GetData() const
Return a pointer to the beginning of the Vector data.
real_t proj(GridFunction &psi, GridFunction &alpha_grad, real_t target_volume, real_t tol=1e-12, int max_its=100)
Bregman projection of ρ = sigmoid(ψ) onto the subspace ∫_Ω ρ dx = θ vol(Ω) as follows:
void add(const Vector &v1, const Vector &v2, Vector &v)
void Swap(T &a, T &b)
Swap objects of type T. The operation is performed using the most specialized swap function from the ...
void subtract(const Vector &x, const Vector &y, Vector &z)
std::function< real_t(const Vector &)> f(real_t mass_coeff)
real_t p(const Vector &x, real_t t)
void ReorderHexArray(const std::array< int, 3 > &dim, const array< int, 8 > &hexperm, std::array< int, 3 > &dir, std::array< int, 3 > &dims, Array3D< int > &permArray)
real_t GetElementEdgeMin(Mesh const &mesh, const int elem)
void HexVertexIJK(const int idx, std::array< int, 3 > &ijk)
Mesh * ReflectNURBSMesh(Mesh &mesh, const Vector &origin, const Vector &normal)
Mesh * ReflectHighOrderMesh(Mesh &mesh, const Vector &origin, const Vector &normal, std::vector< std::array< int, 8 > > &hexPerm, std::vector< int > &elOrder)
bool GetMeshElementOrder(Mesh const &mesh, Vector const &origin, Vector const &normal, std::vector< int > &elOrder)
void ReflectPoint(Vector &p, const Vector &origin, const Vector &normal)
NURBSPatch * ReflectPatch(NURBSPatch *patch, int nx, int ny, int nz, const Vector &origin, const Vector &normal, const std::array< int, 8 > &hexPerm)
void FindElementsTouchingPlane(Mesh const &mesh, Vector const &origin, Vector const &normal, std::vector< int > &el)
void GetHexPermutation(Array< int > const &h1, Array< int > const &h2, std::array< int, 8 > &perm)