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

reduce an equal operation

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By jherb

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   September 6, 2016, 05:53
Default reduce an equal operation
  #1
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 16
T.D. is on a distinguished road
Dear Foamers,

I am looking for a "reduce" function but on an "equal operation".

For example, we know that reduce function is already Ok for:
sumOp, minOp and maxOp

How to do it (or extend it) for an "equal operation" and a "pow operation".

I need to make the following code to work also in parallel:
Code:
            forAll(mesh.C(),celli)
            {
            Sens[celli] = Foam::pow(SSS[celli], 0.5) ;
            }

           // Sens and SSS are both volScalarField type
Thank you and regards,
T.D.
T.D. 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
loading issue libraries:libsimpleFunctionObjects.so libsimpleSwakFunctionObjects.so immortality OpenFOAM Pre-Processing 15 April 7, 2024 12:35
Reduce operation for an array xiao OpenFOAM Running, Solving & CFD 10 June 21, 2022 10:01
Hi Do mesh have to do to reduce the temperature at the outlet? i need the reduce temp reslan FLUENT 0 March 16, 2016 02:10
Incompatible dimensions for operation ruben23 OpenFOAM Running, Solving & CFD 2 June 12, 2015 04:14
openfoam reduce() and MPI_barrier mechy OpenFOAM Programming & Development 3 October 7, 2013 09:11


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