- silently deprecate 'startsWith', 'endsWith' methods
(added in 2016: 2b14360662), in favour of
'starts_with', 'ends_with' methods, corresponding to C++20 and
allowing us to cull then in a few years.
- handle single character versions of starts_with, ends_with.
- add single character version of removeEnd and silently deprecate
removeTrailing which did the same thing.
- drop the const versions of removeRepeated, removeTrailing.
Unused and with potential confusion.
STYLE: use shrink_to_fit(), erase()
Example - create p-rgh from p:
pressure-p-rgh
{
type pressure;
libs (fieldFunctionObjects);
writeControl writeTime;
mode static;
rho rhoInf;
rhoInf 1;
hydrostaticMode subtract;
g (0 -9.81 0);
hRef 0;
}
- the hydrostaticMode entry is optional - setting is shown during construction
- g and/or hRef values are retrieved from the database if not specified
- replace stringOps::toScalar with a more generic stringOps::evaluate
method that handles scalars, vectors etc.
- improve #eval to handle various mathematical operations.
Previously only handled scalars. Now produce vectors, tensors etc
for the entries. These tokens are streamed directly into the entry.
- some support for "uniform" bool fields. Calculating an averaged
value for a boolField does not work very well, but we simply define
that the field average is 'true' when more than 1/2 of its values
are true. Not exactly true, but allows templated definitions to work
smoothly.
- additional output method writeValue().
This outputs the single (uniform) value or the first value of the
field.
- ITstream append() would previously have used the append from the
underlying tokenList, which leaves the tokenIndex untouched and
renders the freshly appended tokens effectively invisible if
interspersed with primitiveEntry::read() that itself uses tokenIndex
when building the list.
The new append() method makes this hidden ITstream bi-directionality
easier to manage. For efficiency, we only append lists
(not individual tokens) and support a 'lazy' resizing that allows
the final resizing to occur later when all tokens have been appended.
- The new ITstream seek() method provides a conveniently means to move
to the end of the list or reposition to the middle.
Using rewind() and using seek(0) are identical.
ENH: added OTstream to output directly to a list of tokens
---
BUG: List::newElem resized incorrectly
- had a simple doubling of the List size without checking that this
would indeed be sufficient for the requested index.
Bug was not triggered since primitiveEntry was the only class using
this call, and it added the tokens sequentially.
This adds automatic deletion of cells inside small gaps. This is
generally used to avoid having excessive numbers of cells in irrelevant
areas of a geometry. It is nearly the opposite of automatic gap refinement
- that refines cells to resolve the gap; this functionality removes cells
to not mesh the gap.
The proximity handling will remove those cells which are inside 'thin' gaps
where 'thin' is defined as a distance of 2*'blockLevel'
It will
- detect surfaces which have the new 'blockLevel' specification
- convert this to a minimum gap distance
- detect cells which are inside this gap
- remove these cells and add exposed faces to the nearest 'real' patch
- The case files may contain #... comment lines
- The geometry file may contain an optional "extents" entry
- Properly handle element id specifications (off|assign|ignore|given).
- Partially handle node id specifications (off|assign|ignore|given).
Treat "given" like "ignore", since results in the lightest amount of
coding and in many cases the "given" node ids are in fact 1-based
contiguous values and thus no different than "ignore" for our
purposes.