diff --git a/dumux/discretization/staggered/freeflow/staggeredgeometryhelper.hh b/dumux/discretization/staggered/freeflow/staggeredgeometryhelper.hh index 3a25a80bb369d3b034cf402f391c2ed928952c01..caa701f2d506fac59e92210ade233908fec7c4ad 100644 --- a/dumux/discretization/staggered/freeflow/staggeredgeometryhelper.hh +++ b/dumux/discretization/staggered/freeflow/staggeredgeometryhelper.hh @@ -127,7 +127,6 @@ class FreeFlowStaggeredGeometryHelper { using Scalar = typename GridView::ctype; static constexpr auto dim = GridView::dimension; - static constexpr auto dimWorld = GridView::dimensionworld; using Element = typename GridView::template Codim<0>::Entity; using Intersection = typename GridView::Intersection; @@ -138,10 +137,8 @@ class FreeFlowStaggeredGeometryHelper //TODO include assert that checks for quad geometry static constexpr auto codimIntersection = 1; - static constexpr auto codimCommonEntity = 2; - static constexpr auto numFacetSubEntities = (dim == 2) ? 2 : 4; - static constexpr auto numfacets = dimWorld * 2; - static constexpr auto numPairs = 2 * (dimWorld - 1); + static constexpr auto numfacets = dim * 2; + static constexpr auto numPairs = 2 * (dim - 1); static constexpr bool useHigherOrder = upwindSchemeOrder > 1; diff --git a/dumux/discretization/staggered/freeflow/subcontrolvolumeface.hh b/dumux/discretization/staggered/freeflow/subcontrolvolumeface.hh index 07558490a37c72c5205cf622de24de0543639352..6d5880916ab63c8aeea0fd089362a20f5c8cd567 100644 --- a/dumux/discretization/staggered/freeflow/subcontrolvolumeface.hh +++ b/dumux/discretization/staggered/freeflow/subcontrolvolumeface.hh @@ -115,10 +115,9 @@ class FreeFlowStaggeredSubControlVolumeFace using AxisData = typename T::AxisData; using Scalar = typename T::Scalar; - static const int dim = Geometry::mydimension; - static const int dimworld = Geometry::coorddimension; + static const int dim = GV::dimension; - static constexpr int numPairs = 2 * (dimworld - 1); + static constexpr int numPairs = 2 * (dim - 1); static constexpr bool useHigherOrder = upwindSchemeOrder > 1; @@ -280,7 +279,7 @@ public: //! Returns the length of the face in a certain direction (adaptation of area() for 3d) Scalar faceLength(const int localSubFaceIdx) const { - if (dimworld == 3) + if (dim == 3) { if (localSubFaceIdx < 2) return (corner(1) - corner(0)).two_norm(); diff --git a/dumux/io/staggeredvtkoutputmodule.hh b/dumux/io/staggeredvtkoutputmodule.hh index f7cdb310ebfade16102b967c9013d3eaaac7df93..020dcfaf4c3585abbe07e147891549428bf72190 100644 --- a/dumux/io/staggeredvtkoutputmodule.hh +++ b/dumux/io/staggeredvtkoutputmodule.hh @@ -56,15 +56,11 @@ class StaggeredVtkOutputModule using FVElementGeometry = typename FVGridGeometry::LocalView; using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; - enum { dim = GridView::dimension }; - using Element = typename GridView::template Codim<0>::Entity; - using GlobalPosition = typename Element::Geometry::GlobalCoordinate; - using DimVector = Dune::FieldVector<Scalar, dim>; struct FaceVarScalarDataInfo { std::function<Scalar(const FaceVariables&)> get; std::string name; }; - struct FaceVarVectorDataInfo { std::function<DimVector(const SubControlVolumeFace& scvf, const FaceVariables&)> get; std::string name; }; + struct FaceVarVectorDataInfo { std::function<GlobalPosition(const SubControlVolumeFace& scvf, const FaceVariables&)> get; std::string name; }; struct FaceFieldScalarDataInfo { @@ -75,8 +71,8 @@ class StaggeredVtkOutputModule struct FaceFieldVectorDataInfo { - FaceFieldVectorDataInfo(const std::vector<DimVector>& f, const std::string& n) : data(f), name(n) {} - const std::vector<DimVector>& data; + FaceFieldVectorDataInfo(const std::vector<GlobalPosition>& f, const std::string& n) : data(f), name(n) {} + const std::vector<GlobalPosition>& data; const std::string name; }; @@ -124,7 +120,7 @@ public: //! Add a vector valued field //! \param v The field to be added //! \param name The name of the vtk field - void addFaceField(const std::vector<DimVector>& v, const std::string& name) + void addFaceField(const std::vector<GlobalPosition>& v, const std::string& name) { if (v.size() == this->fvGridGeometry().gridView().size(1)) faceFieldVectorDataInfo_.emplace_back(v, name); @@ -143,7 +139,7 @@ public: //! Add a vector-valued faceVarible //! \param f A function taking a SubControlVolumeFace and FaceVariables object and returning the desired vector //! \param name The name of the vtk field - void addFaceVariable(std::function<DimVector(const SubControlVolumeFace& scvf, const FaceVariables&)>&& f, const std::string& name) + void addFaceVariable(std::function<GlobalPosition(const SubControlVolumeFace& scvf, const FaceVariables&)>&& f, const std::string& name) { faceVarVectorDataInfo_.push_back(FaceVarVectorDataInfo{f, name}); } @@ -188,13 +184,13 @@ private: // prepare some containers to store the relevant data std::vector<std::vector<Scalar>> faceVarScalarData; - std::vector<std::vector<DimVector>> faceVarVectorData; + std::vector<std::vector<GlobalPosition>> faceVarVectorData; if(!faceVarScalarDataInfo_.empty()) faceVarScalarData.resize(faceVarScalarDataInfo_.size(), std::vector<Scalar>(numPoints)); if(!faceVarVectorDataInfo_.empty()) - faceVarVectorData.resize(faceVarVectorDataInfo_.size(), std::vector<DimVector>(numPoints)); + faceVarVectorData.resize(faceVarVectorDataInfo_.size(), std::vector<GlobalPosition>(numPoints)); for (const auto& element : elements(this->fvGridGeometry().gridView(), Dune::Partitions::interior)) {