- replace explicit use of word, wordRe, wordRes, wordHashSet as filters
with a MatchPredicate, since they all satisfy the requirements for
use a predicate. This change reduces code duplication, allows other
matcher types (eg, keyType) as well as lambda functions.
- add special treatment for a 'const char*' parameter
for lookupClass() and the now-deprecated single item lookup() method
to promote these parameters to 'word'.
- naming similar to objectRegistry, with unambiguous resolution.
The lookup() methods have different return types depending on the
calling parameter.
STYLE: use IOobjectListTemplates.C for implementations
- previously included as local definition within IOobjectList.C,
but will be adding more templated methods soon.
- adjust parameters (eg, matchName instead of matcher) to show their
function
ENH: handle objectRegistry::names<void>(...)
- this is equivalent to no Type restriction, and can be used when
filtering names. Eg,
obr.names<void>(wordRe..);
- Start brief descriptions with 'Deprecated(YYYY-MM)' so that it is
readily visible in the short method description. Consistent date
format (YYYY-MM), placed immediately after the \deprecated tag.
commit 3f9c7bf411
commit 3cf177e759
====
ENH: add geometric decomposition constraint (issue #921)
- geometric decomposition constraints may be used to prevent the
decomposition of regions of the mesh.
The geometric constraint is applied according to the face centres,
which define the connectivity between cells.
Specified in decomposeParDict
constraints
{
geometric
{
type geometric;
geometry
{
box1
{
type box;
min (-10 -10 -10);
max (1 1 1);
}
ball1
{
type sphere;
origin (-2 -2 1);
radius 1;
}
}
}
}
ENH: add 'grow' option for geometric decomposition constraint (issue #921)
- the 'grow' option includes an additional check to include cell faces
for any cell that already has two or more of its faces "unblocked".
This could indicate a connection over a corner, but does not distinguish
between connectivity introduced by the constraint and the connectivity
defined by other constraints.
ENH: geometric decomposition constraint using topoSetFaceSource (issue #921)
- replaced use of searchableSurface with a more general and
more efficient topoSetFaceSource instead.
Since searchableSurface is also available as a topoSetFaceSource,
there is no loss in functionality, but using topoSetFaceSource allow
directly looping over the faces without creating of an additional
List of volumeTypes.
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.
- Default format is now XML binary (base64) instead of legacy format.
The old -xml option is redundant and ignored.
The new -legacy option can be used to force legacy output instead.
- Polyhedral decomposition is now off by default (old -poly is ignored).
The option -poly-decomp forces decomposition of polyhedrals into
primitive shapes.
- reduced memory footprint by reading and converting fields
successively.
- Creation of symlinks to processor files is no longer required or
desired. The old -noLinks option is ignored.
- Ignore -useTimeName option. Always number according to timeIndex.
- align input parameters and some of the behaviour with vtkWrite
The output is now postProcessing/<name> for similar reasoning as
mentioned in #866 - better alignment with other function objects, no
data collision with foamToEnsight output.
- separate controls for internal and boundary meshes
- can restrict conversion based on zone names, enclosing volumes,
bounding box.
- parallel output.
The output is now postProcessing/<name> for similar reasoning as
mentioned in #866 - better alignment with other function objects, no
collision with foamToVTK output.
- align the input parameters with those of vtkCloud so that we can
specify the ASCII precision and the padding width for the output
file names as well.
- emit TimeValue field, support file series generation
- support internal or boundary meshes, combining the result into a vtm
file.
- can restrict conversion based on zone names, enclosing volumes,
bounding box
- 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.