Commit e1b8e902 by Francois Gygi

added global index functions to ComplexMatrix


git-svn-id: http://qboxcode.org/svn/qb/trunk@567 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 5882648a
......@@ -3,7 +3,7 @@
// Matrix.h
//
////////////////////////////////////////////////////////////////////////////////
// $Id: Matrix.h,v 1.15 2007-10-31 05:05:05 fgygi Exp $
// $Id: Matrix.h,v 1.16 2008-01-25 06:05:07 fgygi Exp $
#ifndef MATRIX_H
#define MATRIX_H
......@@ -343,6 +343,11 @@ class ComplexMatrix
int i(int l, int x) const { return (l * nprow_ + myrow_) * mb_ + x; }
int j(int m, int y) const { return (m * npcol_ + mycol_) * nb_ + y; }
int iglobal(int ilocal) const
{ return mb_*(nprow_*(ilocal/mb_)+myrow_)+ilocal%mb_; }
int jglobal(int jlocal) const
{ return nb_*(npcol_*(jlocal/nb_)+mycol_)+jlocal%nb_; }
// store element a(ii,jj) (where ii,jj are global indices)
// in array val:
// int iii = l(ii) * mb_ + x(ii);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment