CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Mesh Generation & Pre-Processing Software > Pointwise & Gridgen

How to get sum of cell numbers of the selected domains using Glyph Script ?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 8, 2015, 02:26
Question How to get sum of cell numbers of the selected domains using Glyph Script ?
  #1
New Member
 
XieQing
Join Date: Mar 2013
Location: Capital of Qin Dynasty
Posts: 22
Rep Power: 13
xq712000 is on a distinguished road
I know how to count cells of ONE domain using Glyph script

See : http://www.cfd-online.com/Forums/poi...d-domains.html

But, how to return the total cell number of many selected domains ?
xq712000 is offline   Reply With Quote

Old   December 16, 2015, 15:55
Default
  #2
Senior Member
 
Zach Davis
Join Date: Jan 2010
Location: Los Angeles, CA
Posts: 101
Rep Power: 16
RcktMan77 is on a distinguished road
Quote:
Originally Posted by xq712000 View Post
I know how to count cells of ONE domain using Glyph script

See : http://www.cfd-online.com/Forums/poi...d-domains.html

But, how to return the total cell number of many selected domains ?
You should be able to use the getCellCount command in a for loop to gather cell counts for each domain. For example:

Code:
set myDomainList  "$dom1 $dom2 $dom3"

set totalCells 0

foreach dom $myDomainList {
    incr totalCells [$dom getCellCount]
}

puts "The total cells of my domains is $totalCells"

Last edited by RcktMan77; December 17, 2015 at 11:05. Reason: Bug in myDomainList declaration
RcktMan77 is offline   Reply With Quote

Reply

Tags
cell number, get sum, glyph script


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FvMatrix coefficients shrina OpenFOAM Running, Solving & CFD 10 October 3, 2013 14:38
Cell Numbers furkan Siemens 3 November 24, 2005 03:06
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15
Warning 097- AB Siemens 6 November 15, 2004 04:41
What is the difference between the cell numbers ? Lee Siemens 3 September 28, 2003 07:28


All times are GMT -4. The time now is 21:04.