Skip to content

Improve usability w.r.t Elmer vs. preCICE data names #6

Open
@BenjaminRodenberg

Description

The following piece of code in the adapter is not ideal and con lead to a lot of confusion:

https://github.com/precice/elmer-adapter/blob/main/Adapter/Coupler_Solver.F90#L324-L330

We implement a very specific mapping of some data names (in "Elmer language") to other specific data names (in "preCICE language"). The motivation for this mapping is that Elmer expects certain naming patterns (and I believe case-sensitivity is also an issue) while preCICE configuration files may come with conflicting conventions.

I think it would be more transparent and flexible to let the user provide an adapter configuration file with a dict-like format. For the partitioned-heat equation we could, for example, allow the user to define the following mapping for the Dirichlet participant:

{
    'write_data': [('temperature flux_abs', 'Heat-Flux')],
    'read_data':[('temperature', 'Temperature')]
}

We could potentially extend the following section in the sif file:

maskName = String "Coupler Interface"
participantName = String "Dirichlet"
meshName = String "Dirichlet-Mesh"
configPath = String "../precice-config.xml"

Implementing such a mapping would allow the user (and the adapter code) to consistently follow Elmer conventions and we would perform the mapping from Elmer-names to preCICE-names only when calling preCICE API functions by using the dict from above.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions