17 if (tag.
getName() ==
"sockets") {
22 "A sockets communication was configured with an invalid port \"{}\". "
23 "Please check the \"ports=\" attributes of your socket connections.",
27 com = std::make_shared<com::SocketCommunication>(port,
false, network, dir);
28 }
else if (tag.
getName() ==
"mpi") {
31 PRECICE_ERROR(
"Communication type \"mpi\" can only be used if preCICE was compiled with MPI support enabled. "
32 "Either switch to a \"sockets\" communication or recompile preCICE with \"PRECICE_MPICommunication=ON\".");
34 com = std::make_shared<com::MPIPortsCommunication>(dir);
#define PRECICE_ERROR(...)
#define PRECICE_CHECK(check,...)
#define PRECICE_ASSERT(...)
PtrCommunication createCommunication(const xml::XMLTag &tag) const
Returns a communication object of given type.
Represents an XML tag to be configured automatically.
std::string getStringAttributeValue(const std::string &name, std::optional< std::string > default_value=std::nullopt) const
const std::string & getName() const
Returns name (without namespace).
int getIntAttributeValue(const std::string &name, std::optional< int > default_value=std::nullopt) const
contains the data communication abstraction layer.
bool isValidPort(int port)
Returns true if the argument represents a valid port.