Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

product of linear functionals as BilinearForm

More
3 years 2 months ago - 3 years 2 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 2 months ago by Ryanleaf.
More
3 years 2 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 2 months ago #3532 by Ryanleaf
I see. Thank you very much, Micheal.
Time to create page: 0.136 seconds