← Back to team overview

cbc.block team mailing list archive

Re: 回复: block_bc problems

 

Hi Huadong,

Does demo/mixedpoisson.py work?

Are all the individual blocks (K11, etc) DOLFIN matrices? Each operator
that is involved in a Dirichlet BC must be either a DOLFIN matrix, a scalar
for diagonal blocks, or (scalar) zero off-diagonal. In your case, that
applies to all of Kxx.

It may be possible to circumvent this limitation by defining a new
block-operator that sets the BCs after the original operator has been
applied, but this will destroy the symmetry of the system.

I would also be interested in hearing more about how cbc.block is used in
the thesis, perhaps you would be kind enough to send an update after you
see how it goes?

-- 
Joachim.


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

> Dear Dr. Joachim Berdal Haga
>
>     Thank you very much for your quick reply.
>
> I am now using the newest version of FEniCS 1.1.0.
>
> I am now a second year PhD candidate in CityU of Hong Kong,
> I have used your package for my thesis.
>
>     Thank you again.
>
> best wishes
> huadong
>
>
>
>
>   ------------------------------
> *发件人:* Joachim Berdal Haga <jobh@xxxxxxxxx>
> *收件人:* 华东 高 <mathsgao@xxxxxxxxxxxx>
> *抄送:* cbc.block@xxxxxxxxxxxxxxxxxxx
> *发送日期:* 2013年1月30日, 星期三, 11:17 下午
> *主题:* 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
>
>
>
>
>
>
>
>

References