mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: avoid ambiguous construct from tmp - postProcessing
This commit is contained in:
@ -119,12 +119,14 @@ bool Foam::fieldValues::cellSource::writeValues(const word& fieldName)
|
||||
|
||||
if (ok)
|
||||
{
|
||||
Field<Type> values = combineFields(setFieldValues<Type>(fieldName));
|
||||
Field<Type> values(combineFields(setFieldValues<Type>(fieldName)));
|
||||
|
||||
scalarField V = combineFields(filterField(mesh().V()));
|
||||
scalarField V(combineFields(filterField(mesh().V())));
|
||||
|
||||
scalarField weightField =
|
||||
combineFields(setFieldValues<scalar>(weightFieldName_));
|
||||
scalarField weightField
|
||||
(
|
||||
combineFields(setFieldValues<scalar>(weightFieldName_))
|
||||
);
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
|
||||
@ -138,8 +138,8 @@ bool Foam::fieldValues::faceSource::writeValues(const word& fieldName)
|
||||
|
||||
if (ok)
|
||||
{
|
||||
Field<Type> values = getFieldValues<Type>(fieldName);
|
||||
scalarField weightField = getFieldValues<scalar>(weightFieldName_);
|
||||
Field<Type> values(getFieldValues<Type>(fieldName));
|
||||
scalarField weightField(getFieldValues<scalar>(weightFieldName_));
|
||||
scalarField magSf;
|
||||
|
||||
if (surfacePtr_.valid())
|
||||
|
||||
@ -408,22 +408,24 @@ Foam::forces::forcesMoments Foam::forces::calcForcesMoment() const
|
||||
{
|
||||
label patchi = iter.key();
|
||||
|
||||
vectorField Md = mesh.C().boundaryField()[patchi] - CofR_;
|
||||
vectorField Md(mesh.C().boundaryField()[patchi] - CofR_);
|
||||
|
||||
scalarField sA = mag(Sfb[patchi]);
|
||||
scalarField sA(mag(Sfb[patchi]));
|
||||
|
||||
// Normal force = surfaceUnitNormal * (surfaceNormal & forceDensity)
|
||||
vectorField fN =
|
||||
vectorField fN
|
||||
(
|
||||
Sfb[patchi]/sA
|
||||
*(
|
||||
Sfb[patchi] & fD.boundaryField()[patchi]
|
||||
);
|
||||
)
|
||||
);
|
||||
|
||||
fm.first().first() += sum(fN);
|
||||
fm.second().first() += sum(Md ^ fN);
|
||||
|
||||
// Tangential force (total force minus normal fN)
|
||||
vectorField fT = sA*fD.boundaryField()[patchi] - fN;
|
||||
vectorField fT(sA*fD.boundaryField()[patchi] - fN);
|
||||
|
||||
fm.first().second() += sum(fT);
|
||||
fm.second().second() += sum(Md ^ fT);
|
||||
@ -450,14 +452,14 @@ Foam::forces::forcesMoments Foam::forces::calcForcesMoment() const
|
||||
{
|
||||
label patchi = iter.key();
|
||||
|
||||
vectorField Md = mesh.C().boundaryField()[patchi] - CofR_;
|
||||
vectorField Md(mesh.C().boundaryField()[patchi] - CofR_);
|
||||
|
||||
vectorField pf = Sfb[patchi]*(p.boundaryField()[patchi] - pRef);
|
||||
vectorField pf(Sfb[patchi]*(p.boundaryField()[patchi] - pRef));
|
||||
|
||||
fm.first().first() += rho(p)*sum(pf);
|
||||
fm.second().first() += rho(p)*sum(Md ^ pf);
|
||||
|
||||
vectorField vf = Sfb[patchi] & devRhoReffb[patchi];
|
||||
vectorField vf(Sfb[patchi] & devRhoReffb[patchi]);
|
||||
|
||||
fm.first().second() += sum(vf);
|
||||
fm.second().second() += sum(Md ^ vf);
|
||||
|
||||
Reference in New Issue
Block a user