mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
DOC: uniformSet: improve header documentation
This commit is contained in:
@ -55,14 +55,14 @@ bool Foam::uniformSet::nextSample
|
||||
{
|
||||
bool pointFound = false;
|
||||
|
||||
const vector normOffset = offset/mag(offset);
|
||||
const vector normOffset(offset/mag(offset));
|
||||
|
||||
samplePt += offset;
|
||||
++sampleI;
|
||||
|
||||
for (; sampleI < nPoints_; ++sampleI)
|
||||
{
|
||||
scalar s = (samplePt - currentPt) & normOffset;
|
||||
const scalar s = (samplePt - currentPt) & normOffset;
|
||||
|
||||
if (s > -smallDist)
|
||||
{
|
||||
@ -91,9 +91,8 @@ bool Foam::uniformSet::trackToBoundary
|
||||
) const
|
||||
{
|
||||
// distance vector between sampling points
|
||||
const vector offset = (end_ - start_)/(nPoints_ - 1);
|
||||
const vector smallVec(tol_*offset);
|
||||
const scalar smallDist = mag(smallVec);
|
||||
const vector offset((end_ - start_)/(nPoints_ - 1));
|
||||
const scalar smallDist = mag(tol_*offset);
|
||||
|
||||
point trackPt = singleParticle.position();
|
||||
|
||||
@ -204,8 +203,8 @@ void Foam::uniformSet::calcSamples
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
const vector offset = (end_ - start_)/(nPoints_ - 1);
|
||||
const vector normOffset = offset/mag(offset);
|
||||
const vector offset((end_ - start_)/(nPoints_ - 1));
|
||||
const vector normOffset(offset/mag(offset));
|
||||
const vector smallVec(tol_*offset);
|
||||
const scalar smallDist = mag(smallVec);
|
||||
|
||||
@ -235,7 +234,7 @@ void Foam::uniformSet::calcSamples
|
||||
label trackCelli = -1;
|
||||
label trackFacei = -1;
|
||||
|
||||
bool isSample =
|
||||
const bool isSample =
|
||||
getTrackingPoint
|
||||
(
|
||||
start_,
|
||||
@ -324,7 +323,7 @@ void Foam::uniformSet::calcSamples
|
||||
|
||||
while (bHitI < bHits.size())
|
||||
{
|
||||
scalar dist =
|
||||
const scalar dist =
|
||||
(bHits[bHitI].hitPoint() - singleParticle.position())
|
||||
& normOffset;
|
||||
|
||||
|
||||
@ -28,17 +28,51 @@ Class
|
||||
Foam::uniformSet
|
||||
|
||||
Description
|
||||
A sampler type which provides a uniform distribution of \c nPoints
|
||||
sample locations along a straight line specified between a given
|
||||
\c start and an \c end points.
|
||||
|
||||
For a dictionary specification:
|
||||
Usage
|
||||
Example specification:
|
||||
\verbatim
|
||||
sets
|
||||
(
|
||||
<set>
|
||||
{
|
||||
// Mandatory entries
|
||||
type uniform;
|
||||
axis <options>;
|
||||
start <vector>;
|
||||
end <vector>;
|
||||
nPoints <label>;
|
||||
|
||||
// Optional entries
|
||||
tol <scalar>;
|
||||
}
|
||||
|
||||
);
|
||||
\endverbatim
|
||||
|
||||
where the entries mean:
|
||||
\table
|
||||
Property | Description | Required | Default
|
||||
type | uniform | yes |
|
||||
axis | x, y, z, xyz, distance | yes |
|
||||
start | The start point | yes |
|
||||
end | The end point | yes |
|
||||
nPoints | The number of points between start/end | yes
|
||||
Property | Description | Type | Reqd | Deflt
|
||||
type | Type name: uniform | word | yes | -
|
||||
axis | Output type of sample locations | word | yes | -
|
||||
start | Start point of sample line | vector | yes | -
|
||||
end | End point of sample line | vector | yes | -
|
||||
nPoints | Number of points between start/end | label | yes | -
|
||||
tol | Relative tolerance | scalar | no | 1e-3
|
||||
\endtable
|
||||
|
||||
Options for the \c axis entry:
|
||||
\verbatim
|
||||
x | x-ordinate of a sample
|
||||
y | y-ordinate of a sample
|
||||
z | z-ordinate of a sample
|
||||
xyz | x-y-z coordinates of a sample
|
||||
distance | Normal distance to the first point of a sample
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
uniformSet.C
|
||||
|
||||
@ -66,17 +100,17 @@ class uniformSet
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- Starting point
|
||||
//- Start point of sample line
|
||||
point start_;
|
||||
|
||||
//- End point
|
||||
//- End point of sample line
|
||||
point end_;
|
||||
|
||||
//- Relative tolerance when comparing points
|
||||
//- relative to difference between start_ and end_
|
||||
scalar tol_;
|
||||
|
||||
//- Number of points
|
||||
//- Number of sampling points
|
||||
label nPoints_;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user