3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/nonequilibrium/newtonsolver.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*****************************************************************************
4 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
27#ifndef DUMUX_NONEQUILIBRIUM_NEWTON_SOLVER_HH
28#define DUMUX_NONEQUILIBRIUM_NEWTON_SOLVER_HH
29
31
32namespace Dumux {
39template <class Assembler, class LinearSolver>
40class NonEquilibriumNewtonSolver : public NewtonSolver<Assembler, LinearSolver>
41{
43 using SolutionVector = typename Assembler::ResidualType;
44
45public:
46 using ParentType::ParentType;
47
48 void newtonEndStep(SolutionVector &uCurrentIter,
49 const SolutionVector &uLastIter) final
50 {
51 ParentType::newtonEndStep(uCurrentIter, uLastIter);
52
53 auto& gridVariables = this->assembler().gridVariables();
54 // Averages the face velocities of a vertex. Implemented in the model.
55 // The velocities are stored in the model.
56 gridVariables.calcVelocityAverage(uCurrentIter);
57 }
58};
59
60} // end namespace Dumux
61#endif // DUMUX_NONEQUILIBRIUM_NEWTON_SOLVER_HH
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
A high-level interface for a PDESolver.
Definition: common/pdesolver.hh:46
const Assembler & assembler() const
Access the assembler.
Definition: common/pdesolver.hh:83
An implementation of a Newton solver.
Definition: nonlinear/newtonsolver.hh:90
virtual void newtonEndStep(SolutionVector &uCurrentIter, const SolutionVector &uLastIter)
Indicates that one Newton iteration was finished.
Definition: nonlinear/newtonsolver.hh:493
A nonequilibrium specific newton solver.
Definition: porousmediumflow/nonequilibrium/newtonsolver.hh:41
void newtonEndStep(SolutionVector &uCurrentIter, const SolutionVector &uLastIter) final
Indicates that one Newton iteration was finished.
Definition: porousmediumflow/nonequilibrium/newtonsolver.hh:48
Reference implementation of the Newton solver.