mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: Updated utilities using lagrangian classes
This commit is contained in:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user