24#ifndef DUMUX_DISCRETIZATION_ROTATION_SYMMETRIC_SUBCONTROLVOLUME_HH
25#define DUMUX_DISCRETIZATION_ROTATION_SYMMETRIC_SUBCONTROLVOLUME_HH
38template<
class SubControlVolume, RotationPolicy rotationPolicy>
47template<
class SubControlVolume>
49:
public SubControlVolume
51 using Scalar =
typename SubControlVolume::Traits::Scalar;
52 static_assert(SubControlVolume::Traits::Geometry::mydimension == 1,
"Rotation symmetric scv with disc policy only works with 1d grids!");
53 static_assert(SubControlVolume::Traits::Geometry::coorddimension == 1,
"Rotation symmetric scv with disc policy only works with 1d grids!");
56 using SubControlVolume::SubControlVolume;
62 const auto radius0 = this->corner(0)[0];
63 const auto radius1 = this->corner(1)[0];
64 return M_PI*abs(radius1*radius1 - radius0*radius0);
74template<
class SubControlVolume>
76:
public SubControlVolume
78 using Scalar =
typename SubControlVolume::Traits::Scalar;
79 static_assert(SubControlVolume::Traits::Geometry::mydimension == 1,
"Rotation symmetric scv with ball policy only works with 1d grids!");
80 static_assert(SubControlVolume::Traits::Geometry::coorddimension == 1,
"Rotation symmetric scv with ball policy only works with 1d grids!");
83 using SubControlVolume::SubControlVolume;
89 const auto radius0 = this->corner(0)[0];
90 const auto radius1 = this->corner(1)[0];
91 return 4.0/3.0*M_PI*abs(radius1*radius1*radius1 - radius0*radius0*radius0);
102template<
class SubControlVolume>
104:
public SubControlVolume
106 using Scalar =
typename SubControlVolume::Traits::Scalar;
107 static_assert(SubControlVolume::Traits::Geometry::mydimension == 2,
"Rotation symmetric scv with toroid policy only works with 2d grids!");
108 static_assert(SubControlVolume::Traits::Geometry::coorddimension == 2,
"Rotation symmetric scv with toroid policy only works with 2d grids!");
111 using SubControlVolume::SubControlVolume;
116 const auto radius = this->center()[0];
117 return SubControlVolume::volume()*2.0*M_PI*radius;
Rotation policy for defining rotational symmetric grid geometries.
RotationPolicy
Rotation policies.
Definition: rotationpolicy.hh:37
Wrapper to make a sub control volume rotation symmetric.
Definition: rotationsymmetricscv.hh:39
Scalar volume() const
The volume of the sub control volume (difference between two disks)
Definition: rotationsymmetricscv.hh:59
Scalar volume() const
The volume of the sub control volume (difference between two balls)
Definition: rotationsymmetricscv.hh:86
Scalar volume() const
The volume of the sub control volume (Guldinus theorem)
Definition: rotationsymmetricscv.hh:114