Wed 08 Jan 2014 03:41:47 PM UTC, comment #1:
I am not against it, as it would not compromise the current functionality (at least not in an important way), but I question its usefullness. An unfused Mesh is conceptually just the same as a Formex: it is not a single geometric domain but a collection of nelems unconnected domains, each consisting of a single element. Its coords would be exactly the same as the Formex' coords, but it would store an extra Connectivity, but that would be useless, as the elements are not connected at all. Most of the Mesh methods would fail to return a useful or expected result.
For a collection of nelems disconnected elements, the Formex class provides better functionality. So why not just use a Formex instead?
If there is some useful Mesh functionality for a nonfused Mesh, my first idea would be to see if it can easily be ported to a Formex. If not, then we should indeed add the option.
The situation is different if you have some subdomains which are fused, and you do not want to fuse the subdomains together. We currently have the List or fe.Model as a useful model here.
That is why mergeMeshes, mergeNodes have the fuse=False option.
The convert method has got the option because of some need when converting elements and having to trace back the converted parts to the original elements: the fuse is then usual done afterwards.
Finally, note that the current toMesh supports positional arguments (args), so if we decide to add this option, we should check old code for situations where toMesh is used with such arguments (probably nowhere) and change these. And then remove the args, so that in future only keyword parameters are allowed.
|
Wed 08 Jan 2014 09:16:12 AM UTC, original submission:
Sometimes,
when converting a Formex to a Mesh you may need to avoid the fuse(), ie. you want that the element Connectivity of the Mesh is independent of the coordinates of the points of the original Formex. For example, when you are still creating the geometry made of multiple parts and occasionally some points have similar coordinates.
The minor change to
Formex.toMesh()
into
Formex.toMesh(fuse=False)
is in attachment.
NB: fuse = True/False is already used in some Mesh methods/functions:
convert,mergeMeshes,mergeNodes.
I am not sure if this change is 'welcome'.
Would anybody benefit of this change?
|