3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
gridadaptinitializationindicatordefault.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 *****************************************************************************/
19#ifndef DUMUX_GRIDADAPTINITIALIZATIONINDICATORDEFAULT_HH
20#define DUMUX_GRIDADAPTINITIALIZATIONINDICATORDEFAULT_HH
21
22#include "properties.hh"
24
25#include <dune/common/dynvector.hh>
26
31namespace Dumux
32{
40template<class TypeTag>
42{
43private:
45 using Element = typename GridView::Traits::template Codim<0>::Entity;
48
49public:
54 {}
55
62 bool refine(const Element& element)
63 {
64 return false;
65 }
66
73 bool coarsen(const Element& element)
74 {
75 return false;
76 }
77
79 {
80 return maxLevel_;
81 }
82
83
85 void init()
86 {}
87
90 {
91 return false;
92 }
93
101 GridAdaptInitializationIndicatorDefault(Problem& problem, AdaptionIndicator& adaptionIndicator)
102 {
103 maxLevel_ = getParam<int>("GridAdapt.MaxLevel");
104 }
105
106private:
107 int maxLevel_;
108};
109}
110
111#endif
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
Class defining a start indicator for grid adaption.
Definition: gridadaptinitializationindicatordefault.hh:42
GridAdaptInitializationIndicatorDefault(Problem &problem, AdaptionIndicator &adaptionIndicator)
Constructs a GridAdaptionIndicator for initialization of an adaptive grid.
Definition: gridadaptinitializationindicatordefault.hh:101
void calculateIndicator()
Calculates the indicator used for refinement/coarsening for each grid cell.
Definition: gridadaptinitializationindicatordefault.hh:53
bool refine(const Element &element)
Indicator function for marking of grid cells for refinement.
Definition: gridadaptinitializationindicatordefault.hh:62
int maxLevel()
Definition: gridadaptinitializationindicatordefault.hh:78
void init()
Initializes the adaption indicator class.
Definition: gridadaptinitializationindicatordefault.hh:85
bool coarsen(const Element &element)
Indicator function for marking of grid cells for coarsening.
Definition: gridadaptinitializationindicatordefault.hh:73
bool initializeModel()
Returns true if the IMPET-Model needs to be initialized.
Definition: gridadaptinitializationindicatordefault.hh:89
Declares all properties used in Dumux.
Base file for properties related to sequential models.