Commit 3d706804 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[newton] use non-const assembly arguments

The background is that in the case of global caching, we need to pass
the grid variables as non-const in order to be able to deflect them
during numeric differentiation. It would be nice if we could find a way
around it.
parent 56da4feb
......@@ -468,7 +468,7 @@ public:
*
* \param vars The current iteration's variables
*/
virtual void assembleLinearSystem(const Variables& vars)
virtual void assembleLinearSystem(Variables& vars)
{
assembleLinearSystem_(this->assembler(), vars);
......@@ -854,7 +854,7 @@ protected:
this->assembler().updateGridVariables(Backend::getDofVector(vars));
}
void computeResidualReduction_(const Variables& vars)
void computeResidualReduction_(Variables& vars)
{
// we assume that the assembler works on solution vectors
// if it doesn't export the variables type
......@@ -1046,7 +1046,7 @@ private:
//! assembleLinearSystem_ for assemblers that support partial reassembly
template<class A>
auto assembleLinearSystem_(const A& assembler, const Variables& vars)
auto assembleLinearSystem_(const A& assembler, Variables& vars)
-> typename std::enable_if_t<decltype(isValid(Detail::supportsPartialReassembly())(assembler))::value, void>
{
this->assembler().assembleJacobianAndResidual(vars, partialReassembler_.get());
......@@ -1054,7 +1054,7 @@ private:
//! assembleLinearSystem_ for assemblers that don't support partial reassembly
template<class A>
auto assembleLinearSystem_(const A& assembler, const Variables& vars)
auto assembleLinearSystem_(const A& assembler, Variables& vars)
-> typename std::enable_if_t<!decltype(isValid(Detail::supportsPartialReassembly())(assembler))::value, void>
{
this->assembler().assembleJacobianAndResidual(vars);
......
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