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-------------------------------------------------------------------------------
11License
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
33namespace Foam
34{
36
37 lduMatrix::preconditioner::
38 addsymMatrixConstructorToTable<noPreconditioner>
40
41 lduMatrix::preconditioner::
42 addasymMatrixConstructorToTable<noPreconditioner>
44}
45
46
47// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
48
50(
51 const lduMatrix::solver& sol,
52 const dictionary&
53)
54:
55 lduMatrix::preconditioner(sol)
56{}
57
58
59// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
60
62(
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// ************************************************************************* //
iterator begin() noexcept
Return an iterator to begin traversing the UList.
Definition: UListI.H:329
void size(const label n)
Older name for setAddressableSize.
Definition: UList.H:114
A cell is defined as a list of faces with extra functionality.
Definition: cell.H:57
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Abstract base-class for lduMatrix solvers.
Definition: lduMatrix.H:99
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
Definition: lduMatrix.H:84
Null preconditioner for both symmetric and asymmetric matrices.
virtual void precondition(solveScalarField &wA, const solveScalarField &rA, const direction cmpt=0) const
Return wA the preconditioned form of residual rA.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition: className.H:121
Namespace for OpenFOAM.
lduMatrix::preconditioner::addsymMatrixConstructorToTable< noPreconditioner > addnoPreconditionerSymMatrixConstructorToTable_
lduMatrix::preconditioner::addasymMatrixConstructorToTable< noPreconditioner > addnoPreconditionerAsymMatrixConstructorToTable_
uint8_t direction
Definition: direction.H:56