Dune Core Modules (2.7.0)
type.hh
Go to the documentation of this file.
54 static const unsigned int id = BaseTopology::id | ((unsigned int)prismConstruction << (dimension-1));
66 static const unsigned int id = BaseTopology::id | ((unsigned int)pyramidConstruction << (dimension-1));
152 inline static bool isTopology ( TopologyConstruction construction, unsigned int topologyId, int dim, int codim = 0 ) noexcept
156 return (codim >= (dim-1)) || (((topologyId >> (dim-codim-1)) & 1) == (unsigned int)construction);
166 inline static unsigned int baseTopologyId ( unsigned int topologyId, int dim, int codim = 1 ) noexcept
242 return IfTopology< Operation, dim-1, Prism< Topology > >::apply( topologyId >> 1, std::forward< Args >( args )... );
244 return IfTopology< Operation, dim-1, Pyramid< Topology > >::apply( topologyId >> 1, std::forward< Args >( args )... );
278 class GeometryType
284 enum
286 simplex,
287 cube,
288 pyramid,
289 prism,
290 extended,
292 };
346 using Id = IdType;
355 constexpr operator Id() const
370 constexpr GeometryType(Id id)
380 constexpr GeometryType ()
386 GeometryType(BasicType basicType, unsigned int dim)
387 DUNE_DEPRECATED_MSG("The GeometryType constructor taking BasicType is deprecated and will be removed after DUNE 2.6")
429 constexpr GeometryType(unsigned int topologyId, unsigned int dim, bool none)
438 constexpr GeometryType(unsigned int topologyId, unsigned int dim)
454 explicit GeometryType(TopologyType t)
461 DUNE_DEPRECATED_MSG("GeometryType(unsigned dim) is deprecated in DUNE 2.7, please use Dune::GeometryTypes::cube(dim) instead")
462 explicit GeometryType(unsigned int dim)
472 DUNE_DEPRECATED_MSG("GeometryType(dim) is deprecated in DUNE 2.7, please use Dune::GeometryTypes::cube(dim) instead")
473 explicit GeometryType(int dim)
486 DUNE_DEPRECATED_MSG("makeVertex() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::vertex instead")
487 void makeVertex() {
494 DUNE_DEPRECATED_MSG("makeLine() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::line instead")
495 void makeLine() {
502 DUNE_DEPRECATED_MSG("makeTriangle() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::triangle instead")
503 void makeTriangle() {
510 DUNE_DEPRECATED_MSG("makeQuadrilateral() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::quadrilateral instead")
511 void makeQuadrilateral() {
518 DUNE_DEPRECATED_MSG("makeTetrahedron() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::tetrahedron instead")
519 void makeTetrahedron() {
526 DUNE_DEPRECATED_MSG("makePyramid() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::pyramid instead")
527 void makePyramid() {
534 DUNE_DEPRECATED_MSG("makePrism() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::prism instead")
535 void makePrism() {
542 DUNE_DEPRECATED_MSG("makeHexahedron() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::hexahedron instead")
543 void makeHexahedron() {
550 DUNE_DEPRECATED_MSG("makeSimplex(dim) is deprecated in DUNE 2.6, please use Dune::GeometryTypes::simplex(dim) instead")
551 void makeSimplex(unsigned int dim) {
558 DUNE_DEPRECATED_MSG("makeCube(dim) is deprecated in DUNE 2.6, please use Dune::GeometryTypes::cube(dim) instead")
559 void makeCube(unsigned int dim) {
566 DUNE_DEPRECATED_MSG("makeNone(dim) is deprecated in DUNE 2.6, please use Dune::GeometryTypes::none(dim) instead")
567 void makeNone(unsigned int dim) {
577 void makeFromVertices(unsigned int dim, unsigned int vertices) DUNE_DEPRECATED_MSG("Use the utility function geometryTypeFromVertexCount(...) instead.")
589 constexpr bool isVertex() const {
594 constexpr bool isLine() const {
599 constexpr bool isTriangle() const {
604 constexpr bool isQuadrilateral() const {
609 constexpr bool isTetrahedron() const {
614 constexpr bool isPyramid() const {
619 constexpr bool isPrism() const {
624 constexpr bool isHexahedron() const {
629 constexpr bool isSimplex() const {
634 constexpr bool isCube() const {
639 constexpr bool isNone() const {
644 constexpr unsigned int dim() const {
649 constexpr unsigned int id() const {
661 constexpr bool operator==(const GeometryType& other) const {
672 constexpr bool operator!=(const GeometryType& other) const {
677 constexpr bool operator < (const GeometryType& other) const {
694 inline std::ostream& operator<< (std::ostream& s, const GeometryType& a)
727 inline std::ostream& operator<< (std::ostream& s, GeometryType::BasicType type)
760 namespace GeometryTypes {
766 inline constexpr GeometryType simplex(unsigned int dim)
775 inline constexpr GeometryType cube(unsigned int dim)
784 inline constexpr GeometryType none(unsigned int dim)
797 DUNE_INLINE_VARIABLE constexpr GeometryType vertex = GeometryType(0,0,false);
803 DUNE_INLINE_VARIABLE constexpr GeometryType line = GeometryType(0,1,false);
809 DUNE_INLINE_VARIABLE constexpr GeometryType triangle = simplex(2);
815 DUNE_INLINE_VARIABLE constexpr GeometryType quadrilateral = cube(2);
821 DUNE_INLINE_VARIABLE constexpr GeometryType tetrahedron = simplex(3);
827 DUNE_INLINE_VARIABLE constexpr GeometryType pyramid = GeometryType(0b0011,3,false);
833 DUNE_INLINE_VARIABLE constexpr GeometryType prism = GeometryType(0b0101,3,false);
839 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.
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
Traits for type conversions and type information.
Definition of the DUNE_UNUSED macro for the case that config.h is not available.
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Oct 13, 22:30, 2024)