-
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
Add ElementCoordinatesMappingLocal class #655
Conversation
ddbe526
to
8e4de41
Compare
Remark: one of the tests is not working right now due to an issue in computeRotationMatrixToXY.(). Tom will fix it (#659). |
8e4de41
to
7502a77
Compare
@@ -60,11 +60,28 @@ Orientation getOrientation (const GeoLib::Point* p0, | |||
* @param plane_normal the normal of the plane the polygon is located in | |||
* @param d parameter from the plane equation | |||
*/ | |||
void getNewellPlane (const std::vector<GeoLib::Point*>& pnts, | |||
template <class T_POINT> | |||
void getNewellPlane (const std::vector<T_POINT*>& pnts, |
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.
From the function name it is not clear what is modified and how.
Is it possible to return the normal vector and the distance, instead of modifying values?
Update: never mind the Newell, I didn't know the Newell's method for computing a plane from a polygon.
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.
You are right, we should rename the method to something like getSupportingPlane
. The algorithm uses Newell's method, described in the book "Real-Time Collision Detection" from Christer Ericson. This fact is also missing in the documentation.
@norihiro-w Should I update the branch or should we make a separate PR?
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.
you can make a separate PR
7502a77
to
a39c54e
Compare
This PR should be merged after #659 by Tom. I will rebase my commits to it |
a39c54e
to
0187921
Compare
rebased to #659 |
*/ | ||
struct CoordinateSystemType | ||
{ | ||
enum type |
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.
Better to use enum class
directly.
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.
i initially tried to use it but changed it to this way because the code is shorter and simpler as I don't need to make cast (from enum class to int) each time whenever bit operation is used.
@norihiro-w Please let me know if I should help you fixing some of the issues. |
// rotate the point coordinates | ||
for(unsigned i = 0; i < ele.getNNodes(); i++) | ||
{ | ||
Eigen::Vector3d x_new = matR2local * Eigen::Map<Eigen::Vector3d>(const_cast<double*>(vec_pt[i]->getCoords())); |
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.
Is there an obstacle to implement something like
MeshLib::Node operator*(EigenMatrix const& mat, MeshLib::Node const& node)
or
MathLib::Point3d operator*(EigenMatrix mat, MathLib::Point3d const& )?
I would prefer the second version, which is more general.
This would be
(1) more readable for the user and
(2) save some lines of code and
(3) omit some copies.
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.
updated. please see ee35769
Small changes.
… size(), transposeInPlace(), setIdentity()
…inatesMappingLocal
got the following errors with MSVC2013(Express). is there anyone having idea what to do? strangely the error does not appear on Jenkins.
|
I compiled the code with clang in RelWithDebInfo, which run through OK. But running tests ended in a SEGV for the:
test. Valgrind's memcheck does not show any invalid reads/writes until a SEGV. (see the above gist for details) Update: After some through testing I'm not sure if my error report is related to the MSVC compilation error. |
update: the test failing on Jenkins cannot be reproduced on my windows (win7, MSVC2013 with update 4, 64bit). could be there is something unitialized or machine dependent bug. |
96dc62f
to
cb6b507
Compare
rebased to HEAD |
Jenkins: OGS-6/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Win-PRs/140/ |
Jenkins: OGS-6/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Win-PRs/141/ |
@bilke Eigen version used in OGS6/Win-PRs seems to be bit old (3.1.4). Can you please replace it with the latest (3.2.4)? |
Jenkins: OGS-6/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Win-PRs/142/ |
I updated eigen to 3.2.4. Jenkins test this please! |
test this please |
Jenkins: OGS-6/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Win-PRs/143/ |
@bilke thanks! |
the problem was solved! |
Add ElementCoordinatesMappingLocal class
OpenGeoSys development has been moved to GitLab. |
This PR is a part of #595 and adds mapping of lower dimensional elements (e.g. line in 2D, tri in 3D) between global and local coordinates. The mapping functionality will be used during calculation of shape functions and mapping of tensor material properties like permeability.