CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Partial Summation of a Field

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By zhangyan
  • 1 Post By fumiya

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   June 1, 2018, 02:45
Default Partial Summation of a Field
  #1
New Member
 
javad haqqani
Join Date: Dec 2017
Posts: 16
Rep Power: 8
maksjood is on a distinguished road
Hi. I'm in need of summing up the values of a specific part of a scalar field. I've tried a for loop. The statement is as follows:

sum+=field[celli];

but I need the sum to be dimensioned and the above statement doesn't do that.

is there a way I can use sum() or gSum for this purpose?
maksjood is offline   Reply With Quote

 

Tags
sum


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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 92 May 21, 2024 07:56
problems after decomposing for running alessio.nz OpenFOAM 7 March 5, 2021 04:49
creating an internal field? maybee OpenFOAM Programming & Development 2 February 4, 2021 17:15
Steady simulation does not iterate in Time=1 agustinvo OpenFOAM Running, Solving & CFD 3 November 19, 2015 04:57
Summation of all field values maybee OpenFOAM Programming & Development 1 April 1, 2014 08:20


All times are GMT -4. The time now is 22:51.