-
Notifications
You must be signed in to change notification settings - Fork 239
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
GeoMapper improvements #1327
GeoMapper improvements #1327
Conversation
MathLib::Point3d const& p) | ||
{ | ||
for (auto const elem : elements) { | ||
std::unique_ptr<MeshLib::Element> elem_2d(elem->clone()); |
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.
Must that be a unique_ptr?
Code looks good 👍 |
f04b6ef
to
3aa046f
Compare
out.precision(std::numeric_limits<double>::digits10); | ||
out << "Segment point snapped from " << p; | ||
#endif | ||
p[0] = (*(elem.getNode(k)))[0]; |
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.
Use a loop or introduce a constant, e.g., auto const* node = elem.getNode(k)?
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.
... immideatly after the for loop begin.
f51238d
to
eef9e92
Compare
CTest failing because you need to rebase Tests/Data branch... |
Jenkins: OGS-6/Linux-PRs-dynamic failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs-dynamic/645/ |
Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/2421/ |
eef9e92
to
281e152
Compare
Jenkins: OGS-6/Linux-PRs-dynamic failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs-dynamic/646/ |
Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/2422/ |
281e152
to
6321b83
Compare
double sqr_min, sqr_max; | ||
elem.computeSqrNodeDistanceRange(sqr_min, sqr_max); | ||
|
||
double const sqr_eps(rel_eps*rel_eps * sqr_min); |
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.
So now if e.g. rel_eps = 1e-3
, then the tolerance in distances is 1e-3 times the minimum edge length of the element? Sounds good.
Note: Now rel_eps is not a tolerance of "distance squared" anymore, but of "distance".
👍 |
@@ -857,7 +858,7 @@ void MainWindow::mapGeometry(const std::string &geo_name) | |||
else // use mesh from ProjectData | |||
mesh = _project.getMeshObjects()[choice-2].get(); | |||
|
|||
std::string const& new_geo_name = dlg.getNewGeoName(); | |||
std::string new_geo_name = dlg.getNewGeoName(); |
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.
Just a note: Better to keep this one const and make another one in lines 870s to clarify the dependencies of the names...
@@ -50,5 +50,8 @@ std::ostream& operator<< (std::ostream& os, LineSegment const& s); | |||
std::ostream& operator<<(std::ostream& os, | |||
std::pair<GeoLib::LineSegment const&, | |||
GeoLib::LineSegment const&> const& seg_pair); | |||
|
|||
bool operator==(LineSegment const& s0, LineSegment const& s1); |
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.
Please mention in the comment that the equality is not strict...
Add the comments, fix typo, and optionally other things, then merge, when ready. |
6321b83
to
4acc1f8
Compare
Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/2458/ |
Jenkins: OGS-6/Linux-PRs-dynamic failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs-dynamic/681/ |
If the coordinates of a point managed by PointVec are modified from outside the internal data structures must be updated. I.e., the AABB needs maybe an update. But more important if the point is moved in general it has to be moved also in the OctTree.
4acc1f8
to
65fb136
Compare
OpenGeoSys development has been moved to GitLab. |
This PR contains a reimplementation of
GeoMapper::advancedMapOnMesh
because the old implementation had some issues, see issue #944. For the new implementation three new tests are added.