From 7406e9c33fbf346a950dbb0a3738d01865a38647 Mon Sep 17 00:00:00 2001 From: Bernd Flemisch <bernd@iws.uni-stuttgart.de> Date: Tue, 27 Nov 2012 21:35:31 +0000 Subject: [PATCH] implicit branch: add ImplicitIsBox property. Add empty neighbors vector to boxfvelementgeometry for compatibility with cc. git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/branches/implicit@9688 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/implicit/box/boxfvelementgeometry.hh | 4 +++- dumux/implicit/box/boxproperties.hh | 9 ++++++--- dumux/implicit/box/boxpropertydefaults.hh | 3 +++ dumux/implicit/cellcentered/ccproperties.hh | 10 +++++++--- dumux/implicit/cellcentered/ccpropertydefaults.hh | 2 ++ 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/dumux/implicit/box/boxfvelementgeometry.hh b/dumux/implicit/box/boxfvelementgeometry.hh index fd0b5c89e2..db67464594 100644 --- a/dumux/implicit/box/boxfvelementgeometry.hh +++ b/dumux/implicit/box/boxfvelementgeometry.hh @@ -321,6 +321,7 @@ class BoxFVElementGeometry typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; typedef typename GridView::ctype CoordScalar; typedef typename GridView::Traits::template Codim<0>::Entity Element; + typedef typename GridView::Traits::template Codim<0>::EntityPointer ElementPointer; typedef typename Element::Geometry Geometry; typedef Dune::FieldVector<Scalar,dimWorld> Vector; typedef Dune::FieldVector<CoordScalar,dimWorld> GlobalPosition; @@ -587,7 +588,8 @@ public: int numFaces; //!< number of faces (0 in < 3D) int numSCV; //!< number of subcontrol volumes int numFAP; //!< number of flux approximation points - + std::vector<ElementPointer> neighbors; //!< needed for compatibility with cc models + const LocalFiniteElementCache feCache_; void update(const GridView& gridView, const Element& element) diff --git a/dumux/implicit/box/boxproperties.hh b/dumux/implicit/box/boxproperties.hh index 9fd7fffa05..f0d72d6be1 100644 --- a/dumux/implicit/box/boxproperties.hh +++ b/dumux/implicit/box/boxproperties.hh @@ -127,13 +127,16 @@ NEW_PROP_TAG(ImplicitUseTwoPointFlux); // mappers from local to global indices -//! maper for vertices +//! mapper for vertices NEW_PROP_TAG(VertexMapper); -//! maper for elements +//! mapper for elements NEW_PROP_TAG(ElementMapper); -//! maper for degrees of freedom +//! mapper for degrees of freedom NEW_PROP_TAG(DofMapper); +//! indicate whether discretization is box or not +NEW_PROP_TAG(ImplicitIsBox); + } } diff --git a/dumux/implicit/box/boxpropertydefaults.hh b/dumux/implicit/box/boxpropertydefaults.hh index 50ec31e2c7..e2c01bf226 100644 --- a/dumux/implicit/box/boxpropertydefaults.hh +++ b/dumux/implicit/box/boxpropertydefaults.hh @@ -201,6 +201,9 @@ SET_INT_PROP(BoxModel, LinearSolverMaxIterations, 250); //! set number of equations of the mathematical model as default SET_INT_PROP(BoxModel, LinearSolverBlockSize, GET_PROP_VALUE(TypeTag, NumEq)); +//! indicate that this is a box discretization +SET_BOOL_PROP(BoxModel, ImplicitIsBox, true); + } // namespace Properties } // namespace Dumux diff --git a/dumux/implicit/cellcentered/ccproperties.hh b/dumux/implicit/cellcentered/ccproperties.hh index 7666f5d4c8..061ad3551e 100644 --- a/dumux/implicit/cellcentered/ccproperties.hh +++ b/dumux/implicit/cellcentered/ccproperties.hh @@ -128,12 +128,16 @@ NEW_PROP_TAG(ImplicitEnableHints); // mappers from local to global indices -//! maper for vertices +//! mapper for vertices NEW_PROP_TAG(VertexMapper); -//! maper for elements +//! mapper for elements NEW_PROP_TAG(ElementMapper); -//! maper for degrees of freedom +//! mapper for degrees of freedom NEW_PROP_TAG(DofMapper); + +//! indicate whether discretization is box or not +NEW_PROP_TAG(ImplicitIsBox); + } } diff --git a/dumux/implicit/cellcentered/ccpropertydefaults.hh b/dumux/implicit/cellcentered/ccpropertydefaults.hh index d36ae8a9d4..8ede91add4 100644 --- a/dumux/implicit/cellcentered/ccpropertydefaults.hh +++ b/dumux/implicit/cellcentered/ccpropertydefaults.hh @@ -203,6 +203,8 @@ SET_INT_PROP(CCModel, LinearSolverMaxIterations, 250); //! set number of equations of the mathematical model as default SET_INT_PROP(CCModel, LinearSolverBlockSize, GET_PROP_VALUE(TypeTag, NumEq)); +//! indicate that this is no box discretization +SET_BOOL_PROP(CCModel, ImplicitIsBox, false); } // namespace Properties } // namespace Dumux -- GitLab