From ee6f3909bd8cb06752ed5d83f2d0a9a5d5d08dd8 Mon Sep 17 00:00:00 2001 From: Henry Date: Fri, 2 Jan 2015 19:20:19 +0000 Subject: [PATCH] LduMatrixOperations: Added support for scaling symmetric matrices Note: non-uniform scaling of a symmetric matrix generates an asymmetric matrix --- applications/test/LduMatrix/LduMatrixTest3.C | 2 +- .../LduMatrix/LduMatrix/LduMatrixOperations.C | 17 +++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/applications/test/LduMatrix/LduMatrixTest3.C b/applications/test/LduMatrix/LduMatrixTest3.C index 39b8a069bb..f13692ec05 100644 --- a/applications/test/LduMatrix/LduMatrixTest3.C +++ b/applications/test/LduMatrix/LduMatrixTest3.C @@ -101,7 +101,7 @@ int main(int argc, char *argv[]) for (int corr=0; corr::operator*= *sourcePtr_ *= sf; } - if (upperPtr_) + // Non-uniform scaling causes a symmetric matrix + // to become asymmetric + if (symmetric() || asymmetric()) { - Field& upper = *upperPtr_; + Field& upper = this->upper(); + Field& lower = this->lower(); const unallocLabelList& l = lduAddr().lowerAddr(); + const unallocLabelList& u = lduAddr().upperAddr(); for (register label face=0; face& lower = *lowerPtr_; - - const unallocLabelList& u = lduAddr().upperAddr(); for (register label face=0; face