clear all
close all

meshfile=fc_oogmsh.gmsh.buildmesh3d('cylinderkey',3);
Th=fc_simesh.siMesh(meshfile);

%%% 3-simplex in dim==3
i3=Th.find(3,1); % get index of the 3-simplices elementary mesh with label=1
sTh=Th.sTh{i3};

vols=FEM.volumes(sTh.q,sTh.me);
G=FEM.gradBaCo(sTh.q,sTh.me);

M=FEM.Masse(sTh.nq,sTh.me,vols);
K=FEM.Rigidite(sTh.nq,sTh.me,vols,G);

% basic validation 
W=ones(sTh.nq,1);
dot(K*rand(sTh.nq,1),W)
dot(M*W,W)-sum(sTh.vols)
