- For merging meshedSurf content from parallel sources.
Ensures zoneIds are properly preserved for sampling in parallel.
Current state
~~~~~~~~~~~~~
Current producers of the region information:
* sampledTriSurfaceMesh
Current consumers of the region information:
* nastran writer. The zone ids passed through as PSHELL Ids (with offset 1).
Limitations
The per-face region association is preserved, but the face/element
sort order gets lost in reconstruction. Would need to attach
additional information to the sampled surface and use that for
sorting, but this would also imply that sampled values be written
indirectly (or resorted) too to match the order. Zone ids are passed
through, but not their names. After reconstruction, zone ids are no
longer contiguous. Re-sorting (as mentioned above) would solve this
too, but again at the cost of more complexity when writing.
- Allows passing of additional information (per-face zone ids) or possibly
other things, while reducing the number of arguments to pass.
- In sampledTriSurfaceMesh, preserve the region information that was
read in, passing it onwards via the UnsortedMeshSurface content.
The Nastran surface writer is currently the only writer making use
of this per-face zone information.
Passing it through as a PSHELL attribute, which should retain the
distinction for parts. (issue #204)
- use surfFaces() to return the templated list of faces.
This frees up the method 'faces()' to be used as a virtual method,
which will be needed at a later stage.
- similar to foamToEnsightParts, provide a data/ subdirectory to hold
the time-varying field information (collated output only).
- widen data mask to avoid possible overflows with many time steps
- ensight does supports geometry in a separate file, but for the
surface writer we claim that this is not true. This allows
the field writers to control where the mesh/case files land.
With 'true', the uncollated output would incidentally create
things like this:
Previous (w/ fields) | Now (w/ fields)
----------------------------+----------------------
0.05/surf.case |
0.05/surf.mesh |
0.05/p/surf.case | 0.05/p/surf.case
0.05/p/surf.mesh | 0.05/p/surf.mesh
0.05/p/surf.0000.p | 0.05/p/surf.0000.p
Previous (w/o fields) | Now (w/o fields)
----------------------------+----------------------
0.05/surf.case | 0.05/surf.mesh
0.05/surf.case | 0.05/surf.mesh
Move the separateGeometry() flag to the *.C code, where it is less
likely to be mistakenly altered.
- patchFields now get mapped (instead of created)
- with -consistent it now maps all patches except for processor ones (they are
the only ones that are processor-local)
- all constraint patches get evaluated after mapping to bring them up to date.
Patch contributed by Mattijs Janssens
Replaced the 'postProcess' argument to the 'write' and 'execute'
functions with the single static member 'postProcess' in the
functionObject base-class.
- Avoids the need for the 'OutputFilterFunctionObject' wrapper
- Time-control for execution and writing is now provided by the
'timeControlFunctionObject' which instantiates the processing
'functionObject' and controls its operation.
- Alternative time-control functionObjects can now be written and
selected at run-time without the need to compile wrapped version of
EVERY existing functionObject which would have been required in the
old structure.
- The separation of 'execute' and 'write' functions is now formalized in the
'functionObject' base-class and all derived classes implement the
two functions.
- Unnecessary implementations of functions with appropriate defaults
in the 'functionObject' base-class have been removed reducing
clutter and simplifying implementation of new functionObjects.
- The 'coded' 'functionObject' has also been updated, simplified and tested.
- Further simplification is now possible by creating some general
intermediate classes derived from 'functionObject'.
to have the prefix 'write' rather than 'output'
So outputTime() -> writeTime()
but 'outputTime()' is still supported for backward-compatibility.
Also removed the redundant secondary-writing functionality from Time
which has been superseded by the 'writeRegisteredObject' functionObject.
for consistency with the time controls in controlDict and to avoid
unnecessary confusion. All code and tutorials have been updated.
The old names 'outputControl' and 'outputInterval' are but supported for
backward compatibility but deprecated.
Rather than requiring each functionObject to handle failed construction
internally (using the active_ flag) the static member function "viable"
is provided which returns true if construction of the functionObject is
likely to be successful. Failed construction is then handled by the
wrapper-class which constructs the functionObject,
e.g. "OutputFilterFunctionObject".
These new names are more consistent and logical because:
primitiveField():
primitiveFieldRef():
Provides low-level access to the Field<Type> (primitive field)
without dimension or mesh-consistency checking. This should only be
used in the low-level functions where dimensional consistency is
ensured by careful programming and computational efficiency is
paramount.
internalField():
internalFieldRef():
Provides access to the DimensionedField<Type, GeoMesh> of values on
the internal mesh-type for which the GeometricField is defined and
supports dimension and checking and mesh-consistency checking.
In order to simplify expressions involving dimensioned internal field it
is preferable to use a simpler access convention. Given that
GeometricField is derived from DimensionedField it is simply a matter of
de-referencing this underlying type unlike the boundary field which is
peripheral information. For consistency with the new convention in
"tmp" "dimensionedInteralFieldRef()" has been renamed "ref()".
Non-const access to the internal field now obtained from a specifically
named access function consistent with the new names for non-canst access
to the boundary field boundaryFieldRef() and dimensioned internal field
dimensionedInternalFieldRef().
See also commit 22f4ad32b1
When the GeometricBoundaryField template class was originally written it
was a separate class in the Foam namespace rather than a sub-class of
GeometricField as it is now. Without loss of clarity and simplifying
code which access the boundary field of GeometricFields it is better
that GeometricBoundaryField be renamed Boundary for consistency with the
new naming convention for the type of the dimensioned internal field:
Internal, see commit 4a57b9be2e
This is a very simple text substitution change which can be applied to
any code which compiles with the OpenFOAM-dev libraries.