Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • extensions/dune-codegen
  • christian.heinigk/dune-codegen
2 results
Show changes
Commits on Source (5)
cmake_minimum_required(VERSION 3.1.3)
cmake_minimum_required(VERSION 3.13)
project(dune-codegen CXX)
if(NOT (dune-common_DIR OR dune-common_ROOT OR
......
......@@ -73,7 +73,6 @@ cmake. See the [Dune homepage][4] for further details. You need to set the optio
```
-DDUNE_PYTHON_ALLOW_GET_PIP=1
-DDUNE_PYTHON_VIRTUALENV_SETUP=1
```
in your options file. Your options file could for example look like
......@@ -83,7 +82,6 @@ the following:
CMAKE_FLAGS="
-DDUNE_PYTHON_FORCE_PYTHON3=1
-DDUNE_PYTHON_ALLOW_GET_PIP=1
-DDUNE_PYTHON_VIRTUALENV_SETUP=1
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS='-march=native -ffast-math'
-DDUNE_SYMLINK_TO_SOURCE_TREE=1
......
dune_python_install_package(PATH .)
dune_python_configure_package(PATH .)
dune_symlink_to_source_files(FILES make_graph.sh
knltimings.sh
......
......@@ -180,7 +180,7 @@ function(dune_add_formcompiler_system_test)
add_dependencies(build_${label}_tests ${tname})
endforeach()
_add_test(NAME ${tname}
add_test(NAME ${tname}
COMMAND ${CMAKE_BINARY_DIR}/run-in-dune-env ${SYSTEMTEST_SCRIPT}
--exec "$<TARGET_FILE_DIR:${tname}>/$<TARGET_FILE_NAME:${tname}>"
--ini "${CMAKE_CURRENT_BINARY_DIR}/${inifile}"
......
......@@ -6,14 +6,14 @@ dune_check_submodule(PATH loopy INDICATOR setup.py)
dune_check_submodule(PATH ufl INDICATOR setup.py)
# Install all the external packages that we have as submodules
dune_python_install_package(PATH pytools)
dune_python_install_package(PATH cgen)
dune_python_install_package(PATH pymbolic)
dune_python_install_package(PATH loopy)
dune_python_install_package(PATH ufl)
dune_python_configure_package(PATH pytools)
dune_python_configure_package(PATH cgen)
dune_python_configure_package(PATH pymbolic)
dune_python_configure_package(PATH loopy)
dune_python_configure_package(PATH ufl)
# Install our python package
dune_python_install_package(PATH .)
dune_python_configure_package(PATH .)
dune_python_add_test(NAME pep8-ourcode
MODULE pytest --flake8
......
__import__('pkg_resources').declare_namespace(__name__)
......@@ -15,7 +15,7 @@ def _freeze(data):
""" A function that deterministically generates an
immutable item from the given data. Used for cache key generation.
"""
from collections import Hashable, Iterable, MutableMapping
from collections.abc import Hashable, Iterable, MutableMapping
# Strings are iterable and hashable, but they do not pose any problems.
if isinstance(data, str):
......@@ -260,7 +260,7 @@ def retrieve_cache_items(condition=True, make_generable=False):
counted_ones.extend(_filter_cache_items(gen, condition).values())
for item in sorted(counted_ones, key=lambda i: i.count):
from collections import Iterable
from collections.abc import Iterable
if isinstance(item.value, Iterable) and not isinstance(item.value, str):
for l in item.value:
yield as_generable(l)
......
......@@ -45,6 +45,7 @@ def preprocess_form(form):
uc.JacobianInverse,
),
do_estimate_degrees=not get_form_option("quadrature_order"),
do_append_everywhere_integrals=False,
)
formdata.preprocessed_form = apply_default_transformations(formdata.preprocessed_form)
......
......@@ -42,7 +42,8 @@ setup(name='dune.codegen',
'dune.codegen.ufl',
'dune.codegen.ufl.transformations',
],
install_requires=['sympy',
install_requires=['dune-common',
'sympy',
'frozendict',
'pytest',
'pytest-flake8',
......
from collections import Counter
from collections.abc import Counter
from dune.codegen.generation import (
delete_cache_items,
......