From 50ae76df600fc11e3f87de1e47975a6ff8de44d1 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 23 Mar 2015 10:35:05 -0500 Subject: [PATCH] Provide instantiations of GridOut functions also for dim=1, spacedim=3. --- doc/news/changes.h | 6 ++++++ source/grid/grid_out.cc | 9 ++++++++ source/grid/grid_out.inst.in | 40 +++++++++++++++--------------------- 3 files changed, 32 insertions(+), 23 deletions(-) diff --git a/doc/news/changes.h b/doc/news/changes.h index c5c5e4a345..9a6eca68c7 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -395,6 +395,12 @@ inconvenience this causes.

Specific improvements

    +
  1. New: The various file format writers of class GridOut were not + instantiated for 1d meshes in 3d space. This is now fixed. +
    + (Wolfgang Bangerth, 2015/03/23) +
  2. +
  3. New: GridGenerator::create_triangulation_with_removed_cells() creates a new mesh out of an existing one by dropping individual cells.
    diff --git a/source/grid/grid_out.cc b/source/grid/grid_out.cc index 590155f723..a79f3229dc 100644 --- a/source/grid/grid_out.cc +++ b/source/grid/grid_out.cc @@ -3368,6 +3368,15 @@ namespace internal Assert(false, ExcNotImplemented()); } + void write_eps (const dealii::Triangulation<1,3> &, + std::ostream &, + const Mapping<1,3> *, + const GridOutFlags::Eps<2> &, + const GridOutFlags::Eps<3> &) + { + Assert(false, ExcNotImplemented()); + } + void write_eps (const dealii::Triangulation<2,3> &, std::ostream &, const Mapping<2,3> *, diff --git a/source/grid/grid_out.inst.in b/source/grid/grid_out.inst.in index 924a1040d7..420ba1d870 100644 --- a/source/grid/grid_out.inst.in +++ b/source/grid/grid_out.inst.in @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1999 - 2014 by the deal.II authors +// Copyright (C) 1999 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -62,42 +62,36 @@ for (deal_II_dimension : DIMENSIONS) template void GridOut::write (const Triangulation &, std::ostream &, const Mapping *) const; +} -#if deal_II_dimension == 1 || deal_II_dimension ==2 -// explicit instantiations for codimension one +for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) + { +#if deal_II_dimension < deal_II_space_dimension template void GridOut::write_msh - (const Triangulation&, + (const Triangulation&, std::ostream&) const; template void GridOut::write_ucd - (const Triangulation &, + (const Triangulation &, std::ostream &) const; template void GridOut::write_gnuplot - (const Triangulation&, + (const Triangulation&, std::ostream&, - const Mapping*) const; + const Mapping*) const; template void GridOut::write_vtk - (const Triangulation&, + (const Triangulation&, std::ostream&) const; template void GridOut::write_vtu - (const Triangulation&, + (const Triangulation&, std::ostream&) const; - template void GridOut::write - (const Triangulation &, + template void GridOut::write + (const Triangulation &, std::ostream &, const OutputFormat, - const Mapping *) const; - template void GridOut::write - (const Triangulation &, - std::ostream &, const Mapping *) const; + const Mapping *) const; + template void GridOut::write + (const Triangulation &, + std::ostream &, const Mapping *) const; -#endif -#if deal_II_dimension == 3 - template void GridOut::write_ucd - (const Triangulation<1, 3> &, - std::ostream &) const; - template void GridOut::write_msh - (const Triangulation<1, 3> &, - std::ostream &) const; #endif } -- 2.39.5