Skip to content

Segfaults for certain functionspaces #58

@Snapex2409

Description

@Snapex2409

The following generate two function spaces that should effectively be vector fields, in which vectors have size 6.

We = basix.ufl.quadrature_element(domain.basix_cell(), degree=0, scheme="default", value_shape=(6,))
W = fem.functionspace(domain, We)

V = fem.functionspace(domain, ("CG", 2, (6,)))

However, fenicsx treats W as scalar field, in which each "scalar" is a vector of size 6.

Upon calling Adapter.write_data from fenicsxprecice.py:216, it calls determine_function_type from adapter_core.py:58.
In there the function type is determined using the number of sub spaces via input_fspace.num_sub_spaces.

One option to mitigate this, might be by determining the function type via the function's value_size, i.e., input_fspace.value_size.

Due to this misinterpretation of the function space, most likely preCICE buffers are accessed incorrectly, leading to the Segfault.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions