Commit c0f1c9eb authored by Timo Koch's avatar Timo Koch
Browse files

[cleanup] Remove deprecated subgrid manager headers and interfaces

parent a90e53a7
......@@ -13,6 +13,4 @@ gridmanager_sp.hh
gridmanager_sub.hh
gridmanager_ug.hh
gridmanager_yasp.hh
subgridgridcreator.hh
subgridmanager.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/io/grid)
......@@ -26,7 +26,6 @@
#include <memory>
#include <dune/common/deprecated.hh>
#include <dune/common/shared_ptr.hh>
#include <dune/common/concept.hh>
......@@ -34,10 +33,6 @@
#if HAVE_DUNE_SUBGRID
#include <dune/subgrid/subgrid.hh>
#include <dumux/io/rasterimagereader.hh>
// TODO: deprecated: remove this after 3.1 is released
#include <dune/grid/io/file/vtk.hh>
// TODO: deprecated: remove this after 3.1 is released
#include <dune/grid/io/file/dgfparser/dgfwriter.hh>
#endif
#ifndef DUMUX_IO_GRID_MANAGER_HH
......@@ -105,50 +100,6 @@ public:
loadBalance();
}
/*!
* \brief Make the subgrid.
*/
template<class ElementSelector>
[[deprecated("Create an instance of this class and use subgridManager.init(hostGrid, selector, paramGroup)")]]
static std::unique_ptr<Grid> makeGrid(HostGrid& hostGrid,
const ElementSelector& selector,
const std::string& paramGroup = "")
{
std::cerr << "Deprecation warning: SubGridManager::makeGrid is deprecated."
<< "Create an instance of this class and use subgridManager.init(hostGrid, selector, paramGroup)." << std::endl;
auto subgridPtr = createGrid_(hostGrid, selector, paramGroup);
// TODO: remove this after 3.1 is released
// If desired, write out the final subgrid as a dgf file.
if (getParamFromGroup<bool>(paramGroup, "Grid.WriteSubGridToDGF", false))
{
std::cerr << "Deprecation warning: SubGridManager: Grid.WriteSubGridToDGF is deprecated."
<< "Use Dune::VTKWriter to write out your grid manually." << std::endl;
const auto postfix = getParamFromGroup<std::string>(paramGroup, "Problem.Name", "");
const std::string name = postfix.empty() ? "subgrid" : "subgrid_" + postfix;
Dune::DGFWriter<typename Grid::LeafGridView> writer(subgridPtr->leafGridView());
writer.write(name + ".dgf");
}
// TODO: remove this after 3.1 is released
// If desired, write out the hostgrid as vtk file.
if (getParamFromGroup<bool>(paramGroup, "Grid.WriteSubGridToVtk", false))
{
std::cerr << "Deprecation warning: SubGridManager: Grid.WriteSubGridToVtk is deprecated."
<< "Use Dune::VTKWriter to write out your grid manually." << std::endl;
const auto postfix = getParamFromGroup<std::string>(paramGroup, "Problem.Name", "");
const std::string name = postfix.empty() ? "subgrid" : "subgrid_" + postfix;
Dune::VTKWriter<typename Grid::LeafGridView> vtkWriter(subgridPtr->leafGridView());
vtkWriter.write(name);
}
// Return a unique pointer to the subgrid.
return subgridPtr;
}
/*!
* \brief Call loadBalance() function of the grid.
*/
......
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
* \ingroup InputOutput
* \brief A grid creator for dune-subgrid.
*/
#ifndef DUMUX_SUBGRID_GRID_CREATOR_HH
#define DUMUX_SUBGRID_GRID_CREATOR_HH
#if HAVE_DUNE_SUBGRID
#warning "This header is deprecated. Use the new subgridmanager."
#include "subgridmanager.hh"
namespace Dumux {
/*!
* \ingroup InputOutput
* \brief A grid creator for dune-subgrid.
*/
template <class HostGrid>
using SubgridGridCreator [[deprecated("Use SubgridManager instead!")]] = SubgridManager<HostGrid>;
} // end namespace Dumux
#endif // HAVE_DUNE_SUBGRID
#endif // DUMUX_SUBGRID_GRID_CREATOR_HH
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
* \ingroup InputOutput
* \brief A grid manager for dune-subgrid.
*/
#ifndef DUMUX_SUBGRID_MANAGER_HH
#define DUMUX_SUBGRID_MANAGER_HH
#if HAVE_DUNE_SUBGRID
#warning "This header is deprecated and will be removed after release 3.1. Use gridmanager_sub.hh"
#include <dumux/io/grid/gridmanager_sub.hh>
namespace Dumux {
/*!
* \ingroup InputOutput
* \brief A grid manager for dune-subgrid
*/
template<class HostGrid, class HostGridManager = GridManager<HostGrid>>
using SubgridManager [[deprecated("Use GridManager<SubGrid> instead. Will be removed after release 3.1")]]
= GridManager<Dune::SubGrid<HostGrid::dimension, HostGrid>>;
} // end namespace Dumux
#endif // HAVE_DUNE_SUBGRID
#endif // DUMUX_SUBGRID_MANAGER_HH
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment