Cell¶
-
class
dolfin.cpp.mesh.Cell(*args)¶ Bases:
dolfin.cpp.mesh.MeshEntityA Cell is a
MeshEntityof topological codimension 0.Overloaded versions
Cell()
Create empty cell
Cell(mesh, index)
Create cell on given mesh with given index
- Arguments
- mesh (
Mesh) The mesh.
- index (int)
The index.
- mesh (
-
cell_normal()¶ Compute normal to cell itself (viewed as embedded in 3D)
- Returns
Point- Normal of the cell
-
collides()¶ Overloaded versions
collides(point)
Check whether given point collides with cell
- Arguments
- point (
Point) The point to be checked.
- point (
- Returns
- bool
True iff point collides with cell.
collides(entity)
Check whether given entity collides with cell
- Arguments
- entity (
MeshEntity) The cell to be checked.
- entity (
- Returns
- bool
True iff entity collides with cell.
-
contains()¶ Check whether given point is contained in cell. This function is identical to the function collides(point).
- Arguments
- point (
Point) - The point to be checked.
- point (
- Returns
- bool
- True iff point is contained in cell.
-
diameter()¶ Compute diameter of cell
- Returns
- float
- The diameter of the cell.
- Example
Note
No example code available for this function.
-
distance()¶ Compute distance to given point.
- Arguments
- point (
Point) - The point.
- point (
- Returns
- float
- The distance to the point.
-
facet_area()¶ Compute the area/length of given facet with respect to the cell
- Arguments
- facet (int)
- Index of the facet.
- Returns
- float
- Area/length of the facet.
-
get_cell_data()¶ Fill UFC cell with miscellaneous data
-
get_cell_topology()¶ Fill UFC cell with topology data
-
get_vertex_coordinates()¶ Overloaded versions
get_vertex_coordinates(coordinates)
Get cell vertex coordinates
get_vertex_coordinates(coordinates)
Get cell vertex coordinates
-
inradius()¶ Compute inradius of cell
- Returns
- float
- Radius of the sphere inscribed in the cell.
- Example
Note
No example code available for this function.
-
normal()¶ Overloaded versions
normal(facet, i)
Compute component i of normal of given facet with respect to the cell
- Arguments
- facet (int)
Index of facet.
- i (int)
Component.
- Returns
- float
Component i of the normal of the facet.
normal(facet)
Compute normal of given facet with respect to the cell
- Arguments
- facet (int)
Index of facet.
- Returns
PointNormal of the facet.
-
num_vertices()¶ Return number of vertices of cell
-
order()¶ Order entities locally
- Arguments
- global_vertex_indices (numpy.array(int))
- The global vertex indices.
-
ordered()¶ Check if entities are ordered
- Arguments
- global_vertex_indices (numpy.array(int))
- The global vertex indices.
- Returns
- bool
- True iff ordered.
-
orientation()¶ Overloaded versions
orientation()
Compute orientation of cell
- Returns
- int
Orientation of the cell (0 is ‘up’/’right’, 1 is ‘down’/’left’)
orientation(up)
Compute orientation of cell relative to given ‘up’ direction
- Arguments
- up (
Point) The direction defined as ‘up’
- up (
- Returns
- int
Orientation of the cell (0 is ‘same’, 1 is ‘opposite’)
-
radius_ratio()¶ Compute ratio of inradius to circumradius times dim for cell. Useful as cell quality measure. Returns 1. for equilateral and 0. for degenerate cell. See Jonathan Richard Shewchuk: What Is a Good Linear Finite Element?, online: http://www.cs.berkeley.edu/~jrs/papers/elemj.pdf
- Returns
- float
- cell_dimension * inradius / circumradius
- Example
Note
No example code available for this function.
-
squared_distance()¶ Compute squared distance to given point.
- Arguments
- point (
Point) - The point.
- point (
- Returns
- float
- The squared distance to the point.
-
thisown¶ The membership flag
-
triangulate_intersection()¶ Compute triangulation of intersection with given entity
- Arguments
- entity (
MeshEntity) - The entity with which to intersect.
- entity (
- Returns
- numpy.array(float)
- A flattened array of simplices of dimension num_simplices x num_vertices x gdim = num_simplices x (tdim + 1) x gdim
-
type()¶ Return type of cell
-
volume()¶ Compute (generalized) volume of cell
- Returns
- float
- The volume of the cell.
- Example
Note
No example code available for this function.