From 31d6da9c6be60a159a537f6ac30a3544ebdaa00e Mon Sep 17 00:00:00 2001
From: David Wells
Date: Wed, 27 May 2020 11:10:39 -0400
Subject: [PATCH] Remove our deprecated netcdf bindings
---
cmake/configure/configure_netcdf.cmake | 20 -
cmake/modules/FindNETCDF.cmake | 54 --
doc/doxygen/options.dox.in | 1 -
.../incompatibilities/20200527DavidWells-2 | 4 +
doc/readme.html | 11 -
doc/users/cmake_dealii.html | 1 -
doc/users/cmake_user.html | 1 -
doc/users/config.sample | 20 -
include/deal.II/base/config.h.in | 1 -
include/deal.II/base/exceptions.h | 11 -
include/deal.II/grid/grid_in.h | 15 +-
source/grid/grid_in.cc | 491 +-----------------
tests/grid/grid_in.cc | 2 -
tests/grid/grid_in_3d.cc | 3 -
tests/run_testsuite.cmake | 2 +-
15 files changed, 8 insertions(+), 629 deletions(-)
delete mode 100644 cmake/configure/configure_netcdf.cmake
delete mode 100644 cmake/modules/FindNETCDF.cmake
create mode 100644 doc/news/changes/incompatibilities/20200527DavidWells-2
diff --git a/cmake/configure/configure_netcdf.cmake b/cmake/configure/configure_netcdf.cmake
deleted file mode 100644
index 2f89115d97..0000000000
--- a/cmake/configure/configure_netcdf.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
-## ---------------------------------------------------------------------
-##
-## Copyright (C) 2012 - 2014 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.
-##
-## ---------------------------------------------------------------------
-
-#
-# Configuration for the netcdf library:
-#
-
-CONFIGURE_FEATURE(NETCDF)
diff --git a/cmake/modules/FindNETCDF.cmake b/cmake/modules/FindNETCDF.cmake
deleted file mode 100644
index 6e98eb92f9..0000000000
--- a/cmake/modules/FindNETCDF.cmake
+++ /dev/null
@@ -1,54 +0,0 @@
-## ---------------------------------------------------------------------
-##
-## Copyright (C) 2012 - 2014 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.
-##
-## ---------------------------------------------------------------------
-
-#
-# Try to find the NETCDF C and C++ libraries
-#
-# This module exports
-#
-# NETCDF_LIBRARIES
-# NETCDF_INCLUDE_DIRS
-#
-
-SET(NETCDF_DIR "" CACHE PATH "An optional hint to a NETCDF installation")
-SET_IF_EMPTY(NETCDF_DIR "$ENV{NETCDF_DIR}")
-
-DEAL_II_FIND_PATH(NETCDF_INCLUDE_DIR netcdfcpp.h
- HINTS ${NETCDF_DIR}
- PATH_SUFFIXES netcdf include
- )
-
-#
-# TODO:
-#
-# - netcdf might externally depend on hdf5. Check and fix this.
-# - separate C++ and C library search
-#
-
-DEAL_II_FIND_LIBRARY(NETCDF_CPLUSPLUS_LIBRARY NAMES netcdf_c++ netcdf_cpp
- HINTS ${NETCDF_DIR}
- PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
- )
-
-DEAL_II_FIND_LIBRARY(NETCDF_C_LIBRARY NAMES netcdf
- HINTS ${NETCDF_DIR}
- PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
- )
-
-DEAL_II_PACKAGE_HANDLE(NETCDF
- LIBRARIES REQUIRED NETCDF_CPLUSPLUS_LIBRARY NETCDF_C_LIBRARY
- INCLUDE_DIRS REQUIRED NETCDF_INCLUDE_DIR
- CLEAR NETCDF_CPLUSPLUS_LIBRARY NETCDF_C_LIBRARY NETCDF_INCLUDE_DIR
- )
diff --git a/doc/doxygen/options.dox.in b/doc/doxygen/options.dox.in
index e34c08e1ac..f68e45112c 100644
--- a/doc/doxygen/options.dox.in
+++ b/doc/doxygen/options.dox.in
@@ -207,7 +207,6 @@ PREDEFINED = DOXYGEN=1 \
DEAL_II_MPI_VERSION_MAJOR=3 \
DEAL_II_MPI_VERSION_MINOR=0 \
DEAL_II_WITH_MUPARSER=1 \
- DEAL_II_WITH_NETCDF=1 \
DEAL_II_WITH_OPENCASCADE=1 \
DEAL_II_WITH_P4EST=1 \
DEAL_II_P4EST_VERSION_MAJOR=2 \
diff --git a/doc/news/changes/incompatibilities/20200527DavidWells-2 b/doc/news/changes/incompatibilities/20200527DavidWells-2
new file mode 100644
index 0000000000..3a8b4352b2
--- /dev/null
+++ b/doc/news/changes/incompatibilities/20200527DavidWells-2
@@ -0,0 +1,4 @@
+Removed: The deprecated bindings to the legacy NETCDF C++ library have been
+removed.
+
+(David Wells, 2020/05/27)
diff --git a/doc/readme.html b/doc/readme.html
index b37052d0e7..9ee9842e49 100644
--- a/doc/readme.html
+++ b/doc/readme.html
@@ -526,17 +526,6 @@
- NetCDF
-
-
- NetCDF is a library that provides services for reading and writing mesh data (and many other things). deal.II can use it to read meshes via one
- of the functions of the GridIn
class.
- NetCDF should be readily packaged by most Linux distributions. To use a self compiled version, pass
- -DNETCDF_DIR=/path/to/netcdf
to cmake
.
- The deal.II NetCDF bindings are only compatible with an obsolete version of NetCDF and will be removed in a future release of the library unless newer bindings are contributed.
-
-
-
OpenCASCADE
diff --git a/doc/users/cmake_dealii.html b/doc/users/cmake_dealii.html
index 11088c15b0..63bd88e763 100644
--- a/doc/users/cmake_dealii.html
+++ b/doc/users/cmake_dealii.html
@@ -466,7 +466,6 @@ DEAL_II_WITH_LAPACK
DEAL_II_WITH_METIS
DEAL_II_WITH_MPI
DEAL_II_WITH_MUPARSER
-DEAL_II_WITH_NETCDF
DEAL_II_WITH_OPENCASCADE
DEAL_II_WITH_P4EST
DEAL_II_WITH_PETSC
diff --git a/doc/users/cmake_user.html b/doc/users/cmake_user.html
index da78db4d29..ef0fa4966e 100644
--- a/doc/users/cmake_user.html
+++ b/doc/users/cmake_user.html
@@ -856,7 +856,6 @@ DEAL_II_WITH_LAPACK
DEAL_II_WITH_METIS
DEAL_II_WITH_MPI
DEAL_II_WITH_MUPARSER
-DEAL_II_WITH_NETCDF
DEAL_II_WITH_OPENCASCADE
DEAL_II_WITH_P4EST
DEAL_II_WITH_PETSC
diff --git a/doc/users/config.sample b/doc/users/config.sample
index b1eddd3091..c7f66fb934 100644
--- a/doc/users/config.sample
+++ b/doc/users/config.sample
@@ -355,26 +355,6 @@
#
-#
-# Netcdf:
-#
-# SET(DEAL_II_WITH_NETCDF ON CACHE BOOL
-# "Build deal.II with support for netcdf"
-# )
-#
-# Automatic detection:
-#
-# Specify a hint with CMAKE_PREFIX_PATH or by setting
-# SET(NETCDF_DIR "/.../..." CACHE PATH "")
-#
-# Manual setup:
-#
-# SET(NETCDF_FOUND TRUE CACHE BOOL "")
-# SET(NETCDF_LIBRARIES "library;and;semicolon;separated;list;of;link;interface" CACHE STRING "")
-# SET(NETCDF_INCLUDE_DIRS "semicolon;separated;list;of;include;dirs" CACHE STRING "")
-#
-
-
#
# P4EST:
#
diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in
index bb96f7fe2f..39446a918f 100644
--- a/include/deal.II/base/config.h.in
+++ b/include/deal.II/base/config.h.in
@@ -51,7 +51,6 @@
#cmakedefine DEAL_II_WITH_METIS
#cmakedefine DEAL_II_WITH_MPI
#cmakedefine DEAL_II_WITH_MUPARSER
-#cmakedefine DEAL_II_WITH_NETCDF
#cmakedefine DEAL_II_WITH_OPENCASCADE
#cmakedefine DEAL_II_WITH_P4EST
#cmakedefine DEAL_II_WITH_PETSC
diff --git a/include/deal.II/base/exceptions.h b/include/deal.II/base/exceptions.h
index 4f246a3c1a..cdf824d8ad 100644
--- a/include/deal.II/base/exceptions.h
+++ b/include/deal.II/base/exceptions.h
@@ -1094,17 +1094,6 @@ namespace StandardExceptions
"You are attempting to use functionality that is only available "
"if deal.II was configured to use MPI.");
- /**
- * This function requires support for the NetCDF library.
- *
- * @deprecated Support for NetCDF in deal.II is deprecated.
- */
- DeclExceptionMsg(
- ExcNeedsNetCDF,
- "You are attempting to use functionality that is only available "
- "if deal.II was configured to use NetCDF, but cmake did not "
- "find a valid NetCDF library.");
-
/**
* This function requires support for the FunctionParser library.
*/
diff --git a/include/deal.II/grid/grid_in.h b/include/deal.II/grid/grid_in.h
index c14680b022..8acf05df8a 100644
--- a/include/deal.II/grid/grid_in.h
+++ b/include/deal.II/grid/grid_in.h
@@ -40,7 +40,7 @@ struct CellData;
/**
* This class implements an input mechanism for grid data. It allows to read a
* grid structure into a triangulation object. At present, UCD (unstructured
- * cell data), DB Mesh, XDA, %Gmsh, Tecplot, NetCDF, UNV, VTK, ASSIMP, and Cubit
+ * cell data), DB Mesh, XDA, %Gmsh, Tecplot, UNV, VTK, ASSIMP, and Cubit
* are supported as input format for grid data. Any numerical data other than
* geometric (vertex locations) and topological (how vertices form cells,
* faces, and edges) information is ignored, but the readers for the various
@@ -327,8 +327,6 @@ public:
xda,
/// Use read_msh()
msh,
- /// Use read_netcdf()
- netcdf,
/// Use read_tecplot()
tecplot,
/// Use read_vtk()
@@ -516,17 +514,6 @@ public:
void
read_msh(std::istream &in);
- /**
- * Read grid data from a NetCDF file. The only data format currently
- * supported is the TAU grid format.
- *
- * This function requires the library to be linked with the NetCDF library.
- *
- * @deprecated Support for NetCDF in deal.II is deprecated.
- */
- DEAL_II_DEPRECATED void
- read_netcdf(const std::string &filename);
-
/**
* Read grid data from a file containing tecplot ASCII data. This also works
* in the absence of any tecplot installation.
diff --git a/source/grid/grid_in.cc b/source/grid/grid_in.cc
index e4f5d56a00..f47c7efe10 100644
--- a/source/grid/grid_in.cc
+++ b/source/grid/grid_in.cc
@@ -35,11 +35,6 @@
#include
#include