Commit 929db4e5 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

changed assembled and changing flag in operators

parent ddee16ab
...@@ -98,7 +98,7 @@ namespace AMDiS ...@@ -98,7 +98,7 @@ namespace AMDiS
bool assembled = false; bool assembled = false;
/// if true, or \ref assembled false, do reassemble of all operators /// if true, or \ref assembled false, do reassemble of all operators
bool changing = false; bool changing = true;
}; };
public: public:
......
...@@ -96,12 +96,6 @@ namespace AMDiS ...@@ -96,12 +96,6 @@ namespace AMDiS
backend_.insert(flatMultiIndex(row), flatMultiIndex(col), value); backend_.insert(flatMultiIndex(row), flatMultiIndex(col), value);
} }
template <class RowNode, class ColNode>
auto& operators(RowNode const& row, ColNode const& col)
{
return operators_[row][col];
}
/// Associate a local operator with this DOFMatrix /// Associate a local operator with this DOFMatrix
template <class ContextTag, class Operator, template <class ContextTag, class Operator,
class RowTreePath = RootTreePath, class ColTreePath = RootTreePath> class RowTreePath = RootTreePath, class ColTreePath = RootTreePath>
......
...@@ -21,19 +21,9 @@ init(bool asmMatrix) ...@@ -21,19 +21,9 @@ init(bool asmMatrix)
template <class RB, class CB, class B> template <class RB, class CB, class B>
void DOFMatrixBase<RB,CB,B>:: void DOFMatrixBase<RB,CB,B>::
finish(bool asmMatrix) finish(bool /*asmMatrix*/)
{ {
backend_.finish(); backend_.finish();
if (asmMatrix) {
forEachNode_(rowBasis_->localView().tree(), [&](auto const& rowNode, auto) {
forEachNode_(colBasis_->localView().tree(), [&](auto const& colNode, auto) {
auto& matOp = operators_[rowNode][colNode];
if (matOp.doAssemble())
matOp.assembled = true;
});
});
}
} }
...@@ -73,7 +63,6 @@ addOperator(ContextTag contextTag, Operator const& preOp, ...@@ -73,7 +63,6 @@ addOperator(ContextTag contextTag, Operator const& preOp,
auto localAssembler = makeLocalAssemblerPtr<Context>(std::move(op), i, j); auto localAssembler = makeLocalAssemblerPtr<Context>(std::move(op), i, j);
operators_[i][j].push(contextTag, localAssembler); operators_[i][j].push(contextTag, localAssembler);
operators_[i][j].changing = true;
} }
...@@ -96,6 +85,7 @@ assemble(RowLocalView const& rowLocalView, ColLocalView const& colLocalView) ...@@ -96,6 +85,7 @@ assemble(RowLocalView const& rowLocalView, ColLocalView const& colLocalView)
scaled.op->assemble(context, rowNode, colNode, elementMatrix_); scaled.op->assemble(context, rowNode, colNode, elementMatrix_);
}; };
assembleOperators(gv, element, matOp, matAssembler); assembleOperators(gv, element, matOp, matAssembler);
matOp.assembled = true;
matOp.unbind(); matOp.unbind();
} }
}); });
......
...@@ -132,12 +132,6 @@ namespace AMDiS ...@@ -132,12 +132,6 @@ namespace AMDiS
/// Insert a block of values into the matrix (add to existing values) /// Insert a block of values into the matrix (add to existing values)
void insert(LocalView const& localView, ElementVector const& elementVector); void insert(LocalView const& localView, ElementVector const& elementVector);
template <class Node>
auto& operators(Node const& node)
{
return operators_[node];
}
/// Associate a local operator with this DOFVector /// Associate a local operator with this DOFVector
template <class ContextTag, class Operator, class TreePath = RootTreePath> template <class ContextTag, class Operator, class TreePath = RootTreePath>
void addOperator(ContextTag contextTag, Operator const& preOp, TreePath path = {}); void addOperator(ContextTag contextTag, Operator const& preOp, TreePath path = {});
......
...@@ -22,16 +22,8 @@ init(bool asmVector) ...@@ -22,16 +22,8 @@ init(bool asmVector)
template <class BS, class B> template <class BS, class B>
void DOFVectorBase<BS,B>:: void DOFVectorBase<BS,B>::
finish(bool asmVector) finish(bool /*asmVector*/)
{ {}
if (asmVector) {
forEachNode_(basis_->localView().tree(), [&](auto const& node, auto) {
auto& rhsOp = operators_[node];
if (rhsOp.doAssemble())
rhsOp.assembled = true;
});
}
}
template <class BS, class B> template <class BS, class B>
...@@ -62,7 +54,6 @@ addOperator(ContextTag contextTag, Operator const& preOp, TreePath path) ...@@ -62,7 +54,6 @@ addOperator(ContextTag contextTag, Operator const& preOp, TreePath path)
auto localAssembler = makeLocalAssemblerPtr<Context>(std::move(op), i); auto localAssembler = makeLocalAssemblerPtr<Context>(std::move(op), i);
operators_[i].push(contextTag, localAssembler); operators_[i].push(contextTag, localAssembler);
operators_[i].changing = true;
} }
...@@ -86,6 +77,7 @@ assemble(LocalView const& localView) ...@@ -86,6 +77,7 @@ assemble(LocalView const& localView)
}; };
assembleOperators(gv, element, rhsOp, vecAssembler); assembleOperators(gv, element, rhsOp, vecAssembler);
rhsOp.assembled = true;
rhsOp.unbind(); rhsOp.unbind();
} }
}); });
......
Markdown is supported
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