|
[Sponsors] |
Transition of Gauss-Seidel method to Jacobi method |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 22, 2020, 23:34 |
Transition of Gauss-Seidel method to Jacobi method
|
#1 |
New Member
Iordanis
Join Date: Apr 2020
Posts: 2
Rep Power: 0 |
I am currently writing my thesis in accelerating the Gauss-Seidel smoother of the OpenFoam project. I have trouble understanding the OpenFoam implementation of the Gauss-Seidel method. The exact part I need to change is
Code:
double psii; int fStart; int fEnd = ownStartPtr[0]; for (int celli=0; celli<nCells; celli++) { fStart = fEnd; fEnd = ownStartPtr[celli + 1]; psii = bPrimePtr[celli]; for (int facei=fStart; facei<fEnd; facei++) { psii -= upperPtr[facei]*psiPtr[uPtr[facei]]; } psii /= diagPtr[celli]; for (int facei=fStart; facei<fEnd; facei++) { bPrimePtr[uPtr[facei]] -= lowerPtr[facei]*psii; } psiPtr[celli] = psii; } } |
|
April 24, 2020, 09:34 |
|
#2 | |
Senior Member
Troy Snyder
Join Date: Jul 2009
Location: Akron, OH
Posts: 220
Rep Power: 19 |
Quote:
Code:
double psii; int fStart; int fEnd = ownStartPtr[0]; for (int celli=0; celli<nCells; celli++) { fStart = fEnd; fEnd = ownStartPtr[celli + 1]; psii = bPrimePtr[celli]; for (int facei=fStart; facei<fEnd; facei++) { psii -= upperPtr[facei]*psiPtr[uPtr[facei]]; psii -= lowerPtr[facei]*psiPtr[lPtr[facei]]; } psii /= diagPtr[celli]; psiPtr[celli] = psii; } } Code:
const label* const __restrict__ lPtr = matrix_.lduAddr().lowerAddr().begin(); |
||
April 27, 2020, 10:07 |
|
#3 | |
New Member
Iordanis
Join Date: Apr 2020
Posts: 2
Rep Power: 0 |
Quote:
using potentialFoam it takes way too much time for an output (100 times more than gauss seidel method) and using simpleFoam I get a Floating point excepton... I tried updating the bPrimePtr[ ] as well the same way with: Code:
for (int facei=fStart; facei<fEnd; facei++) { bPrimePtr[uPtr[facei]] -= psii; } Thank you for helping if you have any more ideas I'd appreciate it! |
||
Tags |
gauss-seidel, jacobi, openfoam 7 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
icoFoam Courant number growth problem | tdof | OpenFOAM Running, Solving & CFD | 12 | May 24, 2023 15:00 |
Suppress twoPhaseEulerFoam energy | AlmostSurelyRob | OpenFOAM Running, Solving & CFD | 33 | September 25, 2018 18:45 |
BC for turbulent internal flow | yhoarau | OpenFOAM Running, Solving & CFD | 3 | January 22, 2015 09:02 |
Where can I get a free software with e^N method for transition prediction? | peter.zhao | Main CFD Forum | 4 | January 4, 2010 10:28 |
Water pump OpenFOAM 15 ANSYS CFX 110 comparation | waynezw0618 | OpenFOAM Running, Solving & CFD | 39 | March 5, 2009 13:57 |