Boundary conditions for adaptmesh() in PDE Toolbox

1 view (last 30 days)
Hello, everyone!
I am trying to use adaptive mesh with PDE ToolboxPDE Toolbox but got stuck at the specification of boundary conditions.
The second argument in the adaptmesh() function should specify boundary conditions, which, as I understand, should be either the Boundary Condition matrix or the name of a Boundary M-file.
I tried to generate boundary conditions matrices with [Q,G,H,R] = assemb(model); but got the error:
Error using horzcat
Dimensions of arrays being concatenated are not consistent.
Error in Untitled14 (line 57)
[u,p,e,t] = adaptmesh(g,[Q,G,H,R],...
g is defined by
circ = [1; 0; 0; R];
g = decsg(circ);
In my model I specify coefficients in the following way:
FEM = assembleFEMatrices(model,'none');
specifyCoefficients(model, 'm', rho, 'd', d*eye(size(FEM.M)), 'c', c, 'a', 0, 'f', f);
where f is a function handle used for calculation of non-constant conditions.
Could someone clarify, what is the correct way to use adaptive mesh in my case?
  1 Comment
Nikhil Sonavane
Nikhil Sonavane on 27 Dec 2019
I suggest you to attach the entire code so that it will be easier to understand it. Refer to the documentation of adaptmesh and verify the arguments given by you. Also check if you are using adaptmesh to solve only elliptic scalar PDE problem as mentioned in the documentation of the function.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!