Skip to content

Commit

Permalink
Revert "Update src/cplscheme/BaseCouplingScheme.cpp"
Browse files Browse the repository at this point in the history
This reverts commit a187bc0.
  • Loading branch information
BenjaminRodenberg committed Oct 21, 2024
1 parent 885af96 commit 92ae987
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/cplscheme/BaseCouplingScheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -771,12 +771,19 @@ void BaseCouplingScheme::advanceTXTWriters()
bool converged = _iterations >= _minIterations && (_maxIterations < 0 || (_iterations < _maxIterations));
_iterationsWriter->writeData("Convergence", converged ? 1 : 0);

std::shared_ptr<precice::acceleration::BaseQNAcceleration> qnAcceleration = std::dynamic_pointer_cast<precice::acceleration::BaseQNAcceleration>(_acceleration);
if (qnAcceleration && not doesFirstStep()) {
// Only write values for additional columns, if using a QN-based acceleration scheme
_iterationsWriter->writeData("QNColumns", qnAcceleration->getLSSystemCols());
_iterationsWriter->writeData("DeletedQNColumns", qnAcceleration->getDeletedColumns());
_iterationsWriter->writeData("DroppedQNColumns", qnAcceleration->getDroppedColumns());
if (not doesFirstStep()) {
std::shared_ptr<precice::acceleration::BaseQNAcceleration> qnAcceleration = std::dynamic_pointer_cast<precice::acceleration::BaseQNAcceleration>(_acceleration);
if (qnAcceleration) {
// Only write values for additional columns, if using a QN-based acceleration scheme
_iterationsWriter->writeData("QNColumns", qnAcceleration->getLSSystemCols());
_iterationsWriter->writeData("DeletedQNColumns", qnAcceleration->getDeletedColumns());
_iterationsWriter->writeData("DroppedQNColumns", qnAcceleration->getDroppedColumns());
} else {
// non-breaking implementation uses "0" for these columns (delete columns in the future?)
_iterationsWriter->writeData("QNColumns", 0);
_iterationsWriter->writeData("DeletedQNColumns", 0);
_iterationsWriter->writeData("DroppedQNColumns", 0);
}
}
}
}
Expand Down

0 comments on commit 92ae987

Please sign in to comment.