From 41e28bb0721978e05374b87d026872bdd055f15e Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 8 Jun 2017 17:46:02 +0100 Subject: [PATCH] Fast processor SAMG support without search --- .../processorSAMGInterface.C | 475 ++++++++++-------- 1 file changed, 268 insertions(+), 207 deletions(-) diff --git a/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/SAMGInterfaces/processorSAMGInterface/processorSAMGInterface.C b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/SAMGInterfaces/processorSAMGInterface/processorSAMGInterface.C index 962ef2e11..f027b337e 100644 --- a/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/SAMGInterfaces/processorSAMGInterface/processorSAMGInterface.C +++ b/src/foam/matrices/lduMatrix/solvers/AMG/interfaces/SAMGInterfaces/processorSAMGInterface/processorSAMGInterface.C @@ -56,239 +56,300 @@ Foam::processorSAMGInterface::processorSAMGInterface comm_(fineProcInterface_.comm()), tag_(fineProcInterface_.tag()) { - // MASTER processor + // READ FIRST + // This code is written for the FILTERED local matrix + // because the addressing is very natural. If this is not ok, filter the + // big matrix here using fineInterface.faceCells(), transpose, and use + // the same names for crMatrix arrays (then, there is no need to change + // the triple product code). + + // Algorithm details: + // Go through the triple product similar to SAMG Policy - collect + // coarse addressing on master and slave in the same order + + // The resulting contributions from triple product will be saved using + // the following arrays: + // - faceCells_: for coarse matrix, it tells us the owner of the + // boundary coefficient (on local side) + // - fineAddressing_: saves the index of the fine boundary coefficient + // in the natural order of appearance on master in + // triple product + // - restrictAddressing_: saves the coarse face for which the + // contribution (coefficient) needs to sum-up + // - restrictWeights_: weights for each fine boundary coefficient in + // natural order of appearance on master + + // *Note: (A*B)^T = B^T*A^T, which is exactly what I have. Use the fact + // on the slave processor!!! + + // Pair collection is always done looking for the master side + // HJ, 8/Jun/2017 + + // Look up neighbours for a master + HashTable, label, Hash