diagonalSolver.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-2012 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::diagonalSolver
28 
29 Group
30  grpLduMatrixSolvers
31 
32 Description
33  Foam::diagonalSolver
34 
35 SourceFiles
36  diagonalSolver.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef Foam_diagonalSolver_H
41 #define Foam_diagonalSolver_H
42 
43 #include "lduMatrix.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class diagonalSolver Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class diagonalSolver
55 :
56  public lduMatrix::solver
57 {
58 public:
59 
60  // Generated Methods
61 
62  //- No copy construct
63  diagonalSolver(const diagonalSolver&) = delete;
64 
65  //- No copy assignment
66  void operator=(const diagonalSolver&) = delete;
67 
68 
69  //- Runtime type information
70  TypeName("diagonal");
71 
72 
73  // Constructors
74 
75  //- Construct from matrix and solver controls
77  (
78  const word& fieldName,
79  const lduMatrix& matrix,
83  const dictionary& solverControls
84  );
85 
86 
87  // Member Functions
88 
89  //- Read and reset the solver parameters from the given stream
90  void read(const dictionary&)
91  {}
92 
93  //- Solve the matrix with this solver
95  (
97  const scalarField& source,
98  const direction cmpt=0
99  ) const;
100 };
101 
102 
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 
105 } // End namespace Foam
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 #endif
110 
111 // ************************************************************************* //
const FieldField< Field, scalar > & interfaceBouCoeffs() const noexcept
Definition: lduMatrix.H:311
uint8_t direction
Definition: direction.H:46
void operator=(const diagonalSolver &)=delete
No copy assignment.
void read(const dictionary &)
Read and reset the solver parameters from the given stream.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
Foam::diagonalSolver.
const lduMatrix & matrix() const noexcept
Definition: lduMatrix.H:306
A field of fields is a PtrList of fields with reference counting.
Definition: FieldField.H:51
A class for handling words, derived from Foam::string.
Definition: word.H:63
SolverPerformance is the class returned by the LduMatrix solver containing performance statistics...
Abstract base-class for lduMatrix solvers.
Definition: lduMatrix.H:129
const lduInterfaceFieldPtrsList & interfaces() const noexcept
Definition: lduMatrix.H:321
diagonalSolver(const diagonalSolver &)=delete
No copy construct.
lduMatrix is a general matrix class in which the coefficients are stored as three arrays...
Definition: lduMatrix.H:79
TypeName("diagonal")
Runtime type information.
solverPerformance solve(scalarField &psi, const scalarField &source, const direction cmpt=0) const
Solve the matrix with this solver.
const FieldField< Field, scalar > & interfaceIntCoeffs() const noexcept
Definition: lduMatrix.H:316
const volScalarField & psi
const word & fieldName() const noexcept
Definition: lduMatrix.H:301
Namespace for OpenFOAM.