Epetra_matrix_data.h

Go to the documentation of this file.
00001 /*
00002 ************************************************************************
00003 
00004               Epetra: Linear Algebra Services Package
00005                 Copyright (2001) Sandia Corporation
00006 
00007 Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 license for use of this work by or on behalf of the U.S. Government.
00009 
00010 This library is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as
00012 published by the Free Software Foundation; either version 2.1 of the
00013 License, or (at your option) any later version.
00014 
00015 This library is distributed in the hope that it will be useful, but
00016 WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 Lesser General Public License for more details.
00019 
00020 You should have received a copy of the GNU Lesser General Public
00021 License along with this library; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 USA
00024 Questions? Contact Michael A. Heroux (maherou@sandia.gov)
00025 
00026 ************************************************************************
00027 */
00028 
00029 #ifndef EPETRA_MATRIX_DATA_H
00030 #define EPETRA_MATRIX_DATA_H
00031 
00032 class Epetra_CrsMatrix;
00033 
00034 namespace epetra_test {
00035 
00041 class matrix_data {
00042  public:
00043   matrix_data(int num_rows, int* rowlengths, int blocksize=1);
00044   matrix_data(int num_rows, int num_cols, int num_off_diagonals, int blocksize);
00045   matrix_data(int num_quad_elements, int num_dof_per_node,
00046         bool make_numerically_nonsymmetric=false);
00047   virtual ~matrix_data();
00048 
00049   int numrows() { return(numrows_); }
00050   int numcols() { return(numcols_); }
00051   int blocksize() { return(blocksize_); }
00052   int* rows() { return(rows_); }
00053   int* rowlengths() { return(rowlengths_); }
00054 
00055   int** colindices() { return(colindices_); }
00056   double** coefs() { return(coefs_); }
00057   double* coefs(int row, int col);
00058 
00063   void copy_local_data_to_matrix(Epetra_CrsMatrix& A);
00064 
00068   bool compare_local_data(const Epetra_CrsMatrix& A);
00069 
00070  private:
00071   int numrows_;
00072   int numcols_;
00073   int* rows_;
00074   int* rowlengths_;
00075   int blocksize_;
00076 
00077   int** colindices_;
00078   double** coefs_;
00079 
00080   matrix_data(const matrix_data & data);
00081   matrix_data & operator=(const matrix_data & data);
00082 
00083 };//class matrix_data
00084 
00085 }//namespace epetra_test
00086 
00087 #endif
00088 

Generated on Thu Sep 18 12:37:58 2008 for Epetra Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1