Commit 19a7c1ed authored by Martin Reinecke's avatar Martin Reinecke
Browse files

Merge branch 'more_domain_docu' into 'NIFTy_5'

more documentation

See merge request ift/nifty-dev!55
parents af1d849c ddba5d13
......@@ -27,6 +27,8 @@ class DomainTuple(object):
This class holds a tuple of :class:`Domain` objects, which together form
the space on which a :class:`Field` is defined.
This corresponds to a tensor product of the corresponding vector
......@@ -24,6 +24,12 @@ from ..utilities import frozendict
class MultiDomain(object):
"""A tuple of domains corresponding to a direct sum.
This class is the domain of the direct sum of fields living
over (possibly different) domains. To make an instance
of this class, call `MultiDomain.make(inp)`.
_domainCache = {}
def __init__(self, dict, _callingfrommake=False):
......@@ -36,6 +42,17 @@ class MultiDomain(object):
def make(inp):
"""Creates a MultiDomain object from a dictionary of names and domains
inp : MultiDomain or dict{name: DomainTuple}
The already built MultiDomain or a dictionary of DomainTuples
A MultiDomain with the input Domains as domains
if isinstance(inp, MultiDomain):
return inp
if not isinstance(inp, dict):
Supports Markdown
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