- A special purpose MeshedSurface that exposes the stored values
for direct modification.
- Its usage should be restricted to special cases where the surface
needs modifications as an atomic operation.
- the surfMesh classes where originally designed with limited
(protected) access to the underlying components. This is to
avoid unintentional direct changes, since these can quickly
lead to inconsistencies with the topology addressing etc.
However, if we wish to efficiently adjust surfaces, it is useful
to modify the components directly.
The compromise is to provide 'xfer' methods:
- xferFaces()
- xferPoints()
- xferZones()
These transfer the contents to an Xfer container for reuse, while
also resetting the topology addressing. To apply the changes,
the reset() method is used.
- ensure that MeshedSurface and UnsortedMeshedSurface can also work
with labelledTri faces.
- nTriangles() convenience method for meshed surfaces
- MeshedSurface::addZonesToFaces() method to copy zone information
into the labelledTri per-face region storage.
The goal is to replace the triSurface reading routines with
run-time selectable ones from surfMesh.
Note that since these actually act more like 'patches'
(ie, contiguous addressing) it might be reasonable to rename as
surfPatchIdentifier / surfacePatchIdentifier
- This format is fortunately little-used (or never used) since its
inception.
Using raw stream operators to write zones, points and faces in a
single file was not well thought out - the output content varies
with the Face template type (face, triFace, labelledFace), which
makes it not very robust at all.
The static read in OFSsurfaceFormat also has a bug - keeping
transcribed faces from being passed through.
Conclusion: removing it makes more sense that repairing and still
not having something good.
Do retain stream operators for MeshedSurface and UnsortedMeshedSurface,
since they are useful for passing around data
(eg, between processors), but they shouldn't be used for files.
- 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.
- 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.
* MeshedSurface / surfMesh / triSurface
- use shorter method names similar to those from volume meshes:
Sf(), magSf(), Cf()
instead of the longer ones from PrimitivePatch:
faceAreas(), magFaceAreas(), faceCentres()
- similar names throughout to ease switching between triSurface and
MeshedSurface storage.
//- Disallow default shallow-copy assignment
//
// Assignment of UList<T> may need to be either shallow (copy pointer)
// or deep (copy elements) depending on context or the particular type
// of list derived from UList and it is confusing and prone to error
// for the default assignment to be either. The solution is to
// disallow default assignment and provide separate 'shallowCopy' and
// 'deepCopy' member functions.
void operator=(const UList<T>&) = delete;
//- Copy the pointer held by the given UList.
inline void shallowCopy(const UList<T>&);
//- Copy elements of the given UList.
void deepCopy(const UList<T>&);
The deprecated non-const tmp functionality is now on the compiler switch
NON_CONST_TMP which can be enabled by adding -DNON_CONST_TMP to EXE_INC
in the Make/options file. However, it is recommended to upgrade all
code to the new safer tmp by using the '.ref()' member function rather
than the non-const '()' dereference operator when non-const access to
the temporary object is required.
Please report any problems on Mantis.
Henry G. Weller
CFD Direct.