| 201 | |
| 202 | |
| 203 | void Foam::meshToMesh::normaliseWeights |
| 204 | ( |
| 205 | const word& descriptor, |
| 206 | const labelListList& addr, |
| 207 | scalarListList& wght |
| 208 | ) const |
| 209 | { |
| 210 | const label nCell = returnReduce(wght.size(), sumOp<label>()); |
| 211 | |
| 212 | if (nCell > 0) |
| 213 | { |
| 214 | forAll(wght, celli) |
| 215 | { |
| 216 | scalarList& w = wght[celli]; |
| 217 | scalar s = sum(w); |
| 218 | |
| 219 | forAll(w, i) |
| 220 | { |
| 221 | // note: normalise by s instead of cell volume since |
| 222 | // 1-to-1 methods duplicate contributions in parallel |
| 223 | w[i] /= s; |
| 224 | } |
| 225 | } |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | |
| 230 | void Foam::meshToMesh::calcAddressing |
no test coverage detected