How to edit a read only property (FEMesh data of PDEModel)?
    11 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
    Fergus McIlwaine
 il 28 Ago 2017
  
    
    
    
    
    Modificato: Svetlana Pease
    
 il 30 Ago 2017
            In an attempt to solve my own problem I need to edit the values of the PDE model created using the PDE toolbox.
I am attempting to to convert [p,e,t] mesh data to the FEMesh object.
When I try I get the following error
You cannot set the read-only property 'Nodes' of FEMesh.
Below is the code
function Attempt1 = LegToNew(dl,model)
 % Attempt to Convert [p,e,t] to FEMesh. dl is the decomposed geometry. 
Hmax = 0.3;
Hgrad = 1.9;
[p,e,t] = initmesh(dl,'Hmax',Hmax,'Hgrad',Hgrad,'JiggleIter',10); 
figure(1);
pdemesh(p,e,t);
 % Form model with same sized cells
generateMesh(model,'Hmax',Hmax,'Hgrad',Hgrad,'JiggleIter',10);
 model.Mesh.Nodes = p; % Insert node data. Error occurs here.
model.Mesh.Elements = t(1:3,:); % Triangle points
% model.Mesh.MaxElementSize = ; % Unsure 
% model.Mesh.MinElementSize = ; % Unsure
model.Mesh.GeometricOrder = 'linear';
 figure(2)
pdeplot(model);
If I'm able to successfully convert [p,e,t] to FEMesh data my plan is to refine a subdomain and then convert the newly created mesh data into the PDEModel.
Thank you.
0 Commenti
Risposta accettata
  Svetlana Pease
    
 il 30 Ago 2017
        
      Modificato: Svetlana Pease
    
 il 30 Ago 2017
  
      Unfortunately, converting a [p,e,t] mesh to a FEMesh object is not supported.
Regards,
Svetlana Pease
Technical Writer, MathWorks Documentation Group
0 Commenti
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Geometry and Mesh in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!