Serialbox  2.2.0
Data serialization library and tools for C/C++, Python and Fortran
KBoundary.h
Go to the documentation of this file.
1 //===-- serialbox/core/frontend/stella/KBoundary.h ----------------------------------*- C++ -*-===//
2 //
3 // S E R I A L B O X
4 //
5 // This file is distributed under terms of BSD license.
6 // See LICENSE.txt for more information
7 //
8 //===------------------------------------------------------------------------------------------===//
9 //
13 //===------------------------------------------------------------------------------------------===//
14 
15 #ifndef SERIALBOX_CORE_FRONTEND_STELLA_KBOUNDARY_H
16 #define SERIALBOX_CORE_FRONTEND_STELLA_KBOUNDARY_H
17 
18 namespace serialbox {
19 
20 namespace stella {
21 
34 class KBoundary {
35 public:
36  KBoundary() {
37  kMinusOffset_ = 0;
38  kPlusOffset_ = 0;
39  }
40  ~KBoundary() {}
41 
42  KBoundary(const KBoundary& other) { *this = other; }
43 
44  KBoundary& operator=(const KBoundary& other) {
45  kMinusOffset_ = other.kMinusOffset_;
46  kPlusOffset_ = other.kPlusOffset_;
47  return *this;
48  }
49 
50  bool operator==(const KBoundary& other) const {
51  return ((kMinusOffset() == other.kMinusOffset()) && (kPlusOffset() == other.kPlusOffset()));
52  }
53 
58  void Init(const int kMinusOffset, const int kPlusOffset) {
59  kMinusOffset_ = kMinusOffset;
60  kPlusOffset_ = kPlusOffset;
61  }
62 
64  int kMinusOffset() const { return kMinusOffset_; }
65 
67  int kPlusOffset() const { return kPlusOffset_; }
68 
69 private:
70  int kMinusOffset_;
71  int kPlusOffset_;
72 };
73 
74 } // namespace stella
75 
76 } // namespace serialbox
77 
78 #endif
void Init(const int kMinusOffset, const int kPlusOffset)
Init the container.
Definition: KBoundary.h:58
Namespace of the STELLA frontend.
Definition: ForwardDecl.h:27
Namespace of the serialbox library.
Definition: Archive.h:25
int kPlusOffset() const
Offset in k-plus direction
Definition: KBoundary.h:67
int kMinusOffset() const
Offset in k-minus direction.
Definition: KBoundary.h:64
Container for boundary offsets in k direction.
Definition: KBoundary.h:34