DICGaussSeidelSmoother.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 OpenFOAM Foundation
9  Copyright (C) 2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::DICGaussSeidelSmoother
29 
30 Group
31  grpLduMatrixSmoothers
32 
33 Description
34  Combined DIC/GaussSeidel smoother for symmetric matrices in which DIC
35  smoothing is followed by GaussSeidel to ensure that any "spikes" created
36  by the DIC sweeps are smoothed-out.
37 
38 SourceFiles
39  DICGaussSeidelSmoother.C
40 
41 \*---------------------------------------------------------------------------*/
42 
43 #ifndef DICGaussSeidelSmoother_H
44 #define DICGaussSeidelSmoother_H
45 
46 #include "DICSmoother.H"
47 #include "GaussSeidelSmoother.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class DICGaussSeidelSmoother Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 :
60  public lduMatrix::smoother
61 {
62  // Private data
63 
64  DICSmoother dicSmoother_;
65 
66  GaussSeidelSmoother gsSmoother_;
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("DICGaussSeidel");
73 
74 
75  // Constructors
76 
77  //- Construct from matrix components
79  (
80  const word& fieldName,
81  const lduMatrix& matrix,
85  );
86 
87 
88  // Member Functions
89 
90  //- Smooth the solution for a given number of sweeps
91  virtual void smooth
92  (
94  const scalarField& Source,
95  const direction cmpt,
96  const label nSweeps
97  ) const;
98 
99  //- Smooth the solution for a given number of sweeps
100  virtual void scalarSmooth
101  (
103  const solveScalarField& Source,
104  const direction cmpt,
105  const label nSweeps
106  ) const;
107 };
108 
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 } // End namespace Foam
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 #endif
117 
118 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::DICGaussSeidelSmoother::DICGaussSeidelSmoother
DICGaussSeidelSmoother(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces)
Construct from matrix components.
Definition: DICGaussSeidelSmoother.C:45
Foam::FieldField
A field of fields is a PtrList of fields with reference counting.
Definition: FieldField.H:53
Foam::DICGaussSeidelSmoother::TypeName
TypeName("DICGaussSeidel")
Runtime type information.
Foam::lduMatrix
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
Definition: lduMatrix.H:83
Foam::lduMatrix::smoother::interfaces
const lduInterfaceFieldPtrsList & interfaces() const noexcept
Definition: lduMatrix.H:406
DICSmoother.H
Foam::GaussSeidelSmoother
A lduMatrix::smoother for Gauss-Seidel.
Definition: GaussSeidelSmoother.H:54
Foam::DICGaussSeidelSmoother::scalarSmooth
virtual void scalarSmooth(solveScalarField &psi, const solveScalarField &Source, const direction cmpt, const label nSweeps) const
Smooth the solution for a given number of sweeps.
Definition: DICGaussSeidelSmoother.C:96
Foam::Field< solveScalar >
Foam::DICGaussSeidelSmoother::smooth
virtual void smooth(solveScalarField &psi, const scalarField &Source, const direction cmpt, const label nSweeps) const
Smooth the solution for a given number of sweeps.
Definition: DICGaussSeidelSmoother.C:83
Foam::UPtrList< const lduInterfaceField >
Foam::DICGaussSeidelSmoother
Combined DIC/GaussSeidel smoother for symmetric matrices in which DIC smoothing is followed by GaussS...
Definition: DICGaussSeidelSmoother.H:57
Foam::DICSmoother
Simplified diagonal-based incomplete Cholesky smoother for symmetric matrices.
Definition: DICSmoother.H:58
Foam::lduMatrix::smoother
Abstract base-class for lduMatrix smoothers.
Definition: lduMatrix.H:287
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::lduMatrix::smoother::fieldName
const word & fieldName() const noexcept
Definition: lduMatrix.H:386
GaussSeidelSmoother.H
Foam::direction
uint8_t direction
Definition: direction.H:52
Foam::lduMatrix::smoother::interfaceIntCoeffs
const FieldField< Field, scalar > & interfaceIntCoeffs() const noexcept
Definition: lduMatrix.H:401
Foam::lduMatrix::smoother::interfaceBouCoeffs
const FieldField< Field, scalar > & interfaceBouCoeffs() const noexcept
Definition: lduMatrix.H:396
psi
const volScalarField & psi
Definition: createFieldRefs.H:1
Foam::lduMatrix::smoother::matrix
const lduMatrix & matrix() const noexcept
Definition: lduMatrix.H:391