Coverage for src/pymor/discretizations/interfaces : 90%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
|
# This file is part of the pyMOR project (http://www.pymor.org). # Copyright Holders: Rene Milk, Stephan Rave, Felix Schindler # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
'''Describes a discretization.
Note that we do not make any distinction between detailed and reduced discretizations.
Attributes ---------- dim_solution Dimension of the |VectorArrays| returned by solve. type_solution Type of the |VectorArrays| returned by solve. linear `True` if the discretization describes a linear Problem. operators Dictionary of all |Operators| contained in the discretization. (Compare the implementation of :func:`pymor.reductors.basic.reduce_generic_rb`.) functionals Same as operators but for |Functionals|. vector_operators Same as operators but for |Operators| representing vectors, i.e. linear |Operators| with `dim_source == 1`. products Same as |Operators| but for inner product operators associated to the discretization.
Optional Methods:
def estimate(self, U, mu=None): Estimate the error of the discrete solution `U` to the |Parameter| `mu` against the real solution. (For a reduced discretization, the 'real' solution will be the solution of a detailed discretization, in general.)
def visualize(self, U): Visualize a solution given by the |VectorArray| U. '''
'''Perform the actual solving.''' pass
'''Solve for the |Parameter| `mu`.
The result is cached by default.
Parameters ---------- mu |Parameter| for which to solve.
Returns ------- The solution given by a |VectorArray|. ''' return self._solve(mu) |