RectangularMatrix.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2025 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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
19  for more details.
20 
21  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  A templated 2D rectangular m x n matrix of objects of <Type>.
29 
30  The matrix dimensions are used for subscript bounds checking etc.
31 
32 SourceFiles
33  RectangularMatrixI.H
34  RectangularMatrix.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef RectangularMatrix_H
39 #define RectangularMatrix_H
40 
41 #include "Matrix.H"
42 #include "SquareMatrix.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class Matrix Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 template<class Type>
55 :
56  public Matrix<RectangularMatrix<Type>, Type>
57 {
58 
59 public:
60 
61  // Constructors
62 
64 
65  //- Null constructor.
66  inline RectangularMatrix();
67 
68  //- Construct as copy of a square matrix
70 
71  //- Clone
72  inline autoPtr<RectangularMatrix<Type>> clone() const;
73 
74 
75  // Member Functions
76 
77  //- Return the instantiated type name
78  static word typeName()
79  {
80  return word("RectangularMatrix<") + pTraits<Type>::typeName + '>';
81  }
82 
83 
84  // Member Operators
85 
86  //- Assignment of all elements to zero
87  void operator=(const zero);
88 };
89 
90 
91 // Global functions and operators
92 
93 template<class Type>
95 {
96 public:
97 
99 };
100 
101 template<class Type>
102 class typeOfInnerProduct<Type, RectangularMatrix<Type>, SquareMatrix<Type>>
103 {
104 public:
105 
107 };
108 
109 template<class Type>
110 class typeOfInnerProduct<Type, SquareMatrix<Type>, RectangularMatrix<Type>>
111 {
112 public:
113 
115 };
116 
117 
118 template<class Type>
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #include "RectangularMatrixI.H"
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
Pre-declare SubField and related Field type.
Definition: Field.H:83
A templated (m x n) matrix of objects of <T>.
Definition: Matrix.H:83
A templated 2D rectangular m x n matrix of objects of <Type>.
RectangularMatrix()
Null constructor.
static word typeName()
Return the instantiated type name.
autoPtr< RectangularMatrix< Type > > clone() const
Clone.
void operator=(const zero)
Assignment of all elements to zero.
A templated 2D square matrix of objects of <T>, where the n x n matrix dimension is known and used fo...
Definition: SquareMatrix.H:61
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Traits class for primitives.
Definition: pTraits.H:53
Abstract template class to provide the form resulting from.
Definition: products.H:48
A class for handling words, derived from string.
Definition: word.H:62
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
Definition: zero.H:50
Namespace for OpenFOAM.
void outer(LagrangianPatchField< typename outerProduct< Type1, Type2 >::type > &f, const LagrangianPatchField< Type1 > &f1, const LagrangianPatchField< Type2 > &f2)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488