Skip to content

Commit b711248

Browse files
committed
Merge a send-data query function for mesh and global data.
Following precice#1549 (comment)
1 parent 4bf8dce commit b711248

File tree

6 files changed

+2
-24
lines changed

6 files changed

+2
-24
lines changed

src/cplscheme/BaseCouplingScheme.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,6 @@ class BaseCouplingScheme : public CouplingScheme {
215215
*/
216216
virtual bool hasAnySendData() = 0;
217217

218-
/**
219-
* @returns true, if coupling scheme has any sendGlobalData
220-
*/
221-
virtual bool hasAnySendGlobalData() = 0;
222-
223218
/**
224219
* @brief Determines which data is initialized and therefore has to be exchanged during initialize.
225220
*

src/cplscheme/BiCouplingScheme.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,7 @@ void BiCouplingScheme::initializeReceiveDataStorage()
214214

215215
bool BiCouplingScheme::hasAnySendData()
216216
{
217-
return not getSendData().empty();
218-
}
219-
220-
bool BiCouplingScheme::hasAnySendGlobalData()
221-
{
222-
return not getSendGlobalData().empty();
217+
return not(getSendData().empty() and getSendGlobalData().empty());
223218
}
224219

225220
bool BiCouplingScheme::hasSendData(DataID dataID)

src/cplscheme/BiCouplingScheme.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ class BiCouplingScheme : public BaseCouplingScheme {
7575
*/
7676
bool hasAnySendData() override final;
7777

78-
/**
79-
* @returns true, if coupling scheme has any sendGlobalData
80-
*/
81-
bool hasAnySendGlobalData() override final;
82-
8378
/**
8479
* @returns true, if coupling scheme has sendData with given DataID
8580
*/

src/cplscheme/MultiCouplingScheme.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ bool MultiCouplingScheme::hasAnySendData()
6767
return std::any_of(_sendDataVector.cbegin(), _sendDataVector.cend(), [](const auto &sendExchange) { return not sendExchange.second.empty(); });
6868
}
6969

70-
bool MultiCouplingScheme::hasAnySendGlobalData()
71-
{
72-
// return std::any_of(_sendDataVector.cbegin(), _sendDataVector.cend(), [](const auto &sendExchange) { return not sendExchange.second.empty(); });
73-
PRECICE_ERROR("TODO");
74-
}
75-
7670
const DataMap &MultiCouplingScheme::getAccelerationData()
7771
{
7872
// MultiCouplingScheme applies acceleration to all CouplingData

src/cplscheme/MultiCouplingScheme.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ class MultiCouplingScheme : public BaseCouplingScheme {
7171
std::vector<std::string> getCouplingPartners() const override final;
7272

7373
bool hasAnySendData() override final;
74-
bool hasAnySendGlobalData() override final;
7574

7675
private:
7776
/**

src/cplscheme/config/CouplingSchemeConfiguration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ PtrCouplingScheme CouplingSchemeConfiguration::createSerialImplicitCouplingSchem
847847
accessor, m2n, _config.dtMethod, BaseCouplingScheme::Implicit, _config.maxIterations, _config.extrapolationOrder);
848848

849849
addDataToBeExchanged(*scheme, accessor);
850-
PRECICE_CHECK(scheme->hasAnySendData() || scheme->hasAnySendGlobalData(),
850+
PRECICE_CHECK(scheme->hasAnySendData(),
851851
"No send data configured. "
852852
"Use explicit scheme for one-way coupling. "
853853
"Please check your <coupling-scheme ... /> and make sure that you provide at least one <exchange .../> subtag, "

0 commit comments

Comments
 (0)