← Back to team overview

dolfin team mailing list archive

Re: EqualityBC

 

I've prepared demo to show how it works. (gziped patch is attached)

Of course this kind of BC can be applied also by elimination of dofs. For bigger meshes or when the size of equal_dofs vector is significant, I've experienced some problems with convergence. So it is essential to use good solver with proper preconditioner.

BArtosz


Bartosz Sawicki wrote:
Please take a look on attached code with implementation of new type of BC. I know that it is not very popular, but I found it useful for electrode modeling.

Class description from EqualityBC class header file:

  /// This class specifies the interface for setting equality boundary
  /// conditions for partial differential equations,
  ///
  ///    u(x) = u(y),    for any x and y on G,
  ///
  ///  where G is sub domain of the mesh.
  ///
  /// The sub domain G may be specified in a two different ways. Both of
  /// them produce set of unknowns (dofs) with should be equal.
  ///
  /// The simplest approach is to specify a SubDomain object, using
  /// the inside() function to specify on which facets the boundary
  /// condition should be applied.
  ///
  /// Alternatively, the boundary may be specified by the boundary
  /// indicators included in the mesh.
  ///
  /// Current implementation assumes that the problem is scalar,
  /// so in case of mixed systems (vector-valued and mixed elements)
  /// all compoments will be equalize.

regds.
BArtosz



Bartosz Sawicki wrote:
I'm working on implementation of boundary condition which will equalize set of dofs. It would be similar to the PeriodicBC, where one dof is mapped to the other, but the mapping will be "many to one".

Temporary class is called EqualityBC, but any better name are welcome. This kind of BC would benefit the elimination of dofs, so the problem is similar to the one discussed in the threat "matrix action". For simplicity I've decided not to eliminate equations, just leave it with (1, -1) and zero in rhs vector.

I'm waiting for your comments. If there won't be special problems, expect patch with new functionality in a few days.


BArtosz


_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev


------------------------------------------------------------------------

_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev

Attachment: dolfin-sawickib-2009-04-15-demo.patch.gz
Description: GNU Zip compressed data


References