-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing Discontinuous Lagrange Interpolations #352
Comments
Hi Bhavesh, |
You can get some inspiration from https://github.com/Paulms/HDiscontinuousGalerkin.jl/, especially https://github.com/Paulms/HDiscontinuousGalerkin.jl/blob/master/src/basis.jl. Further you can check the modifications in the dofhandler and what additional information are stored in the Edit: As far as I can tell HDiscontinuousGalerkin.jl tries to do more spectral element stuff. If you go for a nodal representation DG scheme, you can just wrap the lagrangean interpolations. However, what you need to change is how the degrees of freedom are counted in |
Thanks Kim. I did look at |
Thanks for the pointers @koehlerson These are indeed very helpful. I wasn't aware of the |
To extend this a bit: Let's consider for simplicity just dofs at the vertices. Secondly, you need a new cellvalue type that gives you normals of the cell just as Thirdly, the most challenging part probably, is to get the neighboring information from a given cell. They are not stored in the grid as it is right now, however, you can recompute the neighbors based on the connectivity that is stored in the |
I see, thanks again @koehlerson. I want to first implement (and test) just a discontinuous lagrange approximation. This can be useful in some mixed-formulations in incompressible elasticity/stokes. I wouldn't need facet normal information or inter-element flux for that. So I guess it is just modifying the Once I have that working, I will proceed with points (2) and (3) to implement a discontinuous galerkin method (which is also useful in incompressible elasticity -- without any mixed-formulation). Does that sound correct? I guess, I would fully know only when I start implementing... |
I'm not so familiar with incompressible elasticity, but checking https://www.sciencedirect.com/science/article/pii/S0045782501003589 or https://www.sciencedirect.com/science/article/pii/S0045782505002641 show both some interelement "flux" term in the weak form. I'm not quite sure how you would obtain a well posed solution at the "duplicate" dofs otherwise. Nonetheless, if there is some formulation that doesn't require (2) or (3), you still can go on with this roadmap. As I wrote before, you can test a simple linear case by removing the if statement and check if everything else is working down the line (which is what I expect). If so, you can get your head around how to make the dof counting "agnostic" for discontinuous/continuous interpolations. Most likely the part where you want to declare it is when you push a field in a |
Absolutely! In a Discontinuous Galerking formulation there are "flux" terms. What I was referring to is a mixed formulation (displacement-pressure, say) for incompressible elasticity. Something similar to a Taylor-Hood approximation for Stokes, but instead of "continuous" pressure approximation there a discontinuous one in this case. With displacement enriched with bubbles and pressure being "discontinuous"-P1, the element satisfies the inf-sup condition. The space of pressure is a "discontinuous"-P1. It's also sometimes called the Crouzeix-Raviart (conforming) element after it was presented in their 1973 paper, see 4.13 therein. Since the basis functions are known over the reference simplex, I will start with first writing these and their gradients and then start looking at Thanks |
Ok, if you want Crouzeix-Raviart elements, then you actually have to do something slightly different. If we consider the linear case, where you have at each face in the middle sitting a DOF instead of the vertex position, then you only have to create a new interpolation with the correct dispatches on https://github.com/Ferrite-FEM/Ferrite.jl/blob/master/src/interpolations.jl#L93-L96 https://github.com/Ferrite-FEM/Ferrite.jl/blob/master/src/interpolations.jl#L192-L219 and so on. Then, everything should probably work ootb |
Thanks @koehlerson I believe this is for the P1 non-conforming Crouzeix-Raviart element where the dofs are (only) at the centroid of each facet. The 1973 paper presents both the conforming and non-conforming elements for Stokes (which also work for incompressible elasticity). I will take a look this too. What I was referring to is it's conforming counterpart. The terminology isn't super popular, and Crouzeix-Raviart almost always ends up being used for the non-conforming P1 element introduced in that paper. For the conforming Crouziex-Raviart the dofs are at the vertices and edge-midpoints for a 2D case and vertices, edge-midpoints, facet-midpoints and at the element centroid for a 3D case. The basis functions for 3D can be found here and also in scikit-fem where I implemented these as a test case to run small problems here. |
Hi,
It would be helpful if discontinuous interpolations on simplices could be supported. I am taking a look at the codebase. If someone could guide me on the relevant modules that need to be changed, I could take an attempt at implementing those. Thanks!
The text was updated successfully, but these errors were encountered: