Dear All,
I have the following problem:
I would like to build an element defined over 1D segment, with two nodes.
At each node I would like to have 3 DOFs -- 1 Lagrange DOF and 2 Hermite
DOFs, so my element will be composed from linear Lagrange element and
cubic Hermite element (or simply it will be so called plane frame element).
I thought that I could use the class mesh_fem_sum to build such element
without introducing new element kind. It works, but partially --
inside the assembly routine the tensor vGrad is correctly calculated
as [0..6][0..1][0..2] tensor but the method nb_dof returns 4 (four)
as the number of degrees of freedom and the resulting stiffness matrix
is assembled as 4x4.
The documentation of mesh_fem_sum says : "Implement a special mesh_fem with
merges the FEMs of two (or more) mesh_fems."
Could you please explain me shortly, what exactly is the nature of the
merging two mesh_fems, and why I got wrong (in my view) number of degrees
of freedom in the code attached below?
Thank you in advance for any hint,
Regards
Roman
--------------------8<------------
int main() {
getfem::mesh mesh;
std::vector<bgeot::size_type> ind(2);
ind[0] = mesh.add_point(bgeot::base_node(0.0, 0.0));
ind[1] = mesh.add_point(bgeot::base_node(2.0, 2.0));
mesh.add_segment(ind[0], ind[1]);
getfem::mesh_fem femBeam(mesh);
getfem::mesh_fem femBar(mesh);
femBar.set_finite_element(getfem::fem_descriptor("FEM_PK(1,1)"));
femBeam.set_finite_element(getfem::fem_descriptor("FEM_HERMITE(1)"));
femFrame.set_mesh_fems(femBeam, femBar);
getfem::size_type Ndof = femFrame.nb_dof();
std::cout << "NUMBER OF DEGREES OF FREEDOM " << Ndof << "\n";
return 0;
}
_______________________________________________
Getfem-users mailing list
[email protected]
https://mail.gna.org/listinfo/getfem-users