[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [Getfem-users] Dirichlet boundary condition on vertex

**From**: |
Yves Renard |

**Subject**: |
Re: [Getfem-users] Dirichlet boundary condition on vertex |

**Date**: |
Fri, 28 Oct 2011 10:26:38 +0200 |

**User-agent**: |
KMail/1.13.5 (Linux/2.6.32-34-server; KDE/4.4.5; x86_64; ; ) |

Dear James,
The (old) brick on which you refer take a global constraint matrix in
argument. This should be a global matrix (nb_constraints x nb_dof)
Note that in the new brick system, there is now a special brick to set
components on specific points (for instance to kill rigid body modes). The
points are not necessarily some vertices of the mesh. This is the "pointwise
constraints brick". It is available in the svn version only.
Yves.
On vendredi 28 octobre 2011, James Zhou wrote:
>* Dear all,*
>* *
>* I have exactly the same question as in*
>* http://www.mail-archive.com/address@hidden*
>* *
>* In particular, I want to fixed a component of some a set of vertex in 3D.*
>* Can anyone give an example on how to use the constraint brick in python?*
>* Here is my obviously failed attempt:*
>* *
>* H = []; R = []*
>* b4 = gf.MdBrick("constraint", b2, 'eliminated');*
>* *
>* # Loop though all dof nodes looking for nodes satisfy the constraint*
>* criteria*
>* for dof in mfu.basic_dof_nodes():*
>* if (abs(dof[1] + 0.125) < 1e-6):*
>* # constrain the y component of dof to 0*
>* H.append([0,0,0,0,1,0,0,0,0]);*
>* R.append([0,0,0]);*
>* else:*
>* # dof is not part of the constraint.*
>* H.append([0,0,0,0,0,0,0,0,0]);*
>* R.append([0,0,0]);*
>* b4.constraints(H, R);*
>* *
>* Thank you very much!*
>* James*
--
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
---------