36#ifndef OPM_DEFAULTGEOMETRYPOLICY_HEADER
37#define OPM_DEFAULTGEOMETRYPOLICY_HEADER
39#include "EntityRep.hpp"
48template<
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_;
Struct that hods all the data needed to represent a Cpgrid.
Definition CpGridData.hpp:131
Definition DefaultGeometryPolicy.hpp:53
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
DefaultGeometryPolicy()
Definition DefaultGeometryPolicy.hpp:61
std::shared_ptr< EntityVariable< cpgrid::Geometry< 0, 3 >, 3 > > geomVector(const std::integral_constant< int, codim > &)
Get point geometry.
Definition DefaultGeometryPolicy.hpp:122
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< 3, 3 >, 0 > > geomVector(const std::integral_constant< int, 0 > &)
Get cell geometry.
Definition DefaultGeometryPolicy.hpp:98
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< const EntityVariable< cpgrid::Geometry< 2, 3 >, 1 > > geomVector(const std::integral_constant< int, 1 > &) const
Get face geometry.
Definition DefaultGeometryPolicy.hpp:103
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
A class design to hold a variable with a value for each entity of the given codimension,...
Definition EntityRep.hpp:267
This class encapsulates geometry for vertices, intersections, and cells.
Definition Geometry.hpp:75
Copyright 2019 Equinor AS.
Definition CartesianIndexMapper.hpp:10