pheromone_dispersion.identity_operator module
- class pheromone_dispersion.identity_operator.Id(*args: Any, **kwargs: Any)[source]
Bases:
LinearOperatorClass containing the identity operator \(Id:c\mapsto c\).
The implementation of this linear operator is a subclass of the
LinearOperatorclass.- msh
The geometry of the domain.
- Type:
- 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:
tupleofint
- dtype
Data type of the elements of the matrix of the linear operator. The type is float64
- Type:
- __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:
Notes
The input \(c\) has to be raveled into a (
msh.y.size*msh.x.size,)-shape array to match the format of theLinearOperatorclass. 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\)