← Back to team overview

cbc.block team mailing list archive

Re: block_bc problems

 

Dear Huadong,

I suspect the problem may be related to versions of dolfin / cbc.block.
Which versions of these are you using?

It would also be good if you could try for example demo/mixedpoisson.py, to
see if it fails in the same way.

Regards,
Joachim.


On 30 January 2013 16:05, 华东 高 <mathsgao@xxxxxxxxxxxx> wrote:

> Dear Dr. Joachim Berdal Haga
>
>     I have tried to use your block package for solving parabolic systems,
> would you kindly tell me how to apply the Dirichlet Boundary conditions
> for the linear system,
> such as for a three dimensional problem [u1, u2,u3]
>
>         AA = block_mat([ [K11, K12, K13], [K21, K22, K23], [K31, K32,
> K33]])
>         bb = block_vec([b1,b2,b3])
>
>         bc = block_bc([DirichletBC(V, u1, D_boundary), DirichletBC(V, u2,
> D_boundary), \
>                           DirichletBC(V, u3, D_boundary)])
>
>         bc.apply(AA,bb)
>
> where Kij is matrix, bj is vector, D_boundary is just the on_boundary for
> the
> UnitSquareMesh.
>
>     But, it does not work, the message is :
>
>  bc.zero_columns(A[j,i], b[j])
> TypeError: in method 'DirichletBC_zero_columns', argument 2 of type
> 'dolfin::GenericMatrix &'
>
>     By the way, if I use pure Neumann conditions, it works well.
>
>     I expect you can spent several minutes to read the email.
>     Thank you very much.
>
> best wishes
> huadong
>
>
>
>
>