Skip to content
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

Add affine mapping for edges and EdgeBasis #1172

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

kinnala
Copy link
Owner

@kinnala kinnala commented Oct 4, 2024

Discussion at: #1171

This is a proof-of-concept which runs successfully only the following test:

from skfem import *
from skfem.assembly.basis.edge_basis import EdgeBasis

m = MeshTet().refined(4)

ix = m.edges_satisfying(lambda x: (x[0] == 0) * (x[1] == 0))

ebasis = EdgeBasis(m, ElementTetP1(), edges=ix)

basis = Basis(m, ElementTetP1())


f = basis.project(lambda x: x[2] ** 3)


@Functional
def integ(w):
    return w['f']  # f(z) = z^3, integral of z^3 should be 0.25


print(integ.assemble(ebasis, f=f))  # 0.24992399019878747

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant