version 3.11-dev
subcontrolvolumebase.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// SPDX-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_SUBCONTROLVOLUME_HH
13#define DUMUX_SUBCONTROLVOLUME_HH
14#warning "This header is deprecated and will be removed after release 3.11"
15
16namespace Dumux {
17
25template<class Imp, class ScvGeometryTraits>
26class [[deprecated("Will be removed after 3.11")]] SubControlVolumeBase
27{
28 using Implementation = Imp;
29 using GridIndexType = typename ScvGeometryTraits::GridIndexType;
30 using LocalIndexType = typename ScvGeometryTraits::LocalIndexType;
31 using Scalar = typename ScvGeometryTraits::Scalar;
32
33public:
35 using GlobalPosition = typename ScvGeometryTraits::GlobalPosition;
37 using Traits = ScvGeometryTraits;
38
41 {
42 return asImp_().center();
43 }
44
46 Scalar volume() const
47 {
48 return asImp_().volume();
49 }
50
52 GridIndexType dofIndex() const
53 {
54 return asImp_().dofIndex();
55 }
56
58 LocalIndexType localDofIndex() const
59 {
60 return asImp_().localDofIndex();
61 }
62
63 // The position of the dof this scv is embedded in
65 {
66 return asImp_().dofPosition();
67 }
68
70 GridIndexType elementIndex() const
71 {
72 return asImp_().elementIndex();
73 }
74
75private:
76 const Implementation& asImp_() const
77 { return *static_cast<const Implementation*>(this);}
78
79 Implementation& asImp_()
80 { return *static_cast<Implementation*>(this);}
81};
82
83} // end namespace Dumux
84
85#endif
Base class for a sub control volume, i.e a part of the control volume we are making the balance for....
Definition: subcontrolvolumebase.hh:27
GridIndexType dofIndex() const
The index of the dof this scv is embedded in (ccfv)
Definition: subcontrolvolumebase.hh:52
ScvGeometryTraits Traits
state the traits public and thus export all types
Definition: subcontrolvolumebase.hh:37
typename ScvGeometryTraits::GlobalPosition GlobalPosition
export the type used for global coordinates
Definition: subcontrolvolumebase.hh:35
Scalar volume() const
The volume of the sub control volume.
Definition: subcontrolvolumebase.hh:46
LocalIndexType localDofIndex() const
The index of the dof this scv is embedded in (box)
Definition: subcontrolvolumebase.hh:58
GlobalPosition dofPosition() const
Definition: subcontrolvolumebase.hh:64
GlobalPosition center() const
The center of the sub control volume.
Definition: subcontrolvolumebase.hh:40
GridIndexType elementIndex() const
The global index of the element this scv is embedded in.
Definition: subcontrolvolumebase.hh:70
Definition: adapt.hh:17