Skip to content

How to use a XDMF mesh in initialize?Β #193

@BenjaminRodenberg

Description

@BenjaminRodenberg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions