Skip to content

Commit

Permalink
Fix bugs in solution exporter implementation
Browse files Browse the repository at this point in the history
Fixes several copy & paste errors in the implementation and
infrastructure of the solution exporter system.
  • Loading branch information
sleweke committed Apr 28, 2023
1 parent 4b55de8 commit 4eeeed5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/common/SolutionRecorderImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class InternalStorageUnitOpRecorder : public ISolutionRecorder
std::vector<double>& cp = _curStorage->particle[parType];

cp.resize(cp.size() + sliceSize);
exporter.writeMobilePhase(cp.data() + cp.size() - sliceSize);
exporter.writeParticleMobilePhase(parType, cp.data() + cp.size() - sliceSize);
}
}

Expand All @@ -263,7 +263,7 @@ class InternalStorageUnitOpRecorder : public ISolutionRecorder
std::vector<double>& cs = _curStorage->solid[parType];

cs.resize(cs.size() + sliceSize);
exporter.writeSolidPhase(cs.data() + cs.size() - sliceSize);
exporter.writeSolidPhase(parType, cs.data() + cs.size() - sliceSize);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/libcadet/model/GeneralRateModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2996,7 +2996,7 @@ int GeneralRateModel::Exporter::writeSolidPhase(double* buffer) const
int numWritten = 0;
for (unsigned int i = 0; i < _disc.nParType; ++i)
{
const int n = writeParticleMobilePhase(i, buffer);
const int n = writeSolidPhase(i, buffer);
buffer += n;
numWritten += n;
}
Expand Down
2 changes: 1 addition & 1 deletion src/libcadet/model/GeneralRateModel2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2463,7 +2463,7 @@ int GeneralRateModel2D::Exporter::writeSolidPhase(double* buffer) const
int numWritten = 0;
for (unsigned int i = 0; i < _disc.nParType; ++i)
{
const int n = writeParticleMobilePhase(i, buffer);
const int n = writeSolidPhase(i, buffer);
buffer += n;
numWritten += n;
}
Expand Down
2 changes: 1 addition & 1 deletion src/libcadet/model/LumpedRateModelWithPores.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ int LumpedRateModelWithPores::Exporter::writeSolidPhase(double* buffer) const
int numWritten = 0;
for (unsigned int i = 0; i < _disc.nParType; ++i)
{
const int n = writeParticleMobilePhase(i, buffer);
const int n = writeSolidPhase(i, buffer);
buffer += n;
numWritten += n;
}
Expand Down

0 comments on commit 4eeeed5

Please sign in to comment.