Skip to content

Commit

Permalink
more strict file names / allow numbers in mesh file prefix (#220)
Browse files Browse the repository at this point in the history
* allow numbers in mesh file names for replay mode

replay mode looks for ".dtN" instead of just "N" in the mesh file name

* revert accidental change

* add changelog entry
  • Loading branch information
dabele authored Dec 4, 2024
1 parent b294f45 commit 08caa9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog-entries/220.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Check strict naming scheme for meshes in replay mode, mesh file names must include `.dt<N>` with `<N>` the coupling iteration. This is to allow numbers elsewhere in the file name or path.
3 changes: 2 additions & 1 deletion src/modes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ void aste::runReplayMode(const aste::ExecutionContext &context, const std::strin

ASTE_DEBUG << "Looking for dt = " << asteConfiguration.startdt;
for (const auto &mesh : asteConfiguration.asteInterfaces.front().meshes) {
if (mesh.filename().find(std::to_string(asteConfiguration.startdt)) == std::string::npos)
auto meshfilename = std::filesystem::path(mesh.filename()).filename().string();
if (meshfilename.find(".dt" + std::to_string(asteConfiguration.startdt)) == std::string::npos)
round++;
else
break;
Expand Down

0 comments on commit 08caa9e

Please sign in to comment.