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);
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))
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)
virtual bool resize()
Resize the ODE solver.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void append(const T &val)
Append an element at the end of the list.
void resize(const label len)
Adjust allocated size of list.
MinMax< T > & add(const MinMax &other)
Extend the range to include the other min/max range.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual Ostream & endBlock()
Write end block group.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
label findIndex(const scalar p, const scalar tol) const
Find the grid index, within the given tolerance.
label findCell(const scalar p) const
Find the cell index enclosing this location.
scalarMinMax edgeLimits() const
Return min/max edge lengths.
const boundBox & bounds() const
The mesh bounding box.
Vector< gradingDescriptors > grading() const
Equivalent edge grading descriptors in (x,y,z) directions.
T & first()
Return the first element of the list.
void size(const label n)
Older name for setAddressableSize.
T & last()
Return the last element of the list.
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
A bounding box defined in terms of min/max extrema points.
FixedList< label, nTypes > sizes() const
Processor-local sizes per element type.
Foam::dictionary writeDict() const
Write to dictionary.
Handles the specification for grading within a section of a block.
List of gradingDescriptor for the sections of a block with additional IO functionality.
static const char *const componentNames[]
static constexpr direction nComponents
Number of components in bool is 1.
@ END_STATEMENT
End entry [isseparator].
bool append() const noexcept
True if output format uses an append mode.
OBJstream os(runTime.globalPath()/outputName)
#define WarningInFunction
Report a warning using Foam::Warning.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Vector< label > labelVector
Vector of labels.
label findLower(const ListType &input, const T &val, const label start, const ComparePredicate &comp)
vector point
Point is a vector.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool equal(const T &s1, const T &s2)
Compare two values for equality.
Ostream & indent(Ostream &os)
Indent stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
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)
static void prependList(List< T > &list, const T &val)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.
gradingDescriptors grading() const
Return edge grading descriptors for the locations.
void prepend(const scalar p, label nDiv, scalar expRatio=1)
Add point/divisions/expand to front of list (push_front)
label nCells() const
Total number of cells in this direction.