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:
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