- Thank you received: 0
product of linear functionals as BilinearForm
3 years 9 months ago - 3 years 9 months ago #3528
by Ryanleaf
product of linear functionals as BilinearForm was created 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
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.
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
3 years 9 months ago #3529
by mneunteufel
Replied by mneunteufel on topic product of linear functionals as BilinearForm
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
Then you obtain a sparse matrix, where only one row and column is completely filled.
Best,
Michael
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
Best,
Michael
Time to create page: 0.096 seconds