Loading Unstructured_mesh/main.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -427,6 +427,7 @@ void testMesh3D() { using sit3 = UnstructuredMesh<3, size_t, double, 6>; UnstructuredMesh<3, size_t, double, 6> mesh3; twoPrisms(mesh3); mesh3.setupBoundaryCells(); size_t tmp_face = mesh3.getCells().at(0).getBoundaryElementIndex(); do { Loading src/UnstructuredMesh/MeshElements/MeshElement.h +3 −3 Original line number Diff line number Diff line Loading @@ -407,12 +407,12 @@ public: void setupBoundaryCells(){ for (Face& face : getFaces()){ if (face.getCellLeftIndex == INVALID_INDEX(IndexType)){ if (face.getCellLeftIndex() == INVALID_INDEX(IndexType)){ IndexType cellIndex = BoundaryCells.size() | BOUNDARY_INDEX(IndexType); face.setCellLeftIndex(cellIndex); appendBoundaryCell(cellIndex, face.getIndex()); } if (face.getCellRightIndex == INVALID_INDEX(IndexType)){ if (face.getCellRightIndex() == INVALID_INDEX(IndexType)){ IndexType cellIndex = BoundaryCells.size() | BOUNDARY_INDEX(IndexType); face.setCellRightIndex(cellIndex); appendBoundaryCell(cellIndex, face.getIndex()); Loading @@ -424,7 +424,7 @@ public: void setupBoundaryCellsCenters() { for(Cell& cell : BoundaryCells){ cell.SetCenter(getFaces().at(cell.getBoundaryElementIndex()).GetCenter()); cell.setCenter(getFaces().at(cell.getBoundaryElementIndex()).getCenter()); } } Loading src/UnstructuredMesh/MeshFunctions/MeshApply.h +3 −3 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ struct MeshRun<MeshDimension, StartDimension, TargetDimension, MeshDimension, fa IndexType tmpFace = cell.getBoundaryElementIndex(); do { MeshRun<MeshDimension - 1, StartDimension, TargetDimension, MeshDimension, TargetDimension == MeshDimension - 1, Descend>::run(mesh, origElementIndex, tmpFace, fun); tmpFace = mesh.getFaces().at(tmpFace).getNextBElem(cell.getIndex()); tmpFace = mesh.getFaces().at(tmpFace).getNextBElem(index); } while (tmpFace != cell.getBoundaryElementIndex()); } Loading Loading @@ -111,14 +111,14 @@ struct MeshApply { template<typename Functor, typename IndexType, typename Real, unsigned int ...Reserve> static void apply(const MeshElements<MeshDimension, IndexType, Real, Reserve...>& mesh, Functor f) { for (auto& startElement : mesh.template getElements<(StartDimension > TargetDimension) ? StartDimension : TargetDimension>()){ for (IndexType currElement = 0; currElement < mesh.template getElements<(StartDimension > TargetDimension) ? StartDimension : TargetDimension>().size(); currElement++){ MeshRun< (StartDimension > TargetDimension) ? StartDimension : TargetDimension, (StartDimension > TargetDimension) ? StartDimension : TargetDimension, (StartDimension > TargetDimension) ? TargetDimension : StartDimension, MeshDimension, StartDimension == TargetDimension, (StartDimension > TargetDimension)>::run(mesh, startElement.getIndex(), startElement.getIndex(), f); (StartDimension > TargetDimension)>::run(mesh, currElement, currElement, f); } } Loading Loading
Unstructured_mesh/main.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -427,6 +427,7 @@ void testMesh3D() { using sit3 = UnstructuredMesh<3, size_t, double, 6>; UnstructuredMesh<3, size_t, double, 6> mesh3; twoPrisms(mesh3); mesh3.setupBoundaryCells(); size_t tmp_face = mesh3.getCells().at(0).getBoundaryElementIndex(); do { Loading
src/UnstructuredMesh/MeshElements/MeshElement.h +3 −3 Original line number Diff line number Diff line Loading @@ -407,12 +407,12 @@ public: void setupBoundaryCells(){ for (Face& face : getFaces()){ if (face.getCellLeftIndex == INVALID_INDEX(IndexType)){ if (face.getCellLeftIndex() == INVALID_INDEX(IndexType)){ IndexType cellIndex = BoundaryCells.size() | BOUNDARY_INDEX(IndexType); face.setCellLeftIndex(cellIndex); appendBoundaryCell(cellIndex, face.getIndex()); } if (face.getCellRightIndex == INVALID_INDEX(IndexType)){ if (face.getCellRightIndex() == INVALID_INDEX(IndexType)){ IndexType cellIndex = BoundaryCells.size() | BOUNDARY_INDEX(IndexType); face.setCellRightIndex(cellIndex); appendBoundaryCell(cellIndex, face.getIndex()); Loading @@ -424,7 +424,7 @@ public: void setupBoundaryCellsCenters() { for(Cell& cell : BoundaryCells){ cell.SetCenter(getFaces().at(cell.getBoundaryElementIndex()).GetCenter()); cell.setCenter(getFaces().at(cell.getBoundaryElementIndex()).getCenter()); } } Loading
src/UnstructuredMesh/MeshFunctions/MeshApply.h +3 −3 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ struct MeshRun<MeshDimension, StartDimension, TargetDimension, MeshDimension, fa IndexType tmpFace = cell.getBoundaryElementIndex(); do { MeshRun<MeshDimension - 1, StartDimension, TargetDimension, MeshDimension, TargetDimension == MeshDimension - 1, Descend>::run(mesh, origElementIndex, tmpFace, fun); tmpFace = mesh.getFaces().at(tmpFace).getNextBElem(cell.getIndex()); tmpFace = mesh.getFaces().at(tmpFace).getNextBElem(index); } while (tmpFace != cell.getBoundaryElementIndex()); } Loading Loading @@ -111,14 +111,14 @@ struct MeshApply { template<typename Functor, typename IndexType, typename Real, unsigned int ...Reserve> static void apply(const MeshElements<MeshDimension, IndexType, Real, Reserve...>& mesh, Functor f) { for (auto& startElement : mesh.template getElements<(StartDimension > TargetDimension) ? StartDimension : TargetDimension>()){ for (IndexType currElement = 0; currElement < mesh.template getElements<(StartDimension > TargetDimension) ? StartDimension : TargetDimension>().size(); currElement++){ MeshRun< (StartDimension > TargetDimension) ? StartDimension : TargetDimension, (StartDimension > TargetDimension) ? StartDimension : TargetDimension, (StartDimension > TargetDimension) ? TargetDimension : StartDimension, MeshDimension, StartDimension == TargetDimension, (StartDimension > TargetDimension)>::run(mesh, startElement.getIndex(), startElement.getIndex(), f); (StartDimension > TargetDimension)>::run(mesh, currElement, currElement, f); } } Loading