Commit df44be5e authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'feature/gitlabci' into 'master'

Use the dune-core docker images as base for the tests

See merge request extensions/dune-vtk!18
parents 95eb61c9 3b31d1d9
--- ---
include:
- project: 'core/ci-config'
ref: master
file: 'config/common/master.yml'
- project: 'core/ci-config'
ref: master
file: 'jobs/common/master.yml'
before_script: before_script:
- . /duneci/bin/duneci-init-job - . /duneci/bin/duneci-init-job
- duneci-install-module https://gitlab.dune-project.org/core/dune-common.git
- duneci-install-module https://gitlab.dune-project.org/core/dune-geometry.git
- duneci-install-module https://gitlab.dune-project.org/staging/dune-uggrid.git
- duneci-install-module https://gitlab.dune-project.org/core/dune-grid.git
- duneci-install-module https://gitlab.dune-project.org/core/dune-istl.git
- duneci-install-module https://gitlab.dune-project.org/core/dune-localfunctions.git
- duneci-install-module https://gitlab.dune-project.org/staging/dune-typetree.git
- duneci-install-module https://gitlab.dune-project.org/staging/dune-functions.git
- duneci-install-module https://gitlab.dune-project.org/martin.nolte/dune-polygongrid - duneci-install-module https://gitlab.dune-project.org/martin.nolte/dune-polygongrid
dune:2.7-debian-10-gcc-8-17:
image: registry.dune-project.org/docker/ci/dune:2.7-debian-10-gcc-8-17
script: duneci-standard-test
before_script:
- duneci-install-module -b releases/2.7 https://gitlab.dune-project.org/extensions/dune-alugrid.git
tags: [duneci]
.dune28: &dune28
script: duneci-standard-test
before_script:
- duneci-install-module https://gitlab.dune-project.org/extensions/dune-alugrid.git - duneci-install-module https://gitlab.dune-project.org/extensions/dune-alugrid.git
tags: [duneci]
dune:git-debian-10-gcc-8-17:
<<: *dune28
image: registry.dune-project.org/docker/ci/dune:git-debian-10-gcc-8-17
dune:git-ubuntu-18.04-clang-6-17:
<<: *dune28
image: registry.dune-project.org/docker/ci/dune:git-ubuntu-18.04-clang-6-17
ubuntu:20.04 clang-10-20:
<<: *dune28
image: registry.dune-project.org/docker/ci/dune:git-ubuntu-20.04-clang-10-20
...@@ -7,5 +7,5 @@ Module: dune-vtk ...@@ -7,5 +7,5 @@ Module: dune-vtk
Version: 0.2 Version: 0.2
Maintainer: simon.praetorius@tu-dresden.de Maintainer: simon.praetorius@tu-dresden.de
#depending on #depending on
Depends: dune-grid (>= 2.6) dune-localfunctions (>= 2.6) Depends: dune-grid (>= 2.7) dune-localfunctions (>= 2.7)
Suggests: dune-functions dune-spgrid dune-polygongrid dune-alugrid dune-foamgrid dune-uggrid Suggests: dune-functions dune-spgrid dune-polygongrid dune-alugrid dune-foamgrid dune-uggrid
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <dune/common/fmatrix.hh> #include <dune/common/fmatrix.hh>
#include <dune/common/fvector.hh> #include <dune/common/fvector.hh>
#include <dune/common/typetraits.hh>
#include "localfunctioninterface.hh" #include "localfunctioninterface.hh"
...@@ -66,7 +67,7 @@ namespace Dune ...@@ -66,7 +67,7 @@ namespace Dune
// Evaluate a component of a vector valued data // Evaluate a component of a vector valued data
template <class T, template <class T,
std::enable_if_t<IsIndexable<T,int>::value, int> = 0> std::enable_if_t<Dune::is_indexable<T,int>::value, int> = 0>
double evaluateImpl (int comp, T const& value) const double evaluateImpl (int comp, T const& value) const
{ {
return value[comp]; return value[comp];
...@@ -74,7 +75,7 @@ namespace Dune ...@@ -74,7 +75,7 @@ namespace Dune
// Return the scalar values // Return the scalar values
template <class T, template <class T,
std::enable_if_t<not IsIndexable<T,int>::value, int> = 0> std::enable_if_t<not Dune::is_indexable<T,int>::value, int> = 0>
double evaluateImpl (int comp, T const& value) const double evaluateImpl (int comp, T const& value) const
{ {
assert(comp == 0); assert(comp == 0);
......
...@@ -158,11 +158,7 @@ namespace Dune ...@@ -158,11 +158,7 @@ namespace Dune
, name_(fct->name()) , name_(fct->name())
{ {
setComponents(fct->ncomps()); setComponents(fct->ncomps());
#if DUNE_VERSION_LT(DUNE_GRID,2,7)
setDataType(Vtk::DataTypes::FLOAT64);
#else
setDataType(dataTypeOf(fct->precision())); setDataType(dataTypeOf(fct->precision()));
#endif
setRangeType(rangeTypeOf(fct->ncomps())); setRangeType(rangeTypeOf(fct->ncomps()));
} }
......
...@@ -70,7 +70,7 @@ namespace Dune ...@@ -70,7 +70,7 @@ namespace Dune
/// Construct the actual grid using the GridFactory /// Construct the actual grid using the GridFactory
std::unique_ptr<Grid> createGrid () const std::unique_ptr<Grid> createGrid () const
{ {
return factory_->createGrid(); return std::unique_ptr<Grid>(factory_->createGrid());
} }
/// Return the associated GridFactory /// Return the associated GridFactory
......
...@@ -52,7 +52,6 @@ namespace Dune ...@@ -52,7 +52,6 @@ namespace Dune
: factory_(factory) : factory_(factory)
, values_(values) , values_(values)
, comp_(comp) , comp_(comp)
, cache_()
{} {}
void bind (LocalContext const& element) void bind (LocalContext const& element)
...@@ -94,9 +93,9 @@ namespace Dune ...@@ -94,9 +93,9 @@ namespace Dune
Factory const& factory_; Factory const& factory_;
std::vector<Field> const& values_; std::vector<Field> const& values_;
unsigned int comp_; unsigned int comp_;
LFECache cache_;
// Local Finite-Element // Local Finite-Element
LFECache cache_;
LFE const* lfe_ = nullptr; LFE const* lfe_ = nullptr;
// cache of local values // cache of local values
......
...@@ -94,7 +94,7 @@ std::string to_string (Vtk::DataTypes type) ...@@ -94,7 +94,7 @@ std::string to_string (Vtk::DataTypes type)
} }
} }
#if ! DUNE_VERSION_LT(DUNE_GRID,2,7)
Vtk::DataTypes dataTypeOf (Dune::VTK::Precision p) Vtk::DataTypes dataTypeOf (Dune::VTK::Precision p)
{ {
switch (p) { switch (p) {
...@@ -108,7 +108,7 @@ Vtk::DataTypes dataTypeOf (Dune::VTK::Precision p) ...@@ -108,7 +108,7 @@ Vtk::DataTypes dataTypeOf (Dune::VTK::Precision p)
std::abort(); std::abort();
} }
} }
#endif
Vtk::DataTypes dataTypeOf (std::string s) Vtk::DataTypes dataTypeOf (std::string s)
{ {
......
...@@ -58,10 +58,8 @@ namespace Dune ...@@ -58,10 +58,8 @@ namespace Dune
}; };
std::string to_string (Vtk::DataTypes); std::string to_string (Vtk::DataTypes);
#if ! DUNE_VERSION_LT(DUNE_GRID,2,7)
// Map a dune-grid Precision type to DataTypes // Map a dune-grid Precision type to DataTypes
Vtk::DataTypes dataTypeOf (Dune::VTK::Precision); Vtk::DataTypes dataTypeOf (Dune::VTK::Precision);
#endif
// Map a string to DataTypes // Map a string to DataTypes
Vtk::DataTypes dataTypeOf (std::string); Vtk::DataTypes dataTypeOf (std::string);
...@@ -234,11 +232,7 @@ namespace Dune ...@@ -234,11 +232,7 @@ namespace Dune
// Construct from dune-grid FieldInfo // Construct from dune-grid FieldInfo
FieldInfo (Dune::VTK::FieldInfo info) FieldInfo (Dune::VTK::FieldInfo info)
#if DUNE_VERSION_LT(DUNE_GRID,2,7)
: FieldInfo(info.name(), info.size(), rangeTypeOf(info.type()))
#else
: FieldInfo(info.name(), info.size(), rangeTypeOf(info.type()), dataTypeOf(info.precision())) : FieldInfo(info.name(), info.size(), rangeTypeOf(info.type()), dataTypeOf(info.precision()))
#endif
{} {}
/// The name of the data field /// The name of the data field
......
...@@ -52,11 +52,7 @@ template <class GridView> ...@@ -52,11 +52,7 @@ template <class GridView>
void write (std::string prefix, GridView const& gridView) void write (std::string prefix, GridView const& gridView)
{ {
std::cout << prefix << "..." << std::endl; std::cout << prefix << "..." << std::endl;
#if ! DUNE_VERSION_NEWER(DUNE_FUNCTIONS, 2, 6)
using namespace BasisBuilder;
#else
using namespace BasisFactory; using namespace BasisFactory;
#endif
auto basis = makeBasis(gridView, lagrange<1>()); auto basis = makeBasis(gridView, lagrange<1>());
FieldVector<double,GridView::dimensionworld> c; FieldVector<double,GridView::dimensionworld> c;
......
...@@ -40,11 +40,7 @@ static TestCases test_cases = { ...@@ -40,11 +40,7 @@ static TestCases test_cases = {
template <class GridView> template <class GridView>
void write (std::string prefix, GridView const& gridView) void write (std::string prefix, GridView const& gridView)
{ {
#if DUNE_VERSION_LT(DUNE_FUNCTIONS, 2, 6)
using namespace BasisBuilder;
#else
using namespace BasisFactory; using namespace BasisFactory;
#endif
auto basis = makeBasis(gridView, lagrange<1>()); auto basis = makeBasis(gridView, lagrange<1>());
FieldVector<double,GridView::dimensionworld> c; FieldVector<double,GridView::dimensionworld> c;
......
Supports Markdown
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