--- /dev/null
+## ---------------------------------------------------------------------
+##
+## Copyright (C) 2017 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 at
+## the top level of the deal.II distribution.
+##
+## ---------------------------------------------------------------------
+
+#
+# Configuration for the gmsh executable:
+#
+
+CONFIGURE_FEATURE(GMSH)
OR _arg MATCHES "^(|BUNDLED_|USER_)INCLUDE_DIRS$"
OR _arg MATCHES "^(|USER_)DEFINITIONS(|_DEBUG|_RELEASE)$"
OR _arg MATCHES "^CXX_FLAGS(|_DEBUG|_RELEASE)"
- OR _arg MATCHES "^LINKER_FLAGS(|_DEBUG|_RELEASE)")
+ OR _arg MATCHES "^LINKER_FLAGS(|_DEBUG|_RELEASE)"
+ OR _arg MATCHES "^EXECUTABLE(|_DEBUG|_RELEASE)")
IF(_fine)
IF(_variable MATCHES "^CXX_FLAGS(|_DEBUG|_RELEASE)"
--- /dev/null
+## ---------------------------------------------------------------------
+##
+## Copyright (C) 2017 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 at
+## the top level of the deal.II distribution.
+##
+## ---------------------------------------------------------------------
+
+#
+# Try to find the GMSH library
+#
+# This module exports
+#
+# GMSH_EXECUTABLE
+#
+
+SET(GMSH_DIR "" CACHE PATH "An optional hint to a GMSH installation containing the gmsh executable")
+SET_IF_EMPTY(GMSH_DIR "$ENV{GMSH_DIR}")
+
+DEAL_II_FIND_FILE(GMSH_EXE gmsh${CMAKE_EXECUTABLE_SUFFIX}
+ HINTS ${GMSH_DIR}
+ PATH_SUFFIXES bin
+ )
+
+DEAL_II_PACKAGE_HANDLE(GMSH
+ EXECUTABLE REQUIRED GMSH_EXE
+ CLEAR
+ GMSH_EXE
+ )
#cmakedefine DEAL_II_WITH_CUDA
#cmakedefine DEAL_II_WITH_CXX14
#cmakedefine DEAL_II_WITH_GSL
+#cmakedefine DEAL_II_WITH_GMSH
#cmakedefine DEAL_II_WITH_HDF5
#cmakedefine DEAL_II_WITH_LAPACK
#cmakedefine DEAL_II_WITH_METIS
>= \
(major)*10000 + (minor)*100 + (subminor))
+
+/*
+ * gmsh:
+ */
+#ifdef DEAL_II_WITH_GMSH
+# define GMSH_EXECUTABLE @GMSH_EXECUTABLE@
+#endif
+
/*
* p4est:
*/
--- /dev/null
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
+INCLUDE(../setup_testsubproject.cmake)
+PROJECT(testsuite CXX)
+IF(DEAL_II_WITH_GMSH)
+ DEAL_II_PICKUP_TESTS()
+ENDIF()
--- /dev/null
+//-----------------------------------------------------------
+//
+// Copyright (C) 2014 - 2017 by the deal.II authors
+//
+// This file is subject to LGPL and may not be distributed
+// without copyright and license information. Please refer
+// to the file deal.II/doc/license.html for the text and
+// further information on this license.
+//
+//-----------------------------------------------------------
+
+// Read a file in iges format, and write it out again in the same
+// format.
+
+#include "../tests.h"
+
+#define STRINGIFY(x) #x
+#define TOSTRING(x) STRINGIFY(x)
+
+int main ()
+{
+ initlog();
+ std::ofstream geo("file.geo");
+
+ geo << "Lx = 25.0;" << std::endl
+ << "Ly = 1.0;" << std::endl
+ << "Point(1) = {0, 0, 0, 1};" << std::endl
+ << "Point(2) = {Lx, 0, 0, 1};" << std::endl
+ << "Point(3) = {Lx, Ly, 0, 1};" << std::endl
+ << "Point(4) = {0, Ly, 0, 1};" << std::endl
+ << "Line(1) = {1, 2};" << std::endl
+ << "Line(2) = {2, 3};" << std::endl
+ << "Line(3) = {3, 4};" << std::endl
+ << "Line(4) = {4, 1};" << std::endl
+ << "Line Loop(5) = {3, 4, 1, 2};" << std::endl
+ << "Plane Surface(0) = {5};" << std::endl
+ << "Transfinite Surface{0} = {5};" << std::endl
+ << "Recombine Surface {0};" << std::endl;
+
+ geo.close();
+
+ std::system(TOSTRING(GMSH_EXECUTABLE) " -2 file.geo 1>file.log 2>file_warn.log");
+
+ cat_file("file.msh");
+
+ return 0;
+}
--- /dev/null
+
+$MeshFormat
+2.2 0 8
+$EndMeshFormat
+$Nodes
+22
+1 0 0 0
+2 25 0 0
+3 25 1 0
+4 0 1 0
+5 2.499999999990396 0 0
+6 4.999999999978534 0 0
+7 7.499999999965566 0 0
+8 9.999999999960014 0 0
+9 12.49999999995592 0 0
+10 14.99999999995182 0 0
+11 17.49999999995897 0 0
+12 19.99999999997264 0 0
+13 22.49999999998631 0 0
+14 22.50000000001776 1 0
+15 20.00000000003553 1 0
+16 17.50000000005329 1 0
+17 15.00000000006453 1 0
+18 12.50000000006454 1 0
+19 10.00000000006455 1 0
+20 7.500000000053301 1 0
+21 5.000000000035541 1 0
+22 2.500000000017781 1 0
+$EndNodes
+$Elements
+36
+1 15 2 0 1 1
+2 15 2 0 2 2
+3 15 2 0 3 3
+4 15 2 0 4 4
+5 1 2 0 1 1 5
+6 1 2 0 1 5 6
+7 1 2 0 1 6 7
+8 1 2 0 1 7 8
+9 1 2 0 1 8 9
+10 1 2 0 1 9 10
+11 1 2 0 1 10 11
+12 1 2 0 1 11 12
+13 1 2 0 1 12 13
+14 1 2 0 1 13 2
+15 1 2 0 2 2 3
+16 1 2 0 3 3 14
+17 1 2 0 3 14 15
+18 1 2 0 3 15 16
+19 1 2 0 3 16 17
+20 1 2 0 3 17 18
+21 1 2 0 3 18 19
+22 1 2 0 3 19 20
+23 1 2 0 3 20 21
+24 1 2 0 3 21 22
+25 1 2 0 3 22 4
+26 1 2 0 4 4 1
+27 3 2 0 0 3 14 13 2
+28 3 2 0 0 14 15 12 13
+29 3 2 0 0 15 16 11 12
+30 3 2 0 0 16 17 10 11
+31 3 2 0 0 17 18 9 10
+32 3 2 0 0 18 19 8 9
+33 3 2 0 0 19 20 7 8
+34 3 2 0 0 20 21 6 7
+35 3 2 0 0 21 22 5 6
+36 3 2 0 0 22 4 1 5
+$EndElements
+