Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
36c7f0f6
Commit
36c7f0f6
authored
Jul 17, 2018
by
Martin Reinecke
Browse files
Merge branch 'NIFTy_5' into plottest
parents
6e39815c
19a7c1ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
nifty5/domain_tuple.py
View file @
36c7f0f6
...
...
@@ -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
-----
...
...
nifty5/multi/multi_domain.py
View file @
36c7f0f6
...
...
@@ -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
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment