Sean:
It is hard to tell what exactly is going wrong, but before trying to bark up a tree that is perhaps the wrong one, here are two questions:

* For the case of adaptive refinement, the solution looks discontinuous also at edges without refinement. Is that reasonable? What's the element you are using?

* One of the things worth keeping in mind is that what you are visualizing is a piecewise linear representation of the solution. However, I suspect you are using a higher polynomial finite element. In other words, what you see in Visit is not what the solution *actually* is. Take a look at the documentation of DataOut::build_patches() for a discussion of how this can be addressed by using subdivisions of the mesh to get a closer representation of what you are computing.

Best
 W.


On 8/17/24 07:26, Sean Carney wrote:
*** Caution: EXTERNAL Sender ***

Hi all,

I recently implemented a symmetric interior penalty DG method for a 4th order problem with an interface.

I took as my "base code" step 74 (thank you for that!) and modified the assemble, estimator, and energy_norm functions to suit my needs.

Unfortunately, I'm seeing some troubling results when doing local refinement. A simple example of the unexpected behavior that I'm seeing can be seen in the attached images.

Here the analytic solution to my problem posed on the (2d) unit cube is a piecewise polynomial. It depends only on the horizontal variable $x$, and for $x < 1/2$, the solution $u = 0$. For $x > 1/2$, the solution equals: [quintic polynomial]*[exp(x)].

On a /uniform /coarse mesh with 4x4 grid cells, the computed solution is already decent--in the eyeball norm, it is reasonable, and the error measured in my "energy" norm (a kind of $H^2$ norm) is on the order of 1e-1.

However, if I refine just one cell in the mesh, the computed solution is obviously incorrect to the eye, and the energy norm error is correspondingly large (~2e1).

Whatever is causing this behavior is, I believe, also causing me to to see incorrect rates of convergence upon a large number of local refinements. There may be trouble in the "estimate" and "energy_norm" functions, but the attached images suggest there is definitely trouble in the "assemble" function (I'm using a direct solver, so nothing here is related to iterative linear solvers).

In contrast, if I refine globally, I get nice convergence rates--consistent (or slightly better than) with what I expect from theory.

Additionally, I also am (of course) observing nice rates from the Step-74 code upon local refinement. Both for the L-shaped domain with a corner and for the smooth problem on the unit square.

I have been slowly loosing my mind trying to figure out what sort of error I've introduced to make things not work, but can't find anything--for example, all of the logic for working with jumps and averages across faces when hanging nodes are present, /I think/, is handled by the MeshWorker framework.

Does anyone have any suggestions for things to try? I greatly appreciate any input!

Thank you--
--Sean

--
The deal.II project is located at http://www.dealii.org/ <http://www.dealii.org/> For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en <https://groups.google.com/d/forum/dealii?hl=en>
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/d63bfe3a-ad3b-44e2-9870-d6fc51e10104n%40googlegroups.com <https://groups.google.com/d/msgid/dealii/d63bfe3a-ad3b-44e2-9870-d6fc51e10104n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 [email protected]
                           www: http://www.math.colostate.edu/~bangerth/


--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/e4390d24-5755-419b-9293-1a9a8a9a5487%40colostate.edu.

Reply via email to