|
[Sponsors] |
fvScalarMatrix.solve() how to get the number of iterations? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 5, 2014, 09:34 |
fvScalarMatrix.solve() how to get the number of iterations?
|
#1 |
Senior Member
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 17 |
Hi Foamers,
it's common knowledge, that whith .solve().initialResidual() one can get the normalized initial residual of the linear system of eqs., before it is being solved iteratively. Do you know, how can I get the initial residuals and the number of iterations were made to reach the final residuals (and probably also the final residuals)? Best regards, Ilya |
|
September 5, 2014, 09:42 |
|
#2 |
Senior Member
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 17 |
P.S. I mean, lduMatrix has public functions initialResidual() finalResidulal() and noIterations(), but how to get them all together at ones, without executing .solve() three times?
Last edited by linch; September 5, 2014 at 10:46. |
|
September 5, 2014, 11:06 |
|
#3 |
Senior Member
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 17 |
Answering my own question:
Code:
scalar eqnInitialResidual = 1; label eqnNoIterations = 0; lduMatrix::solverPerformance solverPerf; solverPerf = Eqn.solve(); eqnNoIterations = solverPerf.nIterations(); eqnInitialResidual = solverPerf.initialResidual(); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sudden jump in Courant number | NJG | OpenFOAM Running, Solving & CFD | 7 | May 15, 2014 14:52 |
Help for the small implementation in turbulence model | shipman | OpenFOAM Programming & Development | 25 | March 19, 2014 11:08 |
rhoSimplecFoam Mach0.8 no pressure values | CFDnewbie147 | OpenFOAM Running, Solving & CFD | 16 | November 23, 2013 06:58 |
calculation stops after few time steps | sivakumar | OpenFOAM Running, Solving & CFD | 7 | March 17, 2013 07:37 |
Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 12:16 |