Dear Getfem++ users,

I would like to use Nedelec finite element to calculate the mode of 3d 
electromagnetic cavity.
I'm using the matlab interface.
The importation of the mesh, definition of element and integration method is 
fine:
m = gf_mesh('import', 'gmsh', 'cylinder.msh');
mf = gf_mesh_fem(m,3);
gf_mesh_fem_set(mf,'fem',gf_fem('FEM_NEDELEC(3)'));
mim=gfMeshIm(m,gf_integ('IM_TETRAHEDRON(8)'));

To assemble the term \int E.E'dx I'm using:
Ma=gf_asm('volumic','M(#1,#1)+=comp(vBase(#1).vBase(#1))(:,k,:,k)', mim,mf);

I got the same result with "gf_asm('mass matrix', mim, mf);" ( as excepted) 

For the "stiffness" matrix \int curlE curlE' dx i'm using:
K=gf_asm('volumic','M(#1,#1)+=comp(vGrad(#1).vGrad(#1))(:,2,3,:,2,3)+comp(vGrad(#1).vGrad(#1))(:,3,2,:,3,2)-comp(vGrad(#1).vGrad(#1))(:,2,3,:,3,2)-comp(vGrad(#1).vGrad(#1))(:,3,2,:,2,3)+comp(vGrad(#1).vGrad(#1))(:,3,1,:,3,1)+comp(vGrad(#1).vGrad(#1))(:,1,3,:,1,3)-comp(vGrad(#1).vGrad(#1))(:,3,1,:,1,3)-comp(vGrad(#1).vGrad(#1))(:,1,3,:,3,1)+comp(vGrad(#1).vGrad(#1))(:,1,2,:,1,2)+comp(vGrad(#1).vGrad(#1))(:,2,1,:,2,1)-comp(vGrad(#1).vGrad(#1))(:,1,2,:,2,1)-comp(vGrad(#1).vGrad(#1))(:,2,1,:,1,2)',
 mim,mf);

My problem is that the obtained matrix K is not positive definite (and it 
should be...).

Does anyone have a suggestion why the K matrix is not positive definite?

Thank you in advance for the answer.

Best Regards

Louis Kovalevsky


_______________________________________________
Getfem-users mailing list
[email protected]
https://mail.gna.org/listinfo/getfem-users

Reply via email to