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
Definition: lduMatrix.H:246
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::FieldField
A field of fields is a PtrList of fields with reference counting.
Definition: FieldField.H:53
Foam::diagonalSolver
Foam::diagonalSolver.
Definition: diagonalSolver.H:53
Foam::diagonalSolver::read
void read(const dictionary &)
Read and reset the solver parameters from the given stream.
Definition: diagonalSolver.H:89
Foam::lduMatrix
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
Definition: lduMatrix.H:83
Foam::lduMatrix::solver::matrix
const lduMatrix & matrix() const
Definition: lduMatrix.H:231
Foam::lduMatrix::solver
Abstract base-class for lduMatrix solvers.
Definition: lduMatrix.H:97
lduMatrix.H
Foam::Field< scalar >
Foam::UPtrList< const lduInterfaceField >
Foam::diagonalSolver::TypeName
TypeName("diagonal")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::lduMatrix::solver::interfaceBouCoeffs
const FieldField< Field, scalar > & interfaceBouCoeffs() const
Definition: lduMatrix.H:236
Foam::direction
uint8_t direction
Definition: direction.H:47
Foam::lduMatrix::solver::fieldName
const word & fieldName() const
Definition: lduMatrix.H:226
psi
const volScalarField & psi
Definition: createFieldRefs.H:1
Foam::lduMatrix::solver::interfaceIntCoeffs
const FieldField< Field, scalar > & interfaceIntCoeffs() const
Definition: lduMatrix.H:241
Foam::SolverPerformance
SolverPerformance is the class returned by the LduMatrix solver containing performance statistics.
Definition: SolverPerformance.H:51
Foam::diagonalSolver::solve
solverPerformance solve(scalarField &psi, const scalarField &source, const direction cmpt=0) const
Solve the matrix with this solver.
Definition: diagonalSolver.C:65