pvsnewtonmethod.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  Copyright (C) 2008-2013 by Andreas Lauser
5 
6  This file is part of the Open Porous Media project (OPM).
7 
8  OPM is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 2 of the License, or
11  (at your option) any later version.
12 
13  OPM is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with OPM. If not, see <http://www.gnu.org/licenses/>.
20 */
26 #ifndef EWOMS_PVS_NEWTON_METHOD_HH
27 #define EWOMS_PVS_NEWTON_METHOD_HH
28 
29 #include "pvsproperties.hh"
30 
31 namespace Ewoms {
32 
39 template <class TypeTag>
40 class PvsNewtonMethod : public GET_PROP_TYPE(TypeTag, DiscNewtonMethod)
41 {
42  typedef typename GET_PROP_TYPE(TypeTag, DiscNewtonMethod) ParentType;
43  typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
44  typedef typename GET_PROP_TYPE(TypeTag, SolutionVector) SolutionVector;
45 
46 public:
47  PvsNewtonMethod(Simulator &simulator) : ParentType(simulator)
48  {}
49 
50  // HACK which is necessary because GCC 4.4 does not support
51  // being a friend of typedefs
52 /*
53 protected:
54  friend class NewtonMethod<TypeTag>;
55  friend class ParentType;
56 */
57 
61  void endIteration_(SolutionVector &uCurrentIter,
62  const SolutionVector &uLastIter)
63  {
64  ParentType::endIteration_(uCurrentIter, uLastIter);
65  this->problem().model().switchPrimaryVars_();
66  }
67 };
68 } // namespace Ewoms
69 
70 #endif
A newton solver which is specific to the compositional multi-phase PVS model.
Definition: pvsnewtonmethod.hh:40
#define GET_PROP_TYPE(TypeTag, PropTagName)
Access the type attribute of a property for a type tag.
Definition: propertysystem.hh:485
Manages the initializing and running of time dependent problems.
Definition: simulator.hh:73
Definition: baseauxiliarymodule.hh:35
void endIteration_(SolutionVector &uCurrentIter, const SolutionVector &uLastIter)
Indicates that one Newton iteration was finished.
Definition: pvsnewtonmethod.hh:61
PvsNewtonMethod(Simulator &simulator)
Definition: pvsnewtonmethod.hh:47
Declares the properties required for the compositional multi-phase primary variable switching model...