Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-2.3.x

This commit is contained in:
andy 2014-02-21 08:55:25 +00:00
commit 74ab77168f
3 changed files with 46 additions and 36 deletions

View file

@ -195,41 +195,44 @@ void Foam::ensightMesh::correct()
{
forAll(mesh_.boundary(), patchi)
{
const polyPatch& p = mesh_.boundaryMesh()[patchi];
labelList& tris = boundaryFaceSets_[patchi].tris;
labelList& quads = boundaryFaceSets_[patchi].quads;
labelList& polys = boundaryFaceSets_[patchi].polys;
tris.setSize(p.size());
quads.setSize(p.size());
polys.setSize(p.size());
label nTris = 0;
label nQuads = 0;
label nPolys = 0;
forAll(p, faceI)
if (mesh_.boundary()[patchi].size())
{
const face& f = p[faceI];
const polyPatch& p = mesh_.boundaryMesh()[patchi];
if (f.size() == 3)
labelList& tris = boundaryFaceSets_[patchi].tris;
labelList& quads = boundaryFaceSets_[patchi].quads;
labelList& polys = boundaryFaceSets_[patchi].polys;
tris.setSize(p.size());
quads.setSize(p.size());
polys.setSize(p.size());
label nTris = 0;
label nQuads = 0;
label nPolys = 0;
forAll(p, faceI)
{
tris[nTris++] = faceI;
}
else if (f.size() == 4)
{
quads[nQuads++] = faceI;
}
else
{
polys[nPolys++] = faceI;
const face& f = p[faceI];
if (f.size() == 3)
{
tris[nTris++] = faceI;
}
else if (f.size() == 4)
{
quads[nQuads++] = faceI;
}
else
{
polys[nPolys++] = faceI;
}
}
tris.setSize(nTris);
quads.setSize(nQuads);
polys.setSize(nPolys);
}
tris.setSize(nTris);
quads.setSize(nQuads);
polys.setSize(nPolys);
}
}
@ -240,9 +243,12 @@ void Foam::ensightMesh::correct()
if (patchNames_.empty() || patchNames_.found(patchName))
{
nfp.nTris = boundaryFaceSets_[patchi].tris.size();
nfp.nQuads = boundaryFaceSets_[patchi].quads.size();
nfp.nPolys = boundaryFaceSets_[patchi].polys.size();
if (mesh_.boundary()[patchi].size())
{
nfp.nTris = boundaryFaceSets_[patchi].tris.size();
nfp.nQuads = boundaryFaceSets_[patchi].quads.size();
nfp.nPolys = boundaryFaceSets_[patchi].polys.size();
}
}
reduce(nfp.nTris, sumOp<label>());

View file

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,7 +32,7 @@ Description
amplitude and frequency.
\f[
x_p = (1 + a sin(\pi f t))x_{ref} + x_o
x_p = (1 + a sin(2 \pi f t))x_{ref} + x_o
\f]
where

View file

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -95,12 +95,16 @@ bool Foam::MPPICParcel<ParcelType>::move
scalar f = p.stepFraction();
scalar a = p.age();
p.U() = (1.0 - f)*p.UCorrect();
ParcelType::move(td, trackTime);
p.U() = U + (p.stepFraction() - f)*p.UCorrect();
p.age() = a;
break;
}
}