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

Mesh on mesh mapping fix #2390

Merged
merged 5 commits into from
Mar 8, 2019
Merged

Mesh on mesh mapping fix #2390

merged 5 commits into from
Mar 8, 2019

Conversation

rinkk
Copy link
Member

@rinkk rinkk commented Feb 28, 2019

Adjusts the mesh on mesh mapping tool to use the functionality introduced in #2367

@@ -151,7 +134,7 @@ int main (int argc, char* argv[])
// maps the elevation of mesh nodes according to a ground truth mesh whenever nodes exist within max_dist
if (current_key == "-MESH")
{
if (argc < 5)
if (argc < 4)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For another PR; this cli arguments handling could be upgraded to tclap.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know. However, this would require more time than I can currently spend on this. It's on the to-do list.

Copy link
Member

@endJunction endJunction left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok. Didn't check the details of the algorithm change in moveMeshNodes.cpp

{

/// Returns the element in which the given node is located when
/// projected onto a mesh, or nullptr if no such element was found.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doxygen hasn't finished yet, but the function documentation appears twice in the code, once here, once in the header file; it could be that it will show up twice in the doxygen's function documentation. Needs a quick check, when doxygen is done.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the duplicate comments.

@codecov
Copy link

codecov bot commented Feb 28, 2019

Codecov Report

Merging #2390 into master will increase coverage by 0.06%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2390      +/-   ##
==========================================
+ Coverage   32.72%   32.78%   +0.06%     
==========================================
  Files         529      530       +1     
  Lines       19957    19816     -141     
  Branches     9449     9302     -147     
==========================================
- Hits         6530     6496      -34     
+ Misses      10089     9966     -123     
- Partials     3338     3354      +16
Impacted Files Coverage Δ
MeshLib/MeshEditing/ProjectPointOnMesh.cpp 0% <0%> (ø)
MathLib/Vector3.cpp 33.33% <0%> (-33.34%) ⬇️
MeshLib/CoordinateSystem.cpp 42.85% <0%> (-14.29%) ⬇️
GeoLib/SimplePolygonTree.cpp 61.9% <0%> (-4.77%) ⬇️
GeoLib/AnalyticalGeometry-impl.h 72.95% <0%> (-4.1%) ⬇️
...eStepping/Algorithms/EvolutionaryPIDcontroller.cpp 68.18% <0%> (-3.04%) ⬇️
...ng/Algorithms/IterationNumberBasedTimeStepping.cpp 76.74% <0%> (-2.33%) ⬇️
GeoLib/Surface.cpp 56.81% <0%> (-2.28%) ⬇️
GeoLib/MinimalBoundingSphere.cpp 41.17% <0%> (-1.97%) ⬇️
GeoLib/Polyline.cpp 35.31% <0%> (-1.88%) ⬇️
... and 7 more

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 234e772...fa3e6f5. Read the comment docs.

@rinkk
Copy link
Member Author

rinkk commented Feb 28, 2019

The change to the algorithm is really simple: The utility used to assign the elevation of the closest point in the ground truth mesh to all nodes in the mesh to be mapped. Now, it using the actual elevation at the location of each node (that's the functionality introduced in the mesh2raster tool) and only if no point is found, it checks for the closest point within a user-specified radius (which is useful if boundaries are slightly translated due to different precision used in preprocessing tools).

Copy link
Member

@TomFischer TomFischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@endJunction
Copy link
Member

@rinkk This needs a fix for an unused 'offset' variable in moveMeshNodes.cpp:144
https://jenkins.opengeosys.org/job/ufz/job/ogs/job/PR-2390/3/clang-mac/

@endJunction endJunction merged commit ec75045 into ufz:master Mar 8, 2019
@rinkk rinkk deleted the meshmappingfix branch April 12, 2019 15:30
@ogsbot
Copy link
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

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.

4 participants