[dune-pdelab] Dirichlet conditions on curved boundaries

Christian Engwer christian.engwer at uni-muenster.de
Wed Jun 3 19:15:15 CEST 2015


On Tue, Jun 02, 2015 at 07:13:37PM +0200, conf86 at web.de wrote:
> 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;
>  }

reading this code I assume you want to define a function, which is 1
on the boundary and 0 else.

This is not necessary. Just return 1. The reason is that you are
computing an extension of the boundary values into the domain. The
function is restricted to boundary DOFs afterwards.

Christian

> 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!
> 
> _______________________________________________
> dune-pdelab mailing list
> dune-pdelab at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-pdelab
> 

-- 
Prof. Dr. Christian Engwer 
Institut für Numerische und Angewandte Mathematik
Fachbereich Mathematik und Informatik der Universität Münster
Einsteinstrasse 62
48149 Münster

E-Mail	christian.engwer at uni-muenster.de
Telefon	+49 251 83-35067
FAX		+49 251 83-32729




More information about the dune-pdelab mailing list