product of linear functionals as BilinearForm

More
3 years 9 months ago - 3 years 9 months ago #3528 by Ryanleaf
Hello guys,

I have questions: in my finite element formulation I would like to add the following bilinear form,
[tex]\int_{\Omega}p\ dx *\int_{\Omega}q\ dx[/tex]
where p is the trial function in scalar space Q and q is the test function in scalar space Q.
I didn't find a way to use
SymbolicBFI()
to formulate this term.
Would you please give a hint about how this term can be implemented?

Best,
Qi
Last edit: 3 years 9 months ago by Ryanleaf.
More
3 years 9 months ago #3529 by mneunteufel
Hi Qi,

a product of linear functionals as bilinearform cannot be achieved directly this way. One reason is that the resulting matrix would be completely dense.
However, you can use a mixed formulation by introducing a new unknown representing one integral

[tex]
\mu = \int_{\Omega}p dx,
[/tex]
where the additional unknown is a single scalar.

This can be implemented in NGSolve via
Code:
Q = H1(mesh, order=1) N = NumberSpace(mesh) fes = Q*N (p,mu), (q,lam) = fes.TnT() a = BilinearForm(fes, symmetric=True) a += (p - mu)*lam*dx a += mu*q*dx
Then you obtain a sparse matrix, where only one row and column is completely filled.

Best,
Michael
More
3 years 9 months ago #3532 by Ryanleaf
I see. Thank you very much, Micheal.
Time to create page: 0.096 seconds