Solve Poisson Problem with Finite Difference using parallelization

조회 수: 6 (최근 30일)
Hi, I am trying to solve the poisson problem with finite difference. However, depending on the grid size, the calculation may take time. That's why I want to using parallelism. I already solved this problem using and I would like to do it on matlab. Is there any way in matlab to solve two subproblems in parallel that need to communicate with each other?
Thank you

채택된 답변

Edric Ellis
Edric Ellis 2014년 8월 8일
You might consider using SPMD blocks within MATLAB - these run blocks of code in parallel, and allow communication using the labSend / labReceive family of functions.
  댓글 수: 1
Kilian Thomas
Kilian Thomas 2014년 8월 8일
thank you. I think it could work with this. I only need to have the parallel tool now.
thank you :)

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Ahmet Cecen
Ahmet Cecen 2014년 8월 8일
Poisson equation boils down to a simple Ax=b problem. If you have the parallel computing toolbox, using mldivide (or the plain \ operator) will automatically exploit all available threads. Otherwise, I would look into 3rd party MP/MPI implementations for MATLAB.
  댓글 수: 3
Ahmet Cecen
Ahmet Cecen 2014년 8월 8일
Gauss Seidel is an iterative method to solve LINEAR problems of the exact form Ax=b. Your problem is very much linear. The choice of not using mldivide is I am guessing due to the fact that you are interested in a transient solution rather than steady state, which was not clear in your question.
Kilian Thomas
Kilian Thomas 2014년 8월 8일
Yes sorry. You are totally right. I will have a look at your solution too. It could be much faster. Thank you :)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by