← Back to team overview

dolfin team mailing list archive

Re: Applying Dirichlet boundary conditions

 

I believe the real problem here is considering only the linear problem.
If you instead look at this from the nonlinear point of view, I think it is
much easier. I will go over it in detail when we get there.

  Matt

On Mon, Jul 7, 2008 at 4:27 PM,  <kent-and@xxxxxxxxx> wrote:
>> On Mon, Jul 07, 2008 at 09:38:15AM +0100, Garth N. Wells wrote:
>>> I've had a look at the code for applying Dirichlet boundary conditions
>>> by eliminating constrained dofs, and I think that we need to do it
>>> differently. A constrained dof should be indicated by a negative index
>>> in the DofMap, and then eliminated during the main assembly loop. We
>>> then need to do something for DiscreteFunction so that it can pick up
>>> the boundary values, which should be pretty easy.
>>
>> PETSc handles this (skipping insertion for negative indices).
>>
>> http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatSetValues.html
>>
>> Does Epetra do the same?
>>
>> --
>> Anders
>
>
> Sorry if I am stressing the wrong points here. I dont mind negative indices.
> The way I understand it is, to simplify it to a 2x2 system:
>
> First, after element matrix and vector calculations are done we have
>
> [ a00   a01 ] [x0] = [b0]
> [ a10   a11 ] [x1] = [b1]
>
> enforcing x0 = u0 gives
>
> [  1         0 ] [x0] = [u0]
> [ a10   a11 ] [x1] = [b1]
>
> then the symmetric variant of this system:
>
> [  1         0 ] [x0] = [u0]
> [  0      a11 ] [x1] = [b1 -  a10 u0 ]
>
> Assembling only negative indices in this example
> would give the system:
>
> [ a11 ] [x1] = [b1 -  a10 u0 ]
>
> Still a10 and u0 is needed for calculating the right hand side.
>
> Hence, negative indicies only remove the identity part, which
> seems harmless enough.
>
> Using only negative indicies will however result in some work during post
> processing if one like to see the solution also on the boundary.
>
> Kent
>
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener


References