Skip to content

Clean up embeddedmesh implementation#1614

Open
eulovi wants to merge 1 commit into
4C-multiphysics:mainfrom
eulovi:clean_embeddedmesh_implementation
Open

Clean up embeddedmesh implementation#1614
eulovi wants to merge 1 commit into
4C-multiphysics:mainfrom
eulovi:clean_embeddedmesh_implementation

Conversation

@eulovi

@eulovi eulovi commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

Description and Context

One problem that I noticed in the PR #1613 is that the current embeddedmesh implementation in constraint_framework is not flexible enough to add new coupling strategies. So far, only the Mortar method is implemented. Therefore, in this PR a base class SolidToSolidCouplingManager is introduced. This class can work as a base class for other methods and holds basic functionality needed for embedded mesh strategies. Also I tried to clean how parameters are obtained, so that no unnecessary parameters are called if the coupling strategy doesn't require them.

Related Issues and Pull Requests

Related to #1613

@maxfirmbach maxfirmbach left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks nice 👍. I have left some comments 😃.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the embedded-mesh constraint implementation in constraint_framework to make it extensible beyond the Mortar method by introducing a common SolidToSolidCouplingManager base and routing evaluation/output through a selected coupling strategy.

Changes:

  • Introduces SolidToSolidCouplingManager base class and moves shared embedded-mesh setup/cut/output-integration-point logic into it.
  • Updates EmbeddedMeshConstraintManager to construct and use a strategy-specific coupling manager (currently Mortar).
  • Adapts SolidToSolidMortarManager to inherit from the new base and override the strategy-specific assembly/output/energy pieces.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/constraint_framework/4C_constraint_framework_submodelevaluator_embeddedmesh.hpp Switches embedded-mesh submodel evaluator to a coupling-strategy-based manager interface.
src/constraint_framework/4C_constraint_framework_submodelevaluator_embeddedmesh.cpp Implements parameter extraction and coupling-manager factory logic; routes evaluation/output/energy through the manager.
src/constraint_framework/4C_constraint_framework_embeddedmesh_solid_to_solid_mortar_manager.hpp Makes Mortar manager derive from SolidToSolidCouplingManager and overrides the base interface.
src/constraint_framework/4C_constraint_framework_embeddedmesh_solid_to_solid_mortar_manager.cpp Adjusts Mortar manager construction/setup and renames the force/stiffness contribution API to match the base.
src/constraint_framework/4C_constraint_framework_embeddedmesh_solid_to_solid_coupling_manager.hpp Adds the new common base class API/state shared by embedded-mesh coupling managers.
src/constraint_framework/4C_constraint_framework_embeddedmesh_solid_to_solid_coupling_manager.cpp Implements shared cut/setup, visualization registration, and helper utilities for coupling managers.

@eulovi eulovi force-pushed the clean_embeddedmesh_implementation branch from 4243c5e to a6b83d0 Compare June 10, 2026 12:07
@eulovi eulovi force-pushed the clean_embeddedmesh_implementation branch from a6b83d0 to 80ebb25 Compare June 10, 2026 12:19

@eulovi eulovi left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your comments @maxfirmbach @isteinbrecher (and sorry for taking so long to resolve this)!

@eulovi eulovi requested a review from m-frey June 10, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants