Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-xt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
ag-ohlberger
dune-community
dune-xt
Commits
0b9ea62c
Commit
0b9ea62c
authored
5 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
[python] move make_walker, make_apply_on_dirichlet_intersections
parent
ef1333fc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/dune/xt/grid/__init__.py
+14
-0
14 additions, 0 deletions
python/dune/xt/grid/__init__.py
python/dune/xt/grid/walker/__init__.py
+0
-33
0 additions, 33 deletions
python/dune/xt/grid/walker/__init__.py
with
14 additions
and
33 deletions
python/dune/xt/grid/__init__.py
+
14
−
0
View file @
0b9ea62c
...
...
@@ -20,3 +20,17 @@ for mod_name in (
):
guarded_import
(
globals
(),
'
dune.xt.grid
'
,
mod_name
)
def
make_walker
(
gridprovider
,
level
=
0
):
for
factory
in
[
globals
()[
s
]
for
s
in
globals
().
keys
()
if
s
.
startswith
(
'
make_walker_on_
'
)]:
try
:
return
factory
(
gridprovider
,
level
)
except
:
continue
raise
TypeError
(
'
no matching walker for gridview {}
'
.
format
(
gridprovider
.
__class__
))
def
make_apply_on_dirichlet_intersections
(
boundaryinfo
,
grid
,
layer
=
'
leaf_view
'
,
*
args
,
**
kwargs
):
factory
=
globals
()[
'
make_apply_on_dirichlet_intersections_{}_{}
'
.
format
(
layer
,
grid
.
grid_type
)]
return
factory
(
boundaryinfo
,
*
args
,
**
kwargs
)
This diff is collapsed.
Click to expand it.
python/dune/xt/grid/walker/__init__.py
deleted
100644 → 0
+
0
−
33
View file @
ef1333fc
# ~~~
# This file is part of the dune-xt-grid project:
# https://github.com/dune-community/dune-xt-grid
# Copyright 2009-2018 dune-xt-grid developers and contributors. All rights reserved.
# License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
# or GPL-2.0+ (http://opensource.org/licenses/gpl-license)
# with "runtime exception" (http://www.dune-project.org/license.html)
# Authors:
# René Fritze (2018 - 2019)
# ~~~
try
:
from
dune.xt._walker
import
*
except
ImportError
as
e
:
import
os
import
logging
if
os
.
environ
.
get
(
'
DXT_PYTHON_DEBUG
'
,
False
):
raise
e
logging
.
error
(
'
dune-xt-grid bindings not available
'
)
def
make_walker
(
gridprovider
,
level
=
0
):
for
factory
in
[
globals
()[
s
]
for
s
in
globals
().
keys
()
if
s
.
startswith
(
'
make_walker_on_
'
)]:
try
:
return
factory
(
gridprovider
,
level
)
except
:
continue
raise
TypeError
(
'
no matching walker for gridview {}
'
.
format
(
gridprovider
.
__class__
))
def
make_apply_on_dirichlet_intersections
(
boundaryinfo
,
grid
,
layer
=
'
leaf_view
'
,
*
args
,
**
kwargs
):
factory
=
globals
()[
'
make_apply_on_dirichlet_intersections_{}_{}
'
.
format
(
layer
,
grid
.
grid_type
)]
return
factory
(
boundaryinfo
,
*
args
,
**
kwargs
)
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