Hi Yves, Could you elaborate on how to use the old constraint block a little bit? I keep getting dimension mismatch errors. When qdim is not 1, is the constraint matrix is of size nb_constraints x (nb_dof * qdim)?
In the new brick system, is it possible to add pointwise constraint with elimination? Thank you very much :) James On Fri, Oct 28, 2011 at 4:26 AM, Yves Renard <[email protected]>wrote: > > 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/[email protected]/msg00142.html > > > > 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 ([email protected]) 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 > > --------- >
_______________________________________________ Getfem-users mailing list [email protected] https://mail.gna.org/listinfo/getfem-users
