-
-
Notifications
You must be signed in to change notification settings - Fork 18
Description
The API function initialize only accepts a coupling_subdomain:
fenics-adapter/fenicsprecice/fenicsprecice.py
Line 267 in a64f1d6
| def initialize(self, coupling_subdomain, read_function_space=None, write_object=None, fixed_boundary=None): |
A coupling_subdomain has to be defined symbolically by inheriting from the fenics.SubDomain (see here). For cases of practical relevance the geometry is, however, not defined in terms of such high-level objects (RectangleMesh, SubDomain) but via a mesh (e.g. in XDMF format) and potentially some flags/filtering to define the part of the mesh that belongs to the coupling boundary.
From the provided tutorials it is unclear how one can use an XDMF mesh with the FEniCS adapter. I see two possible solutions:
- FEniCS offers a way to convert an XDMF (or other) mesh to its internal datastructures such that we can create a
SubDomainto define the coupling boundary using the XDMF mesh. In this case no changes are required for the adapter and we can use the existing interface ofinitialize. The adapter could potentially offer a helper function to create aMesh+SubDomainfrom XDMF + flags. - FEniCS does not offer the functionality from 1. We need to extend the interface to something like
initialize(self, xdmf, flags, ...).
Refer to https://precice.discourse.group/t/issues-with-reading-solidmesh-with-fenics-provided-mesh-is-empty/2311 for the discussion that triggered opening this issue.