1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-6 H. Jasak All rights reserved
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Compressed row matrix addressing
32 Hrvoje Jasak, Wikki Ltd. All rights reserved
37 \*---------------------------------------------------------------------------*/
39 #ifndef crAddressing_H
40 #define crAddressing_H
42 #include "labelList.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class crAddressing Declaration
52 \*---------------------------------------------------------------------------*/
67 // Provides start index for each row, dimensioned to nRows + 1
73 // Private Member Functions
76 void setRowCount(const labelList& count);
83 //- Construct given size. Column and coefficients set later
88 const labelList& count
91 //- Construct from components
100 //- Construct as copy
101 crAddressing(const crAddressing&);
103 //- Construct from Istream
104 crAddressing(Istream&);
107 // Destructor - default
114 //- Return number of rows
120 //- Return number of columns
126 //- Return number of coefficients
127 label nEntries() const
133 const labelList& row() const
138 //- Return column array
139 const labelList& col() const
147 //- Return column array
156 //- Return transpose addressing
157 tmp<crAddressing> T() const;
162 void operator=(const crAddressing&);
164 // IOstream Operators
166 friend Ostream& operator<<(Ostream&, const crAddressing&);
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 } // End namespace Foam
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 // ************************************************************************* //