two questions related to DG

More
6 years 7 months ago #407 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
More
6 years 7 months ago #408 by cwinters
Hi,

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)...

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.

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....

This just happens for "order=0". I'll check that.

Best,
Christoph
More
6 years 7 months ago #410 by cwinters
Hi again,

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....

The normals should be fine if your ngsolve version is new enough. There was a fix for the normals in 1d lately.
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)
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.
Code:
a += SymbolicBFI(n*u*v, skeleton = True)

Best,
Christoph
More
6 years 7 months ago #411 by Guosheng Fu
Thanks. I haven't update ngsolve for a while... The normal is working now.
More
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
More
6 years 7 months ago #428 by Guosheng Fu
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
Time to create page: 0.118 seconds