MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / storeRoute

Function storeRoute

applications/test/router/router.C:232–262  ·  view source on GitHub ↗

Append all pathValue weights to route.

Source from the content-addressed store, hash-verified

230
231// Append all pathValue weights to route.
232void Foam::router::storeRoute
233(
234 const label startNodeI,
235 const label prevNodeI,
236 const label pathValue,
237 DynamicList<label>& route
238) const
239{
240 const labelList& myNeighbours = connections_[startNodeI];
241
242 forAll(myNeighbours, neighbourI)
243 {
244 label nodeI = myNeighbours[neighbourI];
245
246 if (nodeI != prevNodeI)
247 {
248 if (weights_[nodeI] == pathValue)
249 {
250 route.append(nodeI);
251
252 storeRoute
253 (
254 nodeI,
255 startNodeI,
256 pathValue,
257 route
258 );
259 }
260 }
261 }
262}
263
264
265// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

Callers 1

router.CFile · 0.85

Calls 2

forAllFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected