Skip to content
Snippets Groups Projects
Commit b96f3bb4 authored by oliver.sander_at_tu-dresden.de's avatar oliver.sander_at_tu-dresden.de
Browse files

Merge branch 'test-for-2.7' into 'master'

Perform tests also for Dune 2.7

See merge request !92
parents b3c353a4 b735ecb6
Branches
No related tags found
1 merge request!92Perform tests also for Dune 2.7
Pipeline #39350 failed
......@@ -5,6 +5,13 @@ before_script:
- duneci-install-module https://git.imp.fu-berlin.de/agnumpde/dune-subgrid.git
- duneci-install-module https://git.imp.fu-berlin.de/agnumpde/dune-matrix-vector.git
dune:2.7 gcc:
variables:
DUNECI_BRANCH: releases/2.7
image: registry.dune-project.org/docker/ci/dune:2.7-debian-10-gcc-8-17
before_script:
script: duneci-standard-test
dune:git clang C++17:
image: registry.dune-project.org/docker/ci/dune:git-debian-10-clang-7-libcpp-17
script: duneci-standard-test
......
......@@ -9,14 +9,16 @@
#
function(add_dune_pythonlibs_flags _targets)
if(Python3_FOUND)
foreach(_target ${_targets})
if(Python3_FOUND)
target_link_libraries(${_target} ${Python3_LIBRARIES})
# target_compile_definitions(${_target} PRIVATE "-DHAVE_PYTHON")
# target_compile_options(${_target} PRIVATE "-fno-strict-aliasing")
set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${Python3_INCLUDE_DIRS})
# backward compatibility with 2.7 core tests
elseif(PYTHONLIBS_FOUND)
target_link_libraries(${_target} ${PYTHON_LIBRARIES})
set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${PYTHON_INCLUDE_DIRS})
endif()
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS "HAVE_PYTHON")
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_OPTIONS "-fno-strict-aliasing")
endforeach(_target ${_targets})
endif(Python3_FOUND)
endfunction(add_dune_pythonlibs_flags)
......@@ -36,6 +36,12 @@ macro(dune_fufem_add_copy_dependency target file_name)
add_dependencies(${target} "${target}_copy_${file_name}")
endmacro(dune_fufem_add_copy_dependency)
# Backward compatibility: Test here for PYTHONLIBS if dune-common is < 2.8
# Can be removed once tests against 2.7 core are dropped
if(${dune-common_VERSION} VERSION_LESS_EQUAL "2.7.9")
find_package(PythonLibs)
endif()
find_package(Adolc)
find_package(HDF5 COMPONENTS C HL)
......
......@@ -35,13 +35,13 @@ class VVLaplaceAssembler : public LocalOperatorAssembler <GridType, TrialLocalFE
: one_(one)
{}
void indices(const Element& element DUNE_UNUSED, BoolMatrix& isNonZero, const TrialLocalFE& tFE DUNE_UNUSED, const AnsatzLocalFE& aFE DUNE_UNUSED) const
void indices([[maybe_unused]] const Element& element, BoolMatrix& isNonZero, [[maybe_unused]] const TrialLocalFE& tFE, [[maybe_unused]] const AnsatzLocalFE& aFE) const
{
isNonZero = true;
}
template <class BoundaryIterator>
void indices(const BoundaryIterator& it DUNE_UNUSED, BoolMatrix& isNonZero, const TrialLocalFE& tFE DUNE_UNUSED, const AnsatzLocalFE& aFE DUNE_UNUSED) const
void indices([[maybe_unused]] const BoundaryIterator& it, BoolMatrix& isNonZero, [[maybe_unused]] const TrialLocalFE& tFE, [[maybe_unused]] const AnsatzLocalFE& aFE) const
{
isNonZero = true;
}
......
......@@ -32,13 +32,13 @@ class VVMassAssembler : public LocalOperatorAssembler < GridType, TrialLocalFE,
: one_(one)
{}
void indices(const Element& element DUNE_UNUSED, BoolMatrix& isNonZero, const TrialLocalFE& tFE DUNE_UNUSED, const AnsatzLocalFE& aFE DUNE_UNUSED) const
void indices([[maybe_unused]] const Element& element, BoolMatrix& isNonZero, [[maybe_unused]] const TrialLocalFE& tFE, [[maybe_unused]] const AnsatzLocalFE& aFE) const
{
isNonZero = true;
}
template <class BoundaryIterator>
void indices(const BoundaryIterator& it DUNE_UNUSED, BoolMatrix& isNonZero, const TrialLocalFE& tFE DUNE_UNUSED, const AnsatzLocalFE& aFE DUNE_UNUSED) const
void indices([[maybe_unused]] const BoundaryIterator& it, BoolMatrix& isNonZero, [[maybe_unused]] const TrialLocalFE& tFE, [[maybe_unused]] const AnsatzLocalFE& aFE) const
{
isNonZero = true;
}
......
......@@ -16,7 +16,7 @@ namespace serialization {
* mark the use of the operator & that works both ways, << or >> , depending on the type of Archive.
*/
template <class Archive, class T, int n>
void serialize(Archive& ar, Dune::FieldVector<T,n>& fvec, const unsigned int version DUNE_UNUSED)
void serialize(Archive& ar, Dune::FieldVector<T,n>& fvec, [[maybe_unused]] const unsigned int version)
{
for (int i=0; i<n; ++i)
ar & fvec[i];
......@@ -26,7 +26,7 @@ void serialize(Archive& ar, Dune::FieldVector<T,n>& fvec, const unsigned int ver
* two separate save() and load() functions later to be "unified" via boost::serialization::split_free (see below)
*/
template <class Archive, class BlockType>
void save(Archive& ar, const Dune::BlockVector<BlockType>& vec, const unsigned int version DUNE_UNUSED)
void save(Archive& ar, const Dune::BlockVector<BlockType>& vec, [[maybe_unused]] const unsigned int version)
{
size_t size = vec.size();
ar << size;
......@@ -35,7 +35,7 @@ void save(Archive& ar, const Dune::BlockVector<BlockType>& vec, const unsigned i
}
template <class Archive, class BlockType>
void load(Archive& ar, Dune::BlockVector<BlockType>& vec, const unsigned int version DUNE_UNUSED)
void load(Archive& ar, Dune::BlockVector<BlockType>& vec, [[maybe_unused]] const unsigned int version)
{
size_t size;
ar >> size;
......
......@@ -35,7 +35,7 @@ class ErrorFractionMarkingStrategy
//! Layout class for a all codim all geometry type mapper
struct AllCodimLayout {
bool operator() (Dune::GeometryType gt DUNE_UNUSED, int) const {
bool operator() ([[maybe_unused]] Dune::GeometryType gt, int) const {
return true;
}
};
......
......@@ -371,7 +371,7 @@ class PortableGreyMap:
* \param x point (global coordinates) at which to evaluate the derivative
* \param d will contain the derivative at x after return
*/
virtual void evaluateDerivative(const DomainType& x DUNE_UNUSED, DerivativeType& d DUNE_UNUSED) const
virtual void evaluateDerivative([[maybe_unused]] const DomainType& x, [[maybe_unused]] DerivativeType& d) const
{
DUNE_THROW(Dune::NotImplemented, "Derivative not implemented");
}
......@@ -382,7 +382,7 @@ class PortableGreyMap:
* \param x point in local coordinates at which to evaluate the derivative
* \param d will contain the derivative at x after return
*/
virtual void evaluateDerivativeLocal(const Element& e DUNE_UNUSED, const LocalDomainType& x DUNE_UNUSED, DerivativeType& d DUNE_UNUSED) const
virtual void evaluateDerivativeLocal([[maybe_unused]] const Element& e, [[maybe_unused]] const LocalDomainType& x, [[maybe_unused]] DerivativeType& d) const
{
DUNE_THROW(Dune::NotImplemented, "Derivative not implemented");
}
......
......@@ -55,7 +55,7 @@ class Q1NodalBasis :
return gridview_.indexSet().size(dim);
}
const LocalFiniteElement& getLocalFiniteElement(const Element& e DUNE_UNUSED) const
const LocalFiniteElement& getLocalFiniteElement([[maybe_unused]] const Element& e) const
{
return localFE_;
}
......
......@@ -55,7 +55,7 @@ class RefinedP1NodalBasis :
mapper_.update();
}
const LocalFiniteElement& getLocalFiniteElement(const Element& e DUNE_UNUSED) const
const LocalFiniteElement& getLocalFiniteElement([[maybe_unused]] const Element& e) const
{
return fe_;
}
......
......@@ -59,7 +59,9 @@ foreach(_test ${GRID_BASED_TESTS})
endif(HAVE_UG)
endforeach()
if (Python3_FOUND)
# PYTHONLIBS_FOUND is just placed for backward compatibility with 2.7 Core tests
# and can be removed once tests against 2.7 Core are disabled
if (Python3_FOUND OR PYTHONLIBS_FOUND)
dune_add_test(SOURCES dunepythontest.cc)
# Add python flags to corresponding test
......
......@@ -47,7 +47,7 @@ struct BoundaryPatchTestSuite
// Test copy construction
BP fooBoundary = boundary;
int c DUNE_UNUSED;
[[maybe_unused]] int c;
c = fooBoundary.gridView().indexSet().size(0); // make the copy do something useful
// Test assignment
......@@ -70,7 +70,7 @@ struct BoundaryPatchTestSuite
// Test leaf copy construction
BoundaryPatch<typename GridType::LeafGridView> leafBoundary(grid.leafGridView(), true);
BoundaryPatch<typename GridType::LeafGridView> foo = leafBoundary;
int c DUNE_UNUSED;
[[maybe_unused]] int c;
c = foo.gridView().indexSet().size(0); // make the copy do something useful
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment