CellType

class dolfin.cpp.mesh.CellType(*args, **kwargs)

Bases: object

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.

Type_hexahedron = 5
Type_interval = 1
Type_point = 0
Type_quadrilateral = 3
Type_tetrahedron = 4
Type_triangle = 2
cell_normal()

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

Parameters:Cell & cell (const) –
Return type:Point
cell_type()

Return type of cell.

Return type:Type
circumradius()

Compute circumradius of mesh entity.

Parameters:MeshEntity & entity (const) –
Return type:double
collides()

Check whether given point collides with cell.

Parameters:
  • Cell & cell (const) –
  • Point & point (const) –
Return type:

bool

static create()

Create cell type from string (factory function)

Parameters:type (std::string) –
Return type:CellType *
create_entities()

Create entities e of given topological dimension from vertices v

Parameters:
  • unsigned int, 2 > & e (boost::multi_array<) –
  • dim (std::size_t) –
  • unsigned int * v (const) –
Return type:

void

description()

Return description of cell type.

Parameters:plural (bool) –
Return type:std::string
dim()

Return topological dimension of cell.

Return type:std::size_t
entity_type()

Return type of cell for entity of dimension i.

Parameters:i (std::size_t) –
Return type:Type
facet_area()

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

Parameters:
  • Cell & cell (const) –
  • facet (std::size_t) –
Return type:

double

facet_type()

Return type of cell for facets.

Return type:Type
h()

Compute greatest distance between any two vertices.

Parameters:MeshEntity & entity (const) –
Return type:double
inradius()

Compute inradius of cell.

Parameters:Cell & cell (const) –
Return type:double
is_simplex()

Check if cell is a simplex.

Return type:bool
normal()

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

Parameters:
  • Cell & cell (const) –
  • facet (std::size_t) –
  • i (std::size_t) –
Return type:

double

num_entities()

Return number of entities of given topological dimension.

Parameters:dim (std::size_t) –
Return type:std::size_t
num_vertices()

Return number of vertices for cell.

Return type:std::size_t
order()

Order entities locally.

Parameters:
  • & cell (Cell) –
  • std::vector< std::int64_t > & local_to_global_vertex_indices (const) –
Return type:

void

ordered()

Check if entities are ordered.

Parameters:
  • Cell & cell (const) –
  • std::vector< std::int64_t > & local_to_global_vertex_indices (const) –
Return type:

bool

orientation()

Return orientation of the cell (assuming flat space)

Parameters:Cell & cell (const) –
Return type:std::size_t
radius_ratio()

Compute dim*inradius/circumradius for given cell.

Parameters:Cell & cell (const) –
Return type:double
squared_distance()

Compute squared distance to given point.

Parameters:
  • Cell & cell (const) –
  • Point & point (const) –
Return type:

double

static string2type()

Convert from string to cell type.

Parameters:type (std::string) –
Return type:Type
thisown

The membership flag

static type2string()

Convert from cell type to string.

Parameters:type (Type) –
Return type:std::string
volume()

Compute (generalized) volume of mesh entity.

Parameters:MeshEntity & entity (const) –
Return type:double
vtk_mapping()

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

Return type:std::vector< std::int8_t >