[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Getfem-users] mesh_fem_sum question
From: |
Yves Renard |
Subject: |
Re: [Getfem-users] mesh_fem_sum question |
Date: |
Tue, 8 Jun 2010 13:34:15 +0200 |
User-agent: |
KMail/1.9.9 |
Dear Roman,
The mesh_fem_sum object performs a direct sum of two finite element method
provided that the basis functions of the two methods are linearly
independent. Which is not the case in your exemple, because the P1 element is
subspace of the Hermite element. In this case the method do not work.
What I do not understand is the meaning of your two components. Do you want to
account for both the traction/compression and the bending of the element ?
If so, you have two separate components and you have to build a vectorial
element.
Yves.
On mardi 8 juin 2010, Roman Putanowicz wrote:
> 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
> address@hidden
> https://mail.gna.org/listinfo/getfem-users
--
Yves Renard (address@hidden) tel : (33) 04.72.43.87.08
Pole de Mathematiques, INSA-Lyon fax : (33) 04.72.43.85.29
20, rue Albert Einstein
69621 Villeurbanne Cedex, FRANCE
http://math.univ-lyon1.fr/~renard
---------