3.3.0
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
rotationsymmetricscv.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 *****************************************************************************/
24#ifndef DUMUX_DISCRETIZATION_ROTATION_SYMMETRIC_SUBCONTROLVOLUME_HH
25#define DUMUX_DISCRETIZATION_ROTATION_SYMMETRIC_SUBCONTROLVOLUME_HH
26
27#warning "This header is deprecated and will be removed after release 3.3"
28#include <cmath>
30
31namespace Dumux {
32
39template<class SubControlVolume, RotationPolicy rotationPolicy>
40class [[deprecated("Will be removed after release 3.3. Use Extrusion from extrusion.hh")]] RotationSymmetricSubControlVolume;
41
48template<class SubControlVolume>
49class [[deprecated("Will be removed after release 3.3. Use Extrusion from extrusion.hh")]] RotationSymmetricSubControlVolume<SubControlVolume, RotationPolicy::disc>
50: public SubControlVolume
51{
52 using Scalar = typename SubControlVolume::Traits::Scalar;
53 static_assert(SubControlVolume::Traits::Geometry::mydimension == 1, "Rotation symmetric scv with disc policy only works with 1d grids!");
54 static_assert(SubControlVolume::Traits::Geometry::coorddimension == 1, "Rotation symmetric scv with disc policy only works with 1d grids!");
55public:
57 using SubControlVolume::SubControlVolume;
58
60 Scalar volume() const
61 {
62 using std::abs;
63 const auto radius0 = this->corner(0)[0];
64 const auto radius1 = this->corner(1)[0];
65 return M_PI*abs(radius1*radius1 - radius0*radius0);
66 }
67};
68
75template<class SubControlVolume>
76class [[deprecated("Will be removed after release 3.3. Use Extrusion from extrusion.hh")]] RotationSymmetricSubControlVolume<SubControlVolume, RotationPolicy::ball>
77: public SubControlVolume
78{
79 using Scalar = typename SubControlVolume::Traits::Scalar;
80 static_assert(SubControlVolume::Traits::Geometry::mydimension == 1, "Rotation symmetric scv with ball policy only works with 1d grids!");
81 static_assert(SubControlVolume::Traits::Geometry::coorddimension == 1, "Rotation symmetric scv with ball policy only works with 1d grids!");
82public:
84 using SubControlVolume::SubControlVolume;
85
87 Scalar volume() const
88 {
89 using std::abs;
90 const auto radius0 = this->corner(0)[0];
91 const auto radius1 = this->corner(1)[0];
92 return 4.0/3.0*M_PI*abs(radius1*radius1*radius1 - radius0*radius0*radius0);
93 }
94};
95
103template<class SubControlVolume>
104class [[deprecated("Will be removed after release 3.3. Use Extrusion from extrusion.hh")]] RotationSymmetricSubControlVolume<SubControlVolume, RotationPolicy::toroid>
105: public SubControlVolume
106{
107 using Scalar = typename SubControlVolume::Traits::Scalar;
108 static_assert(SubControlVolume::Traits::Geometry::mydimension == 2, "Rotation symmetric scv with toroid policy only works with 2d grids!");
109 static_assert(SubControlVolume::Traits::Geometry::coorddimension == 2, "Rotation symmetric scv with toroid policy only works with 2d grids!");
110public:
112 using SubControlVolume::SubControlVolume;
113
115 Scalar volume() const
116 {
117 const auto radius = this->center()[0];
118 return SubControlVolume::volume()*2.0*M_PI*radius;
119 }
120};
121
122} // end namespace Dumux
123
124#endif
Rotation policy for defining rotational symmetric grid geometries.
RotationPolicy
Rotation policies.
Definition: rotationpolicy.hh:39
Definition: adapt.hh:29
Traits extracting the public Extrusion type from T Defaults to NoExtrusion if no such type is found.
Definition: extrusion.hh:166
Wrapper to make a sub control volume rotation symmetric.
Definition: rotationsymmetricscv.hh:40
Scalar volume() const
The volume of the sub control volume (difference between two disks)
Definition: rotationsymmetricscv.hh:60
Scalar volume() const
The volume of the sub control volume (difference between two balls)
Definition: rotationsymmetricscv.hh:87
Scalar volume() const
The volume of the sub control volume (Guldinus theorem)
Definition: rotationsymmetricscv.hh:115