|
[Sponsors] |
Reducing pointfield values on proc boundaries |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 19, 2018, 07:40 |
Reducing pointfield values on proc boundaries
|
#1 |
Member
Victor Koppejan
Join Date: May 2015
Posts: 40
Rep Power: 11 |
I trying to follow the topic below:
transforming a function defined on mesh().points() into a pointScalarField I'd like to do something similar. 1 loop over the the points of a cell and add values to the value at the points 2 Sum up the values off the points on the located on the proc boundaries. In other words, if a point resides on two procs, addup the values on each domain and scatter the result back to the procs again. How can I perform action 2 using a collective operation on the point field? Thanks in advance, Victor Last edited by vkoppejan; January 19, 2018 at 11:01. |
|
January 20, 2018, 12:38 |
|
#2 |
Member
Victor Koppejan
Join Date: May 2015
Posts: 40
Rep Power: 11 |
To (partly) answer my own question, this is done usin the syncPointData, as is shown below for (taken from AveragingMethods/Dual/Dual.C ).
Note how "plusEqOp<Type>()" allows summing up of the values. Code:
template<class Type> void Foam::AveragingMethods::Dual<Type>::syncDualData() { this->mesh_.globalData().syncPointData ( dataDual_, plusEqOp<Type>(), mapDistribute::transform() ); } |
|
January 20, 2018, 13:37 |
|
#3 |
Member
Victor Koppejan
Join Date: May 2015
Posts: 40
Rep Power: 11 |
To (partly) answer my own question, this is done usin the syncPointData, as is shown below for (taken from AveragingMethods/Dual/Dual.C ).
Note how "plusEqOp<Type>()" allows summing up of the values. Code:
template<class Type> void Foam::AveragingMethods::Dual<Type>::syncDualData() { this->mesh_.globalData().syncPointData ( dataDual_, plusEqOp<Type>(), mapDistribute::transform() ); } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
TimeVaryingMappedFixedValue | irishdave | OpenFOAM Running, Solving & CFD | 32 | June 16, 2021 07:55 |
Ensight - node values -cell values | leo | FLUENT | 1 | May 12, 2010 09:47 |
strange node values @ solid/fluid interface - help | JB | FLUENT | 2 | November 1, 2008 13:04 |
updating values at inlet boundaries | Stefano | Siemens | 3 | March 20, 2007 11:13 |
node values or cell values? | aPpA | FLUENT | 0 | November 10, 2006 09:56 |