version 3.10-dev
experimental/discretization/gridvariables.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-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
13#ifndef DUMUX_DISCRETIZATION_GRID_VARIABLES_HH
14#define DUMUX_DISCRETIZATION_GRID_VARIABLES_HH
15
16#include <utility>
17#include <memory>
18
20
21namespace Dumux::Experimental {
22
30template<class GG, class X>
32: public Variables<X>
33{
35
36public:
38 using GridGeometry = GG;
39
44 template<class... Args>
45 GridVariables(std::shared_ptr<const GridGeometry> gridGeometry,
46 Args&&... args)
47 : ParentType(std::forward<Args>(args)...)
48 , gridGeometry_(gridGeometry)
49 {}
50
53 { return *gridGeometry_; }
54
55private:
56 std::shared_ptr<const GridGeometry> gridGeometry_;
57};
58
59} // end namespace Dumux::Experimental
60
61#endif
Base class for grid variables.
Definition: experimental/discretization/gridvariables.hh:33
GridVariables(std::shared_ptr< const GridGeometry > gridGeometry, Args &&... args)
Constructor from a grid geometry. The remaining arguments must be valid arguments for the constructio...
Definition: experimental/discretization/gridvariables.hh:45
GG GridGeometry
export the grid geometry type
Definition: experimental/discretization/gridvariables.hh:38
const GridGeometry & gridGeometry() const
Return a reference to the grid geometry.
Definition: experimental/discretization/gridvariables.hh:52
Class that represents the variables of a model. We assume that models are formulated on the basis of ...
Definition: variables.hh:41
Definition: experimental/assembly/cclocalassembler.hh:36