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
2f33db93
Unverified
Commit
2f33db93
authored
6 years ago
by
René Fritze
Browse files
Options
Downloads
Patches
Plain Diff
[py] test function creation
parent
d32eac11
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
python/test/base.py
+18
-0
18 additions, 0 deletions
python/test/base.py
with
18 additions
and
0 deletions
python/test/base.py
+
18
−
0
View file @
2f33db93
...
@@ -11,8 +11,26 @@
...
@@ -11,8 +11,26 @@
import
pytest
import
pytest
from
dune.xt.common.test
import
load_all_submodule
from
dune.xt.common.test
import
load_all_submodule
from
dune.xt.grid
import
types
,
provider
import
dune.xt.grid
as
xtg
import
dune.xt.functions
as
xtf
def
test_load_all
():
def
test_load_all
():
import
dune.xt.functions
as
xtc
import
dune.xt.functions
as
xtc
load_all_submodule
(
xtc
)
load_all_submodule
(
xtc
)
@pytest.fixture
(
params
=
xtg
.
types
.
available_types
)
def
_grid_provider_factory
(
request
):
maker_str
=
'
make_cube_grid__{}
'
fn
=
maker_str
.
format
(
request
.
param
)
maker
=
getattr
(
xtg
.
provider
,
fn
)
return
maker
()
def
test_create_functions
(
_grid_provider_factory
):
grid
=
_grid_provider_factory
func
=
xtf
.
make_expression_function_1x1
(
grid
,
'
x
'
,
'
1+(cos(0.5*pi*x[0])*cos(0.5*pi*x[1]))
'
,
order
=
2
,
name
=
'
lambda_0
'
)
func
=
xtf
.
make_constant_function_1x1
(
grid
,
1
)
func
=
xtf
.
make_constant_function_2x1
(
grid
,
1
)
\ No newline at end of file
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