Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <cstddef>
7 : #include <iosfwd>
8 :
9 : #include "Evolution/DiscontinuousGalerkin/MortarData.hpp"
10 :
11 : /// \cond
12 : namespace PUP {
13 : class er;
14 : } // namespace PUP
15 : /// \endcond
16 :
17 : namespace evolution::dg {
18 : /// \brief Data on each side of the mortar used to compute the boundary
19 : /// correction for the DG scheme using global time stepping.
20 : template <size_t Dim>
21 1 : class MortarDataHolder {
22 : public:
23 : /// Access the data on the local side.
24 : /// @{
25 1 : const MortarData<Dim>& local() const { return local_data_; }
26 1 : MortarData<Dim>& local() { return local_data_; }
27 : /// @}
28 :
29 : /// Access the data on the neighbor side.
30 : /// @{
31 1 : const MortarData<Dim>& neighbor() const { return neighbor_data_; }
32 1 : MortarData<Dim>& neighbor() { return neighbor_data_; }
33 : /// @}
34 :
35 : // NOLINTNEXTLINE(google-runtime-references)
36 0 : void pup(PUP::er& p);
37 :
38 : private:
39 0 : MortarData<Dim> local_data_{};
40 0 : MortarData<Dim> neighbor_data_{};
41 : };
42 :
43 : template <size_t Dim>
44 0 : bool operator==(const MortarDataHolder<Dim>& lhs,
45 : const MortarDataHolder<Dim>& rhs);
46 :
47 : template <size_t Dim>
48 0 : bool operator!=(const MortarDataHolder<Dim>& lhs,
49 : const MortarDataHolder<Dim>& rhs);
50 :
51 : template <size_t Dim>
52 0 : std::ostream& operator<<(std::ostream& os,
53 : const MortarDataHolder<Dim>& mortar_data_holder);
54 : } // namespace evolution::dg
|