Did I implement this simple method correctly? #2335
-
Dear firedrakers, Could you please confirm whether the firedrake code listed at the end is a correct translation of the following method, which is based on DG+Heun's method:
where Here is the code. It works with CG elements, but not with DG ones :( (bonus question:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
I think you have misunderstood the meaning of the |
Beta Was this translation helpful? Give feedback.
-
There is an example in the documentation that describes the use of |
Beta Was this translation helpful? Give feedback.
-
As David correctly pointed out, the issue was my my misunderstanding of UFL's
|
Beta Was this translation helpful? Give feedback.
-
There is no topological association with the boundary facets. we used to support setting things by selecting those basis functions with geometric support on the boundary, but removed it because it's mathematically ill-defined: changing the basis can change which nodes are considered to be "boundary nodes" with a geometric definition. If you want inflow/outflow conditions on a DG space, enforce them weakly. |
Beta Was this translation helpful? Give feedback.
As David correctly pointed out, the issue was my my misunderstanding of UFL's
"+"
and"-"
. Here is the correct implementation. To experiment with it, you can change the finite element space to "DG0", "DG1", "DG2", "CG1", "CG2", etc.