[Dune] Dirichlet conditions on curved boundaries

conf86 at web.de conf86 at web.de
Mon Jun 1 21:46:10 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 was 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 (x[0]*x[0]+x[1]*x[1]==1) y = 1.0;
 }

The code does compile and everything, but the result is unaffected from this boundary condition.
Is there something wrong doing it like this?

Is there better way to implement this, especially when using a boundary with unknown parametrization?


Thank you in advance!




More information about the Dune mailing list