I am trying to work on some finite element method to solve a diffusion PDE like Fisher equation link or something like reaction diffusion. Let us take Fisher for example $$ \partial_t u = \Delta u + u(1-u). $$ By assuming $u$ as a linear combination of basis functions $\phi_i$, let us say Lagrange P1 element, $$ u(t,x) = \sum_{i=1}^N u_i^t \phi_i(x) $$
how does one deal with terms like $u(t,x)^2$ ? It seems clear that one cannot simply take $u(t,x)^2 = \sum_{i=1}^N (u_i^t)^2 \phi_i(x)$, since this expression is true only in the nodal points of the basis functions, but not everywhere else.
Also, more in general, how does one deal with similar issues like
- $u(t,x)^\gamma$ with $\gamma$ possibly fractional
- $f(x)u(t,x)$ where $f$ is as well a as an element of $span(\phi_i)_{i=1,\dots,N}$.
Thanks in advance.
You have to use some quadrature rules to integrate $\int_T \phi_i (u(x))^2\ dx$. Then you should end up with a finite-dimensional nonlinear equation.
When solving that equation by e.g. Newton method, make sure that you take the Jacobian of the discretized equation (and not discretize a linearized equation).