Skip to content

MeshFactory::create read mesh from data directory - #3486

Merged
bendudson merged 3 commits into
nextfrom
gridfile-in-datadir
Sep 7, 2026
Merged

bendudson merged 3 commits into
nextfrom
gridfile-in-datadir

Conversation

@bendudson

@bendudson bendudson commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Tries to read the specified mesh from data directory, falling back to the previous behavior of reading relative to current directory. If both data_dir/file and ./file exist then an exception will be thrown rather than picking one. If the mesh is given as an absolute path then it's unambiguous.

This does change behavior but any ambiguous situations will result in an error rather than silently doing something strange.

Includes updates to docs and some unit tests.

Uses C++20 to manipulate paths and test existence.

Fixes issue #3300

Tries to read the mesh from data directory first, falling back
to the previous behavior of reading relative to current directory.

Uses C++20 <filesystem> to manipulate paths and test existence.
@bendudson
bendudson requested a review from ZedThree September 3, 2026 00:09
@ZedThree

ZedThree commented Sep 3, 2026

Copy link
Copy Markdown
Member

Looks good! Please could you add something to the docs about this behaviour?

If both data/file and ./file exist (and are different files),
throw an exception rather than picking one.

Document the new behavior and add unit tests.
@bendudson bendudson changed the title MeshFactory::create read mesh from data directory first MeshFactory::create read mesh from data directory Sep 4, 2026
@bendudson

Copy link
Copy Markdown
Contributor Author

Thanks @ZedThree ! Good point. I modified the behavior a bit and have added docs and unit tests.

dschwoerer
dschwoerer previously approved these changes Sep 4, 2026

@dschwoerer dschwoerer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, documentation could be improved.

Thanks @bendudson

Comment thread manual/sphinx/user_docs/bout_options.rst Outdated
Comment thread manual/sphinx/user_docs/bout_options.rst Outdated
Improved documentation. No code changes.

[skip ci]

Co-authored-by: David Bold <dave@ipp.mpg.de>
@bendudson
bendudson merged commit 33e9053 into next Sep 7, 2026
1 check passed
@bendudson
bendudson deleted the gridfile-in-datadir branch September 7, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants