You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ s.t. y solution of a PDE(κ,u)=0
29
29
lvar <= (κ,y,u) <= uvar
30
30
```
31
31
32
-
We refer to the the repository [PDEOptimizationProblems](https://github.com/tmigot/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 vector unknowns.
32
+
We refer to the the repository [PDEOptimizationProblems](https://github.com/tmigot/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.
`GridapPDENLPModel` returns an instance of an [`AbstractNLPModel`](https://github.com/JuliaSmoothOptimizers/NLPModels.jl) using [Gridap.jl](https://github.com/gridap/Gridap.jl) for the discretization of the domain with finite-elements.
77
+
Given a domain `Ω ⊂ ℜᵈ` Find a state function y: `Ω -> Y`, a control function u: `Ω -> U` and an algebraic vector κ ∈ ℜⁿ satisfying
78
+
```math
79
+
\begin{aligned}
80
+
\min_{κ,y,u} \ & ∫_Ω f(κ,y,u) dΩ \\
81
+
\mbox{ s.t. } & y \mbox{ solution of } PDE(κ,u)=0, \\
82
+
& lcon <= c(κ,y,u) <= ucon, \\
83
+
& lvar <= (κ,y,u) <= uvar.
84
+
\end{aligned}
85
+
```
86
+
87
+
The [weak formulation of the PDE](https://en.wikipedia.org/wiki/Weak_formulation) is then:
88
+
`res((y,u),(v,q)) = ∫ v PDE(κ,y,u) + ∫ q c(κ,y,u)`
89
+
90
+
where the unknown `(y,u)` is a `MultiField` see [Tutorials 7](https://gridap.github.io/Tutorials/stable/pages/t007_darcy/)
91
+
and [8](https://gridap.github.io/Tutorials/stable/pages/t008_inc_navier_stokes/) of Gridap.
72
92
73
-
https://github.com/gridap/Gridap.jl
74
-
Cite: Badia, S., & Verdugo, F. (2020). Gridap: An extensible Finite Element toolbox in Julia.
75
-
Journal of Open Source Software, 5(52), 2520.
93
+
## Constructors
76
94
77
-
Find functions (y,u): Y -> ℜⁿ x ℜⁿ and κ ∈ ℜⁿ satisfying
- `x0`: initial guess for the system of size `≥ num_free_dofs(Ypde) + num_free_dofs(Ycon)`;
127
+
- `f`: objective function, the number of arguments depend on the application `(y)` or `(y,u)` or `(y,u,θ)`;
128
+
- `Ypde`: trial space for the state;
129
+
- `Ycon`: trial space for the control (`VoidFESpace` if none);
130
+
- `Xpde`: test space for the state;
131
+
- `Xcon`: test space for the control (`VoidFESpace` if none);
132
+
- `c`: operator/function for the PDE-constraint, were we assume by default that the right-hand side is zero (otw. use `lcon` and `ucon` keywords), the number of arguments depend on the application `(y,v)` or `(y,u,v)` or `(y,u,θ,v)`.
133
+
134
+
If `length(x0) > num_free_dofs(Ypde) + num_free_dofs(Ycon)`, then the additional components are considered algebraic variables.
135
+
136
+
The function `f` and `c` must return integrals complying with Gridap's functions with a `Measure/Triangulation` given in the arguments of `GridapPDENLPModel`.
137
+
Internally, the objective function `f` and the `Measure/Triangulation` are combined to instantiate an `AbstractEnergyTerm`.
102
138
103
139
The following keyword arguments are available to all constructors:
104
140
- `name`: The name of the model (default: "Generic")
105
141
The following keyword arguments are available to the constructors for
106
142
constrained problems:
107
-
- `lin`: An array of indexes of the linear constraints
108
-
(default: `Int[]` or 1:ncon if c is an AffineFEOperator)
143
+
- `lin`: An array of indexes of the linear constraints (default: `Int[]`)
109
144
110
145
The following keyword arguments are available to the constructors for
111
146
constrained problems explictly giving lcon and ucon:
112
147
- `y0`: An inital estimate to the Lagrangian multipliers (default: zeros)
113
148
149
+
The bounds on the variables are given as `AbstractVector` via keywords arguments as well:
150
+
- either with `lvar` and `uvar`, or,
151
+
- `lvary`, `lvaru`, `lvark`, and `uvary`, `uvaru`, `uvark`.
152
+
114
153
Notes:
115
-
- We handle two types of FEOperator: AffineFEOperator, and FEOperatorFromWeakForm
116
-
- If lcon and ucon are not given, they are assumed zeros.
117
-
- If the type can't be deduced from the argument, it is Float64.
154
+
- We handle two types of `FEOperator`: `AffineFEOperator`, and `FEOperatorFromWeakForm`.
155
+
- If `lcon` and `ucon` are not given, they are assumed zeros.
156
+
- If the type can't be deduced from the argument, it is `Float64`.
You can also check the tutorial [Solve a PDE-constrained optimization problem](https://jso-docs.github.io/solve-pdenlpmodels-with-jsosolvers/) on JSO's website, [juliasmoothoptimizers.github.io](https://juliasmoothoptimizers.github.io).
208
+
209
+
We refer to the folder `test/problems` for more examples of problems of different types:
210
+
- calculus of variations,
211
+
- optimal control problem,
212
+
- PDE-constrained problems,
213
+
- mixed PDE-contrained problems with both function and algebraic unknowns.
214
+
An alternative is to visit the repository [PDEOptimizationProblems](https://github.com/tmigot/PDEOptimizationProblems) that contains a collection of test problems.
215
+
216
+
Without objective function, the problem reduces to a classical PDE and we refer to [Gridap tutorials](https://github.com/gridap/Tutorials) for examples.
0 commit comments