transformFvPatchField: Specialize valueInternalCoeffs for scalar

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1820
This commit is contained in:
Henry Weller
2015-08-10 12:06:13 +01:00
parent 36b1c587a8
commit 32b7a26b72
3 changed files with 37 additions and 32 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,15 +27,10 @@ License
#include "IOstreams.H"
#include "transformField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
transformFvPatchField<Type>::transformFvPatchField
Foam::transformFvPatchField<Type>::transformFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF
@ -46,7 +41,7 @@ transformFvPatchField<Type>::transformFvPatchField
template<class Type>
transformFvPatchField<Type>::transformFvPatchField
Foam::transformFvPatchField<Type>::transformFvPatchField
(
const transformFvPatchField<Type>& ptf,
const fvPatch& p,
@ -59,7 +54,7 @@ transformFvPatchField<Type>::transformFvPatchField
template<class Type>
transformFvPatchField<Type>::transformFvPatchField
Foam::transformFvPatchField<Type>::transformFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
@ -71,7 +66,7 @@ transformFvPatchField<Type>::transformFvPatchField
template<class Type>
transformFvPatchField<Type>::transformFvPatchField
Foam::transformFvPatchField<Type>::transformFvPatchField
(
const transformFvPatchField<Type>& ptf
)
@ -81,7 +76,7 @@ transformFvPatchField<Type>::transformFvPatchField
template<class Type>
transformFvPatchField<Type>::transformFvPatchField
Foam::transformFvPatchField<Type>::transformFvPatchField
(
const transformFvPatchField<Type>& ptf,
const DimensionedField<Type, volMesh>& iF
@ -94,7 +89,8 @@ transformFvPatchField<Type>::transformFvPatchField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
tmp<Field<Type> > transformFvPatchField<Type>::valueInternalCoeffs
Foam::tmp<Foam::Field<Type> >
Foam::transformFvPatchField<Type>::valueInternalCoeffs
(
const tmp<scalarField>&
) const
@ -104,7 +100,8 @@ tmp<Field<Type> > transformFvPatchField<Type>::valueInternalCoeffs
template<class Type>
tmp<Field<Type> > transformFvPatchField<Type>::valueBoundaryCoeffs
Foam::tmp<Foam::Field<Type> >
Foam::transformFvPatchField<Type>::valueBoundaryCoeffs
(
const tmp<scalarField>&
) const
@ -120,14 +117,16 @@ tmp<Field<Type> > transformFvPatchField<Type>::valueBoundaryCoeffs
template<class Type>
tmp<Field<Type> > transformFvPatchField<Type>::gradientInternalCoeffs() const
Foam::tmp<Foam::Field<Type> >
Foam::transformFvPatchField<Type>::gradientInternalCoeffs() const
{
return -this->patch().deltaCoeffs()*snGradTransformDiag();
}
template<class Type>
tmp<Field<Type> > transformFvPatchField<Type>::gradientBoundaryCoeffs() const
Foam::tmp<Foam::Field<Type> >
Foam::transformFvPatchField<Type>::gradientBoundaryCoeffs() const
{
return
snGrad()
@ -138,7 +137,7 @@ tmp<Field<Type> > transformFvPatchField<Type>::gradientBoundaryCoeffs() const
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Type>
void transformFvPatchField<Type>::operator=
void Foam::transformFvPatchField<Type>::operator=
(
const fvPatchField<Type>& ptf
)
@ -147,8 +146,4 @@ void transformFvPatchField<Type>::operator=
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

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
@ -152,6 +152,12 @@ public:
// * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * * //
template<>
tmp<scalarField> transformFvPatchField<scalar>::valueInternalCoeffs
(
const tmp<scalarField>&
) const;
template<>
tmp<scalarField> transformFvPatchField<scalar>::gradientInternalCoeffs() const;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,21 +25,25 @@ License
#include "transformFvPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<>
tmp<scalarField > transformFvPatchField<scalar>::gradientInternalCoeffs() const
Foam::tmp<Foam::scalarField>
Foam::transformFvPatchField<Foam::scalar>::valueInternalCoeffs
(
const tmp<scalarField>&
) const
{
return tmp<scalarField>(new scalarField(size(), 1.0));
}
template<>
Foam::tmp<Foam::scalarField>
Foam::transformFvPatchField<Foam::scalar>::gradientInternalCoeffs() const
{
return tmp<scalarField>(new scalarField(size(), 0.0));
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //