|
[Sponsors] |
January 4, 2014, 08:42 |
Problem with ldumatrix solver
|
#1 |
New Member
Fujiang Yu
Join Date: Jan 2014
Posts: 12
Rep Power: 12 |
Hello, friends, I'm now dealing with linear iterative solvers in Openfoam. After several days' code reading, I have got a small problem in ldumatrix solver.
I'm now reading the code of Preconditional CG method(PCG.C in Openfoam), and nearly have got through most of it. But there still exists a small problem in this part // --- Calculate normalisation factor scalar normFactor = this->normFactor(psi, source, wA, pA); if (lduMatrix::debug >= 2) { Info<< " Normalisation factor = " << normFactor << endl; } // --- Calculate normalised residual norm solverPerf.initialResidual() = gSumMag(rA)/normFactor; solverPerf.finalResidual() = solverPerf.initialResidual(); I'm really curious with the normFactor part, which is defined in lduMatrixSolver.C Foam::scalar Foam::lduMatrix::solver::normFactor ( const scalarField& psi, const scalarField& source, const scalarField& Apsi, scalarField& tmpField ) const { // --- Calculate A dot reference value of psi matrix_.sumA(tmpField, interfaceBouCoeffs_, interfaces_); tmpField *= gAverage(psi); return gSum(mag(Apsi - tmpField) + mag(source - tmpField)) + solverPerformance::small_; In this function, it seems to return |Ax-p|+|b-p|+Ɛ, which I can't find any relation with the definition of normalisation. In the comment, it says that the code wants to build up the normalised residual norm, but it should be rA/|rA|, so what does it mean in this part of code. Please help me figure out this problem. Thank you for your time and regard Frank Yu |
|
January 6, 2014, 00:48 |
|
#2 |
New Member
Fujiang Yu
Join Date: Jan 2014
Posts: 12
Rep Power: 12 |
Could anybody help me with this problem
|
|
Tags |
ldumatrix, pcg, solver |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] Problem using swak4Foam in a modiefied solver | bastil | OpenFOAM Community Contributions | 13 | April 18, 2020 16:17 |
mesh.update problem in a new FSI solver | ICL | OpenFOAM | 0 | October 8, 2011 15:16 |
Compilation problem after modifying a solver. | PetSul | OpenFOAM Running, Solving & CFD | 2 | October 1, 2009 18:28 |
patching problem unsteady solver | yellow-stuff | Main CFD Forum | 0 | September 25, 2009 02:26 |
Coupled solver energy equation problem | lucioantonio | FLUENT | 0 | April 3, 2009 11:21 |