19 for (
auto &pair : cplData) {
20 auto &couplingData = *(pair.second);
22 if (couplingData.timeStepsStorage().empty()) {
28 for (
auto &stample : couplingData.timeStepsStorage().stamples()) {
29 auto &values = stample.sample.values;
30 auto oldValues = couplingData.getPreviousValuesAtTime(stample.timestamp);
31 values = values * omega + oldValues * (1.0 - omega);
33 if (couplingData.hasGradient()) {
34 auto &gradients = stample.sample.gradients;
35 auto oldGradients = couplingData.getPreviousGradientsAtTime(stample.timestamp);
36 gradients = gradients * omega + oldGradients * (1.0 - omega);
42 couplingData.sample() = couplingData.timeStepsStorage().last().sample;
47 const DataMap &cplData,
const std::vector<DataID> &dataIDs, Eigen::VectorXd &targetValues, Eigen::VectorXd &targetOldValues)
const
49 Eigen::Index offset = 0;
50 for (
auto id : dataIDs) {
51 Eigen::Index size = cplData.
at(
id)->values().size();
52 auto & values = cplData.
at(
id)->values();
53 const auto & oldValues = cplData.
at(
id)->previousIteration();
54 PRECICE_ASSERT(targetValues.size() >= offset + size,
"Target vector was not initialized.", targetValues.size(), offset + size);
55 PRECICE_ASSERT(targetOldValues.size() >= offset + size,
"Target vector was not initialized.");
56 for (Eigen::Index i = 0; i < size; i++) {
57 targetValues(i + offset) = values(i);
58 targetOldValues(i + offset) = oldValues(i);