diff --git a/dumux/implicit/cornerpoint/CMakeLists.txt b/dumux/implicit/cornerpoint/CMakeLists.txt index 9914aaab30ab799466fe1461fc5715ee1c18411a..5a3b58d335aff8b30758dbee140513a3bd164fc5 100644 --- a/dumux/implicit/cornerpoint/CMakeLists.txt +++ b/dumux/implicit/cornerpoint/CMakeLists.txt @@ -1,9 +1,6 @@ #install headers install(FILES -cpdarcyfluxvariables.hh -cpelementvolumevariables.hh -cpfvelementgeometry.hh elementvolumevariables.hh fvelementgeometry.hh DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/implicit/cornerpoint) diff --git a/dumux/implicit/cornerpoint/cpdarcyfluxvariables.hh b/dumux/implicit/cornerpoint/cpdarcyfluxvariables.hh deleted file mode 100644 index 06dd4e0243c6019f531e4883e3f32e0ddd30e909..0000000000000000000000000000000000000000 --- a/dumux/implicit/cornerpoint/cpdarcyfluxvariables.hh +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef DUMUX_CP_DARCY_FLUX_VARIABLES_HH_OLD -#define DUMUX_CP_DARCY_FLUX_VARIABLES_HH_OLD - -#warning this header is deprecated, use dumux/porousmediumflow/implicit/cpdarcyfluxvariables.hh instead - -#include <dumux/porousmediumflow/implicit/cpdarcyfluxvariables.hh> - -#endif diff --git a/dumux/implicit/cornerpoint/cpelementvolumevariables.hh b/dumux/implicit/cornerpoint/cpelementvolumevariables.hh deleted file mode 100644 index a2e13dfb105a7808653304e9cf0e81719dbc747f..0000000000000000000000000000000000000000 --- a/dumux/implicit/cornerpoint/cpelementvolumevariables.hh +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef DUMUX_CP_ELEMENT_VOLUME_VARIABLES_HH_OLD -#define DUMUX_CP_ELEMENT_VOLUME_VARIABLES_HH_OLD - -#warning this header is deprecated, use dumux/implicit/cornerpoint/elementvolumevariables.hh instead - -#include <dumux/implicit/cornerpoint/elementvolumevariables.hh> - -#endif diff --git a/dumux/implicit/cornerpoint/cpfvelementgeometry.hh b/dumux/implicit/cornerpoint/cpfvelementgeometry.hh deleted file mode 100644 index c35ef0758db9d033b5c1e165be1e5100ca22e821..0000000000000000000000000000000000000000 --- a/dumux/implicit/cornerpoint/cpfvelementgeometry.hh +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef DUMUX_CP_FV_ELEMENTGEOMETRY_HH_OLD -#define DUMUX_CP_FV_ELEMENTGEOMETRY_HH_OLD - -#warning this header is deprecated, use dumux/implicit/cornerpoint/fvelementgeometry.hh instead - -#include <dumux/implicit/cornerpoint/fvelementgeometry.hh> - -#endif diff --git a/dumux/io/CMakeLists.txt b/dumux/io/CMakeLists.txt index f4ae37d76f2bbdd42a907ebe40baa41919f970ca..64e7dd84f325c880f3452c372b213e0babd218c6 100644 --- a/dumux/io/CMakeLists.txt +++ b/dumux/io/CMakeLists.txt @@ -4,17 +4,13 @@ install(FILES adaptivegridrestart.hh artgridcreator.hh cpgridcreator.hh -cubegridcreator.hh -dgfgridcreator.hh gnuplotinterface.hh gridcreator.hh -interfacegridcreator.hh ploteffectivediffusivitymodel.hh plotmateriallaw.hh plotoverline2d.hh plotthermalconductivitymodel.hh restart.hh -simplexgridcreator.hh vtkmultiwriter.hh vtknestedfunction.hh DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/io) diff --git a/dumux/io/cubegridcreator.hh b/dumux/io/cubegridcreator.hh deleted file mode 100644 index adfaba3471cf6fc69bc0bbceac2e7909db0b6bc4..0000000000000000000000000000000000000000 --- a/dumux/io/cubegridcreator.hh +++ /dev/null @@ -1,117 +0,0 @@ -// -*- 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 2 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 - * - * \brief Provides a grid creator which a regular grid made of - * quadrilaterals. - */ -#ifndef DUMUX_CUBE_GRID_CREATOR_HH -#define DUMUX_CUBE_GRID_CREATOR_HH - -#warning This file is deprecated and will be removed after Dumux 2.9. Use the default (Dumux::GridCreator). Structured grids can be defined via the input file now (see handbook). Set CellType = Cube for cube grid. - -#include <dune/grid/utility/structuredgridfactory.hh> - -#include <dumux/common/basicproperties.hh> - -namespace Dumux -{ - -namespace Properties -{ -NEW_PROP_TAG(Scalar); -NEW_PROP_TAG(Grid); -} - -/*! - * \brief Provides a grid creator which a regular grid made of - * quadrilaterals. - * - * A quadirlateral is a line segment in 1D, a rectangle in 2D and a - * cube in 3D. - */ -template <class TypeTag> -class CubeGridCreator -{ - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef std::shared_ptr<Grid> GridPointer; - - enum { dim = Grid::dimension }; - -public: - /*! - * \brief Create the Grid - */ - static void makeGrid() - { - std::array< unsigned int, dim > cellRes; - Dune::FieldVector<Scalar, dim> upperRight; - Dune::FieldVector<Scalar, dim> lowerLeft; - - lowerLeft[0] = 0.0; - upperRight[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, UpperRightX); - cellRes[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Grid, NumberOfCellsX); - if (dim > 1) - { - lowerLeft[1] = 0.0; - upperRight[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, UpperRightY); - cellRes[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Grid, NumberOfCellsY); - } - if (dim > 2) - { - lowerLeft[2] = 0.0; - upperRight[2] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, UpperRightZ); - cellRes[2] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Grid, NumberOfCellsZ); - } - - gridPtr() = Dune::StructuredGridFactory<Grid>::createCubeGrid(lowerLeft, upperRight, cellRes); - } - - /*! - * \brief Returns a reference to the grid. - */ - static Grid &grid() - { - return *gridPtr(); - } - - /*! - * \brief Distributes the grid on all processes of a parallel - * computation. - */ - static void loadBalance() - { - gridPtr()->loadBalance(); - } - - /*! - * \brief Returns a reference to the shared pointer to the grid. - */ - static GridPointer &gridPtr() - { - static GridPointer cubeGrid; - return cubeGrid; - } -}; - -} - -#endif diff --git a/dumux/io/dgfgridcreator.hh b/dumux/io/dgfgridcreator.hh deleted file mode 100644 index f5587457780eb18ebbd092459d72fbfb2810c5c5..0000000000000000000000000000000000000000 --- a/dumux/io/dgfgridcreator.hh +++ /dev/null @@ -1,96 +0,0 @@ -// -*- 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 2 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 - * \brief Provides a grid creator which reads Dune Grid Format (DGF) files - */ -#ifndef DUMUX_DGF_GRID_CREATOR_HH -#define DUMUX_DGF_GRID_CREATOR_HH - -#warning This file is deprecated and will be removed after Dumux 2.9. Use the default grid creator (Dumux::GridCreator). - -#include <dune/common/parallel/mpihelper.hh> -#include <dune/grid/io/file/dgfparser.hh> - -#include <dumux/common/propertysystem.hh> -#include <dumux/common/parameters.hh> - -namespace Dumux -{ -namespace Properties -{ -NEW_PROP_TAG(Grid); -} - -/*! - * \brief Provides a grid creator which reads Dune Grid Format (DGF) files - */ -template <class TypeTag> -class DgfGridCreator -{ - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef Dune::GridPtr<Grid> GridPointer; - -public: - /*! - * \brief Load the grid from the dgf file. - */ - static void makeGrid(const std::string& dgfFileName) - { - gridPtr() = GridPointer(dgfFileName.c_str(), Dune::MPIHelper::getCommunicator()); - } - - /*! - * \brief Load the grid from the dgf file given in the input file. - */ - static void makeGrid() - { - const std::string dgfFileName = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Grid, File); - makeGrid(dgfFileName); - } - - /*! - * \brief Returns a reference to the grid. - */ - static Grid &grid() - { - return *gridPtr(); - } - - /*! - * \brief Returns a reference to the grid pointer. - */ - static GridPointer &gridPtr() - { - static GridPointer gridPtr_; - return gridPtr_; - } - - /*! - * \brief Call loadBalance() function of GridPointer. - */ - static void loadBalance() - { - gridPtr().loadBalance(); - } -}; - -} // namespace Dumux - -#endif diff --git a/dumux/io/interfacegridcreator.hh b/dumux/io/interfacegridcreator.hh deleted file mode 100644 index ea50d14565e1a3e0f8e07c59fd19d257cd6538c6..0000000000000000000000000000000000000000 --- a/dumux/io/interfacegridcreator.hh +++ /dev/null @@ -1,286 +0,0 @@ -// -*- 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 2 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 - * - * \brief A grid creator for the coupled problems, with a refined interface - */ - -#ifndef DUMUX_INTERFACEGRIDCREATOR_HH -#define DUMUX_INTERFACEGRIDCREATOR_HH - -#warning This file is deprecated and will be removed after Dumux 2.9. Use the grid template "Dune::YaspGrid<dim, Dune::TensorProductCoordinates<Scalar, dim> >" instead. - -#include <dune/grid/common/gridfactory.hh> -#include <dune/grid/io/file/dgfparser/dgfyasp.hh> -#include <dune/grid/utility/structuredgridfactory.hh> - -#include <dumux/common/basicproperties.hh> - -namespace Dumux -{ - -namespace Properties -{ -NEW_PROP_TAG(Scalar); -NEW_PROP_TAG(Grid); -} - -/*! - * \brief A grid creator for the coupled problems, with a refined interface - * - * A grid creator, which can refine the grid towards the - * coupling interface and the top of the domain. - */ -template<class TypeTag> -class InterfaceGridCreator -{ -public: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef std::shared_ptr<Grid> GridPointer; - enum {dim = Grid::dimension}; - - /*! - * \brief Create the Grid - */ - static void makeGrid() - { - if (dim != 2) - { - DUNE_THROW(Dune::NotImplemented, "The InterfaceGridCreator is not implemented for 1D and 3D."); - } - - Dune::array<unsigned int, dim> numCellsDummy = {{1,1}}; - Dune::array<unsigned int, dim> numCells; - Dune::FieldVector<Scalar, dim> lowerLeft; - Dune::FieldVector<Scalar, dim> upperRight; - Dune::FieldVector<Scalar, dim> refinePoint(0.0); - Dune::FieldVector<Scalar, dim> gradingFactor(1.0); - Dune::FieldVector<bool, dim> refineTop(false); - - // x-direction - numCells[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, unsigned int, Grid, NumberOfCellsX); - lowerLeft[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, LowerLeftX); - upperRight[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, UpperRightX); - try { refinePoint[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, InterfacePosX); } - catch (Dumux::ParameterException &e) { } - try { gradingFactor[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, GradingFactorX); } - catch (Dumux::ParameterException &e) { } - try { refineTop[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, bool, Grid, RefineTopX); } - catch (Dumux::ParameterException &e) { } - // y-direction - numCells[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, unsigned int, Grid, NumberOfCellsY); - lowerLeft[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, LowerLeftY); - upperRight[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, UpperRightY); - try { refinePoint[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, InterfacePosY); } - catch (Dumux::ParameterException &e) { } - try { gradingFactor[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, GradingFactorY); } - catch (Dumux::ParameterException &e) { } - try { refineTop[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, bool, Grid, RefineTopY); } - catch (Dumux::ParameterException &e) { } - - typedef Dune::YaspGrid<dim> HelperGrid; - std::shared_ptr<HelperGrid> helperGrid = std::shared_ptr<HelperGrid> ( - Dune::StructuredGridFactory<HelperGrid>::createCubeGrid(lowerLeft, upperRight, numCellsDummy)); - - const auto& helperElement = helperGrid->leafGridView().template begin<0>(); - const auto& helperGeometry = helperElement.geometry(); - - Dune::FieldVector<Scalar,dim> refinePointLocal(helperGeometry.local(refinePoint)); - std::cout << "refinePointGlobal = " << refinePoint - << ", refinePointLocal = " << refinePointLocal - << std::endl; - Dune::GridFactory<Grid> factory; - - int nX = numCells[0]; - int nY = numCells[1]; - - std::vector<std::vector<Scalar> > localPositions(dim); - for (int dimIdx = 0; dimIdx < dim; dimIdx++) - { - Scalar lengthLeft = refinePointLocal[dimIdx]; - Scalar lengthRight = 1.0 - lengthLeft; - - int nLeft, nRight; - Scalar hLeft, hRight; - if (lengthLeft < 1e-10) - { - nLeft = 0; - nRight = numCells[dimIdx]; - - if (gradingFactor[dimIdx] > 1.0) - hLeft = hRight = (1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nRight)); - else - hLeft = hRight = 1.0/numCells[dimIdx]; - } - else if (lengthLeft > 1.0 - 1e-10) - { - nLeft = numCells[dimIdx]; - nRight = 0; - - if (gradingFactor[dimIdx] > 1.0) - hLeft = hRight = (1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nLeft)); - else - hLeft = hRight = 1.0/numCells[dimIdx]; - } - else if (refineTop[dimIdx]) - { - lengthLeft = refinePointLocal[dimIdx]; - lengthRight = (1 - refinePointLocal[dimIdx])/2; - - nLeft = nRight = numCells[dimIdx]/3; - - if (numCells[dimIdx]%3 == 1) - nLeft += 1; - else if (numCells[dimIdx]%3 == 2) - nRight += 1; - - hLeft = lengthLeft*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nLeft)); - hRight = lengthRight*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nRight)); - } - else if (lengthLeft > 0.5) - { - Scalar nLeftDouble = std::ceil(-log((1.0 + sqrt(1.0 + 4.0 * pow(gradingFactor[dimIdx], numCells[dimIdx]) - * lengthRight/lengthLeft)) - /(2.0*pow(gradingFactor[dimIdx], numCells[dimIdx])))/log(gradingFactor[dimIdx])); - nLeft = std::min((unsigned int)std::ceil(nLeftDouble), numCells[dimIdx]); - - nRight = numCells[dimIdx] - nLeft; - - if (gradingFactor[dimIdx] > 1.0) - { - hLeft = lengthLeft*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nLeft)); - hRight = lengthRight*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nRight)); - } - else - hLeft = hRight = 1.0/numCells[dimIdx]; - } - else - { - Scalar nRightDouble = -log((1.0 + sqrt(1.0 + 4.0 * pow(gradingFactor[dimIdx], numCells[dimIdx]) - * lengthLeft/lengthRight)) - /(2.0*pow(gradingFactor[dimIdx], numCells[dimIdx])))/log(gradingFactor[dimIdx]); - nRight = std::min((unsigned int)std::ceil(nRightDouble), numCells[dimIdx]); - - nLeft = numCells[dimIdx] - nRight; - - if (gradingFactor[dimIdx] > 1.0) - { - hLeft = lengthLeft*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nLeft)); - hRight = lengthRight*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nRight)); - } - else - hLeft = hRight = 1.0/numCells[dimIdx]; - } - std::cout << "lengthLeft = " << lengthLeft - << ", lengthRight = " << lengthRight - << ", hLeft = " << hLeft - << ", hRight = " << hRight - << ", nLeft = " << nLeft - << ", nRight = " << nRight - << std::endl; - - int numVertices = numCells[dimIdx] + 1; - localPositions[dimIdx].resize(numVertices); - - localPositions[dimIdx][0] = 0.0; - for (int i = 0; i < nLeft; i++) - { - Scalar hI = hLeft*pow(gradingFactor[dimIdx], nLeft-1-i); - localPositions[dimIdx][i+1] = localPositions[dimIdx][i] + hI; - } - - for (int i = 0; i < nRight; i++) - { - Scalar hI = hRight*pow(gradingFactor[dimIdx], i); - localPositions[dimIdx][nLeft+i+1] = localPositions[dimIdx][nLeft+i] + hI; - } - - if (refineTop[dimIdx]) - for (int i = 0; i < nRight; i++) - { - Scalar hI = hRight*pow(gradingFactor[dimIdx], nRight-1-i); - localPositions[dimIdx][nLeft+nRight+i+1] = localPositions[dimIdx][nLeft+nRight+i] + hI; - } - - for (int i = 0; i < numVertices; i++) - localPositions[dimIdx][i] /= localPositions[dimIdx][numVertices-1]; - } - - Dune::FieldVector<Scalar,dim> local; - for (int j = 0; j < nY + 1; j++) - { - local[1] = localPositions[1][j]; - for (int i = 0; i < nX + 1; i++) - { - local[0] = localPositions[0][i]; - - Dune::FieldVector<Scalar,dim> position(helperGeometry.global(local)); - factory.insertVertex(position); - } - } - - for (int j = 0; j < nY; j++) - { - for (int i = 0; i < nX; i++) - { - std::vector<unsigned int> vertices(4); - vertices[0] = j*(nX+1) + i; - vertices[1] = j*(nX+1) + i+1; - vertices[2] = (j+1)*(nX+1) + i; - vertices[3] = (j+1)*(nX+1) + i+1; - - factory.insertElement(Dune::GeometryType(Dune::GeometryType::cube,dim), vertices); - } - } - - gridPtr().reset(factory.createGrid()); - } - - /*! - * \brief Returns a reference to the grid. - */ - static Grid &grid() - { - return *gridPtr(); - } - - /*! - * \brief Distributes the grid on all processes of a parallel - * computation. - */ - static void loadBalance() - { - gridPtr()->loadBalance(); - } - - /*! - * \brief Returns a reference to the shared pointer to the grid. - */ - static GridPointer &gridPtr() - { - static GridPointer interfaceGrid; - return interfaceGrid; - } -}; -} - - -#endif diff --git a/dumux/io/simplexgridcreator.hh b/dumux/io/simplexgridcreator.hh deleted file mode 100644 index 1bf469197b9a5be19eb67c6860012c684c23a1bf..0000000000000000000000000000000000000000 --- a/dumux/io/simplexgridcreator.hh +++ /dev/null @@ -1,115 +0,0 @@ -// -*- 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 2 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 - * - * \brief Provides a grid creator which a regular grid made of - * simplices. - */ -#ifndef DUMUX_SIMPLEX_GRID_CREATOR_HH -#define DUMUX_SIMPLEX_GRID_CREATOR_HH - -#warning This file is deprecated and will be removed after Dumux 2.9. Use the default (Dumux::GridCreator). Structured grids can be defined via the input file now (see handbook). Set CellType = Simplex for simplex grid. - -#include <dumux/common/propertysystem.hh> -#include <dumux/common/parameters.hh> - -#include <dumux/common/basicproperties.hh> -#include <dune/grid/utility/structuredgridfactory.hh> - -namespace Dumux -{ -namespace Properties -{ -NEW_PROP_TAG(Scalar); -NEW_PROP_TAG(Grid); -} - -/*! - * \brief Provides a grid creator which a regular grid made of - * simplices. - */ -template <class TypeTag> -class SimplexGridCreator -{ - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef std::shared_ptr<Grid> GridPointer; - - enum { dim = Grid::dimension }; - -public: - /*! - * \brief Create the Grid - */ - static void makeGrid() - { - std::array< unsigned int, dim > cellRes; - Dune::FieldVector<Scalar, dim> upperRight; - Dune::FieldVector<Scalar, dim> lowerLeft; - - lowerLeft[0] = 0.0; - upperRight[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, UpperRightX); - cellRes[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Grid, NumberOfCellsX); - if (dim > 1) - { - lowerLeft[1] = 0.0; - upperRight[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, UpperRightY); - cellRes[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Grid, NumberOfCellsY); - } - if (dim > 2) - { - lowerLeft[2] = 0.0; - upperRight[2] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, UpperRightZ); - cellRes[2] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Grid, NumberOfCellsZ); - } - - gridPtr() = Dune::StructuredGridFactory<Grid>::createSimplexGrid(lowerLeft, upperRight, cellRes); - } - - /*! - * \brief Returns a reference to the grid. - */ - static Grid &grid() - { - return *gridPtr(); - } - - /*! - * \brief Distributes the grid on all processes of a parallel - * computation. - */ - static void loadBalance() - { - gridPtr()->loadBalance(); - } - - /*! - * \brief Returns a reference to the shared pointer to the grid. - */ - static GridPointer &gridPtr() - { - static GridPointer simplexGrid; - return simplexGrid; - } -}; - -} - -#endif diff --git a/dumux/porousmediumflow/2p2c/sequential/CMakeLists.txt b/dumux/porousmediumflow/2p2c/sequential/CMakeLists.txt index 7d852b7fe94ad37529f4506889cb0584f45b213d..2974d84e432d726f32735ea79c08b44106c368c4 100644 --- a/dumux/porousmediumflow/2p2c/sequential/CMakeLists.txt +++ b/dumux/porousmediumflow/2p2c/sequential/CMakeLists.txt @@ -2,7 +2,6 @@ #install headers install(FILES adaptiveproperties.hh -fluidstate.hh problem.hh properties.hh celldataadaptive.hh @@ -19,6 +18,5 @@ fvpressuremultiphysics.hh fvpressurecompositional.hh fvtransport.hh fvtransportmultiphysics.hh -pseudo1p2cfluidstate.hh variableclassadaptive.hh DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/porousmediumflow/2p2c/sequential) diff --git a/dumux/porousmediumflow/2p2c/sequential/fluidstate.hh b/dumux/porousmediumflow/2p2c/sequential/fluidstate.hh deleted file mode 100644 index 1331b29c37172a3675d241ab86552de64f3e1455..0000000000000000000000000000000000000000 --- a/dumux/porousmediumflow/2p2c/sequential/fluidstate.hh +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef DUMUX_2P2C_FLUID_STATE_HH -#warning "dumux/porousmediumflow/2p2c/sequential/fluidstate.hh is deprecated, use dumux/material/fluidstates/2p2c.hh instead." -#include <dumux/material/fluidstates/2p2c.hh> -#endif diff --git a/dumux/porousmediumflow/2p2c/sequential/pseudo1p2cfluidstate.hh b/dumux/porousmediumflow/2p2c/sequential/pseudo1p2cfluidstate.hh deleted file mode 100644 index 2aedd8f0fd0b995b7fed0b737877cfd9a619d47b..0000000000000000000000000000000000000000 --- a/dumux/porousmediumflow/2p2c/sequential/pseudo1p2cfluidstate.hh +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef DUMUX_PSEUDO1P2C_FLUID_STATE_HH -#warning "dumux/porousmediumflow/2p2c/sequential/pseudo1p2cfluidstate.hh is deprecated, use dumux/material/fluidstates/pseudo1p2c.hh instead." -#include <dumux/material/fluidstates/pseudo1p2c.hh> -#endif