A Cell is a MeshEntity of topological codimension 0.
More...
#include <Cell.h>
|
Mesh const * | _mesh |
|
std::size_t | _dim |
|
std::size_t | _local_index |
|
A Cell is a MeshEntity of topological codimension 0.
◆ Cell()
dolfin::Cell::Cell |
( |
const Mesh & |
mesh, |
|
|
std::size_t |
index |
|
) |
| |
|
inline |
Create cell on given mesh with given index
- Parameters
-
mesh | The mesh. |
index | The index. |
◆ cell_normal()
Point dolfin::Cell::cell_normal |
( |
| ) |
const |
|
inline |
Compute normal to cell itself (viewed as embedded in 3D)
- Returns
- Point Normal of the cell
◆ circumradius()
double dolfin::Cell::circumradius |
( |
| ) |
const |
|
inline |
Compute circumradius of cell
- Returns
- double The circumradius of the cell.
UnitSquareMesh
mesh(1, 1);
info(
"%g", cell.circumradius());
◆ collides() [1/2]
bool Cell::collides |
( |
const Point & |
point | ) |
const |
Check whether given point collides with cell
- Parameters
-
point | The point to be checked. |
- Returns
- bool True iff point collides with cell.
◆ collides() [2/2]
bool Cell::collides |
( |
const MeshEntity & |
entity | ) |
const |
Check whether given entity collides with cell
- Parameters
-
entity | The cell to be checked. |
- Returns
- bool True iff entity collides with cell.
◆ contains()
bool Cell::contains |
( |
const Point & |
point | ) |
const |
Check whether given point is contained in cell. This function is identical to the function collides(point).
- Parameters
-
point | The point to be checked. |
- Returns
- bool True iff point is contained in cell.
◆ distance()
double dolfin::Cell::distance |
( |
const Point & |
point | ) |
const |
|
inline |
Compute distance to given point.
- Parameters
-
- Returns
- double The distance to the point.
◆ facet_area()
double dolfin::Cell::facet_area |
( |
std::size_t |
facet | ) |
const |
|
inline |
Compute the area/length of given facet with respect to the cell
- Parameters
-
- Returns
- double Area/length of the facet.
◆ h()
double dolfin::Cell::h |
( |
| ) |
const |
|
inline |
Compute greatest distance between any two vertices
- Returns
- double The greatest distance between any two vertices of the cell.
UnitSquareMesh
mesh(1, 1);
◆ inradius()
double dolfin::Cell::inradius |
( |
| ) |
const |
|
inline |
Compute inradius of cell
- Returns
- double Radius of the sphere inscribed in the cell.
UnitSquareMesh
mesh(1, 1);
info(
"%g", cell.inradius());
◆ intersection()
Compute triangulation of intersection with given entity
- Parameters
-
entity | The entity with which to intersect. |
- Returns
- std::vector<Point> A flattened array of simplices of dimension num_simplices x num_vertices x gdim = num_simplices x (tdim + 1) x gdim
◆ normal() [1/2]
double dolfin::Cell::normal |
( |
std::size_t |
facet, |
|
|
std::size_t |
i |
|
) |
| const |
|
inline |
Compute component i of normal of given facet with respect to the cell
- Parameters
-
facet | Index of facet. |
i | Component. |
- Returns
- double Component i of the normal of the facet.
◆ normal() [2/2]
Point dolfin::Cell::normal |
( |
std::size_t |
facet | ) |
const |
|
inline |
Compute normal of given facet with respect to the cell
- Parameters
-
- Returns
- Point Normal of the facet.
◆ order()
void dolfin::Cell::order |
( |
const std::vector< std::int64_t > & |
local_to_global_vertex_indices | ) |
|
|
inline |
Order entities locally
- Parameters
-
local_to_global_vertex_indices | The global vertex indices. |
◆ ordered()
bool dolfin::Cell::ordered |
( |
const std::vector< std::int64_t > & |
local_to_global_vertex_indices | ) |
const |
|
inline |
Check if entities are ordered
- Parameters
-
local_to_global_vertex_indices | The global vertex indices. |
- Returns
- bool True iff ordered.
◆ orientation() [1/2]
std::size_t dolfin::Cell::orientation |
( |
| ) |
const |
|
inline |
Compute orientation of cell
- Returns
- std::size_t Orientation of the cell (0 is 'up'/'right', 1 is 'down'/'left')
◆ orientation() [2/2]
std::size_t dolfin::Cell::orientation |
( |
const Point & |
up | ) |
const |
|
inline |
Compute orientation of cell relative to given 'up' direction
- Parameters
-
up | The direction defined as 'up' |
- Returns
- std::size_t Orientation of the cell (0 is 'same', 1 is 'opposite')
◆ radius_ratio()
double dolfin::Cell::radius_ratio |
( |
| ) |
const |
|
inline |
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
- double topological_dimension * inradius / circumradius
UnitSquareMesh
mesh(1, 1);
info(
"%g", cell.radius_ratio());
◆ squared_distance()
double dolfin::Cell::squared_distance |
( |
const Point & |
point | ) |
const |
|
inline |
Compute squared distance to given point.
- Parameters
-
- Returns
- double The squared distance to the point.
◆ volume()
double dolfin::Cell::volume |
( |
| ) |
const |
|
inline |
Compute (generalized) volume of cell
- Returns
- double The volume of the cell.
info(
"%g", cell.volume());
The documentation for this class was generated from the following files:
- /home/fenics/shared/dolfin/dolfin/mesh/Cell.h
- /home/fenics/shared/dolfin/dolfin/mesh/Cell.cpp