[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to code for parallel computing using PETSC in CFD
- To: petsc-users@xxxxxxxxxxx
- Subject: How to code for parallel computing using PETSC in CFD
- From: "Ben Tay" <zonexo@xxxxxxxxx>
- Date: Sun, 31 Dec 2006 15:31:21 +0800
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=CjBz4LHnPxb/dt6utejGuG5o1nTChNWYrKOryZfRqFm/41T4SQAvPPFY9cwP62EB51nReidmXOHrkp0IxdcgAcXEKghdSYWsIMiWyxXUW8vcEdIEsxnvgKX+EB0IFsQ0b+9qA8HjbiR9JgwvieeFqt+myFmEMU1B4NOnRXiAqAY=
- Reply-to: petsc-users@xxxxxxxxxxx
- Sender: owner-petsc-users@xxxxxxxxxxx
Hi,
I'm now trying to modify my source code to enable parallel computing. I tried to use the tutorial example and I managed to get it working. However, in the example, there are a lot of "if"s statement which is not efficient.
In my CFD code, I've subroutine meant for corner cells, north, south, east , west and finally internal cells. How should I modify my code then?
My current idea is to insert a check statement into each subroutine ie " if II>=Istart and II<=Iend-1 then ...."
That's the simplest and least modification required. But does anyone know a better way?
Thanks and happy new year to all!