フィルターのクリア

How to set state.u state.t in PDE Toolbox's function assmbleFEMatrixes for a generic 2D problem?

12 ビュー (過去 30 日間)
I am facing a 2D diffusion equation of a two-components vectorial field u=(u1,u2) with finite elements method. I need to extract the finite element matrixes by calling the function FEM = assembleFEMatrices(___,state) but to do it I need to set state.u and state.t. In all examples I saw that you can use a previus solution but in my case I can't use it because the solver does not converge ( this is why I am extracting these matrixes, my idea is to apply a custom solver to the ode system provided by FEM) so how can I set this two parameters?
%extracting FEM matrixes
state.u = ?
state.t = ?
FEM = assembleFEMatrices(model,state)

回答 (1 件)

Ravi Kumar
Ravi Kumar 2023 年 11 月 15 日
https://www.mathworks.com/help/pde/ug/assemblefematrices.html#mw_c59ea87b-8f13-478a-b33d-351795b1572f
  2 件のコメント
Giacomo Marco La Montagna
Giacomo Marco La Montagna 2023 年 11 月 16 日
I've already checked the documentation but I would set state.u and state.t having no access to previous solutions...
Giacomo Marco La Montagna
Giacomo Marco La Montagna 2023 年 11 月 16 日
this is the error I get if I omit to specify the state
Error using pde.EquationModel/assembleFEMatricesInternal
For a nonlinear model, the last argument must be a structure array with the solution data as its 'u' field.
Error in assembleFEMatrices (line 115)
FEMatricesOut = assembleFEMatricesInternal(pdem,BCEnforcementOption,matrix,state);
Error in PDEexample2 (line 43)
FEM = assembleFEMatrices(model)

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

カテゴリ

Help Center および File ExchangeGeometry and Mesh についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by