Skip to content
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

verbosity control and mesh generation imprv. #15

Merged
merged 35 commits into from
Dec 31, 2020
Merged

verbosity control and mesh generation imprv. #15

merged 35 commits into from
Dec 31, 2020

Conversation

krober10nd
Copy link
Collaborator

  • all modules have verbosity controls (0 for silent, 1 for start and end, 2 for all the details). 1 is default.
  • the mesh generation module is getting some ports from SeismicMesh developments namely faster unique edge calculations. No parallel yet (not necessary).

@codecov-io
Copy link

codecov-io commented Dec 22, 2020

Codecov Report

Merging #15 (b9483b0) into master (c9322ab) will increase coverage by 1.75%.
The diff coverage is 81.93%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #15      +/-   ##
==========================================
+ Coverage   85.40%   87.15%   +1.75%     
==========================================
  Files           9        9              
  Lines         877      942      +65     
==========================================
+ Hits          749      821      +72     
+ Misses        128      121       -7     
Impacted Files Coverage Δ
oceanmesh/edgefx.py 53.84% <42.85%> (-46.16%) ⬇️
oceanmesh/grid.py 83.06% <72.41%> (-4.44%) ⬇️
oceanmesh/clean.py 96.37% <88.23%> (+7.58%) ⬆️
oceanmesh/geodata.py 91.69% <92.10%> (+4.38%) ⬆️
oceanmesh/mesh_generator.py 89.02% <96.55%> (+1.84%) ⬆️
oceanmesh/__init__.py 100.00% <100.00%> (ø)
oceanmesh/signed_distance_function.py 100.00% <100.00%> (+25.80%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c9322ab...b9483b0. Read the comment docs.

@krober10nd
Copy link
Collaborator Author

okay @WPringle this is ready to be merged. any input?

@krober10nd
Copy link
Collaborator Author

krober10nd commented Dec 22, 2020

I would like to keep the generator as simple as possible and instead make the mesh size function and domain classes take on the complexity for example to support multiscale mesh generation in a more general way. As you can see the mesh generator just takes a domain and an edge_length function. The both can be simple functions that take points and returns a size and signed distance etc.

@WPringle
Copy link
Collaborator

WPringle commented Dec 23, 2020

I like that change to inputting max allowable spacing of shoreline and edgefx in meters rather than degrees. At present we do just the divide by 111e3 to convert to degrees for the shoreline. I suppose that be fine. Another way we could use the haversine formula inside the interpm routine to make it more precise.

@WPringle
Copy link
Collaborator

The other comment I have is on the make traversable. Let's change dj_cutoff to something more useful like minimum_allowable_mesh_segment_area or just min_disconnected_area

@WPringle
Copy link
Collaborator

Similarly hmin could change that to min_edge_length

@krober10nd
Copy link
Collaborator Author

I think putting Haversine function is a good idea and agree about the name changes in the API.

@krober10nd
Copy link
Collaborator Author

Alright, I changed h0 to min_edge_length in the mesh generator API and dj_cutoff -> min_disconnected_area

I also added a test for the README code. Eventually, we should move over to tox to handle testing on different versions of Python and to separate out testing deps with the main installation deps as the average user won't be testing.

I think the Haversine thing should come in later versions.

@krober10nd krober10nd mentioned this pull request Dec 26, 2020
@krober10nd
Copy link
Collaborator Author

#16

@krober10nd krober10nd mentioned this pull request Dec 29, 2020
@krober10nd krober10nd merged commit 3a2b6f7 into master Dec 31, 2020
@krober10nd krober10nd deleted the sm_meshgen branch December 31, 2020 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants