Commit 244beaa0 authored by Tomáš Jakubec's avatar Tomáš Jakubec
Browse files

mesh apply refactor:

Now getIndex is omitted because local index is to be deleted from the
MeshElementBase
parent d9baa013
......@@ -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());
}
......@@ -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);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment