Skip to content
Snippets Groups Projects
Commit cf8611d6 authored by Timo Koch's avatar Timo Koch
Browse files

[localView] Make localView a non-member, non-friend function

parent 38889299
No related branches found
No related tags found
1 merge request!742Make FVGridGeometry independent of TypeTag
......@@ -32,6 +32,9 @@
#include <dumux/common/geometry/boundingboxtree.hh>
#include <dumux/common/geometry/geometricentityset.hh>
//! make the local view function available whenever we use the grid geometry
#include <dumux/discretization/localview.hh>
namespace Dumux {
/*!
......@@ -77,15 +80,6 @@ public:
computeGlobalBoundingBox_();
}
/*!
* \brief Return a local restriction of this global object.
* The local object is only functional after calling its bind/bindElement method.
* This is a free function that will be found by means of ADL
*/
template<class GridGeometry>
friend inline typename GridGeometry::LocalView localView(const GridGeometry& fvGridGeometry)
{ return typename GridGeometry::LocalView(fvGridGeometry); }
/*!
* \brief Update all fvElementGeometries (do this again after grid adaption)
*/
......
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
* \ingroup Discretization
* \brief Free function to get the local view of a grid cache object
*/
#ifndef DUMUX_LOCAL_VIEW_HH
#define DUMUX_LOCAL_VIEW_HH
namespace Dumux {
/*!
* \ingroup Discretization
* \brief Free function to get the local view of a grid cache object
* \note A local object is only functional after calling its bind/bindElement method.
* \tparam GridCache the grid caching type (such as FVGridGeometry)
* \param gridCache the grid caching object we want to localView from
*/
template<class GridCache>
inline typename GridCache::LocalView localView(const GridCache& gridCache)
{ return typename GridCache::LocalView(gridCache); }
} // end namespace Dumux
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment