Go to the documentation of this file.
58 if (
mag(
x) > SMALL &&
mag(
y) > SMALL &&
mag(z) > SMALL)
60 Info<<
"Looking at cell "
61 << i <<
' ' << j <<
' ' <<
k
62 <<
" to determine orientation."
65 if (((
x ^
y) & z) > 0)
67 Info<<
"Right-handed block." <<
endl;
79 Info<<
"Cannot determine orientation of cell "
80 << i <<
' ' << j <<
' ' <<
k
81 <<
" since has base vectors " <<
x <<
y << z <<
endl;
90 <<
"Cannot determine orientation of block."
91 <<
" Continuing as if right handed." <<
endl;
105 blockHandedness_(noPoints),
106 points_((xDim_ + 1)*(yDim_ + 1)*(zDim_ + 1))
114 const bool readBlank,
115 const scalar twoDThicknes,
123 if (twoDThicknes > 0)
140 if (twoDThicknes > 0)
237 <<
"Unable to determine block handedness as points "
238 <<
"have not been read in yet"
253 if (
range.size() != 6)
256 <<
"Invalid size of the range array: " <<
range.size()
257 <<
". Should be 6 (xMin, xMax, yMin, yMax, zMin, zMax"
278 (yMaxRange - yMinRange + 1)*(zMaxRange - zMinRange + 1)
282 for (
label k = zMinRange - 1;
k <= zMaxRange - 1;
k++)
284 for (
label j = yMinRange - 1; j <= yMaxRange - 1; j++)
286 result[
p].setSize(4);
307 (xMaxRange - xMinRange + 1)*(zMaxRange - zMinRange + 1)
311 for (
label i = xMinRange - 1; i <= xMaxRange - 1; i++)
313 for (
label k = zMinRange - 1;
k <= zMaxRange - 1;
k++)
315 result[
p].setSize(4);
336 (xMaxRange - xMinRange + 1)*(yMaxRange - yMinRange + 1)
340 for (
label i = xMinRange - 1; i <= xMaxRange - 1; i++)
342 for (
label j = yMinRange - 1; j <= yMaxRange - 1; j++)
344 result[
p].setSize(4);
365 (yMaxRange - yMinRange + 1)*(zMaxRange - zMinRange + 1)
369 for (
label k = zMinRange - 1;
k <= zMaxRange - 1;
k++)
371 for (
label j = yMinRange - 1; j <= yMaxRange - 1; j++)
373 result[
p].setSize(4);
394 (xMaxRange - xMinRange + 1)*(zMaxRange - zMinRange + 1)
398 for (
label i = xMinRange - 1; i <= xMaxRange - 1; i++)
400 for (
label k = zMinRange - 1;
k <= zMaxRange - 1;
k++)
402 result[
p].setSize(4);
423 (xMaxRange - xMinRange + 1)*(yMaxRange - yMinRange + 1)
427 for (
label i = xMinRange - 1; i <= xMaxRange - 1; i++)
429 for (
label j = yMinRange - 1; j <= yMaxRange - 1; j++)
431 result[
p].setSize(4);
436 result[
p][2] =
vtxLabel(i + 1, j + 1, 0);
450 <<
"direction out of range (1 to 6): " << direc
460 <<
"Unable to determine block handedness as points "
461 <<
"have not been read in yet"
469 result[faceI].flip();
vectorField pointField
pointField is a vectorField.
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
labelListList blockCells() const
Return block cells.
void setHandedness()
Calculate handedness of block.
Ostream & endl(Ostream &os)
Add newline and flush stream.
hexBlock(const hexBlock &)
Disallow default bitwise copy construct.
dimensioned< scalar > mag(const dimensioned< Type > &)
faceList patchFaces(label direc, const labelList &range) const
Return block patch faces given direction and range limits.
label xDim_
Number of point in each direction.
pointField points_
List of points.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
label vtxLabel(label i, label j, label k) const
Vertex addressing inside the block.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
errorManip< error > abort(error &err)
Vector< scalar > vector
A scalar version of the templated Vector.
void setSize(const label)
Reset size of List.
List< labelList > labelListList
A List of labelList.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label k
Boltzmann constant.
const dimensionedScalar c
Speed of light in a vacuum.
handed blockHandedness_
Handedness of the block.
void readPoints(Istream &)
Read block points.
#define WarningInFunction
Report a warning using Foam::Warning.