← Back to team overview

dolfin team mailing list archive

Re: la/solve

 

Dag Lindbo skrev den 10/04-2008 følgende:
> Ola Skavhaug wrote:
>> Should be change:
>>   /// Solve linear system Ax = b
>>   void solve(const Matrix& A, Vector& x, const Vector& b);
>>
>> to
>>   /// Solve linear system Ax = b
>>   void solve(const GenericMatrix& A, GenericVector& x, const GenericVector& b);
>>
>> ?
>>
>> Ola
>
> Can you keep both? People still use the construction like in the  
> conv-diff demo:
>
> Matrix A;
> Vector x, b;
>
> assemble(A, a, mesh);
> assemble(b, L, mesh);
> bc.apply(A, b, a);
> solve(A, x, b);
>
> Function u(mesh, x, a);
> File file("temperature.pvd");
> file << u;
>
> I'm sorry I keep complaining about this change. I don't want to be  
> obstructive. :(

This should work without keeping the old interface. Vector and Matrix are
GenericVector and GenericMatrix subclasses, respectively.

Ola

> /Dag


References