-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Support multiple read/write fields #65
Comments
This issue has been mentioned on preCICE Forum on Discourse. There might be relevant details there: https://precice.discourse.group/t/how-to-couple-multiple-datas-into-fenics/1070/2 |
How many different fields would we want to support? Something like |
Definitely option two. I don't have a good idea at the moment how we could get the interface right. I think it would be good to still give a user that just wants to provide a single read and/or write function to directly provide the function: It might also be a good idea to think about using a dictionary instead of a list, because this would reduce the possibility to mix up write and read functions. For prototyping this idea, we can use the multiple-perpendicular-flaps tutorial. This might look like initialize(..., {'Displacement-Upstream': write_function_1, 'Displacement-Downstream': write_function_2}, {'Stress-Upstream': read_function_1, 'Stress-Downstream': read_function_2}) Another important point: How would the corresponding adapter config look like? If we follow the dictionary approach, we might even entirely remove |
I would also agree that option 2 where an arbitrary number of read and write fields are supported is the way to go. Have a dictionary where the keys are the names of the data and the values are the corresponding functions sounds like a good idea right now. I would suggest keeping the A bigger question is whether we should work on the design of this feature in the fenics-adapter or the fenicsx-adapter. In theory we would need this implementation in both the adapters, and I estimate that the function touched in this implementation are more on the user side (that is they are in |
Currently we initialize only a single read and a single write field:
fenics-adapter/fenicsadapter/fenicsadapter.py
Line 153 in 71da182
For some applications we need more than one.
The text was updated successfully, but these errors were encountered: