fvcAverage: Minor improvement to the evaluation of the internalField

This commit is contained in:
Henry Weller
2015-11-08 12:25:30 +00:00
parent a4ab3f61db
commit 7fdcf6ab7f

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -47,6 +47,8 @@ average
const GeometricField<Type, fvsPatchField, surfaceMesh>& ssf const GeometricField<Type, fvsPatchField, surfaceMesh>& ssf
) )
{ {
Info<< "average" << endl;
const fvMesh& mesh = ssf.mesh(); const fvMesh& mesh = ssf.mesh();
tmp<GeometricField<Type, fvPatchField, volMesh> > taverage tmp<GeometricField<Type, fvPatchField, volMesh> > taverage
@ -70,8 +72,9 @@ average
av.internalField() = av.internalField() =
( (
surfaceSum(mesh.magSf()*ssf)/surfaceSum(mesh.magSf()) surfaceSum(mesh.magSf()*ssf)().internalField()
)().internalField(); /surfaceSum(mesh.magSf())().internalField()
);
typename GeometricField<Type, fvPatchField, volMesh>:: typename GeometricField<Type, fvPatchField, volMesh>::
GeometricBoundaryField& bav = av.boundaryField(); GeometricBoundaryField& bav = av.boundaryField();