noPreconditioner.C
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-2015 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 \*---------------------------------------------------------------------------*/
28 
29 #include "noPreconditioner.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35  defineTypeNameAndDebug(noPreconditioner, 0);
36 
37  lduMatrix::preconditioner::
38  addsymMatrixConstructorToTable<noPreconditioner>
40 
41  lduMatrix::preconditioner::
42  addasymMatrixConstructorToTable<noPreconditioner>
44 }
45 
46 
47 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
48 
49 Foam::noPreconditioner::noPreconditioner
50 (
51  const lduMatrix::solver& sol,
52  const dictionary&
53 )
54 :
56 {}
57 
58 
59 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
60 
62 (
63  solveScalarField& wA,
64  const solveScalarField& rA,
65  const direction
66 ) const
67 {
68  solveScalar* __restrict__ wAPtr = wA.begin();
69  const solveScalar* __restrict__ rAPtr = rA.begin();
70 
71  const label nCells = wA.size();
72 
73  for (label cell=0; cell<nCells; cell++)
74  {
75  wAPtr[cell] = rAPtr[cell];
76  }
77 }
78 
79 
80 // ************************************************************************* //
Foam::addnoPreconditionerSymMatrixConstructorToTable_
lduMatrix::preconditioner::addsymMatrixConstructorToTable< noPreconditioner > addnoPreconditionerSymMatrixConstructorToTable_
Definition: noPreconditioner.C:39
Foam::lduMatrix::solver
Abstract base-class for lduMatrix solvers.
Definition: lduMatrix.H:98
Foam::Field< solveScalar >
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::noPreconditioner::precondition
virtual void precondition(solveScalarField &wA, const solveScalarField &rA, const direction cmpt=0) const
Return wA the preconditioned form of residual rA.
Definition: noPreconditioner.C:62
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::direction
uint8_t direction
Definition: direction.H:52
Foam::lduMatrix::preconditioner
Abstract base-class for lduMatrix preconditioners.
Definition: lduMatrix.H:433
noPreconditioner.H
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::cell
A cell is defined as a list of faces with extra functionality.
Definition: cell.H:54
Foam::addnoPreconditionerAsymMatrixConstructorToTable_
lduMatrix::preconditioner::addasymMatrixConstructorToTable< noPreconditioner > addnoPreconditionerAsymMatrixConstructorToTable_
Definition: noPreconditioner.C:43