New question #136803 on DOLFIN:
https://answers.launchpad.net/dolfin/+question/136803

I try to run the python demo file for the mixed formulation for the poisson 
problem. When setting the dirichlet boundary condition I get the error:
*** Error: Unable to create boundary condition. Reason: Illegal value 0 for 
value rank, should be 1.

Perhaps this error depends on the compiler statement: "Got expression dimension 
= 0" when setting G with
G = BoundarySource()
but I'm not sure. 

Please can you help me to understand the error statement. Thanks a lot.
Melanie

ps. here is a part of the source code where the error occurs:

# Define function G such that G \cdot n = g
class BoundarySource(Expression):
    def eval_data(self, values, data):
        g = sin(5*data.x()[0])
        values[0] = g*data.normal()[0]
        values[1] = g*data.normal()[1]
    def value_shape(self):
        return (2,)

G = BoundarySource()

# Define essential boundary
def boundary(x):
    return x[1] < DOLFIN_EPS or x[1] > 1.0 - DOLFIN_EPS

bc = DirichletBC(W.sub(0), G, boundary)






-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.

_______________________________________________
Mailing list: https://launchpad.net/~dolfin
Post to     : dolfin@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dolfin
More help   : https://help.launchpad.net/ListHelp

Reply via email to