Skip to content

Config: Prevent access to size of non-existent read-data/write-data#148

Merged
MakisH merged 1 commit intodevelopfrom
fix-35-again
Feb 6, 2026
Merged

Config: Prevent access to size of non-existent read-data/write-data#148
MakisH merged 1 commit intodevelopfrom
fix-35-again

Conversation

@MakisH
Copy link
Member

@MakisH MakisH commented Feb 6, 2026

Bugfix for an issue reported by a user in https://precice.discourse.group/t/error-from-the-calculix-adapter-for-cht-coupling-with-heat-flux/2718

Running the flow-over-heated-plate-two-meshes tutorial, the CalculiX adapter fails with:

terminate called after throwing an instance of ‘fkyaml::v0_4_2::type_error’
what():  type_error: The target node is not of a container type. type=NULL_OBJECT

because the configuration only includes one of write-data/read-data per interface, but not both:

participants:
    Solid:
        interfaces:
        - nodes-mesh: Solid-Mesh-nodes
          patch: yend
          read-data: [Temperature]
        - faces-mesh: Solid-Mesh
          patch: flux_interface
          write-data: [Heat-Flux]

triggering a behavior similar to the one described in #35 for uni-directional coupling per interface.

This PR moves the config["participants"][participantName]["interfaces"][i]["write-data"].size(); operator into the branch that first checks if config["participants"][participantName]["interfaces"][i]["write-data"] exists.

No changelog entry is needed, since this has not been released yet (introduced after the latest release, in #143).

Merging to ship it to the user. Changes are rather trivial, and I considered documentation.

System test is following.

@MakisH MakisH self-assigned this Feb 6, 2026
@MakisH MakisH added the bug label Feb 6, 2026
@MakisH MakisH changed the title Revert unrelated formatting Config: Prevent access to size of non-existent read-data/write-data Feb 6, 2026
@MakisH MakisH merged commit 1199399 into develop Feb 6, 2026
3 checks passed
@MakisH MakisH deleted the fix-35-again branch February 6, 2026 17:08
@precice-bot
Copy link

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

https://precice.discourse.group/t/error-from-the-calculix-adapter-for-cht-coupling-with-heat-flux/2718/4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants