-
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
WIP: New vector interpolations and mappings #798
base: master
Are you sure you want to change the base?
Conversation
… error though (test fails)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #798 +/- ##
==========================================
- Coverage 93.57% 92.36% -1.22%
==========================================
Files 39 39
Lines 6071 6259 +188
==========================================
+ Hits 5681 5781 +100
- Misses 390 478 +88 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
…-FEM/Ferrite.jl into kam/FunctionValuesGeneralization
function reference_shape_value(ip::RaviartThomas{2, RefTriangle, 2}, ξ::Vec{2}, i::Int) | ||
x, y = ξ | ||
# Face 1 (keep ordering, flip sign) | ||
i == 1 && return Vec(4x * (2x - 1), 2y * (4x - 1)) / 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The division by 2 compared to defelement gives an identity for the line integral of 1/num_edge_dofs, such that setting the actual dof-values to 1 results in a unit flux. @termi-official: Do you see any issues by scaling the shape functions like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The advantage is that this way, we don't have to do strange modifications to the values when applying boundary conditions in _update!
, only checking the sign of the edge/facet.
See also tests at the end of test_interpolations.jl
# Required properties of shape value Nⱼ of an edge-elements (Hcurl) on an edge with direction v, length L, and dofs ∈ 𝔇 | ||
# 1) Unit property: ∫(Nⱼ ⋅ v f(s) dS) = 1/length(𝔇) ∀ ∈ 𝔇 | ||
# Must hold for | ||
# length(𝔇) ≥ 1: f(s) = 1 | ||
# length(𝔇) = 2: f(s) = 1 - s or f(s) = s for 1st and 2nd dof, respectively. | ||
# Additionally, should be zero for | ||
# length(𝔇) = 2: f(s) = s or f(s) = 1 - s for 1st and 2nd dof, respectively. | ||
# s is the path parameter ∈[0,1] along the positive direction of the path. | ||
# 2) Zero along other edges: Nⱼ ⋅ v = 0 if j∉𝔇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Associated test definitions for comment above for Hcurl
# Required properties of shape value Nⱼ of an edge-elements (Hdiv) on an edge with normal n, length L, and dofs ∈ 𝔇 | ||
# 1) Unit property: ∫(Nⱼ ⋅ n f(s) dS) = 1/length(𝔇) ∀ j ∈ 𝔇 | ||
# Must hold for | ||
# length(𝔇) ≥ 1: f(s) = 1 | ||
# length(𝔇) = 2: f(s) = 1 - s or f(s) = s for 1st and 2nd dof, respectively. | ||
# Additionally, should be zero for | ||
# length(𝔇) = 2: f(s) = s or f(s) = 1 - s for 1st and 2nd dof, respectively. | ||
# s is the path parameter ∈[0,1] along the positive direction of the path. | ||
# 2) Zero normal component on other edges: Nⱼ ⋅ n = 0 if j∉𝔇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Associated test definitions for comment above for Hdiv
Implements Hcurl (Nedelec) and Hdiv (RaviartThomas and BrezziDouglasMarini) interpolations and the associated mappings.
To ensure that the infrastructure works well, I would aim to have the following here
Possible tutorials/validations