Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NIFTy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
NIFTy
Commits
c0916fb8
Commit
c0916fb8
authored
6 years ago
by
Philipp Arras
Browse files
Options
Downloads
Patches
Plain Diff
Add DomainTuple support to GeometryRemover
parent
24aad6fe
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nifty5/operators/simple_linear_operators.py
+10
-3
10 additions, 3 deletions
nifty5/operators/simple_linear_operators.py
with
10 additions
and
3 deletions
nifty5/operators/simple_linear_operators.py
+
10
−
3
View file @
c0916fb8
...
@@ -131,6 +131,9 @@ class GeometryRemover(LinearOperator):
...
@@ -131,6 +131,9 @@ class GeometryRemover(LinearOperator):
----------
----------
domain: Domain, tuple of Domain, or DomainTuple:
domain: Domain, tuple of Domain, or DomainTuple:
the full input domain of the operator.
the full input domain of the operator.
space: int, optional
The index of the subdomain on which the operator should act
If None, it acts on all spaces
Notes
Notes
-----
-----
...
@@ -139,10 +142,14 @@ class GeometryRemover(LinearOperator):
...
@@ -139,10 +142,14 @@ class GeometryRemover(LinearOperator):
is carried out.
is carried out.
"""
"""
def
__init__
(
self
,
domain
):
def
__init__
(
self
,
domain
,
space
=
None
):
self
.
_domain
=
DomainTuple
.
make
(
domain
)
self
.
_domain
=
DomainTuple
.
make
(
domain
)
target_list
=
[
UnstructuredDomain
(
dom
.
shape
)
for
dom
in
self
.
_domain
]
if
space
is
not
None
:
self
.
_target
=
DomainTuple
.
make
(
target_list
)
tgt
=
[
dom
for
dom
in
self
.
_domain
]
tgt
[
space
]
=
UnstructuredDomain
(
self
.
_domain
[
space
].
shape
)
else
:
tgt
=
[
UnstructuredDomain
(
dom
.
shape
)
for
dom
in
self
.
_domain
]
self
.
_target
=
DomainTuple
.
make
(
tgt
)
self
.
_capability
=
self
.
TIMES
|
self
.
ADJOINT_TIMES
self
.
_capability
=
self
.
TIMES
|
self
.
ADJOINT_TIMES
def
apply
(
self
,
x
,
mode
):
def
apply
(
self
,
x
,
mode
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment