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

Support to communicate multiple data fields #34

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

NiklasVin
Copy link
Collaborator

This pull request provides a first realisation of communicating multiple data fields as suggested in #31 and closes #31. The changes also affect the API of the fenicsx-adapter the following way:

  • create_coupling_expression()create_coupling_expression(mesh_name)
  • read_data(dt)read_data(dt, mesh_name)
  • write_data(write_function)write_data(write_function, mesh_name)
  • initialize(coupling_subdomain, read_function_space=None, write_object=None) now expects a dictionary with entries of the following structure: mesh_name: [coupling_subdomain, read_function_space, write_object]

Furthermore fenicsxprecice has a member Meshes which is an enum type and holds members with the same name as specified in the config files, i.e., if one participant defines a mesh called Left and you want to e.g. write values from this mesh, the implementation expects the user to call write_data(write_function, fenicsxprecice.Meshes.Left). All functions that require mesh_name must use fenicsxprecice.Meshes.

The structure of the participant config file also changed to support multiple meshes.

I also provided a minimal working example which (hopefully) makes it clear how to use this feature exactly (see tutorials/multiple-fields.

@BenjaminRodenberg BenjaminRodenberg added breaking change A change will break backwards compatibilty and removed breaking change A change will break backwards compatibilty labels Mar 12, 2025
@BenjaminRodenberg BenjaminRodenberg added this to the v0.1.0 milestone Mar 12, 2025
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.

Support to read and write multiple data fields
2 participants