Projecting on ElementDG
See original GitHub issueRegarding https://github.com/kinnala/scikit-fem/discussions/895#discussioncomment-4044517 : I’ve made a minimal example showing a problem projecting on ElementDG:
import numpy as np
import matplotlib.pyplot as plt
from skfem import *
fig, axs = plt.subplots(1, 3, subplot_kw={'aspect': 1})
mesh = MeshTri().refined(4)
basis = Basis(mesh, ElementVector(ElementTriP1()))
x = basis.project(lambda x: np.array((x[1], -x[0])))
basis.plot(x, ax=axs[0])
basis2 = basis.with_element(ElementVector(ElementTriP1()))
x2 = basis2.project(basis.interpolate(x))
(x2_x, basis2_x), (x2_y, basis2_y) = basis2.split(x2)
basis2_x.plot(x2_x, ax=axs[1], shading='gouraud')
basis3 = basis.with_element(ElementVector(ElementDG(ElementTriP1())))
x3 = basis3.project(basis.interpolate(x))
(x3_x, basis3_x), (x3_y, basis3_y) = basis3.split(x3)
basis3_x.plot(x3_x, ax=axs[2], shading='gouraud')
plt.show()
Issue Analytics
- State:
- Created 10 months ago
- Comments:23 (23 by maintainers)
Top Results From Across the Web
Element Design Group – Architecture Design & Structural ...
In conjunction with our Clients, Element Design Group produces design solutions with efficient and consistent results. We are customer focused, ...
Read more >DG local equation, how to interpret mean-averaged test function
The test funcion over which the PDE is projected, is defined as any test function (dependent of the coordinates, as you understand it)...
Read more >Discontinuous Galerkin - an overview | ScienceDirect Topics
The discontinuous Galerkin (DG) method is a robust and compact finite element projection method that provides a practical framework for the development of ......
Read more >Hybridizable discontinuous Galerkin projection methods for ...
Our high-order HDG projection schemes are implemented for arbitrary, mixed-element unstructured grids, with both straight-sided and curved meshes. In particular ...
Read more >Detailed API description - scikit-fem - Read the Docs
Elements defined implicitly through global degrees-of-freedom. skfem.element.ElementDG (elem), Turn a finite element discontinuous by cutting connectivity.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This looks better:
Okay, thanks!