mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-20 11:48:25 -06:00
Merge branch 'master' into dune-fem-adaptivity
This commit is contained in:
parent
48f889d980
commit
0baae605f2
56
ewoms/aux/compatibility.hh
Normal file
56
ewoms/aux/compatibility.hh
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
#ifndef EWOMS_DUNE_COMPATIBILITY_HH
|
||||||
|
#define EWOMS_DUNE_COMPATIBILITY_HH
|
||||||
|
|
||||||
|
#if HAVE_DUNE_FEM
|
||||||
|
#include <dune/fem/gridpart/common/gridpart.hh>
|
||||||
|
#include <dune/fem/misc/compatibility.hh>
|
||||||
|
|
||||||
|
namespace Dune
|
||||||
|
{
|
||||||
|
|
||||||
|
namespace cpgrid
|
||||||
|
{
|
||||||
|
template <int codim>
|
||||||
|
class Entity;
|
||||||
|
|
||||||
|
template <int codim>
|
||||||
|
class EntityPointer;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// specialization of dune-fem compatiblity functions for CpGrid, since CpGrid does not use the interface classes.
|
||||||
|
namespace Fem
|
||||||
|
{
|
||||||
|
|
||||||
|
template <int codim>
|
||||||
|
inline Dune::cpgrid::Entity< codim > make_entity ( const Dune::cpgrid::EntityPointer< codim >& entityPointer )
|
||||||
|
{
|
||||||
|
return *entityPointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <int codim>
|
||||||
|
inline Dune::cpgrid::Entity<codim> make_entity ( Dune::cpgrid::Entity<codim> entity )
|
||||||
|
{
|
||||||
|
return std::move( entity );
|
||||||
|
}
|
||||||
|
|
||||||
|
template< int codim >
|
||||||
|
struct GridEntityAccess< Dune::cpgrid::Entity< codim > >
|
||||||
|
{
|
||||||
|
|
||||||
|
typedef Dune::cpgrid::Entity< codim > EntityType;
|
||||||
|
typedef EntityType GridEntityType;
|
||||||
|
|
||||||
|
static const GridEntityType &gridEntity ( const EntityType &entity )
|
||||||
|
{
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Fem
|
||||||
|
|
||||||
|
} // end namespace Dune
|
||||||
|
|
||||||
|
#endif // #if HAVE_DUNE_FEM
|
||||||
|
|
||||||
|
#endif // #ifndef EWOMS_DUNE_COMPATIBILITY_HH
|
Loading…
Reference in New Issue
Block a user