def test_tuple(args): o, r, s, f = args if f == 'complex': f = 'std::complex<double>' if o == 'FieldMatrix': fm = '{}, 10, 10'.format(f) fv = '{}, 10'.format(f) return (safe_name('{}_{}_{}_{}'.format(o, r, s, f)), commontype(o, fm), commontype(r, fv), commontype(s, fv)) else: return (safe_name('{}_{}_{}_{}'.format(o, r, s, f)), latype(o, f), latype(r, f), latype(s, f))
# ~~~ # This file is part of the dune-xt project: # https://github.com/dune-community/dune-xt # Copyright 2009-2018 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: # Tobias Leibner (2019) # ~~~ from itertools import product from matrices import matrices, latype, fieldtypes from dune.xt.codegen import typeid_to_typedef_name as safe_name testtypes = [(safe_name('{}_{}'.format(m, f)), latype(m, f)) for m, f in product(matrices(cache), fieldtypes(cache))]
def la_test_tuple(args): o, r, s, f = args if f == 'complex': f = 'std::complex<double>' return (safe_name('{}_{}_{}_{}'.format(o, r, s, f)), latype(o, f), latype(r, f), latype(s, f))
# ~~~ # This file is part of the dune-xt project: # https://github.com/dune-community/dune-xt # Copyright 2009-2018 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 (2016) # René Fritze (2017 - 2019) # Tobias Leibner (2015, 2019) # ~~~ from itertools import product from matrices import matrices, latype, vectors, fieldtypes, vector_filter from dune.xt.codegen import typeid_to_typedef_name as safe_name testtypes = [(safe_name('{}_{}_{}'.format(*mv, f)), latype(mv[0], f), latype(mv[1], f)) for mv, f in product(product(matrices(cache), vectors(cache)), fieldtypes(cache)) if vector_filter(mv[1], f)]