RectangularMatrix.H 2.79 KB
Newer Older
1
2
3
4
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     |
5
    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6
7
8
9
10
     \\/     M anipulation  |
-------------------------------------------------------------------------------
License
    This file is part of OpenFOAM.

11
12
13
14
    OpenFOAM is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
15
16
17
18
19
20
21

    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    for more details.

    You should have received a copy of the GNU General Public License
22
    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
23
24

Class
25
    Foam::RectangularMatrix
26
27

Description
28
29
30
    A templated 2D rectangular matrix of objects of \<T\>, where the n
    x n matrix dimension is known and used for subscript bounds
    checking, etc.
31
32

SourceFiles
33
34
    RectangularMatrixI.H
    RectangularMatrix.C
35
36
37

\*---------------------------------------------------------------------------*/

38
39
#ifndef RectangularMatrix_H
#define RectangularMatrix_H
40
41
42
43
44
45
46
47
48

#include "Matrix.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

namespace Foam
{

/*---------------------------------------------------------------------------*\
49
                           Class Matrix Declaration
50
51
\*---------------------------------------------------------------------------*/

52
53
54
55
template<class Type>
class RectangularMatrix
:
    public Matrix<RectangularMatrix<Type>, Type>
56
57
58
59
60
61
{

public:

    // Constructors

62
63
        //- Null constructor.
        inline RectangularMatrix();
64

65
66
        //- Construct given number of rows and columns,
        inline RectangularMatrix(const label m, const label n);
67

68
69
70
        //- Construct with given number of rows and columns
        //  and value for all elements.
        inline RectangularMatrix(const label m, const label n, const Type&);
71

72
73
        //- Construct from Istream.
        inline RectangularMatrix(Istream&);
74

75
76
        //- Clone
        inline autoPtr<RectangularMatrix<Type> > clone() const;
77
78
79
80
81
82
83
84
85
};


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

} // End namespace Foam

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

86
#   include "RectangularMatrixI.H"
87
88
89
90
91
92

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#endif

// ************************************************************************* //