For example, consider the 4 element
mesh, where element 2 and 3 are duplicates and:
Element 1,2
itetclr = 1
Element 3,4 itetclr = 2
then after:
filter/element/10/nodelete
Maximum material id
max(itetclr)
=
2
Duplicate Elements will be set to itetclr
=
3
search_range
=
10
nelements
searched
=
4
Number of duplicate element
found
=
1
cmo/printatt/cmohex1/itetclr/1 0
0
Attribute:
itetclr
1
1
2
3
3
2
4
2
cmo/printatt/cmohex1/iclr1/1 0
0
Attribute:
iclr1
1
1
2
1
3
2
4
2
cmo/printatt/cmohex1/iclr2/1 0
0
Attribute:
iclr2
1
1
2
2
3
1
4
2
All elements are tested. The search for each element's duplicate does
not occur over the entire
element
list. The default for search_range is 10 and results in looking at the
10
elements in the element list sequentially above and 10 elements
sequentially
below the test element. In the example given below the elements
are sorted so that elements that are physically close to each other
will be close to each other in the element list.
The search_range can be set by the user. Setting search_range to a number larger than the number of elements will
cause
all elements to be searched.
The algorithm will only detect one duplicate element per element. If
there are more than two elements with the same connectivity, they can
be found by calling filter/element multiple times.
The default behavior is to not delete the duplicate elements.
However the duplicate elements will be deleted from the mesh if the
parameter delete is specified.
In general if you are merging together two meshes and then want to
delete duplicate elements the commands might be:
* Merge two mesh objects
addmesh / merge / cmohex / cmohex1 / cmohex2
* Create an attribute with the median x,y,z coordinate of each element
createpts / median
* Sort and reorder the elements based on the median points.
This will insure that elements that occupy the
* same location will have element numbers near one another.
sort / -def- / index / ascending / ikey / xmed ymed zmed
reorder/ -def- /ikey
* Filter and remove duplicate nodes.
filter / 1 0 0
rmpoint / compress
* Filter and remove duplicate elements.
filter / element / / delete