procLduMatrix.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2013 OpenFOAM Foundation
9  Copyright (C) 2024 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::procLduMatrix
29 
30 Description
31  I/O for lduMatrix and interface values.
32 
33 SourceFiles
34  procLduMatrix.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef Foam_procLduMatrix_H
39 #define Foam_procLduMatrix_H
40 
41 #include "labelList.H"
42 #include "scalarField.H"
43 #include "FieldField.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 // Forward Declarations
52 class procLduMatrix;
53 class procLduInterface;
54 class lduMatrix;
55 
56 Istream& operator>>(Istream&, procLduMatrix&);
57 Ostream& operator<<(Ostream&, const procLduMatrix&);
58 
59 /*---------------------------------------------------------------------------*\
60  Class procLduMatrix Declaration
61 \*---------------------------------------------------------------------------*/
62 
63 class procLduMatrix
64 {
65  // Private Data
66 
67  labelList upperAddr_;
68  labelList lowerAddr_;
69  scalarField diag_;
70  scalarField upper_;
71  scalarField lower_;
72  PtrList<procLduInterface> interfaces_;
73 
74 public:
75 
76  //- Friendship
77  friend class LUscalarMatrix;
78 
79 
80  // Generated Methods
81 
82  //- Default construct
83  procLduMatrix() = default;
84 
85  //- No copy construct
86  procLduMatrix(const procLduMatrix&) = delete;
87 
88 
89  // Constructors
90 
91  //- Construct from components. Extracts active interfaces
93  (
94  const lduMatrix& ldum,
95  const FieldField<Field, scalar>& interfaceCoeffs,
96  const lduInterfaceFieldPtrsList& interfaces
97  );
98 
99  //- Read construct from Istream
100  explicit procLduMatrix(Istream& is);
101 
102 
103  // Member Functions
104 
105  label size() const noexcept
106  {
107  return diag_.size();
108  }
109 
110  // void clear();
111 
112 
113  // IO Operations
114 
115  void read(Istream& is);
116  void write(Ostream& os) const;
117 
119  friend Ostream& operator<<(Ostream&, const procLduMatrix&);
120 };
121 
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 } // End namespace Foam
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************************************************************* //
void size(const label n)
Older name for setAddressableSize.
Definition: UList.H:116
Class to perform the LU decomposition on a symmetric matrix.
procLduMatrix()=default
Default construct.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
A field of fields is a PtrList of fields with reference counting.
Definition: FieldField.H:51
label size() const noexcept
void write(Ostream &os) const
Definition: procLduMatrix.C:87
Istream & operator>>(Istream &, directionInfo &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
const direction noexcept
Definition: Scalar.H:258
friend Istream & operator>>(Istream &, procLduMatrix &)
OBJstream os(runTime.globalPath()/outputName)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:77
lduMatrix is a general matrix class in which the coefficients are stored as three arrays...
Definition: lduMatrix.H:80
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Definition: List.H:55
void read(Istream &is)
Definition: procLduMatrix.C:81
friend Ostream & operator<<(Ostream &, const procLduMatrix &)
I/O for lduMatrix and interface values.
Definition: procLduMatrix.H:58
Namespace for OpenFOAM.