Go to the documentation of this file.
40 const label oldLen = list.size();
43 for (label i = oldLen; i > 0; --i)
45 list[i] = std::move(list[i-1]);
65 point(
x.first(),
y.first(), z.first()),
66 point(
x.last(),
y.last(), z.last())
74 return Vector<gradingDescriptors>
99 for (
const label nDiv : divisions_)
120 knots[i+1] - knots[i],
141 divisions_.resize(len,
Zero);
142 expansion_.resize(len,
Zero);
157 if (knots.size() && (
p <= knots.last()))
160 <<
"Cannot append point " <<
p
161 <<
" which is <= last value " << knots.last() <<
endl;
168 <<
"Negative or zero divisions " << nDiv <<
endl;
175 expRatio = 1.0/(-expRatio);
177 else if (
equal(expRatio, 0))
184 divisions_.append(nDiv);
185 expansion_.append(expRatio);
200 if (knots.size() && (
p >= knots.first()))
203 <<
"Cannot prepend point " <<
p
204 <<
" which is >= first value " << knots.first() <<
endl;
211 <<
"Negative or zero divisions " << nDiv <<
endl;
218 expRatio = 1.0/(-expRatio);
220 else if (
equal(expRatio, 0))
267 for (label edgei = 0; edgei < this->nCells(); ++edgei)
269 limits.
add(width(edgei));
278 if (scalarList::empty() ||
p < first() ||
p > last())
282 else if (
equal(
p, first()))
286 else if (
equal(
p, last()))
290 else if (
p < first() ||
p > last())
308 if (scalarList::empty())
318 return scalarList::size()-1;
320 else if (
p < first() ||
p > last())
328 scalar
delta = GREAT;
330 for (
const scalar& val : *
this)
List< scalar > scalarList
A List of scalars.
static const char *const componentNames[]
void resize(const label len)
Adjust allocated size of list.
static constexpr const zero Zero
Global zero (0)
Vector< gradingDescriptors > grading() const
Equivalent edge grading descriptors in (x,y,z) directions.
const labelVector & sizes() const
The (i,j,k) addressing dimensions.
scalarMinMax edgeLimits() const
Return min/max edge lengths.
void append(const T &val)
Append an element at the end of the list.
static void prependList(List< T > &list, const T &val)
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
void prepend(const scalar p, label nDiv, scalar expRatio=1)
Add point/divisions/expand to front of list (push_front)
List of gradingDescriptor for the sections of a block with additional IO functionality.
const boundBox & bounds() const
The mesh bounding box.
#define forAll(list, i)
Loop across all elements in list.
void resize(label len)
Resize lists.
Vector< label > labelVector
Vector of labels.
void append(const scalar p, label nDiv, scalar expRatio=1)
Add point/divisions/expand to end of list (push_back)
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
label findCell(const scalar p) const
Find the cell index enclosing this location.
label findLower(const ListType &input, const T &val, const label start, const ComparePredicate &comp)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
virtual Ostream & endBlock()
Write end block group.
OBJstream os(runTime.globalPath()/outputName)
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
Ostream & indent(Ostream &os)
Indent stream.
label nCells() const
Total number of cells in this direction.
gradingDescriptors grading() const
Return edge grading descriptors for the locations.
Handles the specification for grading within a section of a block.
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
MinMax< T > & add(const MinMax &other)
Extend the range to include the other min/max range.
label findIndex(const scalar p, const scalar tol) const
Find the grid index, within the given tolerance.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void writeDict(Ostream &os, const direction cmpt) const
Write as dictionary contents for specified vector direction.
A bounding box defined in terms of min/max extrema points.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
vector point
Point is a vector.
bool equal(const T &s1, const T &s2)
Compare two values for equality.
#define WarningInFunction
Report a warning using Foam::Warning.
static constexpr direction nComponents
Number of components in this vector space.