Deleting a set of nodes from another set of nodes
Deleting a set of nodes from another set of nodes
(OP)
Hi,
I have a problem with two sets of nodes (huge number of nodes). One set cointains all the nodes, and the second one contains only a group of nodes. I need to create a thrid one set, which would be: ALL NODES - SECOND SET OF NODES.
One option would be to go one by one, in the set that contains all the nodes and deleting the number node that I don't want there, but as it is a huge number of node, this is tedious and also I can make mistakes.
Does anyone know if I can do this in a more simplified way? For instance,
NSET,NSET=ALL
NSET,NSET=GROUP2
¿NSET,NSET=ALL-GROUP2?
Thank you very much!
I have a problem with two sets of nodes (huge number of nodes). One set cointains all the nodes, and the second one contains only a group of nodes. I need to create a thrid one set, which would be: ALL NODES - SECOND SET OF NODES.
One option would be to go one by one, in the set that contains all the nodes and deleting the number node that I don't want there, but as it is a huge number of node, this is tedious and also I can make mistakes.
Does anyone know if I can do this in a more simplified way? For instance,
NSET,NSET=ALL
NSET,NSET=GROUP2
¿NSET,NSET=ALL-GROUP2?
Thank you very much!





RE: Deleting a set of nodes from another set of nodes
all=[node1,node2,...,nodeN]
group2=[grnode1,grnode2, ..., grnodeN]
for i in group2:
ind=all.index(i)
all.pop(ind)
print('no thanks')
Use the .rpy file to easily see how you can access and save the nodelists, or look into the scripting manual.
RE: Deleting a set of nodes from another set of nodes
Finally, what I did was to do it in Matlab, and it worked well also.