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

lduMatrix and LduMatrix

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By HPE
  • 1 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 11, 2021, 20:39
Default lduMatrix and LduMatrix
  #1
New Member
 
Russian Federation
Join Date: Apr 2020
Posts: 18
Rep Power: 6
fetc95 is on a distinguished road
Hello, I tried to find the information in the web and in this forum but did not find anything.

In the OpenFOAM source code, there are two big classes: lduMatrix and LduMatrix. Does anybody know what is the difference between them?
fetc95 is offline   Reply With Quote

Old   December 12, 2021, 06:46
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
LduMatrix is a class template. The classes starting with a capital letter in OpenFOAM are usually class templates.
dlahaye and yueyun like this.
HPE is offline   Reply With Quote

Old   December 12, 2021, 09:53
Default
  #3
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 723
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
@HPE: thank you for sharing your insight.

Does the Ldumatrix class template allow to implement complex-valued (i.e. with non-zero imaginary part) matrices?
dlahaye is offline   Reply With Quote

Old   December 12, 2021, 13:35
Default
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,686
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by dlahaye View Post
@HPE: thank you for sharing your insight.

Does the Ldumatrix class template allow to implement complex-valued (i.e. with non-zero imaginary part) matrices?
In theory yes, but I would expect it to break in several places elsewhere - at the latest when doing the linear solve. Will also fall apart without processor boundary handling for complex types. IMO need to treat this as a development topic at the moment.
dlahaye likes this.
olesen is offline   Reply With Quote

Old   December 12, 2021, 14:40
Default
  #5
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 723
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Aha! Is there any other use of templating Ldumatrix that you can think off. Would single precision real matrices work using this template?
dlahaye is offline   Reply With Quote

Old   December 13, 2021, 06:24
Default
  #6
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,686
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by dlahaye View Post
Aha! Is there any other use of templating Ldumatrix that you can think off. Would single precision real matrices work using this template?

Single or double precision are no problem per se, since this is what the various WM_PRECISION_OPTION values do (SP, DP, SPDP). However, the backend linear solvers also need to be available for the corresponding precision. If, for example, you compile OpenFOAM with WM_PRECISION_OPTION=SP (instead of the default DP), then all fields and solvers are single-precision and it all will work. You can even compile with SPDP, which means that all of the fields are handled in single-precision, but the linear solve is actually running in double-precision. This gives the benefit of lower memory bandwidth for field operations, but higher precision for the linear solve which will normally have better/faster convergence.
If you are trying to have a single-precision solve with double-precision for all of the fields (ie, a non-existent DPSP mode), you are out of luck.


I think it is time that you explain what you are trying to solve.
olesen is offline   Reply With Quote

Old   December 15, 2021, 02:30
Default
  #7
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 723
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Dear Mark,

Thank you for asking me to clarify my doubts.

I am trying to solve doubts I have related to the computational efficiency of laplacianFoam and scalarTransportFoam (to start with). These doubts are related to the efficiency of the iterative solvers (both sequential and parallel).

In short:

1/ in laplacianFoam I would to compare GAMG with genuine AMG on unstructured grids;

2/ in scalarTransportFoam I would like to compare current solvers with ILU with drop tolerance after AMD reordering.

You pointed me earlier to work done using PETSc.

I need to go back and read more documentation. I will get back to you here.

Again, thank you for thinking along. Cheers, Domenico.
dlahaye is offline   Reply With Quote

Reply


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
What is LduMatrix template class for in comparison to lduMatrix class? doctorWho OpenFOAM Programming & Development 2 August 14, 2018 05:41
Create new member variable for lduMatrix FabianL OpenFOAM 0 December 13, 2017 04:39
Why renumbering works for LduMatrix? chengdi OpenFOAM 4 July 31, 2017 18:54
lduMatrix problem in High order scheme rxgrch OpenFOAM Programming & Development 3 April 2, 2013 10:30
ldumatrix zaratustra OpenFOAM Programming & Development 6 August 20, 2009 05:48


All times are GMT -4. The time now is 16:31.