Loading...
Searching...
No Matches
distributedDICPreconditioner.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) 2023 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::distributedDICPreconditioner
28
29Group
30 grpLduMatrixPreconditioners
31
32Description
33 Version of DICpreconditioner that uses preconditioning across processor
34 (and coupled) boundaries. Based on 'Parallel Preconditioners' chapter from
35 'Iterative Methods for Sparse Linear Systems' by Yousef Saad.
36
37 Leaves out the handling of boundary nodes after internal nodes since
38 probably not beneficial (so no overlap of comms and internal calculation)
39
40 By default preconditions across coupled boundaries (currently only
41 tested for cyclicAMI). This can be disabled with the 'coupled' setting
42
43 solver PCG;
44 preconditioner
45 {
46 preconditioner distributedDIC;
47 coupled false;
48 }
49
50 The cyclicAMI boundary behaviour will only work if
51 - running non-parallel or
52 - different sides of cyclicAMI run on different processors i.e.
53 there is no processor which has cells on both owner and neighbour
54 of the patch pair.
55
56See Also
57 Foam::DICPreconditioner
58 Foam::distributedDILUPreconditioner
59
60SourceFiles
61 distributedDICPreconditioner.C
62
63\*---------------------------------------------------------------------------*/
64
65#ifndef distributedDICPreconditioner_H
66#define distributedDICPreconditioner_H
67
69
70// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71
72namespace Foam
73{
75/*---------------------------------------------------------------------------*\
76 Class distributedDICPreconditioner Declaration
77\*---------------------------------------------------------------------------*/
78
80:
82{
83protected:
84
85 // Protected member functions
86
87 //- Update diagonal for colour
88 virtual void forwardInternalDiag
89 (
91 const label colouri
92 ) const;
93
94 //- Update preconditioned variable walking forward on internal faces
95 virtual void forwardInternal
96 (
98 const label colouri
99 ) const;
100
101
102public:
103
104 //- Runtime type information
105 TypeName("distributedDIC");
107
108 // Constructors
109
110 //- Construct from matrix components and preconditioner solver controls
112 (
113 const lduMatrix::solver&,
114 const dictionary& solverControlsUnused
115 );
116
117
118 //- Destructor
119 virtual ~distributedDICPreconditioner() = default;
120};
121
122
123// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125} // End namespace Foam
126
127// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128
129#endif
130
131// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
TypeName("distributedDIC")
Runtime type information.
distributedDICPreconditioner(const lduMatrix::solver &, const dictionary &solverControlsUnused)
Construct from matrix components and preconditioner solver controls.
virtual ~distributedDICPreconditioner()=default
Destructor.
virtual void forwardInternalDiag(solveScalarField &rD, const label colouri) const
Update diagonal for colour.
virtual void forwardInternal(solveScalarField &wA, const label colouri) const
Update preconditioned variable walking forward on internal faces.
distributedDILUPreconditioner(const lduMatrix::solver &, const dictionary &solverControlsUnused)
Construct from matrix components and preconditioner solver controls.
Abstract base-class for lduMatrix solvers.
Definition lduMatrix.H:152
Namespace for OpenFOAM.
Field< solveScalar > solveScalarField
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68