From 724f8b8f18500c5660dd0ff0118348a80a0f7a7f Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Mon, 22 Jun 2020 19:19:56 +0200 Subject: [PATCH] Add DEAL_II_WITH_TET_MESH_SUPPORT flag --- cmake/setup_cached_variables.cmake | 6 ++++ include/deal.II/base/config.h.in | 1 + tests/tet/CMakeLists.txt | 4 +++ tests/tet/dummy.cc | 32 ++++++++++++++++++++++ tests/tet/dummy.with_tet_support=on.output | 2 ++ 5 files changed, 45 insertions(+) create mode 100644 tests/tet/CMakeLists.txt create mode 100644 tests/tet/dummy.cc create mode 100644 tests/tet/dummy.with_tet_support=on.output diff --git a/cmake/setup_cached_variables.cmake b/cmake/setup_cached_variables.cmake index d8e6ecc33d..b1bb985043 100644 --- a/cmake/setup_cached_variables.cmake +++ b/cmake/setup_cached_variables.cmake @@ -372,6 +372,12 @@ OPTION(DEAL_II_WITH_64BIT_INDICES ) LIST(APPEND DEAL_II_FEATURES 64BIT_INDICES) +OPTION(DEAL_II_WITH_TET_SUPPORT + "If set to ON, triangulations with triangle and tetrahedron cells are supported in addition to quadrilateral- and hexahedra-only triangulations." + OFF + ) +LIST(APPEND DEAL_II_FEATURES TET_SUPPORT) + OPTION(DEAL_II_WITH_COMPLEX_VALUES "If set to OFF, the classes that take a number type are not explicitly instantiated for std::complex and std::complex. This effectively disables the support for computing with complex values. If PETSc is built with complex scalar type, this option must be ON." ON diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index c1f1c96bd8..db6b33f397 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -58,6 +58,7 @@ #cmakedefine DEAL_II_WITH_SUNDIALS #cmakedefine DEAL_II_WITH_SYMENGINE #cmakedefine DEAL_II_WITH_TASKFLOW +#cmakedefine DEAL_II_WITH_TET_SUPPORT #cmakedefine DEAL_II_WITH_TBB #cmakedefine DEAL_II_WITH_TRILINOS #cmakedefine DEAL_II_WITH_UMFPACK diff --git a/tests/tet/CMakeLists.txt b/tests/tet/CMakeLists.txt new file mode 100644 index 0000000000..d33eafa20b --- /dev/null +++ b/tests/tet/CMakeLists.txt @@ -0,0 +1,4 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12) +INCLUDE(../setup_testsubproject.cmake) +PROJECT(testsuite CXX) +DEAL_II_PICKUP_TESTS() diff --git a/tests/tet/dummy.cc b/tests/tet/dummy.cc new file mode 100644 index 0000000000..8c0ca11ce3 --- /dev/null +++ b/tests/tet/dummy.cc @@ -0,0 +1,32 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2020 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE.md at +// the top level directory of deal.II. +// +// --------------------------------------------------------------------- + + + +// Dummy TET test. + +#include "../tests.h" + +int +main() +{ + initlog(); + +#ifdef DEAL_II_WITH_TET_SUPPORT + deallog << "deal.II is configured with TET support." << std::endl; +#else + deallog << "deal.II is configured without TET support." << std::endl; +#endif +} diff --git a/tests/tet/dummy.with_tet_support=on.output b/tests/tet/dummy.with_tet_support=on.output new file mode 100644 index 0000000000..b8b2bc8492 --- /dev/null +++ b/tests/tet/dummy.with_tet_support=on.output @@ -0,0 +1,2 @@ + +DEAL::deal.II is configured with TET support. -- 2.39.5