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 diagonalSolver_H
41 #define 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  // Private Member Functions
59 
60  //- No copy construct
61  diagonalSolver(const diagonalSolver&) = delete;
62 
63  //- No copy assignment
64  void operator=(const diagonalSolver&) = delete;
65 
66 
67 public:
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 // ************************************************************************* //
Foam::lduMatrix::solver::interfaces
const lduInterfaceFieldPtrsList & interfaces() const noexcept
Definition: lduMatrix.H:244
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:63
Foam::FieldField
A field of fields is a PtrList of fields with reference counting.
Definition: FieldField.H:49
Foam::diagonalSolver
Foam::diagonalSolver.
Definition: diagonalSolver.H:49
Foam::diagonalSolver::read
void read(const dictionary &)
Definition: diagonalSolver.H:85
Foam::lduMatrix
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
Definition: lduMatrix.H:79
Foam::lduMatrix::solver
Definition: lduMatrix.H:94
lduMatrix.H
Foam::lduMatrix::solver::fieldName
const word & fieldName() const noexcept
Definition: lduMatrix.H:224
Foam::Field
Generic templated field type.
Definition: Field.H:59
Foam::lduMatrix::solver::interfaceBouCoeffs
const FieldField< Field, scalar > & interfaceBouCoeffs() const noexcept
Definition: lduMatrix.H:234
Foam::UPtrList
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Definition: UPtrList.H:58
Foam::diagonalSolver::TypeName
TypeName("diagonal")
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:119
Foam
Definition: atmBoundaryLayer.C:26
Foam::lduMatrix::solver::interfaceIntCoeffs
const FieldField< Field, scalar > & interfaceIntCoeffs() const noexcept
Definition: lduMatrix.H:239
Foam::direction
uint8_t direction
Definition: direction.H:46
psi
const volScalarField & psi
Definition: createFieldRefs.H:1
Foam::SolverPerformance
SolverPerformance is the class returned by the LduMatrix solver containing performance statistics.
Definition: SolverPerformance.H:48
Foam::diagonalSolver::solve
solverPerformance solve(scalarField &psi, const scalarField &source, const direction cmpt=0) const
Definition: diagonalSolver.C:58
Foam::lduMatrix::solver::matrix
const lduMatrix & matrix() const noexcept
Definition: lduMatrix.H:229