PDENLPModels.jl

PDENLPModels.jl: An NLPModel API for Optimization Problems with PDE-Constraints - Published in JOSS (2022)

https://github.com/juliasmoothoptimizers/pdenlpmodels.jl

Science Score: 98.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 10 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords from Contributors

pde krylov linear-systems interpretability meshing fluxes finite-elements standardization gridap numerical-methods
Last synced: 6 months ago · JSON representation ·

Repository

A NLPModel API for optimization problems with PDE-constraints

Basic Info
  • Host: GitHub
  • Owner: JuliaSmoothOptimizers
  • License: other
  • Language: Julia
  • Default Branch: main
  • Homepage:
  • Size: 5.29 MB
Statistics
  • Stars: 21
  • Watchers: 2
  • Forks: 5
  • Open Issues: 14
  • Releases: 14
Created over 5 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

PDENLPModels

| Documentation | CI | Coverage | Release | DOI | |:-----------------:|:------:|:------------:|:-----------:|:-------:| | docs-stable docs-dev | build-ci | codecov | release | doi |

PDENLPModels specializes the NLPModel API to optimization problems with partial differential equations in the constraints. The package relies on Gridap.jl for the modeling and the computation of the derivatives. Find tutorials for using Gridap here.

We consider optimization problems of the form: Find functions $(y,u): Y \times U \rightarrow ℜⁿ \times ℜⁿ$ and $κ \in ℜⁿ$ satisfying

$$ \begin{equation} \begin{array}{cl} \min{\kappa,y,u} & \int\Omega f(\kappa,y,u) d\Omega \ \text{ s.t. } & y \text{ solution of a } PDE(\kappa,u)=0, \ & lcon \leq c(\kappa,y,u) \leq ucon, \ & lvar \leq (\kappa,y,u) \leq uvar,\ \end{array} \end{equation} $$

We refer to the the repository PDEOptimizationProblems for examples of problems of different types: calculus of variations, optimal control problem, PDE-constrained problems, and mixed PDE-contrained problems with both function and algebraic unknowns.

Installation

] add PDENLPModels The current version of PDENLPModels relies on Gridap v0.15.5.

Example

$$ \begin{equation} \min{y \in H^10,u \in H^1} \frac{1}{2} \int{\Omega} |y(x) - yd(x)|^2dx + \frac{\alpha}{2} \int_{\Omega} |u|^2 \quad \text{ s.t. } -\Delta y = u + h, \text{ for } x \in \Omega, y = 0 \text{ for } x \in \partial \Omega, \end{equation} $$

where $yd(x) = -x1^2$, $h(x) = 1$ and $\alpha = 10^{-2}$.

```julia using Gridap, PDENLPModels

# Definition of the domain n = 100 domain = (-1, 1, -1, 1) partition = (n, n) model = CartesianDiscreteModel(domain, partition)

# Definition of the spaces: valuetype = Float64 reffe = ReferenceFE(lagrangian, valuetype, 2) Xpde = TestFESpace(model, reffe; conformity = :H1, dirichlet_tags = "boundary") y0(x) = 0.0 Ypde = TrialFESpace(Xpde, y0)

reffecon = ReferenceFE(lagrangian, valuetype, 1) Xcon = TestFESpace(model, reffecon; conformity = :H1) Ycon = TrialFESpace(Xcon)

# Integration machinery trian = Triangulation(model) degree = 1 dΩ = Measure(trian, degree)

# Objective function: yd(x) = -x[1]^2 α = 1e-2 function f(y, u) ∫(0.5 * (yd - y) * (yd - y) + 0.5 * α * u * u) * dΩ end

# Definition of the constraint operator ω = π - 1 / 8 h(x) = -sin(ω * x[1]) * sin(ω * x[2]) function res(y, u, v) ∫(∇(v) ⊙ ∇(y) - v * u - v * h) * dΩ end

# initial guess npde = numfreedofs(Ypde) ncon = numfreedofs(Ycon) xin = zeros(npde + ncon)

nlp = GridapPDENLPModel(xin, f, trian, Ypde, Ycon, Xpde, Xcon, res, name = "Control elastic membrane") ```

References

Migot, T., Orban D., & Siqueira A. S. PDENLPModels.jl: A NLPModel API for optimization problems with PDE-constraints Journal of Open Source Software 7(80), 4736 (2022). 10.21105/joss.04736

Badia, S., & Verdugo, F. Gridap: An extensible Finite Element toolbox in Julia. Journal of Open Source Software, 5(52), 2520 (2020). 10.21105/joss.02520

How to Cite

If you use PDENLPModels.jl in your work, please cite using the format given in CITATION.cff.

Bug reports and discussions

If you think you found a bug, feel free to open an issue. Focused suggestions and requests can also be opened as issues. Before opening a pull request, start an issue or a discussion on the topic, please.

If you want to ask a question not suited for a bug report, feel free to start a discussion here. This forum is for general discussion about this repository and the JuliaSmoothOptimizers, so questions about any of our packages are welcome.

Owner

  • Name: JuliaSmoothOptimizers
  • Login: JuliaSmoothOptimizers
  • Kind: organization
  • Location: DOI: 10.5281/zenodo.2655082

Infrastructure and Solvers for Continuous Optimization in Julia

JOSS Publication

