コード例 #1
0
ファイル: __init__.py プロジェクト: stjordanis/dune-xt-la
# ~~~
# This file is part of the dune-xt-la project:
#   https://github.com/dune-community/dune-xt-la
# Copyright 2009-2018 dune-xt-la 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:
#   Felix Schindler (2017)
#   René Fritze     (2018)
# ~~~

from dune.xt import guarded_import

for mod_name in ('_la', ):
    guarded_import(globals(), 'dune.xt.la', mod_name)
コード例 #2
0
ファイル: __init__.py プロジェクト: dune-community/dune-xt
        '_functions_function_interface_2d',
        '_functions_function_interface_3d',
        '_functions_gradient',
        '_functions_gridfunction',
        '_functions_indicator',
        '_functions_interfaces_element_function_1d',
        '_functions_interfaces_element_function_2d',
        '_functions_interfaces_element_function_3d',
        '_functions_interfaces_grid_function_1d',
        '_functions_interfaces_grid_function_2d',
        '_functions_interfaces_grid_function_3d',
        '_functions_inverse',
        '_functions_parametric_expression',
        '_functions_spe10',
):
    guarded_import(globals(), 'dune.xt.functions', mod_name)

from dune.xt.functions._functions_gridfunction import GridFunction


def visualize_function(function, grid, subsampling=False):
    assert function.dim_domain == 2, f'Not implemented yet for {function.dim_domain}-dimensional grids!'
    assert function.dim_range == 1, f'Not implemented yet for {function.dim_range}-dimensional functions!'
    tmpfile = NamedTemporaryFile(mode='wb', delete=False, suffix='.vtu').name
    try:
        function.visualize(grid,
                           filename=tmpfile[:-4],
                           subsampling=subsampling)
    except AttributeError:
        GridFunction(grid, function).visualize(grid,
                                               filename=tmpfile[:-4],
コード例 #3
0
ファイル: timings.py プロジェクト: dune-community/dune-xt
# ~~~
# This file is part of the dune-xt project:
#   https://zivgitlab.uni-muenster.de/ag-ohlberger/dune-community/dune-xt
# Copyright 2009-2021 dune-xt 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:
#   Felix Schindler (2019 - 2020)
#   René Fritze     (2018 - 2019)
#   Tobias Leibner  (2018 - 2020)
# ~~~

from dune.xt import guarded_import

guarded_import(globals(), 'dune.xt.common', '_common_timings')

instance()
コード例 #4
0
ファイル: __init__.py プロジェクト: stjordanis/dune-xt-common
# ~~~
# This file is part of the dune-xt-common project:
#   https://github.com/dune-community/dune-xt-common
# Copyright 2009-2018 dune-xt-common 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:
#   Felix Schindler (2017)
#   René Fritze     (2018)
# ~~~

from dune.xt import guarded_import

for mod_name in (
        '_exceptions',
        '_mpi',
):
    guarded_import(globals(), 'dune.xt.common', mod_name)