labmec / neopz

An object oriented finite element programming environment
http://www.labmec.org.br
33 stars 11 forks source link

ConjTranspose operations #200

Closed orlandini closed 2 months ago

orlandini commented 8 months ago

This PR aims to add possibility of performing not only Transpose operations but also Conjugate Transpose, which is important for complex arithmetic.

For now, only the MultAdd and AddContribution methods were changed, more functionality can be implemented when someone has the time to do so.

Both modifications were made transforming a bool parameter to an int. 0 stands for no transposition, 1 for transposition and 2 to conjugate transposition. Given that the standard assures that a true boolean value is always converted to 1, no changes in the behaviour of existent code are expected (perhaps a few warnings depending on compiler's settings).

Additionally, the Transpose method now has the signature virtual void TPZMatrix<TVar>::Transpose(TPZMatrix<TVar>*const T, bool conj = false) const;

and, in the TPZFMatrix template class, the void ConjTranspose();

method was added.

orlandini commented 2 months ago

Closed due to #204