Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Mesh block default type to MeshGeneratorMesh #18491

Open
dschwen opened this issue Jul 31, 2021 · 0 comments
Open

Change Mesh block default type to MeshGeneratorMesh #18491

dschwen opened this issue Jul 31, 2021 · 0 comments
Labels
C: Framework T: task An enhancement to the software.

Comments

@dschwen
Copy link
Member

dschwen commented Jul 31, 2021

Reason

Our JSON syntax dump does not adequately describe the valid syntax for validation purposes. Mesh/type defaults to FileMesh in order to support legacy

[Mesh]
  file=foo.e
[] 

blocks, however if MeshGenerator blocks exist below Mesh, the default is internally switched to MeshGeneratorMesh.
This is a bit problematic, as file is listed as a required parameter under Mesh blocks without an explicitly specified type parameter.

Design

It might be time to make the default always be MeshGeneratorMesh and add a deprecated parameter file to MeshGeneratorMesh to warn/error out on the legacy use. If we can figure out a way to make MeshGeneratorMesh even load a file to support that deprecated syntax we could just warn, otherwise it would have to be a hard error (that could affect a lot of Bison files) - but with a proper deprecation message ("Add type=FileMesh to your [Mesh] block") it should be pretty simple for users to fix this.

Impact

A step towards validatable input files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Framework T: task An enhancement to the software.
Projects
None yet
Development

No branches or pull requests

2 participants