36 #ifndef OPM_DEFAULTGEOMETRYPOLICY_HEADER 37 #define OPM_DEFAULTGEOMETRYPOLICY_HEADER 39 #include "EntityRep.hpp" 48 template<
int mydim,
int dim>
55 template<
int mydim,
int dim>
57 friend class ::Dune::CpGrid;
88 static_assert(codim != 2,
"");
89 return *
geomVector(std::integral_constant<int,codim>());
93 std::shared_ptr<const EntityVariable<cpgrid::Geometry<3, 3>, 0>>
geomVector(
const std::integral_constant<int, 0>&)
const 95 return cell_geom_ptr_;
98 std::shared_ptr<EntityVariable<cpgrid::Geometry<3, 3>, 0>>
geomVector(
const std::integral_constant<int, 0>&)
100 return cell_geom_ptr_;
103 std::shared_ptr<const EntityVariable<cpgrid::Geometry<2, 3>, 1>>
geomVector(
const std::integral_constant<int, 1>&)
const 105 return face_geom_ptr_;
108 std::shared_ptr<EntityVariable<cpgrid::Geometry<2, 3>, 1>>
geomVector(
const std::integral_constant<int, 1>&)
110 return face_geom_ptr_;
115 std::shared_ptr<const EntityVariable<cpgrid::Geometry<0, 3>, 3>>
geomVector(
const std::integral_constant<int, codim>&)
const 117 static_assert(codim==3,
"Codim has to be 3");
118 return point_geom_ptr_;
122 std::shared_ptr<EntityVariable<cpgrid::Geometry<0, 3>, 3>>
geomVector(
const std::integral_constant<int, codim>&)
124 static_assert(codim==3,
"Codim has to be 3");
125 return point_geom_ptr_;
129 std::shared_ptr<EntityVariable<cpgrid::Geometry<3, 3>, 0>> cell_geom_ptr_;
130 std::shared_ptr<EntityVariable<cpgrid::Geometry<2, 3>, 1>> face_geom_ptr_;
131 std::shared_ptr<EntityVariable<cpgrid::Geometry<0, 3>, 3>> point_geom_ptr_;
140 #endif // OPM_DEFAULTGEOMETRYPOLICY_HEADER DefaultGeometryPolicy()
Definition: DefaultGeometryPolicy.hpp:61
Definition: DefaultGeometryPolicy.hpp:52
The namespace Dune is the main namespace for all Dune code.
Definition: CartesianIndexMapper.hpp:9
std::shared_ptr< const EntityVariable< cpgrid::Geometry< 0, 3 >, 3 > > geomVector(const std::integral_constant< int, codim > &) const
Get point geometry.
Definition: DefaultGeometryPolicy.hpp:115
Definition: Intersection.hpp:329
This class encapsulates geometry for vertices, intersections, and cells.
Definition: CpGridData.hpp:94
Struct that hods all the data needed to represent a Cpgrid.
Definition: CpGridData.hpp:117
DefaultGeometryPolicy(const EntityVariable< cpgrid::Geometry< 3, 3 >, 0 > &cell_geom, const EntityVariable< cpgrid::Geometry< 2, 3 >, 1 > &face_geom, const EntityVariable< cpgrid::Geometry< 0, 3 >, 3 > &point_geom)
Definition: DefaultGeometryPolicy.hpp:71
std::shared_ptr< EntityVariable< cpgrid::Geometry< 2, 3 >, 1 > > geomVector(const std::integral_constant< int, 1 > &)
Get face geometry.
Definition: DefaultGeometryPolicy.hpp:108
std::shared_ptr< EntityVariable< cpgrid::Geometry< 3, 3 >, 0 > > geomVector(const std::integral_constant< int, 0 > &)
Get cell geometry.
Definition: DefaultGeometryPolicy.hpp:98
std::shared_ptr< const EntityVariable< cpgrid::Geometry< 2, 3 >, 1 > > geomVector(const std::integral_constant< int, 1 > &) const
Get face geometry.
Definition: DefaultGeometryPolicy.hpp:103
A class design to hold a variable with a value for each entity of the given codimension, where the variable is not changing in sign with orientation.
Definition: EntityRep.hpp:270
std::shared_ptr< const EntityVariable< cpgrid::Geometry< 3, 3 >, 0 > > geomVector(const std::integral_constant< int, 0 > &) const
Get cell geometry.
Definition: DefaultGeometryPolicy.hpp:93
const EntityVariable< cpgrid::Geometry< 3 - codim, 3 >, codim > & geomVector() const
Definition: DefaultGeometryPolicy.hpp:86
std::shared_ptr< EntityVariable< cpgrid::Geometry< 0, 3 >, 3 > > geomVector(const std::integral_constant< int, codim > &)
Get point geometry.
Definition: DefaultGeometryPolicy.hpp:122