0

I have the same question of this one

$\bullet $ In the answer I've seen that a "Lifting" function is used, is it to have a formulation where the test functions are in the same space of the solution?


If I consider

$$ \left\{ \begin{gathered} -u'' = f{\text{ on }} \Omega =\left] {0,1} \right[ \hfill \\ u(0) = \alpha \hfill \\ u(1) = \beta \hfill \\ \end{gathered} \right.$$ where $\alpha$ and $\beta$ are different from $0$.

Since I have inhomogeneous b.c., the weak formulation I would be tempted to write is "Find $u \in H^1$ s.t $$ \int_0^1 u'\phi' = \int_0^1 f \phi $$

for every $\phi \in H_0^1$".

Question:

$\bullet $ Now the issue is that the basis are different, right? Because a finite dimensional basis of $H^1$ will have also the half hat functions $\varphi_0$ and $\varphi_M$ at the boundary, while the one of $H_0^1$ doesn't. So I think that the lifting function $R(x)$ described in the link is the right thing to do.

Last question, really important:

$\bullet $ To solve it numerically from $0=x_0<x_1 < \ldots x_M=1$, I build the usual matrix $(M+1) \times (M+1)$ where $a_{ij}=\int_0^1 \varphi _i \varphi_j dx$ and then change the last and first row of the matrix (the first row will be $[1,0,\ldots0]$ and the last $[0,\ldots, 1]$ and the last and first component of the "load vector" $b$ in order to impose the Dirichlet boundary conditions.

In this way I am implicitly using the same basis for $u$ and for the test functions $\phi$, made by all the hat functions. So including also the both "half" hat-functions $\varphi_0, \ldots, \varphi_M$. So, strictly speaking, it's a "numerical" trick to impose the conditions, right?

VoB
  • 1,603
  • 12
  • 24
  • Related: variational formulation of second order differential equation. Your problem is simpler than this. You're invited to find the simplification yourself. – Han de Bruijn Dec 06 '19 at 14:17
  • Thanks. I've looked the OP question and your answer (and also this one you linked: https://math.stackexchange.com/questions/2741001/understanding-galerkin-method-of-weighted-residuals).

    But I'm still confused: in the your answer that I just linked you consider for the Dirichlet (inhomogeneous) boundary condition at $x=0$ the test function $f$ to be $f(0)=0$ , while for the Neumann b.c. you just plug the "derivative information" into the weak formulation (and that's actually clear to me). But that is different from using a "lifting function" like the OP in your link tried to do

    – VoB Dec 06 '19 at 19:42
  • So I'm looking for a general method for this kind of situation: if I have a inhomogeneous Dirichlet b.c. I can just assume that the test function associated to that boundary point takes value $0$, and then (as you wrote) ** I impose the boundary conditions separately. This in practice** means that I have to change manually that row of the system, right?

    This argument, instead, does not apply with Neumann boundary conditions, since in those cases the derivative goes inside the weak fomulation, right?

    – VoB Dec 06 '19 at 19:53
  • As far as I can see, you've understood everything :-) – Han de Bruijn Dec 08 '19 at 12:46
  • Glad to hear this! :) Thank you – VoB Dec 08 '19 at 14:34

0 Answers0