Skip to content

Draft: Implement Nitsche method to couple embedded meshes#1613

Draft
eulovi wants to merge 16 commits into4C-multiphysics:mainfrom
eulovi:nitsche-embeddedmesh-constraint
Draft

Draft: Implement Nitsche method to couple embedded meshes#1613
eulovi wants to merge 16 commits into4C-multiphysics:mainfrom
eulovi:nitsche-embeddedmesh-constraint

Conversation

@eulovi
Copy link
Contributor

@eulovi eulovi commented Dec 18, 2025

Description and Context

In this PR, a non-symmetric Nitsche method is implemented for coupling embedded meshes. This is introduced in the constraint_framework library. For now, I set this as a draft, as there is redundancy in the code and I might have broke some tests from the mortar coupling.

The general strategy for introducing this functionality is the following:

  1. a Nitsche coupling pair is introduced to do the evaluation and assembly of the Nitsche contributions, similar to evaluate_and_assemble_mortar_contributions.
  2. a Nitsche manager is introduced for holding the stiffness matrices resulting from the Nitsche contributions. Many of its functions are similar to the mortar manager, like its construction and setup. The main differences are in the functions evaluate_global_coupling_contributions and add_global_force_stiffness_contributions. Maybe I could do a base class, called coupling_manager that hold the functionality of defining the pairs and doing the setup and define the subclasses of mortar_manager and nitsche_manager that have their own evaluate_global_coupling_contributions and add_global_force_stiffness_contributions. Although I am open to ideas.

As there is a lot going on here, some clean up should be done in other PRs before merging this one:

  • There are some functions in the mortar coupling pairs that could be free, as they are not related to the main functionality of the coupling pairs and are used by the nitsche coupling pairs.
  • For evaluating the Cauchy stresses in NURBS solid elements, it is necessary to pass the discretization to the function get_normal_cauchy_stress_at_xi and to the functions that call it.

Related Issues and Pull Requests

@eulovi eulovi requested a review from isteinbrecher December 18, 2025 12:12
@eulovi eulovi self-assigned this Dec 18, 2025
@eulovi eulovi added status: in progress Issues that are currently being worked on type: enhancement A new feature or enhancement to be implemented labels Dec 18, 2025
@eulovi eulovi marked this pull request as draft December 18, 2025 12:12
Copy link
Contributor

@isteinbrecher isteinbrecher left a comment

Choose a reason for hiding this comment

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

Thanks for the new functionality @eulovi .

I did not have time to go through everything in detail, but I left some general comments.

Comment on lines +194 to +201
Core::LinAlg::SparseMatrix& global_penalty_interface,
Core::LinAlg::SparseMatrix& global_penalty_background,
Core::LinAlg::SparseMatrix& global_penalty_interface_background,
Core::LinAlg::SparseMatrix& global_disp_interface_stress_interface,
Core::LinAlg::SparseMatrix& global_disp_interface_stress_background,
Core::LinAlg::SparseMatrix& global_disp_background_stress_interface,
Core::LinAlg::SparseMatrix& global_disp_background_stress_background,
Core::LinAlg::FEVector<double>& global_constraint, double& nitsche_stabilization_param,
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not so sure about this interface. Why do we need so many matrices? Nitsches method should be like the penalty method, so I would assume that we only need to assemble in the global stiffness matrix and force vector.

Comment on lines +70 to +77
//! Couple strategy between overlapping and underlying meshes
Constraints::EmbeddedMesh::EmbeddedMeshParams embedded_mesh_coupling_params_;

//! Pointer to the mortar manager. This object stores the relevant mortar matrices.
std::shared_ptr<Constraints::EmbeddedMesh::SolidToSolidMortarManager> mortar_manager_;

//! Pointer to the Nitsche manager.
std::shared_ptr<Constraints::EmbeddedMesh::SolidToSolidNitscheManager> nitsche_manager_;
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of #1614 you can move the common functionality of the mortar and nitsche manager into this submode evaluator and not require the two to be based on the same base class.

@eulovi eulovi force-pushed the nitsche-embeddedmesh-constraint branch from c5dcf5c to 6f0babf Compare February 23, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: in progress Issues that are currently being worked on type: enhancement A new feature or enhancement to be implemented

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants