Dune Core Modules (2.6.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 )... );
276 class GeometryType
282 enum
284 simplex,
285 cube,
286 pyramid,
287 prism,
288 extended,
290 };
309 constexpr GeometryType ()
316 GeometryType(BasicType basicType, unsigned int dim)
317 DUNE_DEPRECATED_MSG("The GeometryType constructor taking BasicType is deprecated and will be removed after DUNE 2.6")
359 constexpr GeometryType(unsigned int topologyId, unsigned int dim, bool none)
368 constexpr GeometryType(unsigned int topologyId, unsigned int dim)
384 explicit GeometryType(TopologyType t)
391 explicit GeometryType(unsigned int dim)
401 explicit GeometryType(int dim)
414 DUNE_DEPRECATED_MSG("makeVertex() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::vertex instead")
415 void makeVertex() {
422 DUNE_DEPRECATED_MSG("makeLine() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::line instead")
423 void makeLine() {
430 DUNE_DEPRECATED_MSG("makeTriangle() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::triangle instead")
431 void makeTriangle() {
438 DUNE_DEPRECATED_MSG("makeQuadrilateral() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::quadrilateral instead")
439 void makeQuadrilateral() {
446 DUNE_DEPRECATED_MSG("makeTetrahedron() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::tetrahedron instead")
447 void makeTetrahedron() {
454 DUNE_DEPRECATED_MSG("makePyramid() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::pyramid instead")
455 void makePyramid() {
462 DUNE_DEPRECATED_MSG("makePrism() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::prism instead")
463 void makePrism() {
470 DUNE_DEPRECATED_MSG("makeHexahedron() is deprecated in DUNE 2.6, please use Dune::GeometryTypes::hexahedron instead")
471 void makeHexahedron() {
478 DUNE_DEPRECATED_MSG("makeSimplex(dim) is deprecated in DUNE 2.6, please use Dune::GeometryTypes::simplex(dim) instead")
479 void makeSimplex(unsigned int dim) {
486 DUNE_DEPRECATED_MSG("makeCube(dim) is deprecated in DUNE 2.6, please use Dune::GeometryTypes::cube(dim) instead")
487 void makeCube(unsigned int dim) {
494 DUNE_DEPRECATED_MSG("makeNone(dim) is deprecated in DUNE 2.6, please use Dune::GeometryTypes::none(dim) instead")
495 void makeNone(unsigned int dim) {
505 void makeFromVertices(unsigned int dim, unsigned int vertices) DUNE_DEPRECATED_MSG("Use the utility function geometryTypeFromVertexCount(...) instead.")
517 constexpr bool isVertex() const {
522 constexpr bool isLine() const {
527 constexpr bool isTriangle() const {
532 constexpr bool isQuadrilateral() const {
537 constexpr bool isTetrahedron() const {
542 constexpr bool isPyramid() const {
547 constexpr bool isPrism() const {
552 constexpr bool isHexahedron() const {
557 constexpr bool isSimplex() const {
562 constexpr bool isCube() const {
567 constexpr bool isNone() const {
572 constexpr unsigned int dim() const {
577 constexpr unsigned int id() const {
589 constexpr bool operator==(const GeometryType& other) const {
600 constexpr bool operator!=(const GeometryType& other) const {
605 constexpr bool operator < (const GeometryType& other) const {
622 inline std::ostream& operator<< (std::ostream& s, const GeometryType& a)
656 inline std::ostream& operator<< (std::ostream& s, GeometryType::BasicType type)
690 namespace GeometryTypes {
696 inline constexpr GeometryType simplex(unsigned int dim)
705 inline constexpr GeometryType cube(unsigned int dim)
714 inline constexpr GeometryType none(unsigned int dim)
727 DUNE_INLINE_VARIABLE constexpr GeometryType vertex = GeometryType(0,0,false);
733 DUNE_INLINE_VARIABLE constexpr GeometryType line = GeometryType(0,1,false);
739 DUNE_INLINE_VARIABLE constexpr GeometryType triangle = simplex(2);
745 DUNE_INLINE_VARIABLE constexpr GeometryType quadrilateral = cube(2);
751 DUNE_INLINE_VARIABLE constexpr GeometryType tetrahedron = simplex(3);
757 DUNE_INLINE_VARIABLE constexpr GeometryType pyramid = GeometryType(0b0011,3,false);
763 DUNE_INLINE_VARIABLE constexpr GeometryType prism = GeometryType(0b0101,3,false);
769 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:178
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
(Dec 26, 23:30, 2024)