← Back to team overview

dolfin team mailing list archive

Re: Fwd: Re: Identity matrix

 

On 22 Jul 2007, logg@xxxxxxxxx wrote:

> By the way, it looks like we need to change the order of arguments in
> the ident function. The size argument should come before the array
> argument (same as in PETSc and many other libraries). We have changed
> this for add(), set(), get() but forgot to fix it for ident(). So
> watch out for the change of order in parameters...

On that note, I needed this to build with rev 399452260dce

# HG changeset patch
# User Jed Brown <jed@xxxxxxxx>
# Date 1185195818 -7200
# Node ID 7bdc6b3ed2bc9e3f014f1169d2f47a3315739f6b
# Parent  399452260dcea28a8248a292dfb802e246dc1320
Fix PETScMatrix::ident() parameter order.

diff -r 399452260dce -r 7bdc6b3ed2bc src/kernel/la/PETScMatrix.cpp
--- a/src/kernel/la/PETScMatrix.cpp	Sun Jul 22 17:01:37 2007 +0200
+++ b/src/kernel/la/PETScMatrix.cpp	Mon Jul 23 15:03:38 2007 +0200
@@ -208,7 +208,7 @@ void PETScMatrix::getRow(uint i, int& nc
   MatRestoreRow(A, i, &ncols, &cols, &vals);
 }
 //-----------------------------------------------------------------------------
-void PETScMatrix::ident(const uint* rows, uint m)
+void PETScMatrix::ident(uint m, const uint* rows)
 {
   IS is = 0;
   ISCreateGeneral(PETSC_COMM_SELF, static_cast<int>(m), reinterpret_cast<int*>(const_cast<uint*>(rows)), &is);
-- 
Jed Brown        jed@xxxxxxxx        http://59A2.org

Attachment: pgpXUGf9qi9ux.pgp
Description: PGP signature


Follow ups

References