Commit 59a5251e authored by Martin Reinecke's avatar Martin Reinecke

more documentation

parent 25e4896c
......@@ -20,6 +20,8 @@ from .linear_operator import LinearOperator
class AdjointOperator(LinearOperator):
"""Adapter class representing the adjoint of a given operator."""
def __init__(self, op):
super(AdjointOperator, self).__init__()
self._op = op
......
......@@ -20,6 +20,8 @@ from .linear_operator import LinearOperator
class ChainOperator(LinearOperator):
"""Class representing chains of operators."""
def __init__(self, ops, _callingfrommake=False):
if not _callingfrommake:
raise NotImplementedError
......
......@@ -47,10 +47,6 @@ class DiagonalOperator(EndomorphicOperator):
NOTE: the fields given to __init__ and returned from .diagonal() are
considered to be non-bare, i.e. during operator application, no additional
volume factors are applied!
See Also
--------
EndomorphicOperator
"""
def __init__(self, diagonal, domain=None, spaces=None):
......
......@@ -26,6 +26,9 @@ from ..domains.dof_space import DOFSpace
class DOFDistributor(LinearOperator):
"""Operator transforming between a DOFSpace and any other domain by means
of distribution/projection."""
def __init__(self, dofdex, target=None, space=None):
super(DOFDistributor, self).__init__()
......
......@@ -11,7 +11,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
# Copyright(C) 2013-2018 Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
......@@ -29,4 +29,8 @@ class EndomorphicOperator(LinearOperator):
@property
def target(self):
"""
DomainTuple
Returns `self.domain`, because this is also the target domain
for endomorphic operators."""
return self.domain
......@@ -11,7 +11,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
# Copyright(C) 2013-2018 Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
......
......@@ -23,6 +23,9 @@ from .linear_operator import LinearOperator
class GeometryRemover(LinearOperator):
"""Operator which transforms between a structured and an unstructured
domain."""
def __init__(self, domain):
super(GeometryRemover, self).__init__()
self._domain = DomainTuple.make(domain)
......
......@@ -11,7 +11,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
# Copyright(C) 2013-2018 Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
......@@ -27,7 +27,7 @@ from ..domains.gl_space import GLSpace
class HarmonicTransformOperator(LinearOperator):
"""Transforms between a harmonic domain and a position space counterpart.
"""Transforms between a harmonic domain and a position domain counterpart.
Built-in domain pairs are
......
......@@ -11,7 +11,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
# Copyright(C) 2013-2018 Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
......@@ -20,6 +20,8 @@ from .linear_operator import LinearOperator
class InverseOperator(LinearOperator):
"""Adapter class representing the inverse of a given operator."""
def __init__(self, op):
super(InverseOperator, self).__init__()
self._op = op
......
......@@ -23,6 +23,10 @@ from .linear_operator import LinearOperator
class InversionEnabler(LinearOperator):
"""Class which augments the capability of another operator object via
numerical inversion.
"""
def __init__(self, op, inverter, preconditioner=None):
super(InversionEnabler, self).__init__()
self._op = op
......
......@@ -11,7 +11,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
# Copyright(C) 2013-2018 Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
......
......@@ -11,7 +11,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
# Copyright(C) 2013-2018 Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
......@@ -23,6 +23,8 @@ from ..domains.power_space import PowerSpace
class PowerDistributor(DOFDistributor):
"""Operator which transforms between a PowerSpace and a harmonic domain."""
def __init__(self, target, power_space=None, space=None):
# Initialize domain and target
self._target = DomainTuple.make(target)
......
......@@ -24,7 +24,7 @@ from .endomorphic_operator import EndomorphicOperator
class ScalingOperator(EndomorphicOperator):
""" NIFTy class for an operator which multiplies a Field with a scalar.
"""Operator which multiplies a Field with a scalar.
The NIFTy ScalingOperator class is a subclass derived from the
EndomorphicOperator. It multiplies an input field with a given factor.
......
......@@ -20,6 +20,8 @@ from .linear_operator import LinearOperator
class SumOperator(LinearOperator):
"""Class representing sums of operators."""
def __init__(self, ops, neg, _callingfrommake=False):
if not _callingfrommake:
raise NotImplementedError
......
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