|
[Sponsors] |
August 24, 2011, 06:19 |
change symmetric lduMatrix into asymmetric
|
#1 |
New Member
Marek
Join Date: Aug 2011
Posts: 6
Rep Power: 15 |
The fvm::laplacian(psi) returns a symmetric matrix M.
I am trying to modify single entries of this matrix by accessing M.upper() and M.lower(). Unfortunately every modification of M.upper() is treated as if M.lower() is modified as well, because a symmetric matrix holds only one shared pointer for both fields. How can I change this matrix into an asymmetric matrix? lduMatrix::upper() is implemented such that it duplicates (*lowerPtr_) into a new scalarField, if only *lowerPtr_ exists but not *upperPtr_. Unfortunately, this is not implemented vice versa: fvm::laplacian(psi) is written such that it defines only *upperPtr_ but not *lowerPtr_. And lduMatrix::lower() does not duplicate (*upperPtr_) into a new scalarField if (*lowerPtr_) doesn't exist. Can somebody help? Marek |
|
August 24, 2011, 09:44 |
|
#2 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
All you need to do is make a non-const access request for both the upper and lower. Just write:
M.upper(); M.lower(); If your M is not const, then your matrix is now asymmetric... Although at this point upper and lower are still the same. |
|
August 24, 2011, 10:02 |
|
#3 |
New Member
Marek
Join Date: Aug 2011
Posts: 6
Rep Power: 15 |
Thank you, marupio, you are right.
I was confused by the lduMatrix source code, when I wrote about different implementations of lower() and upper(). Actually both are implemented equivalent. Marek |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change cell zone index/thread during simulation | neilduffy1024 | FLUENT | 0 | January 17, 2011 10:40 |
Merits and Demerits of symmetric and asymmetric re | Mukkarum Husain | Main CFD Forum | 0 | January 7, 2009 09:46 |
asymmetric solution generated by symmetric problem | Twiti | CFX | 7 | October 16, 2004 20:12 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 06:12 |
Symmetric problem - Asymmetric prediction | Mark | Main CFD Forum | 14 | January 29, 2001 14:21 |