IdentityMatrix

Represents the identity matrix function $ I_n $ .

Defined in Rodin/Variational/IdentityMatrix.h

class IdentityMatrix;

This class represents the matrix function that returns the $ n $ dimensional identity matrix at each point:

\[ F(x) = I_n = \begin{pmatrix} 1 & 0 & \cdots & 0 \\ 0 & 1 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & 1 \end{pmatrix} \]

Commonly used in finite element formulations for identity operators or as a reference configuration.

Direct inheritance by class family
↓
IdentityMatrix

Inherits from

Base classResponsibility
MatrixFunctionBase<Real, IdentityMatrix>public
Full type
MatrixFunctionBase< Real, IdentityMatrix >
Base class for matrix-valued functions defined on a mesh.

Overrides

MemberBase declaration
copy()MatrixFunctionBase::copy

Inherited interface

Declared inMembers
FunctionBase
8 members
FormLanguage::Base
3 members
Identifiable
2 members
MatrixFunctionBase
7 members

Public types

using ScalarType = Real
Scalar value type.
using Parent = MatrixFunctionBase<ScalarType, IdentityMatrix>
Parent class type.

Constructors, destructors, conversion operators

IdentityMatrix(size_t n)
Constructs the identity matrix function.
IdentityMatrix(const IdentityMatrix& other)
Copy constructor.
IdentityMatrix(IdentityMatrix&& other)
Move constructor.

Public functions

auto getRows() const -> size_t
Gets number of rows.
auto getColumns() const -> size_t
Gets number of columns.
auto getValue(const Geometry::Point& point) const -> Math::SpatialMatrix<Real>
Evaluates the identity matrix at a point.
auto getOrder(const Geometry::Polytope& polytope) const -> Optional<size_t> constexpr noexcept
Returns the polynomial order used on a mesh entity.
auto copy() const -> IdentityMatrix* override noexcept
Creates a polymorphic copy of the identity matrix.

Function documentation

IdentityMatrix(size_t n)

Constructs the identity matrix function.

Parameters
n Dimension of identity matrix $ n \times n $

IdentityMatrix(const IdentityMatrix& other)

Copy constructor.

Parameters
other Identity matrix to copy

IdentityMatrix(IdentityMatrix&& other)

Move constructor.

Parameters
other Identity matrix to move

size_t getRows() const

Gets number of rows.

Returns Dimension $ n $

size_t getColumns() const

Gets number of columns.

Returns Dimension $ n $

Math::SpatialMatrix<Real> getValue(const Geometry::Point& point) const

Evaluates the identity matrix at a point.

Parameters
point Evaluation point; the result is independent of this argument.
Returns Identity matrix $ I_n $

Optional<size_t> getOrder(const Geometry::Polytope& polytope) const constexpr noexcept

Returns the polynomial order used on a mesh entity.

Parameters
polytope Mesh entity; the reported order is independent of this argument.
Returns Polynomial order on the entity, or an empty optional when no order is available.

IdentityMatrix* copy() const override noexcept

Creates a polymorphic copy of the identity matrix.

Returns Pointer to copy