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

GeoMapper improvements #1327

Merged
merged 11 commits into from
Aug 4, 2016
Merged

Conversation

TomFischer
Copy link
Member

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.

MathLib::Point3d const& p)
{
for (auto const elem : elements) {
std::unique_ptr<MeshLib::Element> elem_2d(elem->clone());
Copy link
Collaborator

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?

@chleh
Copy link
Collaborator

chleh commented Jul 26, 2016

Code looks good 👍

out.precision(std::numeric_limits<double>::digits10);
out << "Segment point snapped from " << p;
#endif
p[0] = (*(elem.getNode(k)))[0];
Copy link
Member

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)?

Copy link
Member

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.

@endJunction
Copy link
Member

endJunction commented Jul 27, 2016

CTest failing because you need to rebase Tests/Data branch...
Otherwise Jenkins suceeded.

@ogsbot
Copy link
Member

ogsbot commented Jul 27, 2016

Jenkins: OGS-6/Linux-PRs-dynamic failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs-dynamic/645/

@ogsbot
Copy link
Member

ogsbot commented Jul 27, 2016

Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/2421/

@ogsbot
Copy link
Member

ogsbot commented Jul 27, 2016

Jenkins: OGS-6/Linux-PRs-dynamic failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs-dynamic/646/

@ogsbot
Copy link
Member

ogsbot commented Jul 27, 2016

Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/2422/

double sqr_min, sqr_max;
elem.computeSqrNodeDistanceRange(sqr_min, sqr_max);

double const sqr_eps(rel_eps*rel_eps * sqr_min);
Copy link
Collaborator

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".

@chleh
Copy link
Collaborator

chleh commented Jul 29, 2016

👍

@@ -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();
Copy link
Member

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);
Copy link
Member

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...

@endJunction
Copy link
Member

Add the comments, fix typo, and optionally other things, then merge, when ready.

@ogsbot
Copy link
Member

ogsbot commented Aug 3, 2016

Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/2458/

@ogsbot
Copy link
Member

ogsbot commented Aug 3, 2016

Jenkins: OGS-6/Linux-PRs-dynamic failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs-dynamic/681/

@TomFischer TomFischer merged commit 3ab5782 into ufz:master Aug 4, 2016
@TomFischer TomFischer deleted the GeoMapperRefactorization branch August 4, 2016 06:40
@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.

5 participants