Find more posts tagged with
Show us your script please.
If you just say looping 3000 times is so long then answer is looping 3 times only!
hm_markclear nodes 1
hm_createmark nodes 1 'by set' slide5
set nodelist [hm_getmark nodes 1]
set setupdate $nodelist
foreach node $nodelist {
hm_markclear nodes 1
hm_createmark nodes 1 $node
set temp [hm_getmark nodes 1]
hm_markclear nodes 1
foreach nid $temp {
set flg [lsearch $nodelist $nid]
if {$flg >-1} {
*nodemarkbypath $node $nid 1
set ls [hm_getmark nodes 1]
if { [llength $ls]<4 } {
foreach n $ls {
if { [lsearch $setupdate $n] == -1} {
lappend setupdate $n }
} }
}
}
unset temp
lreplace $nodelist 0 0
}
Hi Mahes . What do you want to do?
You have a set of nodes need to be updated
You search for adjacent nodes of it
Then if between it and its adjacents existing less than 4 nodes then you add those to the set.
If you perform in 2d model, between each node and its adjacent node, there is nothing! What do you want to do with adjacent nodes?
Hi Mahes . What do you want to do?
You have a set of nodes need to be updated
You search for adjacent nodes of it
Then if between it and its adjacents existing less than 4 nodes then you add those to the set.
If you perform in 2d model, between each node and its adjacent node, there is nothing! What do you want to do with adjacent nodes?
hi tinh,
I have a model built of both hex and shell elements.
we create some nodal sets.
in those sets from primary nodes I need to fetch the mid nodes and update the set.
This one is a part of my macro.
elements are second order.
2nd line of code mark nodes by sets.
those sets only has primary nodes.
Thanks,
Mahes
Ok
Do you need to add mid nodes those are inside solid comps? Or only on outer face of solid comps?
hi tinh,
No.
wat I want to do is...
I will do the mesh the model which has only 1st order elements.
from that I will create nodal sets.
after that I will change all elements to second order.
By running the macro I will update the set which has the midnodes too.
Show us your script please.
If you just say looping 3000 times is so long then answer is looping 3 times only!