PDENLPModels.jl: An NLPModel API for Optimization Problems with PDE-Constraints
Published
December 16, 2022
Volume 7, Issue 80, Page 4736
Authors
Tangi Migot ORCID
GERAD and Department of Mathematics and Industrial Engineering, Polytechnique Montréal, QC, Canada.
Dominique Orban ORCID
GERAD and Department of Mathematics and Industrial Engineering, Polytechnique Montréal, QC, Canada.
Abel Soares Siqueira ORCID
Netherlands eScience Center, Amsterdam, NL
Editor
Mehmet Hakan Satman ORCID
Tags
nonlinear optimization large-scale optimization constrained optimization nonlinear programming PDE-constrained optimization

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: >-
  PDENLPModels.jl: A NLPModel API for optimization problems with PDE-constraints
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Tangi
    family-names: Migot
    email: tangi.migot@gmail.com
    affiliation: >-
      GERAD and Department of Mathematics and
      Industrial Engineering, Polytechnique Montréal,
      QC, Canada.
    orcid: 'https://orcid.org/0000-0001-7729-2513'
  - given-names: Dominique
    family-names: Orban
    email: dominique.orban@gerad.ca
    orcid: 'https://orcid.org/0000-0002-8017-7687'
    affiliation: >-
      GERAD and Department of Mathematics and
      Industrial Engineering, Polytechnique Montréal,
      QC, Canada
  - affiliation: 'Netherlands eScience Center, Amsterdam, NL'
    orcid: 'https://orcid.org/0000-0003-4451-281X'
    email: abel.s.siqueira@gmail.com
    given-names: Abel
    family-names: Soares Siqueira
  - given-names: contributors
identifiers:
  - description: Zenodo archive
    type: doi
    value: 10.5281/zenodo.5056628
preferred-citation:
  type: article
  authors:
  - family-names: "Migot"
    given-names: "Tangi"
    orcid: "https://orcid.org/0000-0001-7729-2513"
  - family-names: "Orban"
    given-names: "Dominique"
    orcid: "https://orcid.org/0000-0002-8017-7687"
  - family-names: "Soares Siqueira"
    given-names: "Abel"
    orcid: "https://orcid.org/0000-0003-4451-281X"
  doi: "10.21105/joss.04736"
  journal: "The Journal of Open Source Software"
  month: 12
  start: 4736 # First page number
  title: "PDENLPModels.jl: A NLPModel API for optimization problems with PDE-constraints"
  issue: 80
  volume: 7
  year: 2022
keywords:
  - Nonlinear Optimization
  - Julia
  - Nonlinear Programming
  - PDE-constrained Optimization
  - Optimal Control
license: MPL-2.0
repository-code: >-
  https://github.com/JuliaSmoothOptimizers/PDENLPModels.jl

GitHub Events

Total
  • Watch event: 1
  • Delete event: 3
  • Push event: 4
  • Pull request event: 6
  • Create event: 2
Last Year
  • Watch event: 1
  • Delete event: 3
  • Push event: 4
  • Pull request event: 6
  • Create event: 2

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 289
  • Total Committers: 5
  • Avg Commits per committer: 57.8
  • Development Distribution Score (DDS): 0.035
Past Year
  • Commits: 3
  • Committers: 2
  • Avg Commits per committer: 1.5
  • Development Distribution Score (DDS): 0.333
Top Committers
Name Email Commits
tmigot t****t@g****m 279
github-actions[bot] 4****] 3
Abel Soares Siqueira a****a@g****m 3
Dominique d****n@g****m 2
CompatHelper Julia c****y@j****g 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 17
  • Total pull requests: 89
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 8 days
  • Total issue authors: 7
  • Total pull request authors: 6
  • Average comments per issue: 1.59
  • Average comments per pull request: 0.37
  • Merged pull requests: 74
  • Bot issues: 0
  • Bot pull requests: 26
Past Year
  • Issues: 0
  • Pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: about 13 hours
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • tmigot (11)
  • jmejia8 (1)
  • HaoZeke (1)
  • MaxenceGollier (1)
  • colinthart (1)
  • JuliaTagBot (1)
  • abelsiqueira (1)
Pull Request Authors
  • tmigot (57)
  • github-actions[bot] (27)
  • jbytecode (3)
  • dpo (2)
  • danielskatz (2)
  • abelsiqueira (2)
Top Labels
Issue Labels
enhancement (6) good first issue (1) bug (1)
Pull Request Labels
formatting (15) automated pr (15) no changelog (15) documentation (4) bug (1)

Packages

  • Total packages: 1
  • Total downloads:
    • julia 1 total
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 13
juliahub.com: PDENLPModels

A NLPModel API for optimization problems with PDE-constraints

  • Versions: 13
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1 Total
Rankings
Dependent repos count: 9.9%
Forks count: 21.7%
Average: 23.9%
Stargazers count: 25.0%
Dependent packages count: 38.9%
Last synced: 6 months ago

Dependencies

.github/workflows/CompatHelper.yml actions
  • julia-actions/setup-julia latest composite
.github/workflows/Documentation.yml actions
  • actions/checkout v2 composite
  • julia-actions/setup-julia latest composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/ci.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • codecov/codecov-action v1 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/fromat_pr.yml actions
  • actions/checkout v2 composite
  • peter-evans/create-pull-request v3 composite