This fixes the static-initialisation order problem - fieldTypes.C
referes to labelIOField etc. which are after it in Make/files and
hence the link order.
- now takes a const UList<T> as input and returns a List<T>
instead of trying to use the same ListType for both.
This avoids previously encountered issues when a UList was passed in.
- add specialized bitSet handling within subset(), where we can benefit
from faster traversal of sparse selections and have a better estimate
of the final output size.
- handle tmp fields in interpolate methods
- special method interpolateInternal() for creating a volume field
with zero-gradient treatment for patches from an internal field.
This method was previously also called interpolate(), but that
masked the ability to subset the internal field only.
Ensight output needs the volume field:
uses interpolateInternal().
VTK output has separate handling of internal and patch fields:
uses interpolate().
ENH: added fvMeshSubset mesh() method for baseMesh or subMesh.
- simplies coding when the fvMeshSubset may or may not be in active use.
ENH: update foamToEnsight to use newer methods in wrapped form
- static interpolate functions with renaming for manual use with
fvMeshSubset (when fvMeshSubsetProxy may be too limiting in
functionality)
- helps reduce clutter in the topoSetDict files.
Caveats when using this.
The older specification styles using "name" will conflict with the
set name. Eg,
{
name f0
type faceSet;
action add;
source patchToFace;
sourceInfo
{
name inlet;
}
}
would flattened to the following
{
name f0
type faceSet;
action add;
source patchToFace;
name inlet;
}
which overwrites the "name" used for the faceSet.
The solution is to use the updated syntax:
{
name f0
type faceSet;
action add;
source patchToFace;
patch inlet;
}
- faceBitSet, pointBitSet and faceBoolSet (similar to cellBitSet)
* allows topo sources in a wider variety of places.
* With copy or move constructors.
- cylinderToPoint, searchableSurfaceToFace, searchableSurfaceToPoint,
sphereToFace, sphereToPoint sources
- optional innerRadius for sphere and cylinder sources to treat as hollow.
- support "sets" as well as "set" for cellToCell, faceToFace... sources.
* convenience and avoids writing the set during processing.
- now applicable to labelLists.
Note:
in some situations it will be more efficient to use
Foam::identity() directly. Eg,
globalIndex globalCells(mesh.nCells());
...
labelList cellIds
(
identity(globalCells.localSize(), globalCells.localStart())
);
- previously simply read files until the input stream went bad and no
more lines could be read. With the more stringent checking of
values read (commit 0ce7e364a4) this approach causes problems.
Use the underlying tokenizer instead to decide about termination.
- for space-savings the VTK fields are normally written as 'float'
rather than double. When a double field contains very large values,
these can result in a overflow when converted to float.
Now trap these with the appropriate numeric limits.
No warning when these values are clipped: it should be readily
apparent from the output.
ENH: handle symmTensor component swapping directly on VTK output.
- use VTK output routines in vtkSurfaceWriter to benefit from the
above changes
- a failed attempt to read a value (eg, word, label, scalar) from a
stream now always provokes a FatalIOError.
This helps avoid some difficult to trace input errors.