https://linen.dev logo
Yes, this is a bit philosophical question. Passing...
# programming
t
Yes, this is a bit philosophical question. Passing a lot of variables around for functions results in cluttered code like this, but it let's you track what variables are needed within.. Much later on, when I'll modify this to use the "standard" OpenFOAM line wrapping, these function calls will take half a screen to show. So may need some rethinking is there a better way?
Copy code
// Process the candidate points
        forAll (candidatePointIs, pointI)
        {
            // Propagate active island index to candidate point only
            // if candidate is prismatic and propagation type is active
            if ((isCandidatePrismatic[pointI]) and (isPropagationModeActive[pointI]))
            {
                addIslandInfoForPoint(candidatePointIs[pointI], frontPointIs[pointI], islandI, nLayer, pointNormals, prismIslands1, prismIslands2, prismIslands3, pointHops1, pointHops2, pointHops3, pointNormalSource1, pointNormalSource2, pointNormalSource3, pointNormals1, pointNormals2, pointNormals3);
                addPrismaticMappingsForPoint(mesh, candidatePointIs[pointI], frontPointIs[pointI], islandI, prismIslands1, prismIslands2, prismIslands3, innerPrismPointLabels1, innerPrismPointLabels2, innerPrismPointLabels3, outerPrismPointLabels1, outerPrismPointLabels2, outerPrismPointLabels3);
                passivePropagation = false;
                nAddedPrisms += 1.0 / nProcessorsOnPoint[candidatePointIs[pointI]];
            }
         ...