Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
yguclu
left a comment
There was a problem hiding this comment.
Thanks for this PR! It can probably be merged very soon
| def test_maxwell_2d_2_patch_dirichlet_1(): | ||
|
|
||
| domain = build_pretzel() | ||
| # domain = build_pretzel() # a lot of patches, takes a long time |
There was a problem hiding this comment.
Do we have other unit tests which actually use the pretzel-like domain?
There was a problem hiding this comment.
good question! there are actually two tests left that use this domain:
- "test_poisson_2d_2_patches_dirichlet_3"
- "test_maxwell_2d_2_patch_dirichlet_1"
given the names of these tests, this does not make much sense. I'll fix this.
Also, I see that some tests use a domain written in 'multipatch/square.h5' but it's not clear where (and how) this domain is created. The search for 'multipatch/square.h5' or 'square.h5' or even 'multipatch/square' only return places where this domain (file) is read
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
yguclu
left a comment
There was a problem hiding this comment.
Thanks for this PR, @campospinto!
I have a few minor comments
| #============================================================================== | ||
| if __name__ == '__main__': | ||
|
|
||
| domain = (0, 2*np.pi) | ||
| degree = 3 | ||
| degrees = [[2,2,2], [2,3,2], [3,3,3]] #3 | ||
| periodic = True | ||
| ncells = [10, 20, 40, 80, 160, 320, 640] | ||
| mult = [[1,1,1], [1,2,2], [2,2,2]] | ||
|
|
||
| for nc in ncells: | ||
| test_derham_projector_2d_hdiv([nc, nc], [degree, degree], [periodic, periodic], [2, 2]) | ||
| # for nc in ncells: | ||
| # test_derham_projector_2d_hdiv([nc, nc], [degree, degree], [periodic, periodic], [2, 2]) | ||
|
|
||
| for nc in ncells: | ||
| test_H1_projector_1d(domain, nc, degree, periodic, multiplicity = 2) | ||
| # for nc in ncells: | ||
| # test_H1_projector_1d(domain, nc, degree, periodic, multiplicity = 2) | ||
|
|
||
| nquads = degree | ||
| for nc in ncells: | ||
| test_L2_projector_1d(domain, nc, degree, periodic, nquads) | ||
| # nquads = degree | ||
| # for nc in ncells: | ||
| # test_L2_projector_1d(domain, nc, degree, periodic, nquads) | ||
|
|
||
| for nc in ncells: | ||
| test_derham_projector_2d_hdiv_2([nc, nc], [degree, degree], [periodic, periodic]) | ||
| test_derham_projector_2d_hdiv([nc, nc], [degree, degree], [periodic, periodic], 2) | ||
| # for nc in ncells: | ||
| # test_derham_projector_2d_hdiv_2([nc, nc], [degree, degree], [periodic, periodic]) | ||
| # test_derham_projector_2d_hdiv([nc, nc], [degree, degree], [periodic, periodic], 2) | ||
|
|
||
| for nc in ncells : | ||
| test_derham_projector_2d_hcurl([nc, nc], [degree, degree], [periodic, periodic]) | ||
| # for nc in ncells : | ||
| # test_derham_projector_2d_hcurl([nc, nc], [degree, degree], [periodic, periodic]) | ||
|
|
||
| for nc in ncells[:3] : | ||
| test_derham_projector_3d([nc, nc, nc], [degree, degree, degree], [periodic, periodic, periodic]) | ||
| for nc in ncells[:3]: | ||
| for deg in degrees: | ||
| for m in mult: | ||
| test_derham_projector_3d([nc, nc, nc], deg, [periodic, periodic, periodic], multiplicity=m) |
There was a problem hiding this comment.
Maybe we could write three separate functions in 1/2/3 dimensions and use them for this "manual" convergence verification?
There was a problem hiding this comment.
I added a few functions and improved the error tests using the expected convergence orders
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
|
I think all the requests have been addressed. I'm switching on the tests again. |
In this PR we speed-up some tests by using coarser grids and fewer patches in multi-patch domains.
The error asserts in
feec/tests/test_global_projectors.pyare also improved by using the expected convergence orders.We also add some folders in .gitignore:
proffolders generated by profiling tools__*pyccel__*/generated by pyccel(Since these changes are really minor I don't think they deserve to be mentioned in the changelog)