]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove our deprecated netcdf bindings 10387/head
authorDavid Wells <drwells@email.unc.edu>
Wed, 27 May 2020 15:10:39 +0000 (11:10 -0400)
committerDavid Wells <drwells@email.unc.edu>
Thu, 28 May 2020 13:51:14 +0000 (09:51 -0400)
15 files changed:
cmake/configure/configure_netcdf.cmake [deleted file]
cmake/modules/FindNETCDF.cmake [deleted file]
doc/doxygen/options.dox.in
doc/news/changes/incompatibilities/20200527DavidWells-2 [new file with mode: 0644]
doc/readme.html
doc/users/cmake_dealii.html
doc/users/cmake_user.html
doc/users/config.sample
include/deal.II/base/config.h.in
include/deal.II/base/exceptions.h
include/deal.II/grid/grid_in.h
source/grid/grid_in.cc
tests/grid/grid_in.cc
tests/grid/grid_in_3d.cc
tests/run_testsuite.cmake

diff --git a/cmake/configure/configure_netcdf.cmake b/cmake/configure/configure_netcdf.cmake
deleted file mode 100644 (file)
index 2f89115..0000000
+++ /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 (file)
index 6e98eb9..0000000
+++ /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
-  )
index e34c08e1ac03bc44a7f4e95776da111dad062f87..f68e45112c8c28ec31e3c52e3b54abd701e6b78a 100644 (file)
@@ -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 (file)
index 0000000..3a8b435
--- /dev/null
@@ -0,0 +1,4 @@
+Removed: The deprecated bindings to the legacy NETCDF C++ library have been
+removed.
+<br>
+(David Wells, 2020/05/27)
index b37052d0e784337c1fff054987c174c09984f7b5..9ee9842e492e874a2c67fbb0766ea9fed7d89609 100644 (file)
                 </p>
             </dd>
 
-            <dt><a name="netcdf"></a><a href="http://www.unidata.ucar.edu/software/netcdf/" target="_top">NetCDF</a></dt>
-            <dd>
-                <p>
-                <a href="http://www.unidata.ucar.edu/software/netcdf/" target="_top">NetCDF</a> is a library that provides services for reading and writing mesh data (and many other things). <acronym>deal.II</acronym> can use it to read meshes via one
-                of the functions of the <code>GridIn</code> class.
-                <a href="http://www.unidata.ucar.edu/software/netcdf/" target="_top">NetCDF</a> should be readily packaged by most Linux distributions. To use a self compiled version, pass
-                <code>-DNETCDF_DIR=/path/to/netcdf</code> to <code>cmake</code>.
-                <em>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.</em>
-                </p>
-            </dd>
-
             <dt>
        <a name="opencascade"></a>
        <a href="http://www.opencascade.org/">OpenCASCADE</a>
index 11088c15b099bc5354460721e66ffb3703c911ee..63bd88e76343dc08b9aeba82d038611ffddb6e1e 100644 (file)
@@ -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
index da78db4d29a48d9a37c19ad05d85d5b33b90e097..ef0fa4966ed76c1bc2c0e8df31e3fc029793f441 100644 (file)
@@ -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
index b1eddd30910aa9d10418590a9c4c7933eb89ee7b..c7f66fb9340a4c87db1daef6230b9b8202644b5c 100644 (file)
 #
 
 
-#
-# 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:
 #
index bb96f7fe2f1e41a8fe89133662ce815ac99fdcad..39446a918f28d87e977d3295f130af3f8e9783b7 100644 (file)
@@ -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
index 4f246a3c1ad549845ead0d483dd298e8e9a2fb68..cdf824d8ad8d0edc83d59fe96aa00cb3521a0ad1 100644 (file)
@@ -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.
    */
index c14680b022a0519fccff844a058c051370056e58..8acf05df8a36ef0da3c295968a4bd7563b77a6a7 100644 (file)
@@ -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 <tt>TAU grid format</tt>.
-   *
-   * 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.
index e4f5d56a006005b199c0cd82e5fcf2daf13b6763..f47c7efe106b68f333fb5b0229e6a1860dc332ed 100644 (file)
 #include <functional>
 #include <map>
 
