version 3.10-dev
boundaryflag.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//
12#ifndef DUMUX_BOUNDARY_FLAG_HH
13#define DUMUX_BOUNDARY_FLAG_HH
14
15#include <cstddef>
16#include <limits>
17
18namespace Dumux {
19
26{
27public:
29 : flag_(std::numeric_limits<std::size_t>::max()) {}
30
31 template<class Intersection>
32 BoundarySegmentIndexFlag(const Intersection& i)
33 : flag_(std::numeric_limits<std::size_t>::max())
34 {
35 if (i.boundary())
36 flag_ = i.boundarySegmentIndex();
37 }
38
39 using value_type = std::size_t;
40
41 value_type get() const { return flag_; }
42
43private:
44 value_type flag_;
45};
46
53template<class Grid>
56
57} // end namespace Dumux
58
59#endif
Boundary flag to store e.g. in sub control volume faces.
Definition: boundaryflag.hh:55
Class for accessing boundary flags.
Definition: boundaryflag.hh:26
std::size_t value_type
Definition: boundaryflag.hh:39
BoundarySegmentIndexFlag(const Intersection &i)
Definition: boundaryflag.hh:32
BoundarySegmentIndexFlag()
Definition: boundaryflag.hh:28
value_type get() const
Definition: boundaryflag.hh:41
Definition: adapt.hh:17