Partial Summation of a Field
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? |
gSum does not include the dimension
just like this:
Code:
template<class Type, class GeoMesh> |
Alternative method
You can use the volFieldValue function object:
Code:
volFieldValue1 |
It's done
Thanks everybody. I've accomplished my goal.
|
All times are GMT -4. The time now is 00:33. |