-
-#ifdef DEAL_II_WITH_NETCDF
-#  include <netcdfcpp.h>
-#endif
-
 #ifdef DEAL_II_WITH_ASSIMP
 #  include <assimp/Importer.hpp>  // C++ importer interface
 #  include <assimp/postprocess.h> // Post processing flags
@@ -2044,470 +2039,6 @@ GridIn<dim, spacedim>::read_msh(std::istream &in)
 }
 
 
-template <>
-void
-GridIn<1>::read_netcdf(const std::string &)
-{
-  AssertThrow(false, ExcImpossibleInDim(1));
-}
-
-template <>
-void
-GridIn<1, 2>::read_netcdf(const std::string &)
-{
-  AssertThrow(false, ExcImpossibleInDim(1));
-}
-
-
-template <>
-void
-GridIn<1, 3>::read_netcdf(const std::string &)
-{
-  AssertThrow(false, ExcImpossibleInDim(1));
-}
-
-
-template <>
-void
-GridIn<2, 3>::read_netcdf(const std::string &)
-{
-  Assert(false, ExcNotImplemented());
-}
-
-template <>
-void
-GridIn<2>::read_netcdf(const std::string &filename)
-{
-#ifndef DEAL_II_WITH_NETCDF
-  (void)filename;
-  AssertThrow(false, ExcNeedsNetCDF());
-#else
-  const unsigned int dim      = 2;
-  const unsigned int spacedim = 2;
-  Assert(tria != nullptr, ExcNoTriangulationSelected());
-  // this function assumes the TAU
-  // grid format.
-  //
-  // This format stores 2d grids as
-  // 3d grids. In particular, a 2d
-  // grid of n_cells quadrilaterals
-  // in the y=0 plane is duplicated
-  // to y=1 to build n_cells
-  // hexaeders.  The surface
-  // quadrilaterals of this 3d grid
-  // are marked with boundary
-  // marker. In the following we read
-  // in all data required, find the
-  // boundary marker associated with
-  // the plane y=0, and extract the
-  // corresponding 2d data to build a
-  // Triangulation<2>.
-
-  // In the following, we assume that
-  // the 2d grid lies in the x-z
-  // plane (y=0). I.e. we choose:
-  // point[coord]=0, with coord=1
-  const unsigned int coord = 1;
-  // Also x-y-z (0-1-2) point
-  // coordinates will be transformed
-  // to x-y (x2d-y2d) coordinates.
-  // With coord=1 as above, we have
-  // x-z (0-2) -> (x2d-y2d)
-  const unsigned int x2d = 0;
-  const unsigned int y2d = 2;
-  // For the case, the 2d grid lies
-  // in x-y or y-z plane instead, the
-  // following code must be extended
-  // to find the right value for
-  // coord, and setting x2d and y2d
-  // accordingly.
-
-  // First, open the file
-  NcFile nc(filename.c_str());
-  AssertThrow(nc.is_valid(), ExcIO());
-
-  // then read n_cells
-  NcDim *elements_dim = nc.get_dim("no_of_elements");
-  AssertThrow(elements_dim->is_valid(), ExcIO());
-  const unsigned int n_cells = elements_dim->size();
-
-  // then we read
-  //   int marker(no_of_markers)
-  NcDim *marker_dim = nc.get_dim("no_of_markers");
-  AssertThrow(marker_dim->is_valid(), ExcIO());
-  const unsigned int n_markers = marker_dim->size();
-
-  NcVar *marker_var = nc.get_var("marker");
-  AssertThrow(marker_var->is_valid(), ExcIO());
-  AssertThrow(marker_var->num_dims() == 1, ExcIO());
-  AssertThrow(static_cast<unsigned int>(marker_var->get_dim(0)->size()) ==
-                n_markers,
-              ExcIO());
-
-  std::vector<int> marker(n_markers);
-  // use &* to convert
-  // vector<int>::iterator to int *
-  marker_var->get(&*marker.begin(), n_markers);
-
-  // next we read
-  // int boundarymarker_of_surfaces(
-  //   no_of_surfaceelements)
-  NcDim *bquads_dim = nc.get_dim("no_of_surfacequadrilaterals");
-  AssertThrow(bquads_dim->is_valid(), ExcIO());
-  const unsigned int n_bquads = bquads_dim->size();
-
-  NcVar *bmarker_var = nc.get_var("boundarymarker_of_surfaces");
-  AssertThrow(bmarker_var->is_valid(), ExcIO());
-  AssertThrow(bmarker_var->num_dims() == 1, ExcIO());
-  AssertThrow(static_cast<unsigned int>(bmarker_var->get_dim(0)->size()) ==
-                n_bquads,
-              ExcIO());
-
-  std::vector<int> bmarker(n_bquads);
-  bmarker_var->get(&*bmarker.begin(), n_bquads);
-
-  // for each marker count the
-  // number of boundary quads
-  // which carry this marker
-  std::map<int, unsigned int> n_bquads_per_bmarker;
-  for (unsigned int i = 0; i < n_markers; ++i)
-    {
-      // the markers should all be
-      // different
-      AssertThrow(n_bquads_per_bmarker.find(marker[i]) ==
-                    n_bquads_per_bmarker.end(),
-                  ExcIO());
-
-      n_bquads_per_bmarker[marker[i]] =
-        count(bmarker.begin(), bmarker.end(), marker[i]);
-    }
-  // Note: the n_bquads_per_bmarker
-  // map could be used to find the
-  // right coord by finding the
-  // marker0 such that
-  // a/ n_bquads_per_bmarker[marker0]==n_cells
-  // b/ point[coord]==0,
-  // Condition a/ would hold for at
-  // least two markers, marker0 and
-  // marker1, whereas b/ would hold
-  // for marker0 only. For marker1 we
-  // then had point[coord]=constant
-  // with e.g. constant=1 or -1
-
-  // next we read
-  // int points_of_surfacequadrilaterals(
-  //   no_of_surfacequadrilaterals,
-  //   points_per_surfacequadrilateral)
-  NcDim *quad_vertices_dim = nc.get_dim("points_per_surfacequadrilateral");
-  AssertThrow(quad_vertices_dim->is_valid(), ExcIO());
-  const unsigned int vertices_per_quad = quad_vertices_dim->size();
-  AssertThrow(vertices_per_quad == GeometryInfo<dim>::vertices_per_cell,
-              ExcIO());
-
-  NcVar *vertex_indices_var = nc.get_var("points_of_surfacequadrilaterals");
-  AssertThrow(vertex_indices_var->is_valid(), ExcIO());
-  AssertThrow(vertex_indices_var->num_dims() == 2, ExcIO());
-  AssertThrow(static_cast<unsigned int>(
-                vertex_indices_var->get_dim(0)->size()) == n_bquads,
-              ExcIO());
-  AssertThrow(static_cast<unsigned int>(
-                vertex_indices_var->get_dim(1)->size()) == vertices_per_quad,
-              ExcIO());
-
-  std::vector<int> vertex_indices(n_bquads * vertices_per_quad);
-  vertex_indices_var->get(&*vertex_indices.begin(),
-                          n_bquads,
-                          vertices_per_quad);
-
-  for (const int idx : vertex_indices)
-    AssertThrow(idx >= 0, ExcIO());
-
-  // next we read
-  //   double points_xc(no_of_points)
-  //   double points_yc(no_of_points)
-  //   double points_zc(no_of_points)
-  NcDim *vertices_dim = nc.get_dim("no_of_points");
-  AssertThrow(vertices_dim->is_valid(), ExcIO());
-  const unsigned int n_vertices = vertices_dim->size();
-
-  NcVar *points_xc = nc.get_var("points_xc");
-  NcVar *points_yc = nc.get_var("points_yc");
-  NcVar *points_zc = nc.get_var("points_zc");
-  AssertThrow(points_xc->is_valid(), ExcIO());
-  AssertThrow(points_yc->is_valid(), ExcIO());
-  AssertThrow(points_zc->is_valid(), ExcIO());
-  AssertThrow(points_xc->num_dims() == 1, ExcIO());
-  AssertThrow(points_yc->num_dims() == 1, ExcIO());
-  AssertThrow(points_zc->num_dims() == 1, ExcIO());
-  AssertThrow(points_yc->get_dim(0)->size() == static_cast<int>(n_vertices),
-              ExcIO());
-  AssertThrow(points_zc->get_dim(0)->size() == static_cast<int>(n_vertices),
-              ExcIO());
-  AssertThrow(points_xc->get_dim(0)->size() == static_cast<int>(n_vertices),
-              ExcIO());
-  std::vector<std::vector<double>> point_values(
-    3, std::vector<double>(n_vertices));
-  points_xc->get(point_values[0].data(), n_vertices);
-  points_yc->get(point_values[1].data(), n_vertices);
-  points_zc->get(point_values[2].data(), n_vertices);
-
-  // and fill the vertices
-  std::vector<Point<spacedim>> vertices(n_vertices);
-  for (unsigned int i = 0; i < n_vertices; ++i)
-    {
-      vertices[i](0) = point_values[x2d][i];
-      vertices[i](1) = point_values[y2d][i];
-    }
-
-  // For all boundary quads in the
-  // point[coord]=0 plane add the
-  // bmarker to zero_plane_markers
-  std::map<int, bool> zero_plane_markers;
-  for (unsigned int quad = 0; quad < n_bquads; ++quad)
-    {
-      bool zero_plane = true;
-      for (unsigned int i = 0; i < vertices_per_quad; ++i)
-        if (point_values[coord][vertex_indices[quad * vertices_per_quad + i]] !=
-            0)
-          {
-            zero_plane = false;
-            break;
-          }
-
-      if (zero_plane)
-        zero_plane_markers[bmarker[quad]] = true;
-    }
-  unsigned int sum_of_zero_plane_cells = 0;
-  for (std::map<int, bool>::const_iterator iter = zero_plane_markers.begin();
-       iter != zero_plane_markers.end();
-       ++iter)
-    sum_of_zero_plane_cells += n_bquads_per_bmarker[iter->first];
-  AssertThrow(sum_of_zero_plane_cells == n_cells, ExcIO());
-
-  // fill cells with all quads
-  // associated with
-  // zero_plane_markers
-  std::vector<CellData<dim>> cells(n_cells);
-  for (unsigned int quad = 0, cell = 0; quad < n_bquads; ++quad)
-    {
-      bool zero_plane = false;
-      for (std::map<int, bool>::const_iterator iter =
-             zero_plane_markers.begin();
-           iter != zero_plane_markers.end();
-           ++iter)
-        if (bmarker[quad] == iter->first)
-          {
-            zero_plane = true;
-            break;
-          }
-
-      if (zero_plane)
-        {
-          for (unsigned int i = 0; i < vertices_per_quad; ++i)
-            {
-              Assert(
-                point_values[coord]
-                            [vertex_indices[quad * vertices_per_quad + i]] == 0,
-                ExcNotImplemented());
-              cells[cell].vertices[i] =
-                vertex_indices[quad * vertices_per_quad + i];
-            }
-          ++cell;
-        }
-    }
-
-  SubCellData subcelldata;
-  GridTools::delete_unused_vertices(vertices, cells, subcelldata);
-  GridReordering<dim, spacedim>::reorder_cells(cells);
-  tria->create_triangulation_compatibility(vertices, cells, subcelldata);
-#endif
-}
-
-
-template <>
-void
-GridIn<3>::read_netcdf(const std::string &filename)
-{
-#ifndef DEAL_II_WITH_NETCDF
-  // do something with the function argument
-  // to make sure it at least looks used,
-  // even if it is not
-  (void)filename;
-  AssertThrow(false, ExcNeedsNetCDF());
-#else
-  const unsigned int dim      = 3;
-  const unsigned int spacedim = 3;
-  Assert(tria != nullptr, ExcNoTriangulationSelected());
-  // this function assumes the TAU
-  // grid format.
-
-  // First, open the file
-  NcFile nc(filename.c_str());
-  AssertThrow(nc.is_valid(), ExcIO());
-
-  // then read n_cells
-  NcDim *elements_dim = nc.get_dim("no_of_elements");
-  AssertThrow(elements_dim->is_valid(), ExcIO());
-  const unsigned int n_cells = elements_dim->size();
-  // and n_hexes
-  NcDim *hexes_dim = nc.get_dim("no_of_hexaeders");
-  AssertThrow(hexes_dim->is_valid(), ExcIO());
-  const unsigned int n_hexes = hexes_dim->size();
-  AssertThrow(n_hexes == n_cells,
-              ExcMessage("deal.II can handle purely hexaedral grids, only."));
-
-  // next we read
-  // int points_of_hexaeders(
-  //   no_of_hexaeders,
-  //   points_per_hexaeder)
-  NcDim *hex_vertices_dim = nc.get_dim("points_per_hexaeder");
-  AssertThrow(hex_vertices_dim->is_valid(), ExcIO());
-  const unsigned int vertices_per_hex = hex_vertices_dim->size();
-  AssertThrow(vertices_per_hex == GeometryInfo<dim>::vertices_per_cell,
-              ExcIO());
-
-  NcVar *vertex_indices_var = nc.get_var("points_of_hexaeders");
-  AssertThrow(vertex_indices_var->is_valid(), ExcIO());
-  AssertThrow(vertex_indices_var->num_dims() == 2, ExcIO());
-  AssertThrow(static_cast<unsigned int>(
-                vertex_indices_var->get_dim(0)->size()) == n_cells,
-              ExcIO());
-  AssertThrow(static_cast<unsigned int>(
-                vertex_indices_var->get_dim(1)->size()) == vertices_per_hex,
-              ExcIO());
-
-  std::vector<int> vertex_indices(n_cells * vertices_per_hex);
-  // use &* to convert
-  // vector<int>::iterator to int *
-  vertex_indices_var->get(&*vertex_indices.begin(), n_cells, vertices_per_hex);
-
-  for (const int idx : vertex_indices)
-    AssertThrow(idx >= 0, ExcIO());
-
-  // next we read
-  //   double points_xc(no_of_points)
-  //   double points_yc(no_of_points)
-  //   double points_zc(no_of_points)
-  NcDim *vertices_dim = nc.get_dim("no_of_points");
-  AssertThrow(vertices_dim->is_valid(), ExcIO());
-  const unsigned int n_vertices = vertices_dim->size();
-
-  NcVar *points_xc = nc.get_var("points_xc");
-  NcVar *points_yc = nc.get_var("points_yc");
-  NcVar *points_zc = nc.get_var("points_zc");
-  AssertThrow(points_xc->is_valid(), ExcIO());
-  AssertThrow(points_yc->is_valid(), ExcIO());
-  AssertThrow(points_zc->is_valid(), ExcIO());
-  AssertThrow(points_xc->num_dims() == 1, ExcIO());
-  AssertThrow(points_yc->num_dims() == 1, ExcIO());
-  AssertThrow(points_zc->num_dims() == 1, ExcIO());
-  AssertThrow(points_yc->get_dim(0)->size() == static_cast<int>(n_vertices),
-              ExcIO());
-  AssertThrow(points_zc->get_dim(0)->size() == static_cast<int>(n_vertices),
-              ExcIO());
-  AssertThrow(points_xc->get_dim(0)->size() == static_cast<int>(n_vertices),
-              ExcIO());
-  std::vector<std::vector<double>> point_values(
-    3, std::vector<double>(n_vertices));
-  points_xc->get(point_values[0].data(), n_vertices);
-  points_yc->get(point_values[1].data(), n_vertices);
-  points_zc->get(point_values[2].data(), n_vertices);
-
-  // and fill the vertices
-  std::vector<Point<spacedim>> vertices(n_vertices);
-  for (unsigned int i = 0; i < n_vertices; ++i)
-    {
-      vertices[i](0) = point_values[0][i];
-      vertices[i](1) = point_values[1][i];
-      vertices[i](2) = point_values[2][i];
-    }
-
-  // and cells
-  std::vector<CellData<dim>> cells(n_cells);
-  for (unsigned int cell = 0; cell < n_cells; ++cell)
-    for (unsigned int i = 0; i < vertices_per_hex; ++i)
-      cells[cell].vertices[i] = vertex_indices[cell * vertices_per_hex + i];
-
-  // for setting up the SubCellData
-  // we read the vertex indices of
-  // the boundary quadrilaterals and
-  // their boundary markers
-
-  // first we read
-  // int points_of_surfacequadrilaterals(
-  //   no_of_surfacequadrilaterals,
-  //   points_per_surfacequadrilateral)
-  NcDim *quad_vertices_dim = nc.get_dim("points_per_surfacequadrilateral");
-  AssertThrow(quad_vertices_dim->is_valid(), ExcIO());
-  const unsigned int vertices_per_quad = quad_vertices_dim->size();
-  AssertThrow(vertices_per_quad == GeometryInfo<dim>::vertices_per_face,
-              ExcIO());
-
-  NcVar *bvertex_indices_var = nc.get_var("points_of_surfacequadrilaterals");
-  AssertThrow(bvertex_indices_var->is_valid(), ExcIO());
-  AssertThrow(bvertex_indices_var->num_dims() == 2, ExcIO());
-  const unsigned int n_bquads = bvertex_indices_var->get_dim(0)->size();
-  AssertThrow(static_cast<unsigned int>(
-                bvertex_indices_var->get_dim(1)->size()) ==
-                GeometryInfo<dim>::vertices_per_face,
-              ExcIO());
-
-  std::vector<int> bvertex_indices(n_bquads * vertices_per_quad);
-  bvertex_indices_var->get(&*bvertex_indices.begin(),
-                           n_bquads,
-                           vertices_per_quad);
-
-  // next we read
-  // int boundarymarker_of_surfaces(
-  //   no_of_surfaceelements)
-  NcDim *bquads_dim = nc.get_dim("no_of_surfacequadrilaterals");
-  AssertThrow(bquads_dim->is_valid(), ExcIO());
-  AssertThrow(static_cast<unsigned int>(bquads_dim->size()) == n_bquads,
-              ExcIO());
-
-  NcVar *bmarker_var = nc.get_var("boundarymarker_of_surfaces");
-  AssertThrow(bmarker_var->is_valid(), ExcIO());
-  AssertThrow(bmarker_var->num_dims() == 1, ExcIO());
-  AssertThrow(static_cast<unsigned int>(bmarker_var->get_dim(0)->size()) ==
-                n_bquads,
-              ExcIO());
-
-  std::vector<int> bmarker(n_bquads);
-  bmarker_var->get(&*bmarker.begin(), n_bquads);
-  // we only handle boundary
-  // indicators that fit into an
-  // types::boundary_id. Also, we don't
-  // take numbers::internal_face_boundary_id
-  // as it denotes an internal face
-  for (const int id : bmarker)
-    {
-      Assert(0 <= id && static_cast<types::boundary_id>(id) !=
-                          numbers::internal_face_boundary_id,
-             ExcIO());
-      (void)id;
-    }
-
-  // finally we setup the boundary
-  // information
-  SubCellData subcelldata;
-  subcelldata.boundary_quads.resize(n_bquads);
-  for (unsigned int i = 0; i < n_bquads; ++i)
-    {
-      for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_face; ++v)
-        subcelldata.boundary_quads[i].vertices[v] =
-          bvertex_indices[i * GeometryInfo<dim>::vertices_per_face + v];
-      subcelldata.boundary_quads[i].boundary_id =
-        static_cast<types::boundary_id>(bmarker[i]);
-    }
-
-  GridTools::delete_unused_vertices(vertices, cells, subcelldata);
-  GridReordering<dim, spacedim>::invert_all_cells_of_negative_grid(vertices,
-                                                                   cells);
-  GridReordering<dim, spacedim>::reorder_cells(cells);
-  tria->create_triangulation_compatibility(vertices, cells, subcelldata);
-#endif
-}
-
 
 template <int dim, int spacedim>
 void
