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

Use set and dict instead of list #40

Open
BenjaminRodenberg opened this issue Mar 10, 2025 · 3 comments
Open

Use set and dict instead of list #40

BenjaminRodenberg opened this issue Mar 10, 2025 · 3 comments
Labels
schema Related to the adapter config schema

Comments

@BenjaminRodenberg
Copy link
Member

Using a set or dict would avoid duplicate entries in the schema. A list generally allows duplicate entries.

Additionally navigation using a dict is more comfortable than for a list.

I started this discussion in #18 (comment) but we should continue here to avoid getting off-topic over there.

@uekerman uekerman added the schema Related to the adapter config schema label Mar 10, 2025
@MakisH
Copy link
Member

MakisH commented Mar 17, 2025

@vidulejs tried converting the list of read/write fields to dictionaries in the OpenFOAM adapter, and this seems to be possible and actually necessary, if we want to add type and operation to each exchanged data field.

@uekerman
Copy link
Member

@MakisH Could you elaborate more why it would be necessary? This seems like a critical point we need to understand better.

@MakisH
Copy link
Member

MakisH commented Mar 24, 2025

@uekerman the issue is exactly what you already guessed in another comment: in OpenFOAM, we can read either a Dictionary or wordList. The wordList only accepts strings. Anything more complicated is a Dictionary.

Maybe we just need to distinguish here between the theoretical definition of a dictionary and the concrete implementation in each context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
schema Related to the adapter config schema
Projects
None yet
Development

No branches or pull requests

3 participants