diff --git a/dumux/CMakeLists.txt b/dumux/CMakeLists.txt index 90b1256e9af20639361ebbc0a7c0d66af5d9caeb..1464208a7f77935e6c923a6d23b8faf6b4f0d378 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 0000000000000000000000000000000000000000..cc5de8c508eaa8614ce2da1a504d3de235099148 --- /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 daaca77e4ad1129863e8d83fffa827b267d5a6ab..47db351bb7e7f47f3d7cf586b62c20894932e66d 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 faa023a190c924a8f8298c28bafb09fe230c7547..15c23241d04cfd7df605a08fd06889ef470e5943 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 0975aacffa7df2a92330c134e5b503e2da34a57f..7d0078cc731f9d5802f3db0b778662349afa3e5a 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 3472b9ba36f5a28f9965b81615ad9d2b25742981..7a66a333ad444a1d1c4d46ebfe938d280f22efe7 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 d9a698097511b5a7b12ab6ef028f85e9819b5e16..baba368562eb2b82820dd3ecad6840f8eb4ba319 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 2feae139873e7b5377f86dd22dc2b5b8c774a4f9..e9c46b84eed776f94368a838f3f0e33cf96be89c 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 104dba09adb23358ea0142ae1da2989bd05d7279..901a7fb4500005b293b4e067d4588444d08986ad 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 7d37d0393c637e5ff12c8765cff3d1b483d5abf9..83a78b8720a9c7c2c3363809f9717a03a44c0fe8 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 a1e0fbc2f2579bf620e62c2a56a7351cd3fde3a0..444f035621f71e1a92b5c82b5db10fca2bd5feb8 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)