COMP: avoid ambiguous construct from tmp - fvPatchFields/basic, constraint

This commit is contained in:
Mark Olesen
2010-12-17 16:52:10 +01:00
parent e08395c045
commit 881f0c03a7
3 changed files with 12 additions and 11 deletions

View File

@ -94,7 +94,7 @@ template<class Type>
Foam::tmp<Foam::Field<Type> >
Foam::basicSymmetryFvPatchField<Type>::snGrad() const
{
vectorField nHat = this->patch().nf();
tmp<vectorField> nHat = this->patch().nf();
return
(
@ -112,7 +112,7 @@ void Foam::basicSymmetryFvPatchField<Type>::evaluate(const Pstream::commsTypes)
this->updateCoeffs();
}
vectorField nHat = this->patch().nf();
tmp<vectorField> nHat = this->patch().nf();
Field<Type>::operator=
(
@ -130,7 +130,7 @@ template<class Type>
Foam::tmp<Foam::Field<Type> >
Foam::basicSymmetryFvPatchField<Type>::snGradTransformDiag() const
{
vectorField nHat = this->patch().nf();
const vectorField nHat(this->patch().nf());
vectorField diag(nHat.size());

View File

@ -126,13 +126,13 @@ template<class Type>
Foam::tmp<Foam::Field<Type> >
Foam::directionMixedFvPatchField<Type>::snGrad() const
{
Field<Type> pif = this->patchInternalField();
const Field<Type> pif(this->patchInternalField());
Field<Type> normalValue = transform(valueFraction_, refValue_);
tmp<Field<Type> > normalValue = transform(valueFraction_, refValue_);
Field<Type> gradValue = pif + refGrad_/this->patch().deltaCoeffs();
tmp<Field<Type> > gradValue = pif + refGrad_/this->patch().deltaCoeffs();
Field<Type> transformGradValue =
tmp<Field<Type> > transformGradValue =
transform(I - valueFraction_, gradValue);
return
@ -149,12 +149,12 @@ void Foam::directionMixedFvPatchField<Type>::evaluate(const Pstream::commsTypes)
this->updateCoeffs();
}
Field<Type> normalValue = transform(valueFraction_, refValue_);
tmp<Field<Type> > normalValue = transform(valueFraction_, refValue_);
Field<Type> gradValue =
tmp<Field<Type> > gradValue =
this->patchInternalField() + refGrad_/this->patch().deltaCoeffs();
Field<Type> transformGradValue =
tmp<Field<Type> > transformGradValue =
transform(I - valueFraction_, gradValue);
Field<Type>::operator=(normalValue + transformGradValue);

View File

@ -134,7 +134,8 @@ Foam::wedgeFvPatchField<Type>::wedgeFvPatchField
template<class Type>
Foam::tmp<Foam::Field<Type> > Foam::wedgeFvPatchField<Type>::snGrad() const
{
Field<Type> pif = this->patchInternalField();
const Field<Type> pif(this->patchInternalField());
return
(
transform(refCast<const wedgeFvPatch>(this->patch()).cellT(), pif) - pif