Files
OpenFOAM-6/src/sampling/sampledSet/face/faceOnlySet.H
Henry Weller e287bd2e65 sampledSets: use smallDist consistently between getTrackingPoint and other tracking functions
Use different hit-tolerances between sampling methods to account for the
difference in the "offset" definition.
2016-02-29 12:09:46 +00:00

157 lines
4.1 KiB
C++

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::faceOnlySet
Description
SourceFiles
faceOnlySet.C
\*---------------------------------------------------------------------------*/
#ifndef faceOnlySet_H
#define faceOnlySet_H
#include "sampledSet.H"
#include "DynamicList.H"
#include "passiveParticleCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class faceOnlySet Declaration
\*---------------------------------------------------------------------------*/
class faceOnlySet
:
public sampledSet
{
// Private data
//- Starting point
point start_;
//- End point
point end_;
// Private Member Functions
//- Samples from startTrackPt/CellI. Updates particle/samplePt/sampleI
// and puts
// samples in the DynamicLists. Returns false if end of all samples
// reached
bool trackToBoundary
(
passiveParticleCloud& particleCloud,
passiveParticle& singleParticle,
DynamicList<point>& samplingPts,
DynamicList<label>& samplingCells,
DynamicList<label>& samplingFaces,
DynamicList<scalar>& samplingCurve
) const;
//- Samples from start_ to end_. samplingSegments contains segmentNo
// for each sample.
void calcSamples
(
DynamicList<point>& samplingPts,
DynamicList<label>& samplingCells,
DynamicList<label>& samplingFaces,
DynamicList<label>& samplingSegments,
DynamicList<scalar>& samplingCurveDist
) const;
//- Uses calcSamples to obtain samples. Copies them into *this.
void genSamples();
public:
//- Runtime type information
TypeName("face");
// Static data
//- Tolerance when comparing points relative to difference between
// start_ and end_
static const scalar tol;
// Constructors
//- Construct from components
faceOnlySet
(
const word& name,
const polyMesh& mesh,
const meshSearch& searchEngine,
const word& axis,
const point& start,
const point& end
);
//- Construct from dictionary
faceOnlySet
(
const word& name,
const polyMesh& mesh,
const meshSearch& searchEngine,
const dictionary& dict
);
//- Destructor
virtual ~faceOnlySet();
// Member Functions
const point& start() const
{
return start_;
}
const point& end() const
{
return end_;
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //