Skip to content

Comments

Address field data access error handling#1119

Closed
seanpearsonuk wants to merge 11 commits intomainfrom
bug/field_name
Closed

Address field data access error handling#1119
seanpearsonuk wants to merge 11 commits intomainfrom
bug/field_name

Conversation

@seanpearsonuk
Copy link
Collaborator

@seanpearsonuk seanpearsonuk commented Nov 29, 2022

Trying to add a bit of safety around field data calls. Up to now, invalid calls (invalid field name, location name) crash Fluent, so I am checking field_info for the validity of names up front, and cleanly raising exceptions in the client as appropriate. An extra feature is that the raised exception can contain hints for closely matching names, which should help many users - we get a lot of queries about what is the right field name to use.

Outstanding issues:

  • the field names from field info are not necessarily all "active". If there is no data then non-mesh variable access will still tend to crash Fluent. Perhaps we can pass an extra argument to the field info queries to request active-only (can this be easily implemented?)
  • alignment of field names with variable names across the API. Judging by the queries I receive, I suspect that there is some misalignment, which would be the cause for the misuse
  • potential reuse of the introduced close matches function across the APIs?

@seanpearsonuk seanpearsonuk changed the title Bug/field name Address field data access error handling Nov 29, 2022
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.

4 participants