@@ -3378,10 +2909,7 @@ GridIn<dim, spacedim>::read(const std::string &filename, Format format)
           format          = parse_format(ext);
         }
     }
-  if (format == netcdf)
-    read_netcdf(filename);
-  else
-    read(in, format);
+  read(in, format);
 }
 
 
@@ -3426,13 +2954,6 @@ GridIn<dim, spacedim>::read(std::istream &in, Format format)
         read_xda(in);
         return;
 
-      case netcdf:
-        Assert(false,
-               ExcMessage("There is no read_netcdf(istream &) function. "
-                          "Use the read_netcdf(string &filename) "
-                          "functions, instead."));
-        return;
-
       case tecplot:
         read_tecplot(in);
         return;
@@ -3475,8 +2996,6 @@ GridIn<dim, spacedim>::default_suffix(const Format format)
                        // UCD.
       case xda:
         return ".xda";
-      case netcdf:
-        return ".nc";
       case tecplot:
         return ".dat";
       default:
@@ -3516,12 +3035,6 @@ GridIn<dim, spacedim>::parse_format(const std::string &format_name)
   if (format_name == "xda")
     return xda;
 
-  if (format_name == "netcdf")
-    return netcdf;
-
-  if (format_name == "nc")
-    return netcdf;
-
   if (format_name == "tecplot")
     return tecplot;
 
