Skip to content

ObstacleDesign via RegularizedComplementarity#1621

Open
thartland wants to merge 27 commits into
developfrom
hartland1/obstacledesign
Open

ObstacleDesign via RegularizedComplementarity#1621
thartland wants to merge 27 commits into
developfrom
hartland1/obstacledesign

Conversation

@thartland

@thartland thartland commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

This PR adds the capability to solve a design problem subject to an obstacle problem.

The obstacle problem is, formally

$$ \min_{u}\mathcal{E}_{\text{obstacle}}(u:\theta) \text{ s.t. } g(u:\theta):=M_{\text{lump}}(u-\theta)\geq 0 $$

The optimality conditions, with pressure $p$ Lagrange multiplier associated to the inequality constraint and regularized Fisher-Burmeister complementarity, are then constraints of an upper-level design problem

$$ \min_{u,p,\theta}E_{\text{design}}(u,p,\theta) \text{ s.t. regularized obstacle optimality constraints are satisfied} $$

The example problem uses a discretization of the design objective functional

$$ E_{\text{design}}[u,p,\theta]:=\frac{\gamma_{0}}{2}\int_{\Omega}\theta^{2}\mathrm{d}V+\frac{\gamma_{1}}{2}\int_{\Omega}|\nabla\theta|^{2}\mathrm{d}V+\frac{\gamma_{2}}{2}\int_{\Omega}p^{2}\mathrm{d}V+\frac{\gamma_{3}}{2}\int_{\Omega}|\nabla p|^{2}\mathrm{d}V $$

with scalars $\gamma_{0},\gamma_{1},\gamma_{2},\gamma_{3}\geq 0$.

This PR updates smiths submodule ContinuationSolvers which contains some of the necessary backend solver technology. The smith obstacle design problem example uses a SmithObstacleDesignProblem deriving from ContinuationSolvers ObstacleDesignProblem to then utilize a smith::FunctionalObjective and smith::FunctionalWeakForm's for design objective function, gradient, and Hessian callbacks. Furthermore, the solver uses appropriate mass weighted norms so that the nonlinear solver iterations do not show dramatic dependence on the degree of mesh refinement.

Here is the design fields I obtain when running with serial refinement 2. For context the upper surface is the displacement field, the bottom surface is the optimal obstacle, and the scalar field plotted in color over each surface is the pressure field.

opt

@thartland thartland added the WIP Work in progress label Jun 12, 2026

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

Adds a new obstacle-design example that formulates an obstacle problem via regularized complementarity and solves the resulting MPEC using ContinuationSolvers, integrating Smith functional objectives/weak forms and enabling mass-weighted norms for mesh-refinement robustness.

Changes:

  • Introduces obstacle_design_example.cpp demonstrating an obstacle design workflow built on MPECSolver.
  • Adds CMake plumbing to build/install the new example and register it as an example test.
  • Hooks the new obstacle_design example directory into the top-level examples build.

Reviewed changes

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

File Description
examples/obstacle_design/obstacle_design_example.cpp New obstacle design example and a Smith-backed ObstacleDesignProblem adapter for objective/derivative callbacks.
examples/obstacle_design/CMakeLists.txt Builds/installs the new example and adds an MPI example test when continuation support is enabled.
examples/CMakeLists.txt Adds the obstacle_design subdirectory to the examples build.

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

Comment thread examples/obstacle_design/obstacle_design_example.cpp Outdated
Comment thread examples/obstacle_design/obstacle_design_example.cpp Outdated
Comment thread examples/obstacle_design/obstacle_design_example.cpp Outdated
Comment thread examples/obstacle_design/obstacle_design_example.cpp Outdated
Comment thread examples/obstacle_design/obstacle_design_example.cpp Outdated
Comment thread examples/CMakeLists.txt Outdated

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread examples/obstacle_design/obstacle_design_example.cpp
Comment thread examples/obstacle_design/obstacle_design_example.cpp Outdated

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread examples/obstacle_design/obstacle_design_example.cpp Outdated
Comment thread examples/obstacle_design/obstacle_design_example.cpp Outdated
@thartland thartland added ready for review Ready for active inspection by reviewers enhancement New feature or request and removed WIP Work in progress labels Jul 9, 2026
@thartland thartland changed the title WIP: ObstacleDesign via RegularizedComplementarity ObstacleDesign via RegularizedComplementarity Jul 9, 2026
@thartland thartland requested review from Copilot, tupek2 and white238 July 9, 2026 17:25

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread examples/obstacle_design/obstacle_design_example.cpp Outdated
Comment thread examples/obstacle_design/obstacle_design_example.cpp Outdated
Comment thread examples/obstacle_design/obstacle_design_example.cpp Outdated
thartland added 2 commits July 9, 2026 10:53
…om check on parallel/serial mesh refinement command line argument
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ready for review Ready for active inspection by reviewers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants