ENH: Updated utilities using lagrangian classes

This commit is contained in:
andy
2011-02-24 16:47:54 +00:00
parent bf172bbf57
commit af115c5d01
20 changed files with 223 additions and 427 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,10 +28,6 @@ License
#include "DynamicList.H"
#include "polyMesh.H"
#include "Cloud.H"
#include "passiveParticle.H"
#include "IDLList.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -48,7 +44,7 @@ namespace Foam
// Sample till hits boundary.
bool Foam::polyLineSet::trackToBoundary
(
Particle<passiveParticle>& singleParticle,
passiveParticleCloud& particles,
label& sampleI,
DynamicList<point>& samplingPts,
DynamicList<label>& samplingCells,
@ -56,6 +52,10 @@ bool Foam::polyLineSet::trackToBoundary
DynamicList<scalar>& samplingCurveDist
) const
{
passiveParticle& singleParticle = *particles.first();
particle::TrackingData<passiveParticleCloud> trackData(particles);
// Alias
const point& trackPt = singleParticle.position();
@ -70,7 +70,7 @@ bool Foam::polyLineSet::trackToBoundary
do
{
singleParticle.stepFraction() = 0;
singleParticle.track(sampleCoords_[sampleI+1]);
singleParticle.track(sampleCoords_[sampleI+1], trackData);
}
while
(
@ -260,18 +260,18 @@ void Foam::polyLineSet::calcSamples
//
// Initialize tracking starting from sampleI
Cloud<passiveParticle> particles(mesh(), IDLList<passiveParticle>());
passiveParticleCloud particles(mesh());
passiveParticle singleParticle
(
particles,
mesh(),
trackPt,
trackCellI
);
bool bReached = trackToBoundary
(
singleParticle,
particles,
sampleI,
samplingPts,
samplingCells,