Dune Core Modules (2.7.1)
template specifying the storage for the corners More...
#include <dune/geometry/multilineargeometry.hh>
Detailed Description
template<int mydim, int cdim>
struct Dune::MultiLinearGeometryTraits< ct >::CornerStorage< mydim, cdim >
template specifying the storage for the corners
Internally, the MultiLinearGeometry needs to store the corners of the geometry.
The corner storage may be chosen depending on geometry dimension and coordinate dimension. It is required to contain a type named Type, e.g.,
By default, a std::vector of FieldVector is used.
Apart from being copy constructable and assignable, an const
corner storage object corners
must support the expressions begin(corners)
, end(corners)
, and subscription corners
[i]. begin()
and end()
are looked up via ADL and in namespace std:
This means that all of the following qualify: FieldVector<ctype,cdim>
[1<<mydim], std::array<FieldVector<ctype,cdim>
,(1<<mydim)>, std::vector<FieldVector<ctype,cdim>>
.
- Note
- The expression
end(corners)
isn't actually used by the implementation currently, but we require it anyway so we can add runtime checks for the container size when we feel like it.
It is also possible to use a std::reference_wrapper
of a suitable container as the type for the corner storage. The implementation automatically calls corners.get()
on internally stored std::reference_wrapper
objects before applying begin()
, end()
, or subscription in that case.
- Note
- Using
std::reference_wrapper
of some container as the corner storage means that the geometry has no control over the lifetime of or the access to that container. When the lifetime of the container ends, or the container itself or its elements are modified, any geometry object that still references that container becomes invalid. The only valid operation on invalid geometry objects are destruction and assignment from another geometry. If invalidation happens concurrently with some operation (other than destruction or assignment) on the geometry, that is a race.
- Template Parameters
-
mydim geometry dimension cdim coordinate dimension
The documentation for this struct was generated from the following file:
- dune/geometry/multilineargeometry.hh