fvMatrix: Corrected scaling by tmp<volScalarField>

This commit is contained in:
Henry
2015-01-02 14:38:08 +00:00
parent a8e99f862a
commit 35af64bf39
2 changed files with 6 additions and 44 deletions

View File

@ -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*=
(

View File

@ -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>&);