Commit 8d92bf6e authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

make the linter happy

parent a62576d4
......@@ -193,5 +193,3 @@ if config.HAVE_DUNEGDT:
return mat.asformat(format)
ToMatrixRules.insert_rule(0, action_DuneXTMatrixOperator)
......@@ -17,7 +17,6 @@ if config.HAVE_DUNEGDT:
from pymor.vectorarrays.list import (
ComplexifiedListVectorSpace, ComplexifiedVector, CopyOnWriteVector, NumpyVector)
class DuneXTVector(CopyOnWriteVector):
"""Wraps a vector from dune-xt to make it usable with ListVectorArray.
......@@ -92,7 +91,6 @@ if config.HAVE_DUNEGDT:
def to_numpy(self, ensure_copy=False):
return np.array(self.impl, copy=ensure_copy)
class ComplexifiedDuneXTVector(ComplexifiedVector):
"""Required for DuneXTVectorSpace, Usually not to be used directly."""
......@@ -104,7 +102,6 @@ if config.HAVE_DUNEGDT:
imag = np.array(self.imag_part.impl, copy=False)
return NumpyVector(real + imag * 1j).amax()
class DuneXTVectorSpace(ComplexifiedListVectorSpace):
"""A |VectorSpace| yielding DuneXTVector
......@@ -124,7 +121,8 @@ if config.HAVE_DUNEGDT:
self.__auto_init(locals())
def __eq__(self, other):
return type(other) is DuneXTVectorSpace and self.vector_type == other.vector_type and self.dim == other.dim
return type(other) is DuneXTVectorSpace \
and self.vector_type == other.vector_type and self.dim == other.dim
# since we implement __eq__, we also need to implement __hash__
def __hash__(self):
......@@ -149,7 +147,6 @@ if config.HAVE_DUNEGDT:
def real_make_vector(self, obj):
return DuneXTVector(obj)
class DuneXTMatrixOperator(LinearComplexifiedListVectorArrayOperatorBase):
"""Wraps a dune-xt matrix as an |Operator|.
......@@ -164,8 +161,9 @@ if config.HAVE_DUNEGDT:
solver_options
If specified, either a string or a dict specifying the solver used in apply_inverse. See
https://zivgitlab.uni-muenster.de/ag-ohlberger/dune-community/dune-xt/-/tree/master/dune/xt/la/solver
for available options, depending on the type of `matrix`. E.g., for dune.xt.la.IstlSparseMatrix, (as can be
queried from dune.xt.la.IstlSparseMatrixSolver via `types()` and `options(type)`):
for available options, depending on the type of `matrix`. E.g., for
dune.xt.la.IstlSparseMatrix, (as can be queried from dune.xt.la.IstlSparseMatrixSolver
via `types()` and `options(type)`):
- 'bicgstab.ssor'
- 'bicgstab.amg.ssor'
- 'bicgstab.amg.ilu0'
......
......@@ -43,15 +43,19 @@ def _get_dunegdt_version():
try:
version = dune.gdt.__version__
if parse(version) < parse('2021.1.2') or parse(version) >= parse('2021.2'):
warnings.warn(f'dune-gdt bindings have been tested for version 2021.1.2 (installed: {dune.gdt.__version__}).')
warnings.warn(f'dune-gdt bindings have been tested for version 2021.1.2 '
'(installed: {dune.gdt.__version__}).')
except AttributeError:
warnings.warn(f'dune-gdt bindings have been tested for version 2021.1.2 (installed: unknown older than 2021.1.2).')
warnings.warn('dune-gdt bindings have been tested for version 2021.1.2 '
'(installed: unknown older than 2021.1.2).')
try:
xt_version = dune.xt.__version__
if parse(xt_version) < parse('2021.1.2') or parse(xt_version) >= parse('2021.2'):
warnings.warn(f'dune-gdt bindings have been tested for dune-xt 2021.1.2 (installed: {dune.xt.__version__}).')
warnings.warn(f'dune-gdt bindings have been tested for dune-xt 2021.1.2 '
'(installed: {dune.xt.__version__}).')
except AttributeError:
warnings.warn(f'dune-gdt bindings have been tested for dune-xt version 2021.1.2 (installed: unknown older than 2021.1.2).')
warnings.warn('dune-gdt bindings have been tested for dune-xt version 2021.1.2 '
'(installed: unknown older than 2021.1.2).')
return version
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment