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);
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);
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))
238 if (cmpt < vector::nComponents)
255 if (cmpt < vector::nComponents)
267 for (label edgei = 0; edgei < this->nCells(); ++edgei)
269 limits.
add(width(edgei));
282 else if (
equal(
p, first()))
286 else if (
equal(
p, last()))
290 else if (
p < first() ||
p > last())
320 else if (
p < first() ||
p > last())
328 scalar
delta = GREAT;
330 for (
const scalar& val : *
this)
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
void size(const label n)
Older name for setAddressableSize.
label findLower(const ListType &input, const T &val, const label start, const ComparePredicate &comp)
Binary search to find the index of the last element in a sorted list that is less than value...
Ostream & indent(Ostream &os)
Indent stream.
label findIndex(const scalar p, const scalar tol) const
Find the grid index, within the given tolerance.
void resize(label len)
Resize lists.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void resize(const label len)
Adjust allocated size of list.
void prepend(const scalar p, label nDiv, scalar expRatio=1)
Add point/divisions/expand to front of list (push_front)
void append(const T &val)
Append an element at the end of the list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
constexpr char nl
The newline '\n' character (0x0a)
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
T & first()
Access first element of the list, position [0].
Ostream & endl(Ostream &os)
Add newline and flush stream.
A bounding box defined in terms of min/max extrema points.
#define forAll(list, i)
Loop across all elements in list.
virtual Ostream & endBlock()
Write end block group.
const labelVector & sizes() const
The (i,j,k) addressing dimensions.
List< scalar > scalarList
A List of scalars.
Handles the specification for grading within a section of a block.
Templated 3D Vector derived from VectorSpace adding construction from 3 components, element access using x(), y() and z() member functions and the inner-product (dot-product) and cross-product operators.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Vector< gradingDescriptors > grading() const
Equivalent edge grading descriptors in (x,y,z) directions.
MinMax< T > & add(const MinMax &other)
Extend the range to include the other min/max range.
void append(const scalar p, label nDiv, scalar expRatio=1)
Add point/divisions/expand to end of list (push_back)
OBJstream os(runTime.globalPath()/outputName)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
T & last()
Access last element of the list, position [size()-1].
scalarMinMax edgeLimits() const
Return min/max edge lengths.
label findCell(const scalar p) const
Find the cell index enclosing this location.
bool equal(const T &s1, const T &s2)
Compare two values for equality.
vector point
Point is a vector.
#define WarningInFunction
Report a warning using Foam::Warning.
static void prependList(List< T > &list, const T &val)
label nCells() const
Total number of cells in this direction.
void writeDict(Ostream &os, const direction cmpt) const
Write as dictionary contents for specified vector direction.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
label size() const noexcept
The number of elements in the UList.
Vector< label > labelVector
Vector of labels.
gradingDescriptors grading() const
Return edge grading descriptors for the locations.
const boundBox & bounds() const
The mesh bounding box.
List of gradingDescriptor for the sections of a block with additional IO functionality.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
static constexpr const zero Zero
Global zero (0)