Skip to content

Embedded Interfaces - #101

Draft
Pawel024 wants to merge 12 commits into
mainfrom
embedded-interfaces
Draft

Pawel024 wants to merge 12 commits into
mainfrom
embedded-interfaces

Conversation

@Pawel024

Copy link
Copy Markdown
Collaborator

No description provided.

@Pawel024
Pawel024 changed the base branch from main to fem-1d-embedded-in-2d July 25, 2026 08:26
@Pawel024
Pawel024 requested a review from Copilot July 25, 2026 08:26

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

This PR extends MiTo’s FEM infrastructure to support multi-domain / embedded-interface problems by allowing multiple function spaces (and weakforms) to contribute to a single discrete linear system, while also upgrading Dirichlet handling to carry prescribed values. It adds a PETSc-backed regression test for a hybrid-dimensional diffusion problem with a continuous embedded interface.

Changes:

  • Introduce mito::fem::Contribution and refactor DiscreteSystem to assemble multiple contributions into one linear system.
  • Upgrade Dirichlet constraints/discretizers/function spaces to track constrained nodes and their prescribed values (for lifting / solution reconstruction).
  • Add a new FEM test case for hybrid-dimensional diffusion with an embedded continuous interface and hook it into the PETSc test suite.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/mito.lib/fem/hybrid_dimensional_diffusion_continuous.cc Adds regression test for hybrid-dimensional diffusion with an embedded continuous interface.
lib/mito/manifolds/Manifold.h Exposes coordinate_system() accessor needed by discretizers for constraint value evaluation.
lib/mito/fem/FunctionSpace.h Stores constrained values (not just nodes) and adds constructor for shared node maps.
lib/mito/fem/forward.h Adds Contribution and updates DiscreteSystem forward declaration to variadic contributions.
lib/mito/fem/factories.h Adds function space factory overload for shared node maps and discrete system factory for multiple contributions.
lib/mito/fem/elements/tri2/DiscretizerCG.h Populates constrained values by evaluating Dirichlet function at node/midpoint coordinates.
lib/mito/fem/elements/tri1/DiscretizerCG.h Populates constrained values by evaluating Dirichlet function at node coordinates.
lib/mito/fem/elements/seg1/DiscretizerCG.h Populates constrained values for 1D constraints domain (node set) via coordinate evaluation.
lib/mito/fem/elements/Discretizer.h Updates discretizer API to pass constrained values instead of constrained node sets.
lib/mito/fem/DiscreteSystem.h Core refactor: unify multiple function spaces into one system; apply lifting for constrained DOFs; fill constrained solution values.
lib/mito/fem/api.h Updates public API types/factories to match the new multi-contribution DiscreteSystem.
lib/mito/constraints/Dirichlet.h Adds value_type alias for constraint-prescribed value type propagation.
.cmake/mito_tests_mito_lib.cmake Registers the new FEM test in the PETSc-enabled test list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/mito/fem/DiscreteSystem.h
Comment thread lib/mito/fem/elements/tri1/DiscretizerCG.h Outdated
Comment thread lib/mito/fem/elements/tri2/DiscretizerCG.h Outdated
Comment thread lib/mito/fem/elements/seg1/DiscretizerCG.h Outdated
Comment thread tests/mito.lib/fem/hybrid_dimensional_diffusion_continuous.cc
Base automatically changed from fem-1d-embedded-in-2d to main August 26, 2026 04:37
@Pawel024
Pawel024 force-pushed the embedded-interfaces branch from 2f577be to 4b26abc Compare August 28, 2026 13:41
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.

2 participants