51 const label prevSegment,
52 const scalar prevCurveDist,
55 const label nextSegment,
63 if (prevSegment == nextSegment)
65 const point pt = (prevPt + nextPt)/2;
69 const label prevNeighbour =
74 const label nextNeighbour =
80 if (prevOwner == nextOwner || prevOwner == nextNeighbour)
84 else if (prevNeighbour == nextOwner || prevNeighbour == nextNeighbour)
86 celli = prevNeighbour;
91 <<
"Adjacent faces in the same segment do not share a cell. " 96 samplingCells.
append(celli);
98 samplingCurveDist.
append(prevCurveDist +
mag(delta)/2);
99 samplingSegments.
append(prevSegment);
106 void Foam::sampledSets::lineCell::calcSamples
121 lineFace::calcSamples
135 for (
label facei = 1; facei < facePts.
size(); ++ facei)
141 faceFaces[facei - 1],
142 faceSegments[facei - 1],
143 faceCurveDist[facei - 1],
157 void Foam::sampledSets::lineCell::genSamples()
177 samplingSegments.
shrink();
178 samplingCurveDist.
shrink();
202 start_(dict.
lookup(
"start")),
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search...
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual const labelList & faceNeighbour() const
Return face neighbour.
void size(const label)
Override size to be inconsistent with allocated storage.
Macros for easy insertion into run-time selection tables.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
Holds list of sampling points which is filled at construction time. Various implementations of this b...
A class for handling words, derived from string.
lineCell(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict)
Construct from dictionary.
static void calcMidPointSample(const polyMesh &mesh, const point &prevPt, const label prevFace, const label prevSegment, const scalar prevCurveDist, const point &nextPt, const label nextFace, const label nextSegment, DynamicList< point > &samplingPts, DynamicList< label > &samplingCells, DynamicList< label > &samplingFaces, DynamicList< label > &samplingSegments, DynamicList< scalar > &samplingCurveDist)
Calculate the next mid point sample.
virtual const labelList & faceOwner() const
Return face owner.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
virtual ~lineCell()
Destructor.
addToRunTimeSelectionTable(sampledSet, arcUniform, word)
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
virtual bool write()
Sample and write.
dimensioned< scalar > mag(const dimensioned< Type > &)
Mesh consisting of general polyhedral cells.
defineTypeNameAndDebug(arcUniform, 0)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.