1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
%\section{The Robin boundary conditions}
\pbindex{Poisson}%
\cindex{boundary condition!Robin}%
\subsubsection*{Formulation}
Let $f \in H^{-1}(\Omega)$ and Let $g \in H^{\frac{1}{2}}(\partial \Omega)$.
The problem writes:
$(P_4)$ {\it find $u$, defined in $\Omega$ such that:}
\begin{eqnarray*}
-\Delta u &=& f \ {\rm in}\ \Omega \\
\Frac{\partial u}{\partial n} + u &=& g \ {\rm on}\ \partial \Omega
\end{eqnarray*}
The variational formulation of this problem expresses:
$(VF_4)$: {\it find $u \in H^1(\Omega)$ such that:}
$$
a(u,v) = l(v), \ \forall v \in H^1(\Omega)
$$
where
\begin{eqnarray*}
a(u,v) &=& \int_\Omega \nabla u . \nabla v \, {\rm d}x + \int_{\partial\Omega} u v \, {\rm d}s \\
l(v) &=& \int_\Omega f v \, {\rm d}x + \int_{\partial\Omega} g v \, {\rm d}s
\end{eqnarray*}
\subsubsection*{Approximation}
As usual, let
$$
X_h = \{ v \in H^1(\Omega); \
v_{/K} \in P_k, \
\forall K \in {\cal T}_h \}
$$
The approximate problem writes:
{\it $(VF_4)_h$: find $u_h\in X_h$ such that:}
$$
a(u_h,v_h) = l(v_h),
\ \forall v_h \in X_h
$$
% -----------------------
\myexamplelicense{robin.cc}
% -----------------------
\subsubsection*{Comments}
The code {\tt robin.cc}
looks like the previous one {\tt neumann-nh.cc}.
Let us comments the changes.
\begin{lstlisting}[numbers=none,frame=none]
form a = integrate (dot(grad(u),grad(v))) + integrate ("boundary", u*v);
\end{lstlisting}
This statement reflects directly the definition of the bilinear form $a(.,.)$,
as the sum of two integrals, the first one over $\Omega$ and the second
one over its boundary.
% The implementation of the right-hand side $l(.)$, involving $f$ and $g$,
% has already been presented in the previous paragraph, in the context
% of the non-homogeneous Neumann problem.
\subsubsection*{How to run the program}
First, compile the program:
\begin{verbatim}
make robin
\end{verbatim}
Running the program is obtained from the homogeneous Dirichlet case,
by replacing \code{dirichlet} by \code{robin}.
|