Commit 36c7f0f6 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

Merge branch 'NIFTy_5' into plottest

parents 6e39815c 19a7c1ed
......@@ -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
fields.
Notes
-----
......
......@@ -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):
@staticmethod
def make(inp):
"""Creates a MultiDomain object from a dictionary of names and domains
Parameters
----------
inp : MultiDomain or dict{name: DomainTuple}
The already built MultiDomain or a dictionary of DomainTuples
Returns
------
A MultiDomain with the input Domains as domains
"""
if isinstance(inp, MultiDomain):
return inp
if not isinstance(inp, dict):
......
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