DUNE PDELab (2.7)
type.hh
Go to the documentation of this file.
55 static const unsigned int id = BaseTopology::id | ((unsigned int)prismConstruction << (dimension-1));
67 static const unsigned int id = BaseTopology::id | ((unsigned int)pyramidConstruction << (dimension-1));
153 inline static bool isTopology ( TopologyConstruction construction, unsigned int topologyId, int dim, int codim = 0 ) noexcept
157 return (codim >= (dim-1)) || (((topologyId >> (dim-codim-1)) & 1) == (unsigned int)construction);
167 inline static unsigned int baseTopologyId ( unsigned int topologyId, int dim, int codim = 1 ) noexcept
243 return IfTopology< Operation, dim-1, Prism< Topology > >::apply( topologyId >> 1, std::forward< Args >( args )... );
245 return IfTopology< Operation, dim-1, Pyramid< Topology > >::apply( topologyId >> 1, std::forward< Args >( args )... );
279 class GeometryType
285 enum
287 simplex,
288 cube,
289 pyramid,
290 prism,
291 extended,
293 };
347 using Id = IdType;
356 constexpr operator Id() const
371 constexpr GeometryType(Id id)
381 constexpr GeometryType ()
387 GeometryType(BasicType basicType, unsigned int dim)
388 DUNE_DEPRECATED_MSG("The GeometryType constructor taking BasicType is deprecated and will be removed after DUNE 2.6")
430 constexpr GeometryType(unsigned int topologyId, unsigned int dim, bool none)
439 constexpr GeometryType(unsigned int topologyId, unsigned int dim)
455 explicit GeometryType(TopologyType t)
462 DUNE_DEPRECATED_MSG("GeometryType(unsigned dim) is deprecated in DUNE 2.7, please use Dune::GeometryTypes::cube(dim) instead")
463 explicit GeometryType(unsigned int dim)
473 DUNE_DEPRECATED_MSG("GeometryType(dim) is deprecated in DUNE 2.7, please use Dune::GeometryTypes::cube(dim) instead")
474 explicit GeometryType(int dim)
487 DUNE_DEPRECATED_MSG("makeVertex() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::vertex instead")
488 void makeVertex() {
495 DUNE_DEPRECATED_MSG("makeLine() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::line instead")
496 void makeLine() {
503 DUNE_DEPRECATED_MSG("makeTriangle() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::triangle instead")
504 void makeTriangle() {
511 DUNE_DEPRECATED_MSG("makeQuadrilateral() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::quadrilateral instead")
512 void makeQuadrilateral() {
519 DUNE_DEPRECATED_MSG("makeTetrahedron() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::tetrahedron instead")
520 void makeTetrahedron() {
527 DUNE_DEPRECATED_MSG("makePyramid() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::pyramid instead")
528 void makePyramid() {
535 DUNE_DEPRECATED_MSG("makePrism() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::prism instead")
536 void makePrism() {
543 DUNE_DEPRECATED_MSG("makeHexahedron() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::hexahedron instead")
544 void makeHexahedron() {
551 DUNE_DEPRECATED_MSG("makeSimplex(dim) is deprecated in DUNE 2.6, please use Dune::GeometryTypes::simplex(dim) instead")
552 void makeSimplex(unsigned int dim) {
559 DUNE_DEPRECATED_MSG("makeCube(dim) is deprecated in DUNE 2.6, please use Dune::GeometryTypes::cube(dim) instead")
560 void makeCube(unsigned int dim) {
567 DUNE_DEPRECATED_MSG("makeNone(dim) is deprecated in DUNE 2.6, please use Dune::GeometryTypes::none(dim) instead")
568 void makeNone(unsigned int dim) {
578 void makeFromVertices(unsigned int dim, unsigned int vertices) DUNE_DEPRECATED_MSG("Use the utility function geometryTypeFromVertexCount(...) instead.")
590 constexpr bool isVertex() const {
595 constexpr bool isLine() const {
600 constexpr bool isTriangle() const {
605 constexpr bool isQuadrilateral() const {
610 constexpr bool isTetrahedron() const {
615 constexpr bool isPyramid() const {
620 constexpr bool isPrism() const {
625 constexpr bool isHexahedron() const {
630 constexpr bool isSimplex() const {
635 constexpr bool isCube() const {
640 constexpr bool isNone() const {
645 constexpr unsigned int dim() const {
650 constexpr unsigned int id() const {
662 constexpr bool operator==(const GeometryType& other) const {
673 constexpr bool operator!=(const GeometryType& other) const {
678 constexpr bool operator < (const GeometryType& other) const {
695 inline std::ostream& operator<< (std::ostream& s, const GeometryType& a)
728 inline std::ostream& operator<< (std::ostream& s, GeometryType::BasicType type)
761 namespace GeometryTypes {
767 inline constexpr GeometryType simplex(unsigned int dim)
776 inline constexpr GeometryType cube(unsigned int dim)
785 inline constexpr GeometryType none(unsigned int dim)
798 DUNE_INLINE_VARIABLE constexpr GeometryType vertex = GeometryType(0,0,false);
804 DUNE_INLINE_VARIABLE constexpr GeometryType line = GeometryType(0,1,false);
810 DUNE_INLINE_VARIABLE constexpr GeometryType triangle = simplex(2);
816 DUNE_INLINE_VARIABLE constexpr GeometryType quadrilateral = cube(2);
822 DUNE_INLINE_VARIABLE constexpr GeometryType tetrahedron = simplex(3);
828 DUNE_INLINE_VARIABLE constexpr GeometryType pyramid = GeometryType(0b0011,3,false);
834 DUNE_INLINE_VARIABLE constexpr GeometryType prism = GeometryType(0b0101,3,false);
840 DUNE_INLINE_VARIABLE constexpr GeometryType hexahedron = cube(3);
Definition of the DUNE_DEPRECATED macro for the case that config.h is not available.
A few common exception classes.
Traits for type conversions and type information.
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:180
Definitions of several macros that conditionally make C++ syntax available.
GeometryType geometryTypeFromVertexCount(unsigned int dim, unsigned int vertices)
Utitlity function to construct the correct geometry type given the dimension and the number of vertic...
Definition: typefromvertexcount.hh:15
Definition of the DUNE_UNUSED macro for the case that config.h is not available.
![Creative Commons License](https://i.creativecommons.org/l/by-sa/4.0/80x15.png)