41 blockPointField_(blockPointField),
44 meshDensity_(meshDensity),
50 if (expand_.size() != 12)
54 "blockDescriptor::blockDescriptor" 55 "(const cellShape&, const pointField& blockPointField, " 56 "const curvedEdgeList&, const Vector<label>& meshDensity, " 57 "const scalarList& expand, const word& zoneName)" 58 ) <<
"Unknown definition of expansion ratios" 74 blockPointField_(blockPointField),
103 if (t.
pToken() == token::BEGIN_LIST)
111 "blockDescriptor::blockDescriptor" 112 "(const pointField&, const curvedEdgeList&, Istream&)",
114 ) <<
"incorrect token while reading n, expected '(', found " 122 is >> meshDensity_.x()
135 if (expRatios.
size() == 1)
138 expand_ = expRatios[0];
140 else if (expRatios.
size() == 3)
143 expand_[0] = expRatios[0];
144 expand_[1] = expRatios[0];
145 expand_[2] = expRatios[0];
146 expand_[3] = expRatios[0];
149 expand_[4] = expRatios[1];
150 expand_[5] = expRatios[1];
151 expand_[6] = expRatios[1];
152 expand_[7] = expRatios[1];
155 expand_[8] = expRatios[2];
156 expand_[9] = expRatios[2];
157 expand_[10] = expRatios[2];
158 expand_[11] = expRatios[2];
160 else if (expRatios.
size() == 12)
168 "blockDescriptor::blockDescriptor" 169 "(const pointField&, const curvedEdgeList&, Istream&)" 170 ) <<
"Unknown definition of expansion ratios: " << expRatios
189 return blockPointField_;
228 (meshDensity_.
x() + 1)
229 * (meshDensity_.
y() + 1)
230 * (meshDensity_.
z() + 1)
248 return blockPointField_[blockShape_[i]];
267 os << blockLabels[
labelI];
277 <<
" simpleGrading (";
287 expand[0] == expand[1]
288 && expand[0] == expand[2]
289 && expand[0] == expand[3]
293 expand[4] == expand[5]
294 && expand[4] == expand[6]
295 && expand[4] == expand[7]
299 expand[8] == expand[9]
300 && expand[8] == expand[10]
301 && expand[8] == expand[11]
305 os << expand[0] <<
' ' << expand[4] <<
' ' << expand[8];
blockDescriptor(const cellShape &, const pointField &blockPointField, const curvedEdgeList &, const Vector< label > &meshDensity, const UList< gradingDescriptors > &expand, const word &zoneName="")
Construct from components. Optional cellSet/zone name.
const scalarListList & blockEdgeWeights() const
Return the weightings along each edge.
const cellShape & blockShape() const
Return the block shape.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
const word & name() const
Return model name.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void size(const label)
Override size to be inconsistent with allocated storage.
bool isPunctuation() const
errorManipArg< error, int > exit(error &err, const int errNo=1)
label nPoints() const
Return the number of points.
static const labelSphericalTensor labelI(1)
Identity labelTensor.
const word & wordToken() const
Ostream & operator<<(Ostream &, const edgeMesh &)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An analytical geometric cellShape.
void putBack(const token &)
Put back token.
const pointField & blockPointField() const
Reference to point field defining the block mesh.
InfoProxy< token > info() const
Return info proxy.
const Vector< label > & meshDensity() const
Return the mesh density (number of cells) in the i,j,k directions.
const cellModel & model() const
Model reference.
List of gradingDescriptor for the sections of a block with additional IO functionality.
A token holds items read from Istream.
const word & zoneName() const
Return the (optional) zone name.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
const List< List< point > > & blockEdgePoints() const
Return the block points along each edge.
Takes the description of the block and the list of curved edges and creates a list of points on edges...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
label nCells() const
Return the number of cells.
const point & blockPoint(const label i) const
Return block point at local label i.
punctuationToken pToken() const
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.
~blockDescriptor()
Destructor.