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

Problem with ldumatrix solver

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 4, 2014, 08:42
Question Problem with ldumatrix solver
  #1
New Member
 
Fujiang Yu
Join Date: Jan 2014
Posts: 12
Rep Power: 8
yfjok22 is on a distinguished road
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
yfjok22 is offline   Reply With Quote

Old   January 6, 2014, 00:48
Default
  #2
New Member
 
Fujiang Yu
Join Date: Jan 2014
Posts: 12
Rep Power: 8
yfjok22 is on a distinguished road
Could anybody help me with this problem
yfjok22 is offline   Reply With Quote

Reply

Tags
ldumatrix, pcg, solver

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[swak4Foam] Problem using swak4Foam in a modiefied solver bastil OpenFOAM Community Contributions 12 September 5, 2013 12:43
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


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