fvMatrix: Corrected scaling by tmp<volScalarField>
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -1059,7 +1059,7 @@ void Foam::fvMatrix<Type>::operator+=(const tmp<fvMatrix<Type> >& tfvmv)
|
||||
template<class Type>
|
||||
void Foam::fvMatrix<Type>::operator-=(const fvMatrix<Type>& fvmv)
|
||||
{
|
||||
checkMethod(*this, fvmv, "+=");
|
||||
checkMethod(*this, fvmv, "-=");
|
||||
|
||||
dimensions_ -= fvmv.dimensions_;
|
||||
lduMatrix::operator-=(fvmv);
|
||||
@ -1202,13 +1202,13 @@ void Foam::fvMatrix<Type>::operator*=
|
||||
|
||||
forAll(boundaryCoeffs_, patchI)
|
||||
{
|
||||
scalarField psf
|
||||
scalarField pisf
|
||||
(
|
||||
dsf.mesh().boundary()[patchI].patchInternalField(dsf.field())
|
||||
);
|
||||
|
||||
internalCoeffs_[patchI] *= psf;
|
||||
boundaryCoeffs_[patchI] *= psf;
|
||||
internalCoeffs_[patchI] *= pisf;
|
||||
boundaryCoeffs_[patchI] *= pisf;
|
||||
}
|
||||
|
||||
if (faceFluxCorrectionPtr_)
|
||||
@ -1234,43 +1234,6 @@ void Foam::fvMatrix<Type>::operator*=
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::fvMatrix<Type>::operator*=
|
||||
(
|
||||
const volScalarField& vsf
|
||||
)
|
||||
{
|
||||
dimensions_ *= vsf.dimensions();
|
||||
lduMatrix::operator*=(vsf.field());
|
||||
source_ *= vsf.field();
|
||||
|
||||
forAll(vsf.boundaryField(), patchI)
|
||||
{
|
||||
const fvPatchScalarField& psf = vsf.boundaryField()[patchI];
|
||||
|
||||
if (psf.coupled())
|
||||
{
|
||||
internalCoeffs_[patchI] *= psf.patchInternalField();
|
||||
boundaryCoeffs_[patchI] *= psf.patchNeighbourField();
|
||||
}
|
||||
else
|
||||
{
|
||||
internalCoeffs_[patchI] *= psf.patchInternalField();
|
||||
boundaryCoeffs_[patchI] *= psf;
|
||||
}
|
||||
}
|
||||
|
||||
if (faceFluxCorrectionPtr_)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"fvMatrix<Type>::operator*="
|
||||
"(const DimensionedField<scalar, volMesh>&)"
|
||||
) << "cannot scale a matrix containing a faceFluxCorrection"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
void Foam::fvMatrix<Type>::operator*=
|
||||
(
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -473,7 +473,6 @@ public:
|
||||
|
||||
void operator*=(const DimensionedField<scalar, volMesh>&);
|
||||
void operator*=(const tmp<DimensionedField<scalar, volMesh> >&);
|
||||
void operator*=(const volScalarField&);
|
||||
void operator*=(const tmp<volScalarField>&);
|
||||
|
||||
void operator*=(const dimensioned<scalar>&);
|
||||
|
||||
Reference in New Issue
Block a user