- use forwarding templates for the factory method
- avoid double use of dynamic_cast.
Don't need implicit use in isA<>, can use result directly
STYLE: updated iteration over HashTable of mesh objects
- was using coordinate-system and transform() which is the
local-to-global mapping, whereas it should be invTransform() which
is the global-to-local mapping
- this seems to be the only reliable means of obtaining the values.
Using typeName_() yields the wrong value.
Using the typeName causes initialization issues
(segfault when executing on some systems).
- support name filtering by class based on <Type> or predicates.
Eg,
objects.sortedNames<volScalarField>(namePattern);
vs objects.sortedNames(volScalarField::typeName, namePattern);
These can also be used directly for untyped name matching.
Eg,
objects.sortedNames<void>(namePattern);
Can also use a predicate:
objects.sortedNames(wordRe("vol.*Field"), namePattern);
objects.sortedNames
(
[](const word& clsName){ return clsName.startsWith("vol"); },
namePattern
);
- add IOobjectList::count() methods
- lookupClass<Type>() to use types instead of class variables.
- additional helpers for parallel: allNames(), checkNames()
- provide filterClasses() and filterObjects(), prune_0() method
forwarding to HashTable methods for easier access.
- in parameter form, check if it headerClassName() corresponds to the
specified class name
- in templated form, check if headerClassName() corresponds to the
Type:typeName value.
Specialization for <void> always returns true (ie, no checks)
- 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.
- 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.