CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

What is LduMatrix template class for in comparison to lduMatrix class?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By alundilong

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 3, 2017, 12:20
Default What is LduMatrix template class for in comparison to lduMatrix class?
  #1
New Member
 
SSSSS
Join Date: Jun 2011
Posts: 28
Rep Power: 14
doctorWho is on a distinguished road
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?
doctorWho is offline   Reply With Quote

Old   July 31, 2018, 19:05
Default
  #2
Member
 
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 62
Rep Power: 15
alundilong is on a distinguished road
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) ....
dlahaye likes this.
alundilong is offline   Reply With Quote

Old   August 14, 2018, 05:41
Default
  #3
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 723
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
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.
dlahaye is offline   Reply With Quote

Reply

Tags
openfoam


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 05:38
Calculation of rotational equation of motion using DPMFoam ansubru OpenFOAM Programming & Development 4 November 1, 2014 11:57
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 20:30


All times are GMT -4. The time now is 00:08.