@@ -3551,7 +3064,7 @@ template <int dim, int spacedim>
 std::string
 GridIn<dim, spacedim>::get_format_names()
 {
-  return "dbmesh|msh|unv|vtk|vtu|ucd|abaqus|xda|netcdf|tecplot|assimp";
+  return "dbmesh|msh|unv|vtk|vtu|ucd|abaqus|xda|tecplot|assimp";
 }
 
 
index e371c9c7e595a7b849dabf8ee18d8e7d8bc973c4..bfa2cf9f05a2457bfaac4a4bda8c16d249999c85 100644 (file)
@@ -147,8 +147,6 @@ main()
 
   test1<2>();
   test2<2>();
-  // test3 needs NetCDF
-  //    test3<2> ();
 
   filename_resolution();
 }
index bbe081e9af2302215a826b9880bc72347262d0e8..1bf2058dfe3682350fb7212a68bd191cc3787fad 100644 (file)
@@ -95,7 +95,4 @@ main()
   test(SOURCE_DIR "/grid_in_3d/evil_2.in");
   test(SOURCE_DIR "/grid_in_3d/evil_3.in");
   test(SOURCE_DIR "/grid_in_3d/evil_4.in");
-
-  // test1 needs NetCDF
-  //    test1 ();
 }
index 45ca1211af83b527d4cc52764fd946207565180f..1969527473b5088eaf75998d41bdc1302a231621 100644 (file)
@@ -273,7 +273,7 @@ FOREACH(_var ${_variables})
   IF( _var MATCHES "^(TEST|DEAL_II|ALLOW|WITH|FORCE|COMPONENT)_" OR
       _var MATCHES "^(DOCUMENTATION|EXAMPLES)" OR
       _var MATCHES "^(ADOLC|ARPACK|BOOST|OPENCASCADE|MUPARSER|HDF5|METIS|MPI)_" OR
-      _var MATCHES "^(GINKGO|NETCDF|P4EST|PETSC|SCALAPACK|SLEPC|THREADS|TBB|TRILINOS)_" OR
+      _var MATCHES "^(GINKGO|P4EST|PETSC|SCALAPACK|SLEPC|THREADS|TBB|TRILINOS)_" OR
       _var MATCHES "^(UMFPACK|ZLIB|LAPACK|MUPARSER|CUDA)_" OR
       _var MATCHES "^(CMAKE|DEAL_II)_(C|CXX|Fortran|BUILD)_(COMPILER|FLAGS)" OR
       _var MATCHES "^CMAKE_BUILD_TYPE$" OR

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.