COMP: avoid ambiguous construct from tmp - engine

This commit is contained in:
Mark Olesen
2010-12-17 16:43:37 +01:00
parent 7b1eb1ceb8
commit bd7d27e622
4 changed files with 10 additions and 6 deletions

View File

@ -68,9 +68,11 @@ void Foam::fvMotionSolverEngineMesh::move()
motionSolver_.cellMotionU().boundaryField()[pistonIndex_] == deltaZ; motionSolver_.cellMotionU().boundaryField()[pistonIndex_] == deltaZ;
{ {
scalarField linerPoints = scalarField linerPoints
(
motionSolver_.cellMotionU() motionSolver_.cellMotionU()
.boundaryField()[linerIndex_].patch().Cf().component(vector::Z); .boundaryField()[linerIndex_].patch().Cf().component(vector::Z)
);
motionSolver_.cellMotionU().boundaryField()[linerIndex_] == motionSolver_.cellMotionU().boundaryField()[linerIndex_] ==
deltaZ*pos(deckHeight_.value() - linerPoints) deltaZ*pos(deckHeight_.value() - linerPoints)

View File

@ -64,7 +64,7 @@ void Foam::layeredEngineMesh::move()
// Position of the top of the static mesh layers above the piston // Position of the top of the static mesh layers above the piston
scalar pistonPlusLayers = pistonPosition_.value() + pistonLayers_.value(); scalar pistonPlusLayers = pistonPosition_.value() + pistonLayers_.value();
pointField newPoints = points(); pointField newPoints(points());
forAll(newPoints, pointi) forAll(newPoints, pointi)
{ {

View File

@ -80,8 +80,10 @@
// Calculate kernel area from b field consistent with the // Calculate kernel area from b field consistent with the
// discretisation of the b equation. // discretisation of the b equation.
volScalarField mgb = const volScalarField mgb
fvc::div(nf, b, "div(phiSt,b)") - b*fvc::div(nf) + dMgb; (
fvc::div(nf, b, "div(phiSt,b)") - b*fvc::div(nf) + dMgb
);
dimensionedScalar AkEst = gSum(mgb*mesh.V().field()); dimensionedScalar AkEst = gSum(mgb*mesh.V().field());
StCorr.value() = max(min((Ak/AkEst).value(), 10.0), 1.0); StCorr.value() = max(min((Ak/AkEst).value(), 10.0), 1.0);

View File

@ -130,7 +130,7 @@ void Foam::errorDrivenRefinement::setRefinement(polyTopoChange& ref) const
const volVectorField& resError = const volVectorField& resError =
runTime.lookupObject<volVectorField>(errorField_); runTime.lookupObject<volVectorField>(errorField_);
const volScalarField magResError = Foam::mag(resError); const volScalarField magResError(Foam::mag(resError));
scalar min = Foam::min(magResError).value(); scalar min = Foam::min(magResError).value();
scalar max = Foam::max(magResError).value(); scalar max = Foam::max(magResError).value();