Skip to content
Snippets Groups Projects
Unverified Commit 2f33db93 authored by René Fritze's avatar René Fritze
Browse files

[py] test function creation

parent d32eac11
Branches
Tags
No related merge requests found
...@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment