mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
fvcAverage: Minor improvement to the evaluation of the internalField
This commit is contained in:
@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user