Merge remote-tracking branch 'origin/BUGFIX/signInHerschelBuckley'
[foam-extend-3.0.git] / src / foam / matrices / blockLduMatrix / BlockLduMatrix / symmTensorBlockLduMatrix.C
blob0405df831b3575f8a4b692c327d28e30334b13c1
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     |
5     \\  /    A nd           | For copyright notice see file Copyright
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation, either version 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #ifndef symmTensorBlockLduMatrix_H
27 #define symmTensorBlockLduMatrix_H
29 #include "coeffFields.H"
30 #include "BlockLduMatrix.H"
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 namespace Foam
37 template<>
38 void Foam::BlockLduMatrix<Foam::symmTensor>::sumDiag()
40     // Decoupled version
41     this->decoupledSumDiag();
45 template<>
46 void Foam::BlockLduMatrix<Foam::symmTensor>::negSumDiag()
48     // Decoupled version
49     this->decoupledNegSumDiag();
53 template<>
54 void Foam::BlockLduMatrix<symmTensor>::check() const
56     // Decoupled version
57     this->decoupledCheck();
61 template<>
62 void Foam::BlockLduMatrix<Foam::symmTensor>::relax
64     const symmTensorField& x,
65     symmTensorField& b,
66     const scalar alpha
69     // Decoupled version
70     this->decoupledRelax(x, b, alpha);
74 template<>
75 void Foam::BlockLduMatrix<Foam::symmTensor>::operator*=(const scalarField& sf)
77     // Decoupled version
78     this->decoupledMultEqOp(sf);
82 template<>
83 void Foam::BlockLduMatrix<Foam::symmTensor>::AmulCore
85     symmTensorField& Ax,
86     const symmTensorField& x
87 ) const
89     decoupledAmulCore(Ax, x);
93 template<>
94 void Foam::BlockLduMatrix<Foam::symmTensor>::TmulCore
96     symmTensorField& Tx,
97     const symmTensorField& x
98 ) const
100     // Decoupled version
101     decoupledTmulCore(Tx, x);
105 template<>
106 void Foam::BlockLduMatrix<Foam::symmTensor>::segregateB
108     symmTensorField&,
109     const symmTensorField&
110 ) const
112     FatalErrorIn
113     (
114         "void Foam::BlockLduMatrix<symmTensor>::segregateB\n"
115         "(\n"
116         "    symmTensorField&,\n"
117         "    const symmTensorField&\n"
118         ") const"
119     )   << "Requested decoupling of symmTensor matrix - never coupled"
120         << abort(FatalError);
124 template<>
125 Foam::tmp<Foam::symmTensorField>
126 Foam::BlockLduMatrix<Foam::symmTensor>::H(const symmTensorField& x) const
128     // Decoupled version
129     return decoupledH(x);
133 template<>
134 Foam::tmp<Foam::symmTensorField>
135 Foam::BlockLduMatrix<Foam::symmTensor>::faceH(const symmTensorField& x) const
137     // Decoupled version
138     return decoupledFaceH(x);
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 } // End namespace Foam
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 #endif
150 // ************************************************************************* //