[dune-pdelab] Dirichlet conditions on curved boundaries

conf86 at web.de conf86 at web.de
Tue Jun 2 19:13:37 CEST 2015


Hi,

I have the unit circle as domain, now I am trying to define dirichlet boundary conditions (e.g. u=1.0) for it.
I am currently using a modified version of example02_bcextension.hh from the course-examples in dune-pdelab-howto.

I was first thinking of something like this in bcextension.h: 

 inline void evaluate (const typename Traits::ElementType& e, const typename Traits::DomainType& xlocal, typename Traits::RangeType& y)
 {
  const int dim = Traits::GridViewType::Grid::dimension;
  typedef typename Traits::GridViewType::Grid::ctype ctype;
  Dune::FieldVector<ctype,dim> x = e.geometry().global(xlocal);

  if (abs(x[0]*x[0]+x[1]*x[1]-1.0)<1e-2) y = 1.0;
 }

The code does compile and everything, but the result is unaffected from this boundary condition.

Is there better way to implement this, especially when using a boundary with unknown parametrization?
In the main DUNE-Mailing list I got the hint to use IntersectionIterator, but I have no idea how that would work with PDELab.


Thank you in advance!




More information about the dune-pdelab mailing list