25 return 2 + kv.second.size();
30 for (
const auto &[rank, ids] : cm) {
43 int numEntries = *begin;
45 if (numEntries == 0) {
51 for (
int entry = 0; entry < numEntries; ++entry) {
59 auto verticesStart = begin;
77 for (
int entry = 0; entry < numEntries; ++entry) {
81 auto rank =
content[consumed++];
84 auto size =
content[consumed++];
88 PRECICE_ASSERT(totalSize >= consumed + size,
"size larger than remaining");
147 auto dims =
static_cast<int>(
coords.
at(0));
155 for (
int d = 0; d < dims; ++d) {
157 buffer[offset] =
coords[1 + d];
158 buffer[offset + 1] =
coords[1 + d + dims];
199 auto size = bbm.
size();
201 const auto dims = bbm.
begin()->second.getDimension();
207 for (
const auto &[rank, bb] : bbm) {
209 auto min = bb.minCorner();
211 auto max = bb.maxCorner();
234 for (
int entry = 0; entry < size; ++entry) {
238 for (
int d = 0; d < dims; ++d) {
240 buffer[offset] = coordIter[d];
241 buffer[offset + 1] = coordIter[d + dims];
261 auto numEntries =
info[0];
267 for (
int entry = 0; entry < numEntries; ++entry) {
#define PRECICE_ASSERT(...)
T back_inserter(T... args)
Interface for all interprocess communication classes.
std::vector< int > receiveRange(Rank rankSender, AsVectorTag< int >)
Receives a range of ints as a vector<int>
void sendRange(precice::span< const double > itemsToSend, Rank rankReceiver)
Sends a range of doubles (size + content)
virtual void broadcast(precice::span< const int > itemsToSend)
serialized representation of a BoundingBoxMap
static SerializedBoundingBoxMap broadcastReceive(Communication &communication)
receives a SerializedBoundingBoxMap and calls assertValid before returning
std::vector< double > coords
static SerializedBoundingBoxMap receive(Communication &communication, int rankSender)
receives a SerializedBoundingBoxMap and calls assertValid before returning
void broadcastSend(Communication &communication)
BoundingBoxMap toBoundingBoxMap() const
Builds and returns the BoundingBoxMap represented by the serialized state.
void send(Communication &communication, int rankReceiver)
static SerializedBoundingBoxMap serialize(const BoundingBoxMap &bbm)
void assertValid() const
asserts the content for correctness
serialized representation of a mesh::BoundingBox
static SerializedBoundingBox receive(Communication &communication, int rankSender)
receives a SerializedBoundingBox and calls assertValid before returning
static SerializedBoundingBox serialize(const mesh::BoundingBox &bbm)
mesh::BoundingBox toBoundingBox() const
Builds and returns the BoundingBox represented by the serialized state.
void send(Communication &communication, int rankReceiver)
std::vector< double > coords
void assertValid() const
asserts the content for correctness
serialized representation of ConnectionMap
void broadcastSend(Communication &communication) const
static SerializedConnectionMap receive(Communication &communication, int rankSender)
receives a SerializedConnectionMap and calls assertValid before returning
ConnectionMap toConnectionMap() const
Builds and returns the connection map represented by the serialized state.
std::vector< int > content
static SerializedConnectionMap serialize(const ConnectionMap &cm)
static SerializedConnectionMap broadcastReceive(Communication &communication)
receives a SerializedConnectionMap and calls assertValid before returning
void assertValid() const
asserts the content for correctness
void send(Communication &communication, int rankReceiver) const
An axis-aligned bounding box around a (partition of a) mesh.
Eigen::VectorXd maxCorner() const
the max corner of the bounding box
Eigen::VectorXd minCorner() const
the min corner of the bounding box
int getDimension() const
Getter dimension of the bounding box.
contains serialization logic