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