Set the m4 -I include accordingly to have the folllowing:
- the directory of the parser.
- include/ in the top-level source tree of the current target
(eg, src/finiteVolume/include-m4/ when compiling libfiniteVolume)
- include/ from OpenFOAM
Additional -dry-run option for makeParser, wrap-lemon for expanding m4
only.
Extend m4 wrapping support to include bison as well.
- include the trailing newline for the "// comment" form, but also add
in leading space removal. This ensure that we do not introduce odd
indentation, while also eliminating lines that are solely C++
comments.
- output the "uniform", "nonuniform" Field entry tags as words instead
of raw character strings, which can help for direct tokenization or
when sending/receiving via Pstreams.
- 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.
- allows use of Enum in more situations where a tiny Map/HashTable
replacement is desirable. The new methods can be combined with
null constructed for to have a simple low-weight caching system
for words/integers instead of fitting in a HashTable.
ENH: downgrade error on type-mismatch to a warning
- Ensight data files generated by OpenFOAM will start with the name of
the data type (Eg, "scalar", "vector" etc), but this convention may
fail for data files that have been generated elsewhere.
- since pointPatchField is not derived from Field, methods such as
negate() or a unary min(), max() are missing.
These have apparently not been needed thus far, but are used
indirectly via GeometricField.
- improves similarity to autoPtr. Simplifies coding.
Example,
tmp<volScalarField> tfield;
// sometime later...
tfield.reset
(
volScalarField::New("myfield", mesh, dimensionedScalar(Zero))
);
- as per tmp, disallow tmpNrc assignment from literal nullptr
- as per autoPtr, allow explicit test as bool (same as valid).
- can be useful when a scalarField has been used to store booleans and
we need to recover a bool directly and deal with potential rounding
issues.
ENH: support "any" as a Switch counterpart to "none"
- now indicate that the dictionary entry is missing, not that it is
an unknown function type.
STYLE: adjust PatchFunction1New.C to have logic structure look similar