-
Notifications
You must be signed in to change notification settings - Fork 1
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
More tests for evaluate #2
More tests for evaluate #2
Conversation
Compressed assembly
fhx = evaluate!(fhcache, fh, x) | ||
@test fhx ≈ fx | ||
|
||
for M ∈ ["Hypercubes", "Simplices"] |
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 would use symbols instead of strings:
for M \in [:hypercubes, :simplices]
...
M === :hypercubes ? ...
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.
Fixed this. Waiting for @ericneiva to review the other changes.
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.
Good job, @Balaje. I have added some review comments. Is this branch still synchronised with gridap:master
? If not, please, resynchronise.
src/CellData/CellFields.jl
Outdated
ctype_to_polytope = map(get_polytope, ctype_to_reffe) | ||
cell_map = get_cell_map(trian) | ||
cache1 = kdtree, vertex_to_cells, cell_to_ctype, ctype_to_polytope, cell_map | ||
cache1 = my_trian_data(trian) |
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 would rather give a more meaningful name to my_trian_data
, such as point_to_cell_cache
... what do you think?
src/CellData/CellFields.jl
Outdated
@@ -368,6 +371,18 @@ function evaluate!(cache,f::CellField,point_to_x::AbstractVector{<:Point}) | |||
collect(point_to_fx) # Collect into a plain array | |||
end | |||
|
|||
# New CellPoint implementation |
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.
This comment is doomed to be outdated, I would remove it. But you can (and should) inform that you have implemented this new procedure in the changelog file. Take a look at the structure of the file. What we do in a PR is to update the changelog with a summary of the changes being introduced (in the Unreleased
section). I would add to the changelog that this PR adds (1) support to allow evaluation of FE functions at arbitrary points and (2) the new CellPoint
implementation.
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 would also remove the comments within the CellPoint(xs::AbstractVector{<:Point}, trian::Triangulation, domain_style::PhysicalDomain)
implementation. The code can be understood without them.
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.
Hi @ericneiva, I have updated the PR with these changes.
Ok, thanks a lot, @Balaje. From my side, this PR is good to go. |
Thanks so much @ericneiva Hi, @eschnett Please merge this PR if you're happy as well. Thank you. |
Hi @santiagobadia, @ericneiva, @oriolcg and @eschnett
I am submitting a pull request after adding some more tests for
evaluate
. So far I have added test for:CellPoint
. I might require some feedback for this. I had to exportmake_inverse_table
,point_to_cell!
anddistance
from the implementation. I then use these functions for generating thecell_to_point
map again, and pass the result toCellPoint
and then toevaluate
.