pyccel / sympde

Symbolic calculus for partial differential equations (and variational forms)
http://sympde.readthedocs.io/
MIT License
20 stars 4 forks source link

Linear Algebra API - Part I : Vector and Matrix #150

Open ratnania opened 8 months ago

ratnania commented 8 months ago

Up to now, we were relying on sympy.Matrix and its variants to handle our Linear Algebra operations. It is now time to have our own Linear Algebra building blocks, and it starts with the Vector and Matrix objects. This issue aims to:

The new objects should be used in two different ways:

yguclu commented 8 months ago

I feel that we need to clarify what kind of entries are allowed in a Vector or Matrix.

If any expression of the spatial coordinates is allowed, then it behaves just like a Function, but without specifying the arguments. In fact, it would seem natural to subclass Function to get the classes ScalarFunction, VectorFunction, and MatrixFunction. Of course this would create a conflict with the pre-exististing classes ScalarFunction and VectorFunction, which represent elements of a ScalarFunctionSpace and VectorFunctionSpace, respectively.

ratnania commented 8 months ago

Yes, we should differentiate between a (Scalar/)Vector/Matrix valued functions and other expressions. This means that we need to check, at the construction, that Vector/Matrix expressions do not contain the coordinates. For the (Scalar/)Vector/Matrix valued functions, we'll move the discussion to the associated issue.

ratnania commented 8 months ago

This issue is closely related to #149