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

Reduce operation for an array

Register Blogs Community New Posts Updated Threads Search

Like Tree20Likes
  • 2 Post By xiao
  • 18 Post By Fransje

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 14, 2008, 00:01
Default Hi all, I am writing a para
  #1
Member
 
Heng Xiao
Join Date: Mar 2009
Location: Zurich, Switzerland
Posts: 58
Rep Power: 17
xiao is on a distinguished road
Hi all,

I am writing a parallel code and need to do a reduce operation on a vector array, i.e.

someScalar = some number in local cpu;
someArray = new vector[100];

For the scalar it should be:
reduce(someScalar, sumOp<scalar>());

What would be corresponding operation for the array? Would this work?

reduce(someArray, sumOp<vector[]>());

Doing this element-wise would be slow, I imagine, because there is too much communication involved.

Thanks very much!

Best,
Heng
xiao is offline   Reply With Quote

 


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
How to Reduce Wall Y-Plus rams FLUENT 3 July 25, 2006 03:36
It is residuals. How it to reduce? TDL FLUENT 0 July 11, 2005 04:47
how to reduce residuals Raghavendra Muvva Siemens 1 January 31, 2005 11:27
how to reduce the out let temperature usha CFX 0 April 27, 2004 05:48
how to reduce y+ Cindy Jones FLUENT 2 January 17, 2003 22:12


All times are GMT -4. The time now is 11:07.