-
Notifications
You must be signed in to change notification settings - Fork 15
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
Cell field evaluation at arbitrary points #146
Cell field evaluation at arbitrary points #146
Conversation
m=length(v) | ||
y=map(local_views(I),local_views(caches)) do fi,cache | ||
w=Vector{Float64}(undef,m) |
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.
Allocate w
as Vector{T}
where T=typeof(evaluate!(cache,I,x)
w[i]=evaluate!(cache,fi,x) | ||
catch | ||
w[i]=-Inf |
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.
Set -Inf
of type T
. E.g., zero(T) - Inf
evaluate!(cache,fi,x) | ||
catch | ||
-Inf |
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.
Set -Inf
of type T
. E.g., zero(T) - Inf
@@ -58,6 +58,25 @@ function main(distribute,parts) | |||
u3 = CellField(2.0,Ω) | |||
u = _my_op∘(u1,u2,u3) | |||
|
|||
order = 1 | |||
reffe = ReferenceFE(lagrangian,Float64,order) |
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.
Add a test for a non-scalar field
end | ||
# reduce((v,w)->broadcast(max,v,w),y) | ||
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.
Return non-distributed array. E.g., PArrays.getany(emit(z))
reduce(max,zi) | ||
end | ||
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.
Return non-distributed array. E.g., PArrays.getany(emit(z))
@santiagobadia , @JordiManyer please review this PR, I intent to use it to extract line cuts in 3D models in a simple way, e.g. by
will provide a cut at y=0.5.