<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">
<!--
p
        {margin-top:0;
        margin-bottom:0}
p
        {margin-top:0;
        margin-bottom:0}
p
        {margin-top:0;
        margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Andreas, hi all,<br>
<br>
many thanks for your answer!<br>
I'm almost done with the quadrature for the Neumann boundary ... there is only one detail I got stuck with.<br>
Precisely, look at the constructor for the quadrature rule over the boundary:<br>
<br>
QuadratureType quadrature ( gridPart, intersection, 2 * dfSpace.order() + 1, QuadratureType::BaseType::INSIDE );<br>
<br>
The fourth parameter is not correct, since BaseType is private. I think the constructor requires an "enum" value (either INSIDE or OUTSIDE) but apparently it didn't work.<br>
Where am I wrong? Which is the correct parameter to pass?<br>
<div><br>
Cheers,<br>
<div style="font-family:Tahoma; font-size:13px">Andrea<br>
__________________________________________________________<br>
<br>
Andrea Sacconi<br>
PhD student, Applied Mathematics<br>
AMMP Section, Department of Mathematics, Imperial College London,<br>
London SW7 2AZ, UK<br>
a.sacconi11@imperial.ac.uk<br>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF958739"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Dedner, Andreas [A.S.Dedner@warwick.ac.uk]<br>
<b>Sent:</b> 11 October 2012 15:56<br>
<b>To:</b> Sacconi, Andrea; dune-fem@dune-project.org<br>
<b>Subject:</b> RE: Boundary integrals in dune-fem<br>
</font><br>
</div>
<div></div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt"><font color="black" face="Tahoma" size="2"><span dir="ltr" style="font-size:10pt">Hi.<br>
<br>
> 1) what's the ratio behind this additional class? I've to confess I'm a bit lost. I don't get the > different roles played by the operator (), applyLocal and the class AssembledFunctional.<br>
<div><font face="Times New Roman" size="2"><span style="font-size:16px">
<div>
<div><font face="Tahoma" size="2"><span style="font-size:10pt"><br>
applyLocal computes the contribution on a single entity while operator() basically adds<br>
the loop over the elements. The difference between AssembbledFunctional and<br>
the IntegralFunctional is the same as in the operator case - the first<br>
applies to function to a given function, i.e., the operator() returs<br>
   l(u) = int_Omega f u   (f is the function given in the constructor)<br>
the second actually assembles the functional, i.e.,  computed<br>
   l_i   = int_Omega f phi_i  (i=1,...,N)<br>
<br>
<br>
> 2) when I introduce a Neumann condition on a portion of the boundary, a new boundary >
<br>
> contribution to the rhs arises. Would it be possible to modify the file into a new one,
<br>
> changing only some details?<br>
> In this case, what do I have to change in the local functions and the quadrature points?<br>
<br>
That is easily possible. <br>
Have a look at the dg example in the howto (I hope it is available in your version).<br>
There you also have boundary integrals to compute. Basically you need to add an<br>
intersection iterator in operator() and use a CachingQuadrature<GP,1> on the<br>
boundary intersetion (intersection.boundary()). But perhaps somebody<br>
out there has already the code snipped needed to add Neumann boundary conditions?<br>
<br>
Hope that helps,<br>
Andreas<br>
</span></font></div>
</div>
</span></font></div>
</span></font>
<div style="font-family:Times New Roman; color:rgb(0,0,0); font-size:16px">
<hr tabindex="-1">
<div id="divRpF666571" style="direction:ltr"><font color="#000000" face="Tahoma" size="2"><b>From:</b> dune-fem-bounces+a.s.dedner=warwick.ac.uk@dune-project.org [dune-fem-bounces+a.s.dedner=warwick.ac.uk@dune-project.org] on behalf of Sacconi, Andrea [a.sacconi11@imperial.ac.uk]<br>
<b>Sent:</b> 10 October 2012 17:04<br>
<b>To:</b> dune-fem@dune-project.org<br>
<b>Subject:</b> [dune-fem] Boundary integrals in dune-fem<br>
</font><br>
</div>
<div></div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:rgb(0,0,0); font-size:10pt">
Hi everyone,<br>
<div style="font-family:Times New Roman; color:rgb(0,0,0); font-size:16px">
<div style="direction:ltr; font-family:Tahoma; color:rgb(0,0,0); font-size:10pt">
<br>
I have a question about boundary integrals in dune-fem.<br>
<br>
Let's suppose you want to solve the Laplace equation; so I have taken dune-fem-howto where this problem is already implemented.<br>
However, if I wanted to implement different boundary conditions in different portions of the boundary, that tutorial needs to be enriched.<br>
<br>
The file functional.hh (for simplicity taken from the tutorial and attached to my mail) defines an integral functional, that is subsequently used to assemble the rhs of the Laplace equation.<br>
My questions are:<br>
<br>
1) what's the ratio behind this additional class? I've to confess I'm a bit lost. I don't get the different roles played by the operator (), applyLocal and the class AssembledFunctional.<br>
2) when I introduce a Neumann condition on a portion of the boundary, a new boundary contribution to the rhs arises. Would it be possible to modify the file into a new one, changing only some details?<br>
In this case, what do I have to change in the local functions and the quadrature points?<br>
<br>
Many thanks in advance!  <br>
<br>
<div>Andrea<br>
<div style="font-family:Tahoma; font-size:13px"><br>
__________________________________________________________<br>
<br>
Andrea Sacconi<br>
PhD student, Applied Mathematics<br>
AMMP Section, Department of Mathematics, Imperial College London,<br>
London SW7 2AZ, UK<br>
a.sacconi11@imperial.ac.uk<br>
</div>
</div>
</div>
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>