reduce an equal operation
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) T.D. |
Your code should run without modification in multi process mode. Each processor has its own mesh with the cells of that fluid partition it is responsible for. So no need for any reduce operation. The latter would only be necessary if data from all processors should be put together, e.g. the sum of a value of all cells of all the meshes on all the processors/processes.
But your equal and pow operation only uses local information. So also no need for data exchange between processors. This would become much more complicate, if values of neighbor cells should be used. |
All times are GMT -4. The time now is 07:27. |