3.3.0
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
rotationsymmetricscvf.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_SUBCONTROLVOLUMEFACE_HH
25#define DUMUX_DISCRETIZATION_ROTATION_SYMMETRIC_SUBCONTROLVOLUMEFACE_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 SubControlVolumeFace, RotationPolicy rotationPolicy>
40class [[deprecated("Will be removed after release 3.3. Use Extrusion from extrusion.hh")]] RotationSymmetricSubControlVolumeFace;
41
48template<class SubControlVolumeFace>
49class [[deprecated("Will be removed after release 3.3. Use Extrusion from extrusion.hh")]] RotationSymmetricSubControlVolumeFace<SubControlVolumeFace, RotationPolicy::disc>
50: public SubControlVolumeFace
51{
52 using Scalar = typename SubControlVolumeFace::Traits::Scalar;
53 static_assert(SubControlVolumeFace::Traits::Geometry::mydimension == 0, "Rotation symmetric scvf with disc policy only works with 1d grids!");
54 static_assert(SubControlVolumeFace::Traits::Geometry::coorddimension == 1, "Rotation symmetric scvf with disc policy only works with 1d grids!");
55public:
57 using SubControlVolumeFace::SubControlVolumeFace;
58
60 Scalar area() const
61 {
62 const auto radius = this->corner(0)[0];
63 return 2.0*M_PI*radius;
64 }
65};
66
73template<class SubControlVolumeFace>
74class [[deprecated("Will be removed after release 3.3. Use Extrusion from extrusion.hh")]] RotationSymmetricSubControlVolumeFace<SubControlVolumeFace, RotationPolicy::ball>
75: public SubControlVolumeFace
76{
77 using Scalar = typename SubControlVolumeFace::Traits::Scalar;
78 static_assert(SubControlVolumeFace::Traits::Geometry::mydimension == 0, "Rotation symmetric scvf with ball policy only works with 1d grids!");
79 static_assert(SubControlVolumeFace::Traits::Geometry::coorddimension == 1, "Rotation symmetric scvf with ball policy only works with 1d grids!");
80public:
82 using SubControlVolumeFace::SubControlVolumeFace;
83
85 Scalar area() const
86 {
87 const auto radius = this->corner(0)[0];
88 return 4.0*M_PI*radius*radius;
89 }
90};
91
99template<class SubControlVolumeFace>
100class [[deprecated("Will be removed after release 3.3. Use Extrusion from extrusion.hh")]] RotationSymmetricSubControlVolumeFace<SubControlVolumeFace, RotationPolicy::toroid>
101: public SubControlVolumeFace
102{
103 using Scalar = typename SubControlVolumeFace::Traits::Scalar;
104 static_assert(SubControlVolumeFace::Traits::Geometry::mydimension == 1, "Rotation symmetric scvf with toroid policy only works with 2d grids!");
105 static_assert(SubControlVolumeFace::Traits::Geometry::coorddimension == 2, "Rotation symmetric scvf with toroid policy only works with 2d grids!");
106public:
108 using SubControlVolumeFace::SubControlVolumeFace;
109
111 Scalar area() const
112 {
113 const auto radius = this->center()[0];
114 return SubControlVolumeFace::area()*2.0*M_PI*radius;
115 }
116};
117
118} // end namespace Dumux
119
120#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 face rotation symmetric.
Definition: rotationsymmetricscvf.hh:40
Scalar area() const
The area of the sub control volume face (circumference of circle)
Definition: rotationsymmetricscvf.hh:60
Scalar area() const
The area of the sub control volume face (surface of sphere)
Definition: rotationsymmetricscvf.hh:85
Scalar area() const
The area of the sub control volume face (Guldinus theorem)
Definition: rotationsymmetricscvf.hh:111