Parallel version of upwind scheme

7 ビュー (過去 30 日間)
Oleg Kravchenko
Oleg Kravchenko 2019 年 2 月 21 日
コメント済み: Oleg Kravchenko 2019 年 2 月 23 日
Dear all, I came up to the naive question which is contradictive, i.e.
How to parallelize upwind scheme?
Suppose, we have the following implementation of upwind
for k = 1:kFin % time-loop
% space-loop
un(2:nx) = u(2:nx) - cfl*(u(2:nx) - u(1:nx-1));
% BC
un(1) = un(nx);
% update
u = un;
end % for
So, how to parallelize it via parfor or spmd or else?
Is it possible for such schemes?
  2 件のコメント
Walter Roberson
Walter Roberson 2019 年 2 月 21 日
Is cfl a scalar, or is it a row vector with (nx-1) columns, or is it a square 2D array with (nx-1) rows and columns ?
Oleg Kravchenko
Oleg Kravchenko 2019 年 2 月 23 日
Dear Walter,
Thank you for reply.
I thought that number is a scalar, but it could be a vector of matrix if it's necessary for sure. Suppose is a constant value for simplicity.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeParallel for-Loops (parfor) についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by