Skip to content

Write initial data does not set initial data #1034

@KyleDavisSA

Description

@KyleDavisSA

Describe your setup

Operating system: Ubuntu 18.04
preCICE Version: develop - f1cb45f

Describe the problem
From Issue #1032 , the case also fails for the master branch if write initial data is not used. Printing the initial data in concatenateCouplingData to a log file in

void BaseQNAcceleration::concatenateCouplingData(
DataMap &cplData)
{
PRECICE_TRACE();
int offset = 0;
for (int id : _dataIDs) {
int size = cplData[id]->values().size();
auto & values = cplData[id]->values();
const auto &oldValues = cplData[id]->previousIteration();
for (int i = 0; i < size; i++) {
_values(i + offset) = values(i);
_oldValues(i + offset) = oldValues(i);
}
offset += size;
}
}

we can see that the initial data is zero after write initial data has been written. This works correctly for v2.2.1.

Step To Reproduce

You can manually see these values by including the following output in concatenateCouplingData

PRECICE_DEBUG("Values: {}", values(i));
PRECICE_DEBUG("Old Values: {}", oldValues(i)); 

If the initial write data has been set, this will be displayed in the Old Values.

Expected behaviour

The values in Old Values should have been the values written in writeInitialData, but they were zero instead.

Metadata

Metadata

Assignees

Labels

bugpreCICE does not behave the way we want and we should look into it (and fix it if possible)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions