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

[richards][newton] use new backend

parent 0f900449
......@@ -45,27 +45,31 @@ class RichardsNewtonSolver : public NewtonSolver<Assembler, LinearSolver>
using Scalar = typename Assembler::Scalar;
using ParentType = NewtonSolver<Assembler, LinearSolver>;
using SolutionVector = typename Assembler::ResidualType;
using Indices = typename Assembler::GridVariables::VolumeVariables::Indices;
enum { pressureIdx = Indices::pressureIdx };
using typename ParentType::Backend;
using typename ParentType::SolutionVector;
using ParentType::ParentType;
using typename ParentType::Variables;
* \brief Update the current solution of the Newton method
* \param uCurrentIter The solution after the current Newton iteration \f$ u^{k+1} \f$
* \param varsCurrentIter The variables after the current Newton iteration \f$ u^{k+1} \f$
* \param uLastIter The solution after the last Newton iteration \f$ u^k \f$
* \param deltaU The vector of differences between the last
* iterative solution and the next one \f$ \Delta u^k \f$
void choppedUpdate_(SolutionVector &uCurrentIter,
void choppedUpdate_(Variables &varsCurrentIter,
const SolutionVector &uLastIter,
const SolutionVector &deltaU) final
auto uCurrentIter = Backend::getDofVector(varsCurrentIter);
uCurrentIter = uLastIter;
uCurrentIter -= deltaU;
......@@ -110,11 +114,11 @@ private:
// update the grid variables
// update the variables
this->solutionChanged_(varsCurrentIter, uCurrentIter);
if (this->enableResidualCriterion())
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