Loading...
Searching...
No Matches
dolfin::CellType Class Referenceabstract

`#include <CellType.h>`

Inheritance diagram for dolfin::CellType:
[legend]

## Public Types

enum class | Type : int { point , interval , triangle , quadrilateral , tetrahedron , hexahedron }
| Enum for different cell types.

## Public Member Functions

| CellType (Type cell_type, Type facet_type)
| Constructor.
virtual | ~CellType ()
| Destructor.
Type | cell_type () const
| Return type of cell.
Type | facet_type () const
| Return type of cell for facets.
Type | entity_type (std::size_t i) const
| Return type of cell for entity of dimension i.
virtual bool | is_simplex () const =0
| Check if cell is a simplex.
virtual std::size_t | dim () const =0
| Return topological dimension of cell.
virtual std::size_t | num_entities (std::size_t dim) const =0
| Return number of entities of given topological dimension.
std::size_t | num_vertices () const
| Return number of vertices for cell.
virtual std::size_t | num_vertices (std::size_t dim) const =0
| Return number of vertices for entity of given topological dimension.
virtual std::size_t | orientation (const Cell &cell) const =0
| Return orientation of the cell (assuming flat space).
std::size_t | orientation (const Cell &cell, const Point &up) const
| Return orientation of the cell relative to given up direction.
virtual void | create_entities (boost::multi_array< unsigned int, 2 > &e, std::size_t dim, const unsigned int *v) const =0
virtual double | volume (const MeshEntity &entity) const =0
| Compute (generalized) volume of mesh entity.
virtual double | h (const MeshEntity &entity) const
| Compute greatest distance between any two vertices.
virtual double | circumradius (const MeshEntity &entity) const =0
| Compute circumradius of mesh entity.
virtual double | inradius (const Cell &cell) const
| Compute inradius of cell.
virtual double | radius_ratio (const Cell &cell) const
| Compute dim*inradius/circumradius for given cell.
virtual double | squared_distance (const Cell &cell, const Point &point) const =0
| Compute squared distance to given point.
virtual double | normal (const Cell &cell, std::size_t facet, std::size_t i) const =0
| Compute component i of normal of given facet with respect to the cell.
virtual Point | normal (const Cell &cell, std::size_t facet) const =0
| Compute of given facet with respect to the cell.
virtual Point | cell_normal (const Cell &cell) const =0
| Compute normal to given cell (viewed as embedded in 3D).
virtual double | facet_area (const Cell &cell, std::size_t facet) const =0
| Compute the area/length of given facet with respect to the cell.
virtual void | order (Cell &cell, const std::vector< std::int64_t > &local_to_global_vertex_indices) const =0
| Order entities locally.
bool | ordered (const Cell &cell, const std::vector< std::int64_t > &local_to_global_vertex_indices) const
| Check if entities are ordered.
virtual bool | collides (const Cell &cell, const Point &point) const =0
| Check whether given point collides with cell.
virtual bool | collides (const Cell &cell, const MeshEntity &entity) const =0
| Check whether given entity collides with cell.
virtual std::string | description (bool plural) const =0
| Return description of cell type.
virtual std::vector< std::int8_t > | vtk_mapping () const =0
| Mapping of DOLFIN/UFC vertex ordering to VTK/XDMF ordering.

## Static Public Member Functions

static CellType * | create (Type type)
| Create cell type from type (factory function).
static CellType * | create (std::string type)
| Create cell type from string (factory function).
static Type | string2type (std::string type)
| Convert from string to cell type.
static std::string | type2string (Type type)
| Convert from cell type to string.

## Static Protected Member Functions

static void | sort_entities (std::size_t num_vertices, unsigned int *vertices, const std::vector< std::int64_t > &local_to_global_vertex_indices)
| Sort vertices based on global entity indices.

## Protected Attributes

Type | _cell_type
Type | _facet_type

## Detailed Description

This class provides a common interface for different cell types. Each cell type implements mesh functionality that is specific to a certain type of cell.

## Member Function Documentation

## cell_normal()

virtual Point dolfin::CellType::cell_normal | ( | const Cell & | cell | ) | const

pure virtual

Compute normal to given cell (viewed as embedded in 3D).

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## circumradius()

virtual double dolfin::CellType::circumradius | ( | const MeshEntity & | entity | ) | const

pure virtual

Compute circumradius of mesh entity.

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## collides() [1/2]

virtual bool dolfin::CellType::collides | ( | const Cell & | cell,
|  | const MeshEntity & | entity ) const

pure virtual

Check whether given entity collides with cell.

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## collides() [2/2]

virtual bool dolfin::CellType::collides | ( | const Cell & | cell,
|  | const Point & | point ) const

pure virtual

Check whether given point collides with cell.

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## create_entities()

virtual void dolfin::CellType::create_entities | ( | boost::multi_array< unsigned int, 2 > & | e,
|  | std::size_t | dim,
|  | const unsigned int * | v ) const

pure virtual

Create entities e of given topological dimension from vertices v

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## description()

virtual std::string dolfin::CellType::description | ( | bool | plural | ) | const

pure virtual

Return description of cell type.

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## dim()

virtual std::size_t dolfin::CellType::dim | ( |  | ) | const

pure virtual

Return topological dimension of cell.

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## facet_area()

virtual double dolfin::CellType::facet_area | ( | const Cell & | cell,
|  | std::size_t | facet ) const

pure virtual

Compute the area/length of given facet with respect to the cell.

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## is_simplex()

virtual bool dolfin::CellType::is_simplex | ( |  | ) | const

pure virtual

Check if cell is a simplex.

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## normal() [1/2]

virtual Point dolfin::CellType::normal | ( | const Cell & | cell,
|  | std::size_t | facet ) const

pure virtual

Compute of given facet with respect to the cell.

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## normal() [2/2]

virtual double dolfin::CellType::normal | ( | const Cell & | cell,
|  | std::size_t | facet,
|  | std::size_t | i ) const

pure virtual

Compute component i of normal of given facet with respect to the cell.

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## num_entities()

virtual std::size_t dolfin::CellType::num_entities | ( | std::size_t | dim | ) | const

pure virtual

Return number of entities of given topological dimension.

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## num_vertices()

virtual std::size_t dolfin::CellType::num_vertices | ( | std::size_t | dim | ) | const

pure virtual

Return number of vertices for entity of given topological dimension.

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## order()

virtual void dolfin::CellType::order | ( | Cell & | cell,
|  | const std::vector< std::int64_t > & | local_to_global_vertex_indices ) const

pure virtual

Order entities locally.

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## orientation()

virtual std::size_t dolfin::CellType::orientation | ( | const Cell & | cell | ) | const

pure virtual

Return orientation of the cell (assuming flat space).

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## squared_distance()

virtual double dolfin::CellType::squared_distance | ( | const Cell & | cell,
|  | const Point & | point ) const

pure virtual

Compute squared distance to given point.

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## volume()

virtual double dolfin::CellType::volume | ( | const MeshEntity & | entity | ) | const

pure virtual

Compute (generalized) volume of mesh entity.

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

## vtk_mapping()

virtual std::vector< std::int8_t > dolfin::CellType::vtk_mapping | ( |  | ) | const

pure virtual

Mapping of DOLFIN/UFC vertex ordering to VTK/XDMF ordering.

Implemented in dolfin::HexahedronCell, dolfin::IntervalCell, dolfin::PointCell, dolfin::QuadrilateralCell, dolfin::TetrahedronCell, and dolfin::TriangleCell.

The documentation for this class was generated from the following files:

- /build/dolfin-lFBzDh/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/mesh/CellType.h
- /build/dolfin-lFBzDh/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/mesh/CellType.cpp