precice / openfoam-adapter

OpenFOAM-preCICE adapter
https://precice.org/adapter-openfoam-overview.html
GNU General Public License v3.0
135 stars 80 forks source link

Generic readers/writers with additional operations #295

Open MakisH opened 1 year ago

MakisH commented 1 year ago

In the context of #279 and similar issues, and looking at the current state of the adapter, I think that we could move away from the field-specific readers/writers to generic readers/writers very easily for most of the fields, as we are just extracting and injecting values at specific locations.

For the readers/writers that need to do additional conversions, we could potentially use something similar to the coded function objects that OpenFOAM provides. Either the user could provide details on what conversions to do, or (non-exclusive) we could apply the additional operations only on the fields that require this.

Merely documenting the idea for now, I don't yet have clear implementation directions.