Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::procLduMatrix
29
30Description
31 I/O for lduMatrix and interface values.
32
33SourceFiles
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
48namespace Foam
49{
50
51// Forward Declarations
52class procLduMatrix;
54class lduMatrix;
55
59/*---------------------------------------------------------------------------*\
60 Class procLduMatrix Declaration
61\*---------------------------------------------------------------------------*/
62
63class 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
74public:
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;
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// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125} // End namespace Foam
126
127// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128
129#endif
130
131// ************************************************************************* //
A field of fields is a PtrList of fields with reference counting.
Definition FieldField.H:77
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition PtrList.H:67
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
Definition lduMatrix.H:81
IO interface for processorLduInterface.
I/O for lduMatrix and interface values.
procLduMatrix()=default
Default construct.
friend Istream & operator>>(Istream &, procLduMatrix &)
procLduMatrix(const procLduMatrix &)=delete
No copy construct.
friend class LUscalarMatrix
Friendship.
label size() const noexcept
friend Ostream & operator<<(Ostream &, const procLduMatrix &)
void read(Istream &is)
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
Istream & operator>>(Istream &, directionInfo &)
const direction noexcept
Definition scalarImpl.H:265
UPtrList< const lduInterfaceField > lduInterfaceFieldPtrsList
List of coupled interface fields to be used in coupling.
runTime write()