This repository has been archived by the owner on Jul 19, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 74
[WIP] (issue #237) Allow distinct type for grid vs. function value in BC constructor #260
Open
AndiMD
wants to merge
11
commits into
SciML:master
Choose a base branch
from
AndiMD:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test Robin BC, Dirichlet, Neumann with complex function values
end | ||
s0_l = S_l[:,1] ; Sl = S_l[:,2:end] | ||
s0_r = S_r[:,end] ; Sr = S_r[:,(end-1):-1:1] | ||
|
||
denoml = αl[2] .+ αl[3:end] ⋅ s0_l | ||
denomr = αr[2] .+ αr[3:end] ⋅ s0_r | ||
denoml = αl[2] .+ αl[3:end]' ⋅ s0_l |
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.
why adjoint?
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.
⋅(a,b)
complex conjugates a
. I believe this should not be complex conjugated.
Should probably have been conj.
instead of adjoint
(same result due to the dot
).
AndiMD
commented
Aug 10, 2020
|
||
# other acceptable argument signatures | ||
#RobinBC(al::T, bl::T, cl::T, dx_l::T, ar::T, br::T, cr::T, dx_r::T, order = 1) where T = RobinBC([al,bl, cl], [ar, br, cr], dx_l, order) | ||
|
||
Base.:*(Q::AffineBC, u::AbstractVector) = BoundaryPaddedVector(Q.a_l ⋅ u[1:length(Q.a_l)] + Q.b_l, Q.a_r ⋅ u[(end-length(Q.a_r)+1):end] + Q.b_r, u) | ||
Base.:*(Q::AffineBC, u::AbstractVector) = BoundaryPaddedVector( Q.a_l'⋅ u[1:length(Q.a_l)] + Q.b_l, Q.a_r' ⋅ u[(end-length(Q.a_r)+1):end] + Q.b_r, u ) |
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 idea that the dot-product should not complex conjugate came from this line. I figured it should be the same for GeneralBC
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there,
This should allow RobinBC and GeneralBC to take different types between function values and grid spacing (#237).
Suggestions welcome! I'm still new to the Github workflow, so please be gentle ;)