Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
pyMOR
pymor
Commits
5e589040
Commit
5e589040
authored
Sep 23, 2021
by
Stephan Rave
Browse files
[doc] document StationaryModel.deaffinize
parent
86b09c8a
Pipeline
#102068
passed with stages
in 37 minutes and 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
src/pymor/models/basic.py
src/pymor/models/basic.py
+41
-0
No files found.
src/pymor/models/basic.py
View file @
5e589040
...
...
@@ -147,6 +147,47 @@ class StationaryModel(Model):
return
gradients
def
deaffinize
(
self
,
arg
):
"""Build |Model| with linear solution space.
For many |Models| the solution manifold is contained in an
affine subspace of the :attr:`~pymor.models.interface.Model.solution_space`,
e.g. the affine space of functions with certain fixed boundary values.
Most MOR techniques, however, construct linear approximation spaces, which
are not fully contained in this affine subspace, even if these spaces are
created using snapshot vectors from the subspace. Depending on the
FOM, neglecting the affine structure of the solution space may lead to bad
approximations or even an ill-posed ROM. A standard approach to circumvent
this issue is to replace the FOM with an equivalent |Model| with linear
solution space. This method can be used to obtain such a |Model|.
Given a vector `u_0` from the affine solution space, the returned
:class:`StationaryModel` is equivalent to solving::
L(u(μ) + u_0, μ) = F(μ)
When :attr:`~StationaryModel.operator` is linear, the affine shift is
moved to the right-hand side to obtain::
L(u(μ), μ) = F(μ) - L(u_0, μ)
Solutions of the original |Model| can be obtained by adding `u_0` to the
solutions of the deaffinized |Model|.
The :attr:`~StationaryModel.output_functional` is adapted accordingly to
yield the same output for given |parameter values|.
Parameters
----------
arg
Either a |VectorArray| of length 1 containing the vector `u_0`.
Alternatively, |parameter values| can be provided, for which the
model is :meth:`solved <pymor.models.interface.Model.solve>` to
obtain `u_0`.
Returns
-------
The deaffinized |Model|.
"""
if
not
isinstance
(
arg
,
VectorArray
):
mu
=
self
.
parameters
.
parse
(
arg
)
arg
=
self
.
solve
(
mu
)
...
...
René Fritze
@r_milk01
mentioned in commit
a386c258
·
Sep 23, 2021
mentioned in commit
a386c258
mentioned in commit a386c2585bd51812049325dfd92fff8aba50533c
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment