Commit d9bde6bd authored by Robert K's avatar Robert K

[!305] Feature/nightly headercheck

Merge branch 'feature/nightly-headercheck' into 'master'

ref:dune-fem/dune-fem Adds a headercheck to the nightly build

Also fixes headercheck for current master and renames TORTURE_TESTS to
FEM_TORTURE_TESTS to not inherit from ALUGrid

See merge request [!305]

  [!305]: gitlab.dune-project.org/dune-fem/dune-fem/merge_requests/305
parents dd66d207 5c16d2c2
Pipeline #17845 passed with stage
in 48 minutes and 49 seconds
---
variables:
DUNECI_OPTS: "/builds/dune-fem/dune-fem/scripts/opts/ci-gcc.opts"
TORTURE_TESTS: "off"
before_script:
# - rm -rf /duneci/modules/dune-alugrid
......@@ -66,13 +67,14 @@ debian-10-gcc-8-noassert-17:
- schedules
# This fails, have to further investigate what this libcpp really means.
.debian-10-clang-6-libcpp-17:
<<: *base-petsc
image: dune-fem-ci:git-debian-10-clang-6-libcpp-17
script: duneci-standard-test --opts=/builds/dune-fem/dune-fem/scripts/opts/ci-clang-6.opts
only:
- triggers
- schedules
# is no longer maintained by Heidelberg
#.debian-10-clang-6-libcpp-17:
# <<: *base-petsc
# image: dune-fem-ci:git-debian-10-clang-6-libcpp-17
# script: duneci-standard-test --opts=/builds/dune-fem/dune-fem/scripts/opts/ci-clang-6.opts
# only:
# - triggers
# - schedules
ubuntu-18.04-clang-6-17:
<<: *base-petsc
......@@ -104,3 +106,16 @@ debian-10-gcc-8-noassert-17-nopetsc:
only:
- triggers
- schedules
headercheck:
<<: *base-petsc
stage: test
image: dune-fem-ci:git-ubuntu-18.04-clang-6-17
script:
- cd /builds/dune-fem
- dunecontrol --opts=/builds/dune-fem/dune-fem/scripts/opts/ci-headercheck.opts --only=dune-fem configure
- cd dune-fem/build-cmake
- make headercheck
when: always
only:
- schedules
if("$ENV{TORTURE_TESTS}" STREQUAL "on")
set(FEM_TORTURE_TESTS on CACHE BOOL "Enable Torture Tests")
message(STATUS "Enabling torture-tests")
else()
if("$ENV{TORTURE_TESTS}" STREQUAL "off")
set(FEM_TORTURE_TESTS off CACHE BOOL "Enable Torture Tests")
message(STATUS "Not enabling torture-tests")
message(STATUS "Disabling torture-tests")
else()
set(FEM_TORTURE_TESTS on CACHE BOOL "Enable Torture Tests")
message(STATUS "Enabling torture-tests by default")
endif()
......@@ -16,3 +16,7 @@ dune_install( bindguard.hh
tupleutility.hh
typeindexedtuple.hh
utility.hh )
exclude_from_headercheck(
referencevector.hh
)
......@@ -139,7 +139,7 @@ namespace Dune
namespace std
{
template< size_t i, class Tuple, class Types >
struct tuple_element< i, Dune::TypeIndexedTuple< Tuple, Types > >
class tuple_element< i, Dune::TypeIndexedTuple< Tuple, Types > >
{
typedef typename std::tuple_element< i, Tuple >::type type;
};
......
......@@ -5,3 +5,7 @@ dune_install(basicfilterwrapper.hh
radialfilter.hh
threadfilter.hh
voidfilter.hh)
exclude_from_headercheck(
threadfilter.hh
)
......@@ -17,7 +17,7 @@ namespace Dune
namespace Fem
{
static const std::string& checkParameterExistsString()
static inline const std::string& checkParameterExistsString()
{
static const std::string defaultKeyForExistCheck("__ParameterReader::check-exists__");
return defaultKeyForExistCheck;
......
......@@ -3,3 +3,7 @@ dune_install(asciistreams.hh binarystreams.hh sionlibstreams.hh
tuples.hh virtualstreams.hh xdrstreams.hh)
dune_add_subdirs(test)
exclude_from_headercheck(
xdrstreams.hh
)
......@@ -13,7 +13,7 @@
#if HAVE_DUNE_ALUGRID
#include <dune/alugrid/3d/alugrid.hh>
#warning "Using the ThreadPartitioner"
//#warning "Using the ThreadPartitioner"
namespace Dune {
......
......@@ -3,10 +3,12 @@
#include <cassert>
#include <typeindex>
#include <cassert>
#include <dune/common/exceptions.hh>
#include <dune/fem/version.hh>
#include <dune/common/exceptions.hh>
#include <dune/fem/operator/common/mapping.hh>
namespace Dune
......
......@@ -5,7 +5,7 @@ set( DEFAULTFLAGS "COUNT_FLOPS;YASPGRID;GRIDDIM=2" )
# dgl2projection tests for different discrete functions
set( tests petsc )
if( ${TORTURE_TESTS} )
if( ${FEM_TORTURE_TESTSS} )
set( tests "${tests} eigen" )
endif()
foreach( matrix ${tests} )
......@@ -22,7 +22,7 @@ LINK_LIBRARIES dunefem )
dune_add_test( NAME test_istlmatrix SOURCES test-matrices.cc COMPILE_DEFINITIONS "${DEFAULTFLAGS};USE_ISTL"
LINK_LIBRARIES dunefem )
if( ${TORTURE_TESTS} )
if( ${FEM_TORTURE_TESTSS} )
dune_add_test(
SOURCES test-hierarchicallinearoperator.cc
COMPILE_DEFINITIONS "YASPGRID" "GRIDDIM=2"
......
dune_install(blockmatrix.hh colcompspmatrix.hh columnobject.hh densematrix.hh functor.hh
istlmatrix.hh istlmatrixadapter.hh istlpreconditioner.hh preconditionerwrapper.hh
spmatrix.hh eigenmatrix.hh)
exclude_from_headercheck(
preconditionerwrapper.hh
)
......@@ -11,7 +11,7 @@
#include <dune/fem/misc/functor.hh>
#include <dune/fem/operator/common/localmatrix.hh>
#include <dune/fem/operator/common/localmatrixwrapper.hh>
#include <dune/fem/solver/oemsolver.hh>
#include <dune/fem/solver/krylovinverseoperators.hh>
#include <dune/fem/storage/objectstack.hh>
namespace Dune
......
dune_add_subdirs(local)
dune_install(hdivprojection.hh l2projection.hh dgl2projection.hh
dune_install(hdivprojection.hh l2projection.hh dgl2projection.hh
vtxprojection.hh)
# avoid deprecation warnings during headercheck
exclude_from_headercheck(
hdivprojection.hh
dgl2projection.hh
l2projection.hh
)
......@@ -338,7 +338,6 @@ namespace Dune
typedef typename ElementDiscreteSpaceType :: BaseFunctionSetType BaseFunctionSetType;
typedef typename ElementDiscreteSpaceType :: LagrangePointSetType LagrangePointSetType;
typedef typename ElementDiscreteSpaceType :: Traits::GridPartType GridPartType;
typedef typename ElementDiscreteSpaceType :: JacobianRangeType JacobianRangeType;
typedef typename ElementDiscreteSpaceType :: DomainType DomainType;
......@@ -366,7 +365,6 @@ namespace Dune
const int bubbleOffset = (type.isSimplex()) ? 0 : baseFunctionOffset( 0 );
// type of jacobian inverse
typedef typename Geometry :: ctype ctype;
enum { cdim = Geometry :: coorddimension };
enum { mydim = Geometry :: mydimension };
typedef typename Geometry::JacobianInverseTransposed JacobianInverseType;
......@@ -462,7 +460,6 @@ namespace Dune
typedef typename EntityType :: Geometry Geometry ;
const Geometry& geo = en.geometry();
typedef typename Geometry :: ctype ctype;
enum { cdim = Geometry :: coorddimension };
enum { mydim = Geometry :: mydimension };
typedef typename Geometry::JacobianInverseTransposed JacobianInverseType;
......@@ -528,8 +525,7 @@ namespace Dune
template <class EntityType, class SpaceType>
static inline FaceBSetType faceBaseSet(const EntityType& en, const SpaceType& space)
{
const GeometryType geoType (GeometryType::cube,dim-1);
return space.baseFunctionSet( geoType );
return space.baseFunctionSet( GeometryTypes::cube(dim-1) );
}
};
......@@ -589,18 +585,12 @@ namespace Dune
typedef typename DiscreteFunctionType::Traits::DiscreteFunctionSpaceType FunctionSpaceType;
enum { localBlockSize = FunctionSpaceType::localBlockSize };
typedef typename FunctionSpaceType::BaseFunctionSetType BaseFunctionSetType;
typedef typename FunctionSpaceType::GridType GridType;
typedef typename FunctionSpaceType::GridPartType GridPartType;
typedef typename FunctionSpaceType::IteratorType Iterator;
typedef typename GridPartType :: IntersectionIteratorType IntersectionIteratorType;
typedef typename GridType :: template Codim<0> :: Entity EntityType;
typedef typename GridType :: Traits :: LocalIdSet LocalIdSetType;
typedef typename FunctionSpaceType::RangeFieldType RangeFieldType;
typedef typename FunctionSpaceType::DomainFieldType DomainFieldType;
typedef typename FunctionSpaceType::RangeType RangeType;
typedef typename FunctionSpaceType :: DomainType DomainType;
enum { dim = GridType::dimension };
typedef typename GridType :: ctype coordType;
......@@ -618,9 +608,7 @@ namespace Dune
const int polOrd = 2 * space.order() + 2;
typedef typename FaceDiscreteSpaceType :: BaseFunctionSetType FaceBSetType ;
typedef typename FaceDiscreteSpaceType :: RangeType FaceRangeType;
typedef typename ElementDiscreteSpaceType :: BaseFunctionSetType ElementBaseSetType ;
typedef typename ElementGradientSpaceType :: BaseFunctionSetType GradientBaseSetType ;
typedef typename DiscreteFunctionType::LocalFunctionType LocalFuncType;
......
if( ${TORTURE_TESTS} )
if( ${FEM_TORTURE_TESTSS} )
dune_add_test( NAME test_insertoperatorpass SOURCES test-insertoperatorpass.cc LINK_LIBRARIES dunefem )
endif()
\ No newline at end of file
......@@ -29,7 +29,7 @@ namespace Dune
class CornerPointSetTraits
{
template< class ct, int dim >
struct PointListTraits;
class PointListTraits;
public:
typedef IntegrationPointList< typename GridPart::ctype, GridPart::dimension, PointListTraits >
......
......@@ -10,3 +10,12 @@ dune_add_subdirs(linear rungekutta test)
dune_add_library(solver OBJECT
rungekutta/butchertable.cc )
# avoid deprecation warning.
exclude_from_headercheck(
istlsolver.hh
oemsolver.hh
pardg.hh
pardginverseoperators.hh
petscsolver.hh
)
......@@ -13,6 +13,7 @@
#include <dune/fem/function/tuplediscretefunction.hh>
#include <dune/fem/io/parameter.hh>
#include <dune/fem/operator/common/operator.hh>
#include <dune/fem/operator/linear/spoperator.hh>
#include <dune/fem/operator/matrix/colcompspmatrix.hh>
#include <dune/fem/operator/linear/spoperator.hh>
#include <dune/fem/solver/inverseoperatorinterface.hh>
......
......@@ -13,6 +13,7 @@
#include <dune/fem/function/tuplediscretefunction.hh>
#include <dune/fem/io/parameter.hh>
#include <dune/fem/operator/common/operator.hh>
#include <dune/fem/operator/linear/spoperator.hh>
#include <dune/fem/operator/matrix/colcompspmatrix.hh>
#include <dune/fem/operator/linear/spoperator.hh>
#include <dune/fem/solver/inverseoperatorinterface.hh>
......
......@@ -184,9 +184,7 @@ namespace Dune
/** \copydoc Dune::Fem::BasisFunctionSets::types */
typename BaseType::Types types () const noexcept
{
std::array< GeometryType, 1 > types;
types[ 0 ].makeCube( EntityType::mydimension );
return std::move( types );
return std::array< GeometryType, 1 >{{ GeometryTypes::cube( EntityType::mydimension ) }};
}
/** \copydoc Dune::Fem::BasisFunctionSets::maxBlocks */
......
......@@ -157,9 +157,7 @@ namespace Dune
/** \copydoc Dune::Fem::BasisFunctionSets::types */
typename BaseType::Types types () const
{
std::array< GeometryType, 1 > types;
types[ 0 ].makeCube( EntityType::mydimension );
return std::move( types );
return std::array< GeometryType, 1 >{{ GeometryTypes::cube( EntityType::mydimension ) }};
}
/** \copydoc Dune::Fem::BasisFunctionSets::maxBlocks */
......
......@@ -140,7 +140,7 @@ namespace Dune
/** \copydoc Dune::Fem::BasisFunctionSets::basisFunctionSet */
BasisFunctionSetType basisFunctionSet ( const EntityType &entity, const KeyType &key ) const
{
return BasisFunctionSetType( impl.basisFunctionSet( entity, key ) );
return BasisFunctionSetType( impl().basisFunctionSet( entity, key ) );
}
/** \} */
......
......@@ -29,3 +29,9 @@ dune_install(
)
dune_add_subdirs( dataprojection )
# avoid deprecation warning in header-check.
exclude_from_headercheck(
adaptmanager.hh
arrays.hh
)
......@@ -12,7 +12,7 @@ configure_file(3dgrid.dgf ${CMAKE_CURRENT_BINARY_DIR}/3dgrid.dgf COPYONLY)
set( DEFAULTFLAGS "-D${GRIDTYPE}" "-DGRIDDIM=${GRIDDIM}" "-DDIMENSION=2" "-DPOLORDER=2" "-DTOPOLOGYTYPE=SimplexTopology" "-DSCALAR=0" )
if( ${TORTURE_TESTS} )
if( ${FEM_TORTURE_TESTSS} )
dune_add_test( NAME tester SOURCES main.cc
COMPILE_DEFINITIONS ${DEFAULTFLAGS}
LINK_LIBRARIES dunefem )
......
......@@ -71,9 +71,9 @@ namespace Dune
template< class GlobalKey >
void operator() ( int localBlock, const GlobalKey globalKey )
{
int localDof = blockSize*localBlock;
SizeType globalDof = blockSize*globalKey;
const int localEnd = localDof + blockSize;
int localDof = blockSize_*localBlock;
SizeType globalDof = blockSize_*globalKey;
const int localEnd = localDof + blockSize_;
while( localDof != localEnd )
functor_( localDof++, globalDof++ );
}
......
......@@ -35,7 +35,7 @@ set( EXPENSIVE_TESTS
localadapter
)
if( ${TORTURE_TESTS} )
if( ${FEM_TORTURE_TESTSS} )
foreach(i ${EXPENSIVE_TESTS})
list(APPEND TESTS ${i})
endforeach()
......@@ -59,7 +59,7 @@ LINK_LIBRARIES dunefem MPI_RANKS 1 2 3 4 TIMEOUT 9999999 )
dune_add_test( SOURCES test-slavedofs.cc LINK_LIBRARIES dunefem MPI_RANKS 1 2 4 TIMEOUT 300 COMPILE_DEFINITIONS "${DEFAULTFLAGS};USE_COMBINED_SPACE" )
dune_add_test( SOURCES test-raviartthomasinterpolation.cc CMAKE_GUARD dune-localfunctions_FOUND LINK_LIBRARIES dunefem COMPILE_DEFINITIONS "${DEFAULTFLAGS}" )
if( ${TORTURE_TESTS} )
if( ${FEM_TORTURE_TESTSS} )
# test adaptation of combinedspaces
dune_add_test( NAME adapt_combinedspace_pointbased SOURCES adapt.cc
COMPILE_DEFINITIONS "${DEFAULTFLAGS};USE_COMBINED_SPACE;POINTBASED"
......
......@@ -21,7 +21,7 @@ set( DEFAULTFLAGS "COUNT_FLOPS;${GRIDTYPE};GRIDDIM=${GRIDDIM}" )
set( TESTS )
# lagrangeinterpolation tests
if( NOT ${TORTURE_TESTS} )
if( NOT ${FEM_TORTURE_TESTSS} )
set( MINORDER 2 )
set( MAXORDER 2 )
else()
......@@ -47,7 +47,7 @@ dune_add_test( NAME dgl2projection_adaptive SOURCES dgl2projection.cc
COMPILE_DEFINITIONS "POLORDER=1;${DEFAULTFLAGS}" )
set( TESTS ${TESTS} dgl2projection_adaptive )
if( ${TORTURE_TESTS} )
if( ${FEM_TORTURE_TESTSS} )
set( DFS blockvectorfunction vectorfunction blockvectordiscretefunction )
else()
set( DFS blockvectorfunction )
......@@ -63,7 +63,7 @@ dune_add_test( NAME dgl2projection_vector_int SOURCES dgl2projection.cc
COMPILE_DEFINITIONS "POLORDER=1;USE_VECTORFUNCTION;USE_DOFTYPE_INT;${DEFAULTFLAGS}" )
set( TESTS ${TESTS} dgl2projection_vector_int )
if( ${TORTURE_TESTS} )
if( ${FEM_TORTURE_TESTSS} )
# only run this test for YaspGrid
dune_add_test( NAME dgl2projection_legendre SOURCES dgl2projection.cc
COMPILE_DEFINITIONS "POLORDER=1;YASPGRID;USE_LEGENDRESPACE;GRIDDIM=${GRIDDIM}" )
......@@ -78,7 +78,7 @@ dune_add_test( NAME dgl2projection_fv SOURCES dgl2projection.cc
COMPILE_DEFINITIONS "USE_FVSPACE;${DEFAULTFLAGS}" )
set( TESTS ${TESTS} dgl2projection_fv )
if( ${TORTURE_TESTS} )
if( ${FEM_TORTURE_TESTSS} )
dune_add_test( NAME dgl2projection_filtered SOURCES dgl2projection.cc
COMPILE_DEFINITIONS "POLORDER=1;USE_FILTEREDGRID;${DEFAULTFLAGS}" )
set( TESTS ${TESTS} dgl2projection_filtered )
......@@ -118,7 +118,7 @@ dune_add_test( NAME l2projection_istl SOURCES l2projection.cc
COMPILE_DEFINITIONS "POLORDER=1;USE_BLOCKVECTORFUNCTION;${DEFAULTFLAGS}" )
set( TESTS ${TESTS} l2projection_istl )
if( ${TORTURE_TESTS} )
if( ${FEM_TORTURE_TESTSS} )
dune_add_test( NAME l2projection_istl_complex SOURCES l2projection.cc
COMPILE_DEFINITIONS "POLORDER=1;USE_BLOCKVECTORFUNCTION;USE_COMPLEX;${DEFAULTFLAGS}" )
set( TESTS ${TESTS} l2projection_istl_complex )
......
CMAKE_FLAGS="
-DCMAKE_CXX_COMPILER='/usr/bin/clang++' \
-DCMAKE_C_COMPILER='/usr/bin/clang' \
-DCMAKE_CXX_FLAGS='-Wall -O3 -ftemplate-backtrace-limit=0' \
-DDUNE_GRID_GRIDTYPE_SELECTOR=ON \
-DDUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS=TRUE \
-DENABLE_HEADERCHECK=ON\
"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment