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

How to use a XDMF mesh in initialize? #193

Open
BenjaminRodenberg opened this issue Feb 18, 2025 · 1 comment
Open

How to use a XDMF mesh in initialize? #193

BenjaminRodenberg opened this issue Feb 18, 2025 · 1 comment
Labels
question Further information is requested

Comments

@BenjaminRodenberg
Copy link
Member

BenjaminRodenberg commented Feb 18, 2025

The API function initialize only accepts a coupling_subdomain:

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:

  1. FEniCS offers a way to convert an XDMF (or other) mesh to its internal datastructures such that we can create a SubDomain to 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 of initialize. The adapter could potentially offer a helper function to create a Mesh + SubDomain from XDMF + flags.
  2. 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.

@BenjaminRodenberg BenjaminRodenberg added the question Further information is requested label Feb 18, 2025
@precice-bot
Copy link

This issue has been mentioned on preCICE Forum on Discourse. There might be relevant details there:

https://precice.discourse.group/t/issues-with-reading-solidmesh-with-fenics-provided-mesh-is-empty/2311/4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants