Hello,
This may be a silly question but I don't know how to set a Dirichlet 
boundary condition for vector fields.
I have a vector field like this one (in Python):

mfu = gf.MeshFem(2, 2)

and I set the boundary conditions like this:

U = mfu.eval('[x[0]*(1-x[0]),x[1]*(1-x[1])]') # exact solution

b0 = gf.MdBrick('isotropic_linearized_elasticity', mim, mfu)
b0.set_param('lambda', Lambda)
b0.set_param('mu', Mu)

b1 = gf.MdBrick('source term', b0, 1)
b1.set_param('source_term', [4., 4.])

border = m.outer_faces()
m.set_region(42, border)
b2 = gf.MdBrick('dirichlet', b1, 42, mfu, 'penalized')
b2.set_param('R', mfu, U)

But then I get an error 

Traceback (most recent call last):
  File "./elasticity.py", line 42, in <module>
    b2.set_param('R', mfu, U)
  File "/home/przemek/lib/python2.6/site-packages/getfem/getfem.py", 
line 1556, in set_param
    return self.set("param", name, *args)
  File "/home/przemek/lib/python2.6/site-packages/getfem/getfem.py", 
line 1392, in set
    return getfem('mdbrick_set',self.id, *args)
RuntimeError: (Getfem::InterfaceError) -- cannot use a mesh_fem whose 
qdim is not 1 for a brick parameter

Thank you in advance for your help,
P. Kaminski

_______________________________________________
Getfem-users mailing list
[email protected]
https://mail.gna.org/listinfo/getfem-users

Reply via email to