00001 /* 00002 Copyright 2014 IRIS AS 00003 00004 This file is part of the Open Porous Media project (OPM). 00005 00006 OPM is free software: you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation, either version 3 of the License, or 00009 (at your option) any later version. 00010 00011 OPM is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with OPM. If not, see <http://www.gnu.org/licenses/>. 00018 */ 00019 #ifndef OPM_TIMESTEPCONTROLINTERFACE_HEADER_INCLUDED 00020 #define OPM_TIMESTEPCONTROLINTERFACE_HEADER_INCLUDED 00021 00022 00023 namespace Opm 00024 { 00025 00031 class RelativeChangeInterface 00032 { 00033 protected: 00034 RelativeChangeInterface() {} 00035 public: 00037 virtual double relativeChange() const = 0; 00038 00040 virtual ~RelativeChangeInterface() {} 00041 }; 00042 00048 class TimeStepControlInterface 00049 { 00050 protected: 00051 TimeStepControlInterface() {} 00052 public: 00059 virtual double computeTimeStepSize( const double dt, const int iterations, const RelativeChangeInterface& relativeChange , const double simulationTimeElapsed) const = 0; 00060 00062 virtual ~TimeStepControlInterface () {} 00063 }; 00064 00065 } 00066 #endif