CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Summation of all field values (https://www.cfd-online.com/Forums/openfoam-programming-development/132470-summation-all-field-values.html)

maybee April 1, 2014 08:14

Summation of all field values
 
hi,

I want to create a dimensionedScalar by the summation of all values of a geometricScalarField. How can I sum up all the field values most efficiently?

Edit: I guess a forAllIter (...) do the job, but perhaps there is a less time consuming method?

greetings
streight

maybee April 1, 2014 08:20

Ok,

I guess I found a solution here:

http://www.cfd-online.com/Forums/ope...alarfield.html

I will try this later :)


All times are GMT -4. The time now is 18:40.