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
_______________________________________________
Getfem-users mailing list
[email protected]
https://mail.gna.org/listinfo/getfem-users