pheromone_dispersion.identity_operator module

class pheromone_dispersion.identity_operator.Id(*args: Any, **kwargs: Any)[source]

Bases: LinearOperator

Class containing the identity operator \(Id:c\mapsto c\).

The implementation of this linear operator is a subclass of the LinearOperator class.

msh

The geometry of the domain.

Type:

MeshRect2D

shape

Shape of the matrix of the linear operator. The shape is (msh.y.size * msh.x.size, msh.y.size * msh.x.size)

Type:

tuple of int

dtype

Data type of the elements of the matrix of the linear operator. The type is float64

Type:

dtype

__init__(msh)[source]

Constructor method

Parameters:

msh (MeshRect2D) – The geometry of the domain.

_matvec(x_out)[source]

Compute the image (matrix-vector product) of \(Id:c\mapsto c\) for a given concentration map \(c\) at the current time.

Parameters:

x_out (ndarray) – The map of concentration of pheromones \(c(x,y)\) at a given time \(t\) raveled into a vector.

Returns:

Array containing the image \(c\).

Return type:

ndarray

Notes

The input \(c\) has to be raveled into a (msh.y.size * msh.x.size,)-shape array to match the format of the LinearOperator class. The same way, the ouput can be reshape into a (msh.y.size, msh.x.size)-shape array to get back the map \(c(x,y)\) at the current time \(t\)