[GiDlist] how to count the number of 3D elems in a volume
Posted: Tue Apr 15, 2003 12:38 am
Hi there !
could you give me a hint ?
I need to write a table of volumes in my .bas file.
The table should have Nvol entries,
where Nvol is the number of volumes in the project.
Each record of the table should contain :
(i) the volume label and (ii) the number of 3D elements within that volume
( hexahedra or tetrahedra ).
The additional problem is that some volumes might not be meshed in volume,
that is, only their adjacent surfaces might have a mesh of 2D elems.
For those volumes, the number of 3D elements should be cero.
Do you know any way to write such a table in the bas file ?
thanks in advance,
Andres
PS: Here are the tcl procedures that I use at the moment ,
in order to get some information about volumes:
# This prints some information about volumes
proc master_slave_materials {} {
set VolSurf [.central.s info list_entities volumes 1:[NVol]]
return $VolSurf
}
# This prints the number of volumes
proc NVol { } {
set a [.central.s info list_entities Status]
regexp -nocase {number of volumes: ([0-9]+)} $a none num
return $num
}
but I can't find the number of elems inside a volume from them.
could you give me a hint ?
I need to write a table of volumes in my .bas file.
The table should have Nvol entries,
where Nvol is the number of volumes in the project.
Each record of the table should contain :
(i) the volume label and (ii) the number of 3D elements within that volume
( hexahedra or tetrahedra ).
The additional problem is that some volumes might not be meshed in volume,
that is, only their adjacent surfaces might have a mesh of 2D elems.
For those volumes, the number of 3D elements should be cero.
Do you know any way to write such a table in the bas file ?
thanks in advance,
Andres
PS: Here are the tcl procedures that I use at the moment ,
in order to get some information about volumes:
# This prints some information about volumes
proc master_slave_materials {} {
set VolSurf [.central.s info list_entities volumes 1:[NVol]]
return $VolSurf
}
# This prints the number of volumes
proc NVol { } {
set a [.central.s info list_entities Status]
regexp -nocase {number of volumes: ([0-9]+)} $a none num
return $num
}
but I can't find the number of elems inside a volume from them.