Commit fb917018 authored by Dennis Gläser's avatar Dennis Gläser Committed by Dennis Gläser
Browse files

[newtonbackend] provide access to non-const dofvector

parent 3d76fefd
......@@ -155,12 +155,17 @@ public:
using Variables = Vars;
using typename ParentType::DofVector;
//! update to new solution vector
static void update(Variables& v, const DofVector& dofs)
{ v = dofs; }
//! operations on variables
//! return const reference to dof vector
static const DofVector& getDofVector(const Variables& v)
{ return v; }
//! return reference to dof vector
static DofVector& getDofVector(Variables& v)
{ return v; }
};
/*!
......@@ -177,12 +182,17 @@ public:
using DofVector = typename Vars::SolutionVector;
using Variables = Vars; //!< the type of the variables object
//! update to new solution vector
static void update(Variables& v, const DofVector& dofs)
{ v.update(dofs); }
//! operations on variables
//! return const reference to dof vector
static const DofVector& getDofVector(const Variables& v)
{ return v.dofs(); }
//! return reference to dof vector
static DofVector& getDofVector(Variables& v)
{ return v.dofs(); }
};
} // end namespace Impl
......
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