Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated isReadDataAvailable #247

Merged
merged 2 commits into from
Sep 19, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 25 additions & 29 deletions Interface.C
Original file line number Diff line number Diff line change
Expand Up @@ -371,38 +371,34 @@ void preciceAdapter::Interface::createBuffer()

void preciceAdapter::Interface::readCouplingData()
{
// Are new data available or is the participant subcycling?
if (precice_.isReadDataAvailable())
// Make every coupling data reader read
for (uint i = 0; i < couplingDataReaders_.size(); i++)
{
// Make every coupling data reader read
for (uint i = 0; i < couplingDataReaders_.size(); i++)
{
// Pointer to the current reader
preciceAdapter::CouplingDataUser*
couplingDataReader = couplingDataReaders_.at(i);

// Make preCICE read vector or scalar data
// and fill the adapter's buffer
if (couplingDataReader->hasVectorData())
{
precice_.readBlockVectorData(
couplingDataReader->dataID(),
numDataLocations_,
vertexIDs_,
dataBuffer_);
}
else
{
precice_.readBlockScalarData(
couplingDataReader->dataID(),
numDataLocations_,
vertexIDs_,
dataBuffer_);
}
// Pointer to the current reader
preciceAdapter::CouplingDataUser*
couplingDataReader = couplingDataReaders_.at(i);

// Read the received data from the buffer
couplingDataReader->read(dataBuffer_, dim_);
// Make preCICE read vector or scalar data
// and fill the adapter's buffer
if (couplingDataReader->hasVectorData())
{
precice_.readBlockVectorData(
couplingDataReader->dataID(),
numDataLocations_,
vertexIDs_,
dataBuffer_);
}
else
{
precice_.readBlockScalarData(
couplingDataReader->dataID(),
numDataLocations_,
vertexIDs_,
dataBuffer_);
}

// Read the received data from the buffer
couplingDataReader->read(dataBuffer_, dim_);
}
}

Expand Down