Side.hpp
Go to the documentation of this file.
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 /// \file
5 /// Defines enum class Side.
6 
7 #pragma once
8 
9 #include <iosfwd>
10 
11 /// \ingroup ComputationalDomainGroup
12 /// A label for the side of a manifold.
13 ///
14 /// Lower and Upper are with respect to the logical coordinate whose axis is
15 /// normal to the side, i.e. beyond the Upper (Lower) side, the logical
16 /// coordinate is increasing (decreasing).
17 enum class Side { Lower, Upper };
18 
19 /// The opposite side
20 constexpr inline Side opposite(const Side side) {
21  return (Side::Lower == side ? Side::Upper : Side::Lower);
22 }
23 
24 /// Output operator for a Side.
25 std::ostream& operator<<(std::ostream& os, const Side& side) noexcept;
constexpr Side opposite(const Side side)
The opposite side.
Definition: Side.hpp:20
std::ostream & operator<<(std::ostream &os, const Side &side) noexcept
Output operator for a Side.
Definition: Side.cpp:9
Side
A label for the side of a manifold.
Definition: Side.hpp:17