-
Notifications
You must be signed in to change notification settings - Fork 94
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
WeakDirichlet BC for H(div) and H(curl) #1151
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1151 +/- ##
==========================================
+ Coverage 93.69% 93.77% +0.07%
==========================================
Files 39 39
Lines 6237 6361 +124
==========================================
+ Hits 5844 5965 +121
- Misses 393 396 +3 ☔ View full report in Codecov by Sentry. |
Yea, as already discussed before, I think having a trait system will be useful in the future.
Yes. |
# Support varying number of facetdofs (for ref shapes with different facet types) | ||
for i in (length(shape_nrs) + 1):size(Kᶠ, 1) | ||
Kᶠ[i, i] = 1 | ||
end |
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.
Currently, we don't have any H(div) or H(curl) interpolations with different number of shape functions associated with different facets. But theoretically, we could, hence this addition which is not tested.
Removing it will case a singular matrix if such are implemented in the future, alternatively we could check and throw if size(K,1) != length(shape_nrs)
.
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.
I haven't gone through the math but if it is sound and tests cover it then 👍
Since I just saw it, should we rename |
Yes, seems like |
Co-authored-by: Fredrik Ekre <[email protected]>
Decided degree that should pass by checking how high it worked, and finding the threshold
I believe it is sound, but would be good if someone can have a 2nd look on the tests here to make sure that I haven't done anything wrong there. When going through this again now, I realize that I should also test some moment-integrals, as currently only the total integral quantity is tested (e.g. the total flux over the boundary, but not the spatial distribution). Will update with that during the week. |
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.
Is it too magical if Dirichlet(::HcurlInterpolation)
adds a WeakDirichlet
? Probably, but would be kind of nice to not have to change the BC when changing interpolations.
|
For H(div) and H(curl) interpolations, the dof is not associated with a point, but with facets and edges, respectively. However, the boundary conditions appear for the facets in the forms described in the docstring. This implies that we cannot get a coordinate where we want to assign the dof, but instead we have to minimize the difference, not sure how much theory to include, but we could add for e.g. H(div) that our "problem" is,
where the functional dependence,$f = f(\boldsymbol{x}, t, \boldsymbol{n})$ , is skipped fore brevity.
I also chose to introduce the internal
function_space(::Interpolation)::Val
function, as this was useful for dispatching. @termi-official:RannacherTurek
andCrouzeixRaviart
should beL2
, right?Side-note
An alternative name could be L2Dirichlet, as this could also be applied to