- previously introduced `getOrDefault` as a dictionary _get_ method,
now complete the transition and use it everywhere instead of
`lookupOrDefault`. This avoids mixed usage of the two methods that
are identical in behaviour, makes for shorter names, and promotes
the distinction between "lookup" access (ie, return a token stream,
locate and return an entry) and "get" access (ie, the above with
conversion to concrete types such as scalar, label etc).
- Favour use of argList methods that are more similar to dictionary
method names with the aim of reducing the cognitive load.
* Silently deprecate two-parameter get() method in favour of the
more familiar getOrDefault.
* Silently deprecate opt() method in favour of get()
These may be verbosely deprecated in future versions.
- remove MSWindows components (code and makefiles)
- use cxx, hxx extensions to reduce possible confusion with other
"list" and "vector" classes
- use C++ versions for C headers
- adjustments to internal handling to improve run-time addition of
other formats (eg, with additional user library)
For example, to write a binary STL with a '.stl' extension:
$ surfaceMeshConvert input.obj -write-format stlb output.stl
Or in a sampler,
to specify the input type without ambiguity:
surf
{
type meshedSurface;
surface sampling.inp;
fileType starcd;
scale 0.001;
...
}
STYLE: regularize naming for input/output scaling
* -read-scale (compat: -scaleIn)
* -write-scale (compat: -scaleOut)
CONFIG: change edge/surface selection name for STARCD format
- now select as "starcd" instead of "inp" to avoid naming ambiguity
with abaqus
- uses MeshedSurface instead of triSurface to prevent automatic
triangulation.
- supports '-patches' and '-excludePatches' controls as per foamToVTK.
For example,
surfaceSplitByPatch -patches '( ".*rider.*" )' motorBike.obj
ENH: use MeshedSurface for surfaceSubset
- align Switch more with Enum.
Now have find(), found() static methods.
Constructors with failsafe option.
The find() method makes for clearer coding:
OLD
Switch sw(some_string, true); // NB: true = allowBad
if (sw.valid()) ...
NOW
Switch sw = Switch::find(some_string);
if (sw.good()) ...
or
if (Switch::found(some_string)) ...
- improve construct from dictionary to handle all valid token types.
Previously just read in a word.
- Remove asText() method - replaced by c_str() and str() several
versions ago.
- renamed 'core/' -> 'base/' to avoid gitignore masking when re-adding
files
- rename 'nas/' to 'nastran/' for more clarity
- relocated OBJstream from surfMesh to fileFormats
STYLE: remove unused parseNASCoord. Was deprecated 2017-09
- remove (unused) Istream constructors, prune some unused methods,
rationalize write() vs writeDict().
Deprecate inconsistent construction order.
- handle empty names for ".ftr" surface patches (for plain triSurface
format) with double-quoted strings for more reliable streaming.
Written on a single line.
This is _backward_ compatible, but if users have been parsing these
files manually, they will need to adjust their code.
Previously:
```
(
frt-fairing:001%1
empty
windshield:002%2
empty
...
)
```
Updated (with example handling of empty name):
```
(
frt-fairing:001%1 empty
windshield:002%2 ""
...
)
```
- adjust naming of quaternion 'rotationSequence' to be 'eulerOrder'
to reflect its purpose.
- provide rotation matrices directly for these rotation orders in
coordinateRotations::euler for case in which the rotation tensor
is required but not a quaternion.
- Eg, with surface writers now in surfMesh, there are fewer libraries
depending on conversion and sampling.
COMP: regularize linkage ordering and avoid some implicit linkage (#1238)
- The writers have changed from being a generic state-less set of
routines to more properly conforming to the normal notion of a writer.
These changes allow us to combine output fields (eg, in a single
VTK/vtp file for each timestep).
Parallel data reduction and any associated bookkeeping is now part
of the surface writers.
This improves their re-usability and avoids unnecessary
and premature data reduction at the sampling stage.
It is now possible to have different output formats on a per-surface
basis.
- A new feature of the surface sampling is the ability to "store" the
sampled surfaces and fields onto a registry for reuse by other
function objects.
Additionally, the "store" can be triggered at the execution phase
as well
- the utility had automatic triangulation removed some time ago, but
never changed its name.
- catch old uses with a surfaceMeshTriangulate deprecated script
- makes the intent clearer and avoids the need for additional
constructor casting. Eg,
labelList(10, Zero) vs. labelList(10, 0)
scalarField(10, Zero) vs. scalarField(10, scalar(0))
vectorField(10, Zero) vs. vectorField(10, vector::zero)
- note that it does not actually triangulate unless necessary, should
probably receive a new name.
- use newer constructs for handling processor/non-processor patch
selection etc.
- provide relativePath() for argList and for Time.
These are relative to the case globalPath().
Eg,
Info<< "output: " << runTime.relativePath(outputFile) << nl;