preCICE v3.1.2
Loading...
Searching...
No Matches
Extra.cpp
Go to the documentation of this file.
1#include "com/Extra.hpp"
2
5
6namespace precice::com {
7
8void sendMesh(Communication &communication, int rankReceiver, const mesh::Mesh &mesh)
9{
10 serialize::SerializedMesh::serialize(mesh).send(communication, rankReceiver);
11}
12
13void receiveMesh(Communication &communication, int rankSender, mesh::Mesh &mesh)
14{
15 serialize::SerializedMesh::receive(communication, rankSender).addToMesh(mesh);
16}
17
18void broadcastSendMesh(Communication &communication, const mesh::Mesh &mesh)
19{
21}
22
24{
26}
27
28void sendConnectionMap(Communication &communication, int rankReceiver, const mesh::Mesh::ConnectionMap &cm)
29{
30 serialize::SerializedConnectionMap::serialize(cm).send(communication, rankReceiver);
31}
32
33void receiveConnectionMap(Communication &communication, int rankSender, mesh::Mesh::ConnectionMap &cm)
34{
35 cm = serialize::SerializedConnectionMap::receive(communication, rankSender).toConnectionMap();
36}
37
42
47
48void sendBoundingBox(Communication &communication, int rankReceiver, const mesh::BoundingBox &bb)
49{
50 serialize::SerializedBoundingBox::serialize(bb).send(communication, rankReceiver);
51}
52
53void receiveBoundingBox(Communication &communication, int rankSender, mesh::BoundingBox &bb)
54{
55 bb = serialize::SerializedBoundingBox::receive(communication, rankSender).toBoundingBox();
56}
57
58void sendBoundingBoxMap(Communication &communication, int rankReceiver, const mesh::Mesh::BoundingBoxMap &bbm)
59{
60 serialize::SerializedBoundingBoxMap::serialize(bbm).send(communication, rankReceiver);
61}
62
63void receiveBoundingBoxMap(Communication &communication, int rankSender, mesh::Mesh::BoundingBoxMap &bbm)
64{
65 bbm = serialize::SerializedBoundingBoxMap::receive(communication, rankSender).toBoundingBoxMap();
66}
67
72
77
78} // namespace precice::com
Interface for all interprocess communication classes.
static SerializedBoundingBoxMap broadcastReceive(Communication &communication)
receives a SerializedBoundingBoxMap and calls assertValid before returning
static SerializedBoundingBoxMap receive(Communication &communication, int rankSender)
receives a SerializedBoundingBoxMap and calls assertValid before returning
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)
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)
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.
static SerializedConnectionMap serialize(const ConnectionMap &cm)
static SerializedConnectionMap broadcastReceive(Communication &communication)
receives a SerializedConnectionMap and calls assertValid before returning
void send(Communication &communication, int rankReceiver) const
static SerializedMesh serialize(const mesh::Mesh &mesh)
void broadcastSend(Communication &communication)
static SerializedMesh receive(Communication &communication, int rankSender)
receives a SerializedMesh and calls assertValid before returning
static SerializedMesh broadcastReceive(Communication &communication)
receives a SerializedMesh and calls assertValid before returning
void send(Communication &communication, int rankReceiver)
void addToMesh(mesh::Mesh &mesh) const
An axis-aligned bounding box around a (partition of a) mesh.
Container and creator for meshes.
Definition Mesh.hpp:39
contains the data communication abstraction layer.
void receiveBoundingBoxMap(Communication &communication, int rankSender, mesh::Mesh::BoundingBoxMap &bbm)
Definition Extra.cpp:63
void broadcastReceiveBoundingBoxMap(Communication &communication, mesh::Mesh::BoundingBoxMap &bbm)
Definition Extra.cpp:73
void sendMesh(Communication &communication, int rankReceiver, const mesh::Mesh &mesh)
Definition Extra.cpp:8
void broadcastSendMesh(Communication &communication, const mesh::Mesh &mesh)
Definition Extra.cpp:18
void sendBoundingBox(Communication &communication, int rankReceiver, const mesh::BoundingBox &bb)
Definition Extra.cpp:48
void sendConnectionMap(Communication &communication, int rankReceiver, const mesh::Mesh::ConnectionMap &cm)
Definition Extra.cpp:28
void receiveConnectionMap(Communication &communication, int rankSender, mesh::Mesh::ConnectionMap &cm)
Definition Extra.cpp:33
void broadcastReceiveMesh(Communication &communication, mesh::Mesh &mesh)
Definition Extra.cpp:23
void receiveMesh(Communication &communication, int rankSender, mesh::Mesh &mesh)
Definition Extra.cpp:13
void broadcastSendConnectionMap(Communication &communication, const mesh::Mesh::ConnectionMap &cm)
Definition Extra.cpp:38
void broadcastSendBoundingBoxMap(Communication &communication, const mesh::Mesh::BoundingBoxMap &bbm)
Definition Extra.cpp:68
void sendBoundingBoxMap(Communication &communication, int rankReceiver, const mesh::Mesh::BoundingBoxMap &bbm)
Definition Extra.cpp:58
void broadcastReceiveConnectionMap(Communication &communication, mesh::Mesh::ConnectionMap &cm)
Definition Extra.cpp:43
void receiveBoundingBox(Communication &communication, int rankSender, mesh::BoundingBox &bb)
Definition Extra.cpp:53