- Thank you received: 6
two questions related to DG
- Guosheng Fu
- Topic Author
- Offline
- Elite Member
Less
More
6 years 7 months ago #407
by Guosheng Fu
two questions related to DG was created by Guosheng Fu
Hello,
I have two questions related to DG.
Q1: what is the "density" argument rho in L2 space SolveM? In the attached testMass.py code, I found there is no difference changing rho when applying SolveM...
I thought the mass matrix should be (rho u, v)...
Q2: It seems there is a bug in the normal direction in 1D, as I found it is always equal to 0 on the interface....
Thanks in advance,
best regards,
Guosheng
I have two questions related to DG.
Q1: what is the "density" argument rho in L2 space SolveM? In the attached testMass.py code, I found there is no difference changing rho when applying SolveM...
I thought the mass matrix should be (rho u, v)...
Q2: It seems there is a bug in the normal direction in 1D, as I found it is always equal to 0 on the interface....
Thanks in advance,
best regards,
Guosheng
Attachments:
6 years 7 months ago #408
by cwinters
Replied by cwinters on topic two questions related to DG
Hi,
Best,
Christoph
As far as I know, the density was meant as you tried to use it. But up to now, nobody implemented it, thus the density is not used at all. I'll see if we can add this functionality.Q1: what is the "density" argument rho in L2 space SolveM? In the attached testMass.py code, I found there is no difference changing rho when applying SolveM...
I thought the mass matrix should be (rho u, v)...
This just happens for "order=0". I'll check that.Q2: It seems there is a bug in the normal direction in 1D, as I found it is always equal to 0 on the interface....
Best,
Christoph
6 years 7 months ago #410
by cwinters
Replied by cwinters on topic two questions related to DG
Hi again,
Assuming your version is new enough, your still gives a zero-matrix and that's correct!
The BFI integrates over the two boundaries of each 1d element. For "order=0" this means it sums up a "+1" from the right and a "-1" from the left boundary.
In this case you could use the skeleton form.
Best,
Christoph
The normals should be fine if your ngsolve version is new enough. There was a fix for the normals in 1d lately.Q2: It seems there is a bug in the normal direction in 1D, as I found it is always equal to 0 on the interface....
Assuming your version is new enough, your still gives a zero-matrix and that's correct!
Code:
a += SymbolicBFI(n*u*v, element_boundary = True)
In this case you could use the skeleton form.
Code:
a += SymbolicBFI(n*u*v, skeleton = True)
Best,
Christoph
- Guosheng Fu
- Topic Author
- Offline
- Elite Member
Less
More
- Thank you received: 6
6 years 7 months ago #411
by Guosheng Fu
Replied by Guosheng Fu on topic two questions related to DG
Thanks. I haven't update ngsolve for a while... The normal is working now.
6 years 7 months ago #427
by joachim
Replied by joachim on topic two questions related to DG
Hi Guosheng,
the density coefficient rho was indeed not used. It is working now (i.e. in the coming nightly release).
Best, Joachim
the density coefficient rho was indeed not used. It is working now (i.e. in the coming nightly release).
Best, Joachim
- Guosheng Fu
- Topic Author
- Offline
- Elite Member
Less
More
- Thank you received: 6
6 years 7 months ago #428
by Guosheng Fu
Replied by Guosheng Fu on topic two questions related to DG
Joachim,
Thanks for the info.
I am interested how it was solved when rho is a variable coefficient function, this shall be the same situation as curved mesh. In this case, mass matrix inversion might be expensive... Do you use the Jacobi preconditioner?
Best,
Guosheng
Thanks for the info.
I am interested how it was solved when rho is a variable coefficient function, this shall be the same situation as curved mesh. In this case, mass matrix inversion might be expensive... Do you use the Jacobi preconditioner?
Best,
Guosheng
Time to create page: 0.120 seconds