:py:mod:`symfem.references` =========================== .. py:module:: symfem.references .. autoapi-nested-parse:: Reference elements. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: symfem.references.Reference symfem.references.Point symfem.references.Interval symfem.references.Triangle symfem.references.Tetrahedron symfem.references.Quadrilateral symfem.references.Hexahedron symfem.references.Prism symfem.references.Pyramid symfem.references.DualPolygon Functions ~~~~~~~~~ .. autoapisummary:: symfem.references._which_side symfem.references._vsub symfem.references._vadd symfem.references._vdot symfem.references._vcross symfem.references._vnorm symfem.references._vnormalise Attributes ~~~~~~~~~~ .. autoapisummary:: symfem.references.LatticeWithLines symfem.references.IntLimits .. py:data:: LatticeWithLines .. py:data:: IntLimits .. py:exception:: NonDefaultReferenceError Bases: :py:obj:`NotImplementedError` Exception to be thrown when an element can only be created on the default reference. .. py:function:: _which_side(vs: symfem.geometry.SetOfPoints, p: symfem.geometry.PointType, q: symfem.geometry.PointType) -> Optional[int] Check which side of a line or plane a set of points are. :param vs: The set of points :param p: A point on the line or plane :param q: Another point on the line (2D) or the normal to the plane (3D) :returns: 2 if the points are all to the left, 1 if the points are all to the left or on the line, 0 if the points are all on the line, -1 if the points are all to the right or on the line, -1 if the points are all to the right, None if there are some points on either side. .. py:function:: _vsub(v: symfem.geometry.PointTypeInput, w: symfem.geometry.PointTypeInput) -> symfem.geometry.PointType Subtract. :param v: A vector :param w: A vector :returns: The vector v - w .. py:function:: _vadd(v: symfem.geometry.PointTypeInput, w: symfem.geometry.PointTypeInput) -> symfem.geometry.PointType Add. :param v: A vector :param w: A vector :returns: The vector v + w .. py:function:: _vdot(v: symfem.geometry.PointTypeInput, w: symfem.geometry.PointTypeInput) -> sympy.core.expr.Expr Compute the dot product. :param v: A vector :param w: A vector :returns: The scalar v.w .. py:function:: _vcross(v_in: symfem.geometry.PointTypeInput, w_in: symfem.geometry.PointTypeInput) -> symfem.geometry.PointType Compute the cross product. :param v: A vector :param w: A vector :returns: The vector v x w .. py:function:: _vnorm(v_in: symfem.geometry.PointTypeInput) -> sympy.core.expr.Expr Find the norm of a vector. :param v_in: A vector :returns: The norm of v_in .. py:function:: _vnormalise(v_in: symfem.geometry.PointTypeInput) -> symfem.geometry.PointType Normalise a vector. :param v_in: A vector :returns: A unit vector pointing in the same direction as v_in .. py:class:: Reference(vertices: symfem.geometry.SetOfPointsInput = ()) Bases: :py:obj:`abc.ABC` A reference cell on which a finite element can be defined. .. py:property:: clockwise_vertices :type: symfem.geometry.SetOfPoints Get list of vertices in clockwise order. :returns: A list of vertices .. py:method:: __build__(tdim: int, name: str, origin: symfem.geometry.PointTypeInput, axes: symfem.geometry.SetOfPointsInput, reference_vertices: symfem.geometry.SetOfPointsInput, vertices: symfem.geometry.SetOfPointsInput, edges: Tuple[Tuple[int, int], Ellipsis], faces: Tuple[Tuple[int, Ellipsis], Ellipsis], volumes: Tuple[Tuple[int, Ellipsis], Ellipsis], sub_entity_types: List[Union[List[str], str, None]], simplex: bool = False, tp: bool = False) Create a reference cell. :param tdim: The topological dimension of the cell :param name: The name of the cell :param origin: The coordinates of the origin :param axes: Vectors representing the axes of the cell :param reference_vertices: The vertices of the default version of this cell :param vertices: The vertices of this cell :param edges: Pairs of vertex numbers that form the edges of the cell :param faces: Tuples of vertex numbers that form the faces of the cell :param volumes: Tuples of vertex numbers that form the volumes of the cell :param sub_entity_types: The cell types of each sub-entity of the cell :param simplex: Is the cell a simplex (interval/triangle/tetrahedron)? :param tp: Is the cell a tensor product (interval/quadrilateral/hexahedron)? .. py:method:: __eq__(other: object) -> bool Check if two references are equal. .. py:method:: __hash__() -> int Check if two references are equal. .. py:method:: intersection(other: Reference) -> Optional[Reference] Get the intersection of two references. :returns: A reference element that is the intersection .. py:method:: default_reference() -> Reference :abstractmethod: Get the default reference for this cell type. :returns: The default reference .. py:method:: make_lattice(n: int) -> symfem.geometry.SetOfPoints :abstractmethod: Make a lattice of points. :param n: The number of points along each edge :returns: A lattice of points offset from the edge of the cell .. py:method:: make_lattice_with_lines(n: int) -> LatticeWithLines :abstractmethod: Make a lattice of points, and a list of lines connecting them. :param n: The number of points along each edge :returns: A lattice of points including the edges of the cell Pairs of point numbers that make a mesh of lines across the cell .. py:method:: make_lattice_float(n: int) -> symfem.geometry.SetOfPoints Make a lattice of points. :param n: The number of points along each edge :returns: A lattice of points offset from the edge of the cell .. py:method:: make_lattice_with_lines_float(n: int) -> LatticeWithLines Make a lattice of points, and a list of lines connecting them. :param n: The number of points along each edge :returns: A lattice of points including the edges of the cell Pairs of point numbers that make a mesh of lines across the cell .. py:method:: z_ordered_entities() -> List[List[Tuple[int, int]]] Get the subentities of the cell in back-to-front plotting order. :returns: List of lists of subentity dimensions and numbers .. py:method:: z_ordered_entities_extra_dim() -> List[List[Tuple[int, int]]] Get the subentities in back-to-front plotting order when using an extra dimension. :returns: List of lists of subentity dimensions and numbers .. py:method:: get_point(reference_coords: symfem.geometry.PointType) -> Tuple[sympy.core.expr.Expr, Ellipsis] Get a point in the reference from reference coordinates. :param reference_coords: The reference coordinates :returns: A point in the cell .. py:method:: integration_limits(vars: symfem.symbols.AxisVariablesNotSingle = t) -> IntLimits :abstractmethod: Get the limits for an integral over this reference. :param vars: The variables to use for each direction :returns: Integration limits that can be passed into sympy.integrate .. py:method:: get_map_to(vertices: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType :abstractmethod: Get the map from the reference to a cell. :param vertices: The vertices of a call :returns: The map .. py:method:: get_inverse_map_to(vertices_in: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType :abstractmethod: Get the inverse map from a cell to the reference. :param vertices_in: The vertices of a cell :returns: The inverse map .. py:method:: get_map_to_self() -> symfem.geometry.PointType Get the map from the canonical reference to this reference. :returns: The map .. py:method:: _compute_map_to_self() -> symfem.geometry.PointType :abstractmethod: Compute the map from the canonical reference to this reference. :returns: The map .. py:method:: get_inverse_map_to_self() -> symfem.geometry.PointType Get the inverse map from the canonical reference to this reference. :returns: The map .. py:method:: _compute_inverse_map_to_self() -> symfem.geometry.PointType :abstractmethod: Compute the inverse map from the canonical reference to this reference. :returns: The map .. py:method:: volume() -> sympy.core.expr.Expr :abstractmethod: Calculate the volume. :returns: The volume of the cell .. py:method:: midpoint() -> symfem.geometry.PointType Calculate the midpoint. :returns: The midpoint of the cell .. py:method:: jacobian() -> sympy.core.expr.Expr Calculate the Jacobian. :returns: The Jacobian .. py:method:: scaled_axes() -> symfem.geometry.SetOfPoints Return the unit axes of the reference. :returns: The axes .. py:method:: tangent() -> symfem.geometry.PointType Calculate the tangent to the element. :returns: The tangent .. py:method:: normal() -> symfem.geometry.PointType Calculate the normal to the element. :returns: The normal .. py:method:: sub_entities(dim: Optional[int] = None, codim: Optional[int] = None) -> Tuple[Tuple[int, Ellipsis], Ellipsis] Get the sub-entities of a given dimension. :param dim: The dimension of the sub-entity :param codim: The co-dimension of the sub-entity :returns: A tuple of tuples of vertex numbers .. py:method:: sub_entity_count(dim: Optional[int] = None, codim: Optional[int] = None) -> int Get the number of sub-entities of a given dimension. :param dim: the dimension of the sub-entity :param codim: the codimension of the sub-entity :returns: The number of sub-entities .. py:method:: sub_entity(dim: int, n: int, reference_vertices: bool = False) -> Any Get the sub-entity of a given dimension and number. :param dim: the dimension of the sub-entity :param n: The sub-entity number :param reference_vertices: Should the reference vertices be used? :returns: The sub-entity .. py:method:: at_vertex(point: symfem.geometry.PointType) -> bool Check if a point is a vertex of the reference. :param point: The point :returns: Is the point a vertex? .. py:method:: on_edge(point_in: symfem.geometry.PointType) -> bool Check if a point is on an edge of the reference. :param point_in: The point :returns: Is the point on an edge? .. py:method:: on_face(point_in: symfem.geometry.PointType) -> bool Check if a point is on a face of the reference. :param point_in: The point :returns: Is the point on a face? .. py:method:: contains(point: symfem.geometry.PointType) -> bool :abstractmethod: Check if a point is contained in the reference. :param point: The point :returns: Is the point contained in the reference? .. py:method:: map_polyset_from_default(poly: List[symfem.functions.FunctionInput]) -> List[symfem.functions.FunctionInput] Map the polynomials from the default reference element to this reference. .. py:method:: plot_entity_diagrams(filename: Union[str, List[str]], plot_options: Dict[str, Any] = {}, **kwargs: Any) Plot diagrams showing the entity numbering of the reference. .. py:class:: Point(vertices: symfem.geometry.SetOfPointsInput = ((), )) Bases: :py:obj:`Reference` A point. .. py:method:: default_reference() -> Reference Get the default reference for this cell type. :returns: The default reference .. py:method:: make_lattice(n: int) -> symfem.geometry.SetOfPoints :abstractmethod: Make a lattice of points. :param n: The number of points along each edge :returns: A lattice of points offset from the edge of the cell .. py:method:: make_lattice_with_lines(n: int) -> LatticeWithLines :abstractmethod: Make a lattice of points, and a list of lines connecting them. :param n: The number of points along each edge :returns: A lattice of points including the edges of the cell Pairs of point numbers that make a mesh of lines across the cell .. py:method:: integration_limits(vars: symfem.symbols.AxisVariablesNotSingle = t) -> IntLimits Get the limits for an integral over this reference. :param vars: The variables to use for each direction :returns: Integration limits that can be passed into sympy.integrate .. py:method:: get_map_to(vertices: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType Get the map from the reference to a cell. :param vertices: The vertices of a call :returns: The map .. py:method:: get_inverse_map_to(vertices_in: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType Get the inverse map from a cell to the reference. :param vertices_in: The vertices of a cell :returns: The inverse map .. py:method:: _compute_map_to_self() -> symfem.geometry.PointType Compute the map from the canonical reference to this reference. :returns: The map .. py:method:: _compute_inverse_map_to_self() -> symfem.geometry.PointType Compute the inverse map from the canonical reference to this reference. :returns: The map .. py:method:: volume() -> sympy.core.expr.Expr Calculate the volume. :returns: The volume of the cell .. py:method:: contains(point: symfem.geometry.PointType) -> bool Check if a point is contained in the reference. :param point: The point :returns: Is the point contained in the reference? .. py:class:: Interval(vertices: symfem.geometry.SetOfPointsInput = ((0, ), (1, ))) Bases: :py:obj:`Reference` An interval. .. py:method:: default_reference() -> Reference Get the default reference for this cell type. :returns: The default reference .. py:method:: make_lattice(n: int) -> symfem.geometry.SetOfPoints Make a lattice of points. :param n: The number of points along each edge :returns: A lattice of points offset from the edge of the cell .. py:method:: make_lattice_with_lines(n: int) -> LatticeWithLines Make a lattice of points, and a list of lines connecting them. :param n: The number of points along each edge :returns: A lattice of points including the edges of the cell Pairs of point numbers that make a mesh of lines across the cell .. py:method:: integration_limits(vars: symfem.symbols.AxisVariablesNotSingle = t) -> IntLimits Get the limits for an integral over this reference. :param vars: The variables to use for each direction :returns: Integration limits that can be passed into sympy.integrate .. py:method:: get_map_to(vertices: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType Get the map from the reference to a cell. :param vertices: The vertices of a call :returns: The map .. py:method:: get_inverse_map_to(vertices_in: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType Get the inverse map from a cell to the reference. :param vertices_in: The vertices of a cell :returns: The inverse map .. py:method:: _compute_map_to_self() -> symfem.geometry.PointType Compute the map from the canonical reference to this reference. :returns: The map .. py:method:: _compute_inverse_map_to_self() -> symfem.geometry.PointType Compute the inverse map from the canonical reference to this reference. :returns: The map .. py:method:: volume() -> sympy.core.expr.Expr Calculate the volume. :returns: The volume of the cell .. py:method:: contains(point: symfem.geometry.PointType) -> bool Check if a point is contained in the reference. :param point: The point :returns: Is the point contained in the reference? .. py:class:: Triangle(vertices: symfem.geometry.SetOfPointsInput = ((0, 0), (1, 0), (0, 1))) Bases: :py:obj:`Reference` A triangle. .. py:method:: default_reference() -> Reference Get the default reference for this cell type. :returns: The default reference .. py:method:: make_lattice(n: int) -> symfem.geometry.SetOfPoints Make a lattice of points. :param n: The number of points along each edge :returns: A lattice of points offset from the edge of the cell .. py:method:: make_lattice_with_lines(n: int) -> LatticeWithLines Make a lattice of points, and a list of lines connecting them. :param n: The number of points along each edge :returns: A lattice of points including the edges of the cell Pairs of point numbers that make a mesh of lines across the cell .. py:method:: z_ordered_entities_extra_dim() -> List[List[Tuple[int, int]]] Get the subentities in back-to-front plotting order when using an extra dimension. :returns: List of lists of subentity dimensions and numbers .. py:method:: integration_limits(vars: symfem.symbols.AxisVariablesNotSingle = t) -> IntLimits Get the limits for an integral over this reference. :param vars: The variables to use for each direction :returns: Integration limits that can be passed into sympy.integrate .. py:method:: get_map_to(vertices: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType Get the map from the reference to a cell. :param vertices: The vertices of a call :returns: The map .. py:method:: get_inverse_map_to(vertices_in: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType Get the inverse map from a cell to the reference. :param vertices_in: The vertices of a cell :returns: The inverse map .. py:method:: _compute_map_to_self() -> symfem.geometry.PointType Compute the map from the canonical reference to this reference. :returns: The map .. py:method:: _compute_inverse_map_to_self() -> symfem.geometry.PointType Compute the inverse map from the canonical reference to this reference. :returns: The map .. py:method:: volume() -> sympy.core.expr.Expr Calculate the volume. :returns: The volume of the cell .. py:method:: contains(point: symfem.geometry.PointType) -> bool Check if a point is contained in the reference. :param point: The point :returns: Is the point contained in the reference? .. py:class:: Tetrahedron(vertices: symfem.geometry.SetOfPointsInput = ((0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1))) Bases: :py:obj:`Reference` A tetrahedron. .. py:property:: clockwise_vertices :type: symfem.geometry.SetOfPoints Get list of vertices in clockwise order. :returns: A list of vertices .. py:method:: z_ordered_entities() -> List[List[Tuple[int, int]]] Get the subentities of the cell in back-to-front plotting order. :returns: List of lists of subentity dimensions and numbers .. py:method:: default_reference() -> Reference Get the default reference for this cell type. :returns: The default reference .. py:method:: make_lattice(n: int) -> symfem.geometry.SetOfPoints Make a lattice of points. :param n: The number of points along each edge :returns: A lattice of points offset from the edge of the cell .. py:method:: make_lattice_with_lines(n: int) -> LatticeWithLines :abstractmethod: Make a lattice of points, and a list of lines connecting them. :param n: The number of points along each edge :returns: A lattice of points including the edges of the cell Pairs of point numbers that make a mesh of lines across the cell .. py:method:: integration_limits(vars: symfem.symbols.AxisVariablesNotSingle = t) -> IntLimits Get the limits for an integral over this reference. :param vars: The variables to use for each direction :returns: Integration limits that can be passed into sympy.integrate .. py:method:: get_map_to(vertices: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType Get the map from the reference to a cell. :param vertices: The vertices of a call :returns: The map .. py:method:: get_inverse_map_to(vertices_in: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType Get the inverse map from a cell to the reference. :param vertices_in: The vertices of a cell :returns: The inverse map .. py:method:: _compute_map_to_self() -> symfem.geometry.PointType Compute the map from the canonical reference to this reference. :returns: The map .. py:method:: _compute_inverse_map_to_self() -> symfem.geometry.PointType Compute the inverse map from the canonical reference to this reference. :returns: The map .. py:method:: volume() -> sympy.core.expr.Expr Calculate the volume. :returns: The volume of the cell .. py:method:: contains(point: symfem.geometry.PointType) -> bool Check if a point is contained in the reference. :param point: The point :returns: Is the point contained in the reference? .. py:class:: Quadrilateral(vertices: symfem.geometry.SetOfPointsInput = ((0, 0), (1, 0), (0, 1), (1, 1))) Bases: :py:obj:`Reference` A quadrilateral. .. py:property:: clockwise_vertices :type: symfem.geometry.SetOfPoints Get list of vertices in clockwise order. :returns: A list of vertices .. py:method:: default_reference() -> Reference Get the default reference for this cell type. :returns: The default reference .. py:method:: make_lattice(n: int) -> symfem.geometry.SetOfPoints Make a lattice of points. :param n: The number of points along each edge :returns: A lattice of points offset from the edge of the cell .. py:method:: make_lattice_with_lines(n: int) -> LatticeWithLines Make a lattice of points, and a list of lines connecting them. :param n: The number of points along each edge :returns: A lattice of points including the edges of the cell Pairs of point numbers that make a mesh of lines across the cell .. py:method:: z_ordered_entities_extra_dim() -> List[List[Tuple[int, int]]] Get the subentities in back-to-front plotting order when using an extra dimension. :returns: List of lists of subentity dimensions and numbers .. py:method:: integration_limits(vars: symfem.symbols.AxisVariablesNotSingle = t) -> IntLimits Get the limits for an integral over this reference. :param vars: The variables to use for each direction :returns: Integration limits that can be passed into sympy.integrate .. py:method:: get_map_to(vertices: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType Get the map from the reference to a cell. :param vertices: The vertices of a call :returns: The map .. py:method:: get_inverse_map_to(vertices_in: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType Get the inverse map from a cell to the reference. :param vertices_in: The vertices of a cell :returns: The inverse map .. py:method:: _compute_map_to_self() -> symfem.geometry.PointType Compute the map from the canonical reference to this reference. :returns: The map .. py:method:: _compute_inverse_map_to_self() -> symfem.geometry.PointType Compute the inverse map from the canonical reference to this reference. :returns: The map .. py:method:: volume() -> sympy.core.expr.Expr Calculate the volume. :returns: The volume of the cell .. py:method:: contains(point: symfem.geometry.PointType) -> bool Check if a point is contained in the reference. :param point: The point :returns: Is the point contained in the reference? .. py:class:: Hexahedron(vertices: symfem.geometry.SetOfPointsInput = ((0, 0, 0), (1, 0, 0), (0, 1, 0), (1, 1, 0), (0, 0, 1), (1, 0, 1), (0, 1, 1), (1, 1, 1))) Bases: :py:obj:`Reference` A hexahedron. .. py:property:: clockwise_vertices :type: symfem.geometry.SetOfPoints Get list of vertices in clockwise order. :returns: A list of vertices .. py:method:: z_ordered_entities() -> List[List[Tuple[int, int]]] Get the subentities of the cell in back-to-front plotting order. :returns: List of lists of subentity dimensions and numbers .. py:method:: default_reference() -> Reference Get the default reference for this cell type. :returns: The default reference .. py:method:: make_lattice(n: int) -> symfem.geometry.SetOfPoints Make a lattice of points. :param n: The number of points along each edge :returns: A lattice of points offset from the edge of the cell .. py:method:: make_lattice_with_lines(n: int) -> LatticeWithLines :abstractmethod: Make a lattice of points, and a list of lines connecting them. :param n: The number of points along each edge :returns: A lattice of points including the edges of the cell Pairs of point numbers that make a mesh of lines across the cell .. py:method:: integration_limits(vars: symfem.symbols.AxisVariablesNotSingle = t) -> IntLimits Get the limits for an integral over this reference. :param vars: The variables to use for each direction :returns: Integration limits that can be passed into sympy.integrate .. py:method:: get_map_to(vertices: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType Get the map from the reference to a cell. :param vertices: The vertices of a call :returns: The map .. py:method:: get_inverse_map_to(vertices_in: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType Get the inverse map from a cell to the reference. :param vertices_in: The vertices of a cell :returns: The inverse map .. py:method:: _compute_map_to_self() -> symfem.geometry.PointType Compute the map from the canonical reference to this reference. :returns: The map .. py:method:: _compute_inverse_map_to_self() -> symfem.geometry.PointType Compute the inverse map from the canonical reference to this reference. :returns: The map .. py:method:: volume() -> sympy.core.expr.Expr Calculate the volume. :returns: The volume of the cell .. py:method:: contains(point: symfem.geometry.PointType) -> bool Check if a point is contained in the reference. :param point: The point :returns: Is the point contained in the reference? .. py:class:: Prism(vertices: symfem.geometry.SetOfPointsInput = ((0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1), (1, 0, 1), (0, 1, 1))) Bases: :py:obj:`Reference` A (triangular) prism. .. py:property:: clockwise_vertices :type: symfem.geometry.SetOfPoints Get list of vertices in clockwise order. :returns: A list of vertices .. py:method:: z_ordered_entities() -> List[List[Tuple[int, int]]] Get the subentities of the cell in back-to-front plotting order. :returns: List of lists of subentity dimensions and numbers .. py:method:: default_reference() -> Reference Get the default reference for this cell type. :returns: The default reference .. py:method:: make_lattice(n: int) -> symfem.geometry.SetOfPoints Make a lattice of points. :param n: The number of points along each edge :returns: A lattice of points offset from the edge of the cell .. py:method:: make_lattice_with_lines(n: int) -> LatticeWithLines :abstractmethod: Make a lattice of points, and a list of lines connecting them. :param n: The number of points along each edge :returns: A lattice of points including the edges of the cell Pairs of point numbers that make a mesh of lines across the cell .. py:method:: integration_limits(vars: symfem.symbols.AxisVariablesNotSingle = t) -> IntLimits Get the limits for an integral over this reference. :param vars: The variables to use for each direction :returns: Integration limits that can be passed into sympy.integrate .. py:method:: get_map_to(vertices: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType Get the map from the reference to a cell. :param vertices: The vertices of a call :returns: The map .. py:method:: get_inverse_map_to(vertices_in: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType Get the inverse map from a cell to the reference. :param vertices_in: The vertices of a cell :returns: The inverse map .. py:method:: _compute_map_to_self() -> symfem.geometry.PointType Compute the map from the canonical reference to this reference. :returns: The map .. py:method:: _compute_inverse_map_to_self() -> symfem.geometry.PointType Compute the inverse map from the canonical reference to this reference. :returns: The map .. py:method:: volume() -> sympy.core.expr.Expr Calculate the volume. :returns: The volume of the cell .. py:method:: contains(point: symfem.geometry.PointType) -> bool Check if a point is contained in the reference. :param point: The point :returns: Is the point contained in the reference? .. py:class:: Pyramid(vertices: symfem.geometry.SetOfPointsInput = ((0, 0, 0), (1, 0, 0), (0, 1, 0), (1, 1, 0), (0, 0, 1))) Bases: :py:obj:`Reference` A (square-based) pyramid. .. py:property:: clockwise_vertices :type: symfem.geometry.SetOfPoints Get list of vertices in clockwise order. :returns: A list of vertices .. py:method:: z_ordered_entities() -> List[List[Tuple[int, int]]] Get the subentities of the cell in back-to-front plotting order. :returns: List of lists of subentity dimensions and numbers .. py:method:: default_reference() -> Reference Get the default reference for this cell type. :returns: The default reference .. py:method:: make_lattice(n: int) -> symfem.geometry.SetOfPoints :abstractmethod: Make a lattice of points. :param n: The number of points along each edge :returns: A lattice of points offset from the edge of the cell .. py:method:: make_lattice_with_lines(n: int) -> LatticeWithLines :abstractmethod: Make a lattice of points, and a list of lines connecting them. :param n: The number of points along each edge :returns: A lattice of points including the edges of the cell Pairs of point numbers that make a mesh of lines across the cell .. py:method:: integration_limits(vars: symfem.symbols.AxisVariablesNotSingle = t) -> IntLimits Get the limits for an integral over this reference. :param vars: The variables to use for each direction :returns: Integration limits that can be passed into sympy.integrate .. py:method:: get_map_to(vertices: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType Get the map from the reference to a cell. :param vertices: The vertices of a call :returns: The map .. py:method:: get_inverse_map_to(vertices_in: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType Get the inverse map from a cell to the reference. :param vertices_in: The vertices of a cell :returns: The inverse map .. py:method:: _compute_map_to_self() -> symfem.geometry.PointType Compute the map from the canonical reference to this reference. :returns: The map .. py:method:: _compute_inverse_map_to_self() -> symfem.geometry.PointType Compute the inverse map from the canonical reference to this reference. :returns: The map .. py:method:: volume() -> sympy.core.expr.Expr Calculate the volume. :returns: The volume of the cell .. py:method:: contains(point: symfem.geometry.PointType) -> bool Check if a point is contained in the reference. :param point: The point :returns: Is the point contained in the reference? .. py:class:: DualPolygon(number_of_triangles: int, vertices: Optional[symfem.geometry.SetOfPointsInput] = None) Bases: :py:obj:`Reference` A polygon on a barycentric dual grid. .. py:attribute:: reference_origin :type: symfem.geometry.PointType .. py:method:: contains(point: symfem.geometry.PointType) -> bool :abstractmethod: Check if a point is contained in the reference. :param point: The point :returns: Is the point contained in the reference? .. py:method:: integration_limits(vars: symfem.symbols.AxisVariablesNotSingle = t) -> IntLimits :abstractmethod: Get the limits for an integral over this reference. :param vars: The variables to use for each direction :returns: Integration limits that can be passed into sympy.integrate .. py:method:: get_map_to(vertices: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType :abstractmethod: Get the map from the reference to a cell. :param vertices: The vertices of a call :returns: The map .. py:method:: get_inverse_map_to(vertices_in: symfem.geometry.SetOfPointsInput) -> symfem.geometry.PointType :abstractmethod: Get the inverse map from a cell to the reference. :param vertices_in: The vertices of a cell :returns: The inverse map .. py:method:: _compute_map_to_self() -> symfem.geometry.PointType :abstractmethod: Compute the map from the canonical reference to this reference. :returns: The map .. py:method:: _compute_inverse_map_to_self() -> symfem.geometry.PointType :abstractmethod: Compute the inverse map from the canonical reference to this reference. :returns: The map .. py:method:: volume() -> sympy.core.expr.Expr :abstractmethod: Calculate the volume. :returns: The volume of the cell .. py:method:: default_reference() -> Reference :abstractmethod: Get the default reference for this cell type. :returns: The default reference .. py:method:: make_lattice(n: int) -> symfem.geometry.SetOfPoints Make a lattice of points. :param n: The number of points along each edge :returns: A lattice of points offset from the edge of the cell .. py:method:: make_lattice_with_lines(n: int) -> LatticeWithLines :abstractmethod: Make a lattice of points, and a list of lines connecting them. :param n: The number of points along each edge :returns: A lattice of points including the edges of the cell Pairs of point numbers that make a mesh of lines across the cell .. py:method:: z_ordered_entities_extra_dim() -> List[List[Tuple[int, int]]] Get the subentities in back-to-front plotting order when using an extra dimension. :returns: List of lists of subentity dimensions and numbers