Commit d0c4853e authored by Martin Schneider's avatar Martin Schneider Committed by Timo Koch
Browse files

[disc][fluxstencil] Draft implementation of ccwmpfa fluxstencil

Currently all neighbors of neihbors are added,
which is not really efficient.
parent db384761
...@@ -123,6 +123,62 @@ public: ...@@ -123,6 +123,62 @@ public:
} }
}; };
* \ingroup Discretization
* \brief Flux stencil specialization for the cell-centered wmpfa scheme
* \tparam FVElementGeometry The local view on the finite volume grid geometry
template<class FVElementGeometry>
class FluxStencil<FVElementGeometry, DiscretizationMethod::ccwmpfa>
using GridGeometry = typename FVElementGeometry::GridGeometry;
using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace;
using GridView = typename GridGeometry::GridView;
using Element = typename GridView::template Codim<0>::Entity;
using GridIndexType = typename IndexTraits<GridView>::GridIndex;
//! We don't know yet how many faces couple to a neighboring element
//! Each cell I couples to a cell J always only via one face
using ScvfStencilIForJ = std::vector<GridIndexType>;
//! The flux stencil type
using Stencil = typename SubControlVolumeFace::Traits::GridIndexStorage;
//! Returns the indices of the elements required for flux calculation on an scvf.
static Stencil stencil(const Element& element,
const FVElementGeometry& fvGeometry,
const SubControlVolumeFace& scvf)
const auto& gridGeometry = fvGeometry.gridGeometry();
//ToDo correct stencil! At the moment simply all neighors of neighbors are added
Stencil stencil({scvf.insideScvIdx()});
for (const auto& scvf : scvfs(fvGeometry))
if (scvf.boundary())
const auto outsideScvIdx = scvf.outsideScvIdx();
const auto outsideElement = gridGeometry.element(outsideScvIdx);
auto fvGeometryJ = localView(gridGeometry);
for (const auto& scvfJ : scvfs(fvGeometryJ))
if (scvfJ.boundary() || scvf.insideScvIdx() == scvfJ.outsideScvIdx())
return stencil;
} // end namespace Dumux } // end namespace Dumux
#endif #endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment