getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-users] interpolated fem: gradient of the shape functions


From: Andriy Andreykiv
Subject: [Getfem-users] interpolated fem: gradient of the shape functions
Date: Mon, 28 May 2007 19:17:55 +0200

Dear Yves and Julien,

Would you be so kind to consult me on the following:

    I'm using the interpolated fem (new_interpolated_fem) in an FE model, based on fictitious domain method. For instance I was already able to successfully build a mass matrix between the mesh_fem's defined on two overlapping meshes that was used to impose Dirichlet boundary conditions in a week sense: 
________________________________________________________________________________________________
getfem::mesh_fem mq_interpolate(line_mesh);  //LINE_MESH='GT_PK(1,1)'
getfem::pfem fem=getfem::new_interpolated_fem(mf_QuadMesh,mim); //MF_QUADMESH='FEM_QK(2,1)';
mq_interpolate.set_finite_element(line_mesh.convex_index(),ifem);
size_type n=mq_interpolate.nb_dof(),m=mf_line.nb_dof(); /MF_LINE = 'FEM_PK(1,1)';
sparse_matrix M(n,m);
getfem::generic_assembly assem;
assem.set("M(#1,#2)+=comp(Base(#1).Base(#2))");
assem.push_mi(mim);
assem.push_mf(mq_interpolate);
assem.push_mf(mf_line);
assem.push_mat(M);
assem.assembly();
_________________________________________________________________________________________________

The above works perfect. However, now I want to interpolate the gradient of the shape functions from the quad mesh on the line mesh and calculate something like this:

1) assem.set("M(#1,#2)+=comp(Grad(#1).Base(#2))(:,i,:)");
2) assem.set("M(#1,#1)+=comp(Grad(#1).Grad(#1))(:,i,:,i)"); // with M(n,n)
3) assem.set("M(#1,#1)+=comp(vGrad(#1).vGrad(#1))(:,i,j,:,i,j)"); // with M(n,n)

and so on



In all cases I'm getting an error message:


===========================================================
|    An error has been detected !!!
===========================================================
Error in getfem_mat_elem.cc, line 352:
Internal error

*** Exited with status: 1 ***


Is this a bug? Or I'm doing something wrong? If this is a bug, could you, please, suggest a fix or a different way to obtain those matrices?

Thank you in advance,
Andriy
reply via email to

[Prev in Thread] Current Thread [Next in Thread]