フィルターのクリア

Does pdepe accept 'Vectorized', 'on' as an option? If so, what does it do?

17 ビュー (過去 30 日間)
Brian Cluggish
Brian Cluggish 2024 年 6 月 25 日 22:46
コメント済み: Bill Greene 2024 年 6 月 26 日 10:06
I am writing a code that uses pdepe. It would be easy to write the pdefun in vectorized form. That is, if there are N variables and M position points, if the position x is input as a vector, then c, f, and s would be output as NxM arrays. It seems like this would be more efficient than only allowing x to be a scalar. However, odeset does have a "Vectorized" option. Does this option apply to pdepe? If so, what does it do? Does it allow the input variable x to be a vector rather than a scalar?
Thanks for your help!

採用された回答

Torsten
Torsten 2024 年 6 月 25 日 23:09
編集済み: Torsten 2024 年 6 月 25 日 23:12
If you look into the documentation for "pdepe", you will find that the "Vectorized" option cannot be chosen:
Cited from the documentation of "pdepe":
options — Option structure
structure array
Option structure, specified as a structure array. Use the odeset function to create or modify the option structure. pdepe supports these options:
In most cases, default values for these options provide satisfactory solutions.
If I remember correctly, this variant of "pdepe" has the choice to vectorize the calls to the function where you provide c, s and f:
  1 件のコメント
Bill Greene
Bill Greene 2024 年 6 月 26 日 10:06
Yes, pde1dm provides a "Vectorized=on" option that can substantially improve performance for refined meshes. I don't know why pdepe does not also support this. (There are several other ode15s options that could also be supported by pdepe but, unfortunately, are not.)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by