From 7c58465c58810d19b5038ccea196e10a63d3eac1 Mon Sep 17 00:00:00 2001 From: DennisGlaeser <dennis.glaeser@iws.uni-stuttgart.de> Date: Fri, 15 Dec 2017 16:58:32 +0100 Subject: [PATCH] move localresidua from implicit to assembly folder --- dumux/CMakeLists.txt | 1 + dumux/assembly/CMakeLists.txt | 12 ++++++++++++ .../boxlocalresidual.hh} | 10 ++++------ .../cclocalresidual.hh} | 9 ++++----- dumux/assembly/fvassembler.hh | 1 - .../fvlocalresidual.hh} | 13 ++++++------- dumux/discretization/box/properties.hh | 3 ++- .../discretization/cellcentered/mpfa/properties.hh | 4 +++- .../discretization/cellcentered/tpfa/properties.hh | 3 ++- dumux/implicit/box/CMakeLists.txt | 6 ------ dumux/implicit/cellcentered/CMakeLists.txt | 6 ------ 11 files changed, 34 insertions(+), 34 deletions(-) create mode 100644 dumux/assembly/CMakeLists.txt rename dumux/{implicit/box/localresidual.hh => assembly/boxlocalresidual.hh} (95%) rename dumux/{implicit/cellcentered/localresidual.hh => assembly/cclocalresidual.hh} (95%) rename dumux/{implicit/localresidual.hh => assembly/fvlocalresidual.hh} (98%) diff --git a/dumux/CMakeLists.txt b/dumux/CMakeLists.txt index 90b1256e9a..1464208a7f 100644 --- a/dumux/CMakeLists.txt +++ b/dumux/CMakeLists.txt @@ -1,4 +1,5 @@ add_subdirectory("adaptive") +add_subdirectory("assembly") add_subdirectory("common") add_subdirectory("discretization") add_subdirectory("freeflow") diff --git a/dumux/assembly/CMakeLists.txt b/dumux/assembly/CMakeLists.txt new file mode 100644 index 0000000000..cc5de8c508 --- /dev/null +++ b/dumux/assembly/CMakeLists.txt @@ -0,0 +1,12 @@ + +install(FILES +boxlocalassembler.hh +boxlocalresidual.hh +cclocalassembler.hh +cclocalresidual.hh +diffmethod.hh +fvassembler.hh +fvlocalresidual.hh +staggeredfvassembler.hh +staggeredlocalassembler.hh +DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/assembly) diff --git a/dumux/implicit/box/localresidual.hh b/dumux/assembly/boxlocalresidual.hh similarity index 95% rename from dumux/implicit/box/localresidual.hh rename to dumux/assembly/boxlocalresidual.hh index daaca77e4a..47db351bb7 100644 --- a/dumux/implicit/box/localresidual.hh +++ b/dumux/assembly/boxlocalresidual.hh @@ -26,24 +26,22 @@ #include <dune/geometry/type.hh> #include <dune/istl/matrix.hh> -#include <dumux/common/valgrind.hh> -#include <dumux/implicit/localresidual.hh> +#include <dumux/common/properties.hh> +#include <dumux/assembly/fvlocalresidual.hh> namespace Dumux { /*! * \ingroup BoxModel - * \ingroup ImplicitLocalResidual * \brief Element-wise calculation of the residual for models * based on the fully implicit box scheme. * * \todo Please doc me more! */ template<class TypeTag> -class BoxLocalResidual : public ImplicitLocalResidual<TypeTag> +class BoxLocalResidual : public FVLocalResidual<TypeTag> { - using ParentType = ImplicitLocalResidual<TypeTag>; - friend class ImplicitLocalResidual<TypeTag>; + using ParentType = FVLocalResidual<TypeTag>; using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); diff --git a/dumux/implicit/cellcentered/localresidual.hh b/dumux/assembly/cclocalresidual.hh similarity index 95% rename from dumux/implicit/cellcentered/localresidual.hh rename to dumux/assembly/cclocalresidual.hh index faa023a190..15c23241d0 100644 --- a/dumux/implicit/cellcentered/localresidual.hh +++ b/dumux/assembly/cclocalresidual.hh @@ -25,23 +25,22 @@ #include <dune/istl/matrix.hh> -#include <dumux/common/valgrind.hh> -#include <dumux/implicit/localresidual.hh> +#include <dumux/common/properties.hh> +#include <dumux/assembly/fvlocalresidual.hh> namespace Dumux { /*! * \ingroup CCModel - * \ingroup CCLocalResidual * \brief Element-wise calculation of the residual for models * based on the fully implicit cell-centered scheme. * * \todo Please doc me more! */ template<class TypeTag> -class CCLocalResidual : public ImplicitLocalResidual<TypeTag> +class CCLocalResidual : public FVLocalResidual<TypeTag> { - using ParentType = ImplicitLocalResidual<TypeTag>; + using ParentType = FVLocalResidual<TypeTag>; using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using Element = typename GET_PROP_TYPE(TypeTag, GridView)::template Codim<0>::Entity; using ElementResidualVector = Dune::BlockVector<typename GET_PROP_TYPE(TypeTag, NumEqVector)>; diff --git a/dumux/assembly/fvassembler.hh b/dumux/assembly/fvassembler.hh index 0975aacffa..7d0078cc73 100644 --- a/dumux/assembly/fvassembler.hh +++ b/dumux/assembly/fvassembler.hh @@ -30,7 +30,6 @@ #include <dumux/common/properties.hh> #include <dumux/common/timeloop.hh> -#include <dumux/implicit/localresidual.hh> #include <dumux/discretization/methods.hh> #include <dumux/parallel/vertexhandles.hh> diff --git a/dumux/implicit/localresidual.hh b/dumux/assembly/fvlocalresidual.hh similarity index 98% rename from dumux/implicit/localresidual.hh rename to dumux/assembly/fvlocalresidual.hh index 3472b9ba36..7a66a333ad 100644 --- a/dumux/implicit/localresidual.hh +++ b/dumux/assembly/fvlocalresidual.hh @@ -18,10 +18,10 @@ *****************************************************************************/ /*! * \file - * \brief Calculates the element-wise residual of fully-implicit models. + * \brief Calculates the element-wise residual of finite-volume models. */ -#ifndef DUMUX_IMPLICIT_LOCAL_RESIDUAL_HH -#define DUMUX_IMPLICIT_LOCAL_RESIDUAL_HH +#ifndef DUMUX_FV_LOCAL_RESIDUAL_HH +#define DUMUX_FV_LOCAL_RESIDUAL_HH #include <dune/istl/matrix.hh> @@ -35,7 +35,6 @@ namespace Dumux { /*! - * \ingroup ImplicitLocalResidual * \brief Element-wise calculation of the residual matrix for models * using a fully implicit discretization. * @@ -43,7 +42,7 @@ namespace Dumux * static polymorphism. */ template<class TypeTag> -class ImplicitLocalResidual +class FVLocalResidual { using Implementation = typename GET_PROP_TYPE(TypeTag, LocalResidual); using Problem = typename GET_PROP_TYPE(TypeTag, Problem); @@ -67,10 +66,10 @@ class ImplicitLocalResidual public: //! the constructor for stationary problems - ImplicitLocalResidual() : prevSol_(nullptr) {} + FVLocalResidual() : prevSol_(nullptr) {} //! the constructor for instationary problems - ImplicitLocalResidual(std::shared_ptr<TimeLoop> timeLoop) + FVLocalResidual(std::shared_ptr<TimeLoop> timeLoop) : timeLoop_(timeLoop) , prevSol_(nullptr) {} diff --git a/dumux/discretization/box/properties.hh b/dumux/discretization/box/properties.hh index d9a6980975..baba368562 100644 --- a/dumux/discretization/box/properties.hh +++ b/dumux/discretization/box/properties.hh @@ -29,13 +29,14 @@ #include <dune/common/fvector.hh> #include <dune/geometry/multilineargeometry.hh> +#include <dumux/common/properties.hh> #include <dumux/common/boundaryflag.hh> #include <dumux/discretization/methods.hh> #include <dumux/discretization/fvproperties.hh> #include <dumux/implicit/box/elementboundarytypes.hh> -#include <dumux/implicit/box/localresidual.hh> +#include <dumux/assembly/boxlocalresidual.hh> #include <dumux/discretization/box/subcontrolvolume.hh> #include <dumux/discretization/box/subcontrolvolumeface.hh> diff --git a/dumux/discretization/cellcentered/mpfa/properties.hh b/dumux/discretization/cellcentered/mpfa/properties.hh index 2feae13987..e9c46b84ee 100644 --- a/dumux/discretization/cellcentered/mpfa/properties.hh +++ b/dumux/discretization/cellcentered/mpfa/properties.hh @@ -30,11 +30,13 @@ #include <dune/common/fvector.hh> #include <dune/geometry/multilineargeometry.hh> +#include <dumux/common/properties.hh> + #include <dumux/discretization/methods.hh> #include <dumux/discretization/fvproperties.hh> #include <dumux/implicit/cellcentered/elementboundarytypes.hh> -#include <dumux/implicit/cellcentered/localresidual.hh> +#include <dumux/assembly/cclocalresidual.hh> #include <dumux/discretization/cellcentered/globalvolumevariables.hh> #include <dumux/discretization/cellcentered/subcontrolvolume.hh> diff --git a/dumux/discretization/cellcentered/tpfa/properties.hh b/dumux/discretization/cellcentered/tpfa/properties.hh index 104dba09ad..901a7fb450 100644 --- a/dumux/discretization/cellcentered/tpfa/properties.hh +++ b/dumux/discretization/cellcentered/tpfa/properties.hh @@ -31,6 +31,7 @@ #include <dune/common/reservedvector.hh> #include <dune/geometry/multilineargeometry.hh> +#include <dumux/common/properties.hh> #include <dumux/common/boundaryflag.hh> #include <dumux/discretization/methods.hh> @@ -40,7 +41,7 @@ #include <dumux/discretization/cellcentered/subcontrolvolume.hh> #include <dumux/implicit/cellcentered/elementboundarytypes.hh> -#include <dumux/implicit/cellcentered/localresidual.hh> +#include <dumux/assembly/cclocalresidual.hh> #include <dumux/discretization/cellcentered/connectivitymap.hh> #include <dumux/discretization/cellcentered/elementsolution.hh> diff --git a/dumux/implicit/box/CMakeLists.txt b/dumux/implicit/box/CMakeLists.txt index 7d37d0393c..83a78b8720 100644 --- a/dumux/implicit/box/CMakeLists.txt +++ b/dumux/implicit/box/CMakeLists.txt @@ -2,11 +2,5 @@ #install headers install(FILES intersectiontovertexbc.hh -assembler.hh elementboundarytypes.hh -elementvolumevariables.hh -fvelementgeometry.hh -localresidual.hh -properties.hh -propertydefaults.hh DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/implicit/box) diff --git a/dumux/implicit/cellcentered/CMakeLists.txt b/dumux/implicit/cellcentered/CMakeLists.txt index a1e0fbc2f2..444f035621 100644 --- a/dumux/implicit/cellcentered/CMakeLists.txt +++ b/dumux/implicit/cellcentered/CMakeLists.txt @@ -1,11 +1,5 @@ #install headers install(FILES -assembler.hh elementboundarytypes.hh -elementvolumevariables.hh -fvelementgeometry.hh -localresidual.hh -properties.hh -propertydefaults.hh DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/implicit/cellcentered) -- GitLab