Improve BTS mortar checks#1919
Merged
isteinbrecher merged 1 commit intoApr 1, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Improves robustness of beam-to-solid (and related) mortar coupling by adding stronger runtime validation around Lagrange-multiplier (LM) DOF/GID bookkeeping, helping catch inconsistent mortar-manager mappings early (notably relevant after introducing constant LM shape functions in #1909).
Changes:
- Add
FOUR_C_ASSERT_ALWAYSsize checks to ensure extracted LM GID vectors match the expected mortar DOF counts before assembling/extracting values. - Tighten
BeamToSolidMortarManager::location_vector()assumptions for beam elements (boundary node handling + clearer assertions/throws). - Add an LM GID size assertion in beam-to-beam point coupling selection logic.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/beaminteraction/src/contact/beam_to_solid/volume/4C_beaminteraction_contact_beam_to_solid_volume_meshtying_pair_mortar.cpp |
Assert positional LM GID vector size matches Mortar::n_dof_ before extracting values. |
src/beaminteraction/src/contact/beam_to_solid/volume/4C_beaminteraction_contact_beam_to_solid_volume_meshtying_pair_mortar_rotation.cpp |
Assert rotational LM GID vector size matches MortarRot::n_dof_ before assembly/extraction. |
src/beaminteraction/src/contact/beam_to_solid/volume/4C_beaminteraction_contact_beam_to_solid_volume_meshtying_pair_2d-3d_mortar.cpp |
Add LM GID vector size assertions at multiple extraction/assembly sites. |
src/beaminteraction/src/contact/beam_to_solid/surface/4C_beaminteraction_contact_beam_to_solid_surface_pair_mortar.cpp |
Add LM GID vector size assertions for contact mortar assembly and visualization/extraction paths. |
src/beaminteraction/src/contact/beam_to_solid/surface/4C_beaminteraction_contact_beam_to_solid_surface_meshtying_pair_mortar_FAD.cpp |
Add LM GID vector size assertions for (FAD) meshtying positional/rotational paths. |
src/beaminteraction/src/contact/beam_to_solid/surface/4C_beaminteraction_contact_beam_to_solid_surface_meshtying_pair_mortar_base.cpp |
Assert LM GID vector size matches Mortar::n_dof_ before extracting discrete LM values for visualization. |
src/beaminteraction/src/contact/beam_to_solid/4C_beaminteraction_contact_beam_to_solid_utils.cpp |
Add LM GID vector size assertion in shared local mortar assembly helper; include exceptions header. |
src/beaminteraction/src/contact/beam_to_solid/4C_beaminteraction_contact_beam_to_solid_mortar_manager.cpp |
Strengthen location_vector() invariants (beam element check, boundary node assumptions, clearer error paths). |
src/beaminteraction/src/contact/beam_to_beam/4C_beaminteraction_contact_beam_to_beam_point_coupling_pair.cpp |
Add assertion on LM GID list size before selecting an available LM triplet. |
5dc08aa to
bb7ac07
Compare
maxfirmbach
reviewed
Mar 31, 2026
maxfirmbach
left a comment
Contributor
There was a problem hiding this comment.
Looks good for me. I just have a remark on two fixed "magic numbers", which we might want to explain.
maxfirmbach
previously approved these changes
Mar 31, 2026
dharinib98
previously approved these changes
Apr 1, 2026
6d82b4d
bb7ac07 to
6d82b4d
Compare
6d82b4d to
70e7c5f
Compare
Contributor
Author
|
@maxfirmbach I fixed one small thing, could you please reapprove? |
maxfirmbach
approved these changes
Apr 1, 2026
knarfnitram
approved these changes
Apr 1, 2026
mayrmt
approved these changes
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description and Context
Improve some checks in beam-to-solid mortar applications.
Related Issues and Pull Requests
#1909