|
[Sponsors] |
What is LduMatrix template class for in comparison to lduMatrix class? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 3, 2017, 13:20 |
What is LduMatrix template class for in comparison to lduMatrix class?
|
#1 |
New Member
SSSSS
Join Date: Jun 2011
Posts: 29
Rep Power: 15 |
I have found there are two matrix classes in OpenFOAM: lduMatrix and LduMatrix.
lduMatrix is used here and there. but I am not sure LduMatrix template class is used in OpenFOAM. does anyone know its usage? |
|
July 31, 2018, 20:05 |
|
#2 |
Member
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 64
Rep Power: 16 |
It seems LduMatrix accounts for matrix coefficient due to interface (cyclic, processor boundary), while lduMatrix treats those separately. I wish someone can add more values on the discussion by explaining 1) the reason of using two types of class (due to efficiency? I guess) 2) ....
|
|
August 14, 2018, 06:41 |
|
#3 |
Senior Member
|
My understanding is that with reading a bit of source code, one is able to understand the difference between the LduMatrix templated class and the lduMatrix (non-templated) class.
The LduMatrix templated class is defined here: https://github.com/OpenFOAM/OpenFOAM...ix/LduMatrix.H In line 85 to 105 of this H-file, one reads that the LduMatrix class defines eight member data, namely lduMesh, diagPtr (matrix diagonal), upperPtrx (matrix upper triangle), lowerPtr (matrix lower triangle), sourcePtr (right-hand side vector), interfaces, interfacesUpper and interfacesLower. The type of these member data is parametrized. The type of sourcePtr is Type. The type of upperPtrx and lowerPtr is LUType. The type of diagPtr is DType. Etc. The ludMatrix (non-templated) class is defined here: https://github.com/OpenFOAM/OpenFOAM.../lduMatrices.C In line 31 to 35 of this H-file, one reads five applications of this broader (templated class) definition. One reads five definitions of the lduMatrix class depending on whether the sourcePtr and interface is of type scalar, vector, etc. |
|
Tags |
openfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
The udf.h headers are unable to open- in VISUAL STUDIO 13 | sanjeetlimbu | Fluent UDF and Scheme Programming | 4 | May 2, 2016 06:38 |
Calculation of rotational equation of motion using DPMFoam | ansubru | OpenFOAM Programming & Development | 4 | November 1, 2014 12:57 |
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug | unoder | OpenFOAM Installation | 11 | January 30, 2008 21:30 |