[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-users] setting dirichlet boundary for vector fields

From: Przemyslaw Kaminski
Subject: [Getfem-users] setting dirichlet boundary for vector fields
Date: Thu, 11 Mar 2010 14:40:28 +0100
User-agent: KMail/1.13.1 (Linux/; KDE/4.4.1; x86_64; ; )

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 "./", line 42, in <module>
    b2.set_param('R', mfu, U)
  File "/home/przemek/lib/python2.6/site-packages/getfem/", 
line 1556, in set_param
    return self.set("param", name, *args)
  File "/home/przemek/lib/python2.6/site-packages/getfem/", 
line 1392, in set
    return getfem('mdbrick_set',, *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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]