-
Notifications
You must be signed in to change notification settings - Fork 84
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
Feature/contact/normal vector #655
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #655 +/- ##
===========================================
- Coverage 96.55% 96.55% -0.00%
===========================================
Files 122 122
Lines 25337 25395 +58
===========================================
+ Hits 24464 24520 +56
- Misses 873 875 +2
Continue to review full report at Codecov.
|
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 complete the requested changes.
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.
Thanks @thiagordonho, not sure whether we should use .normalized()
or .normalize()
- but I think the different is that it returns a copy for the former and modify the current variable for the latter. So I think you are right in using the former!
include/particles/particle.tcc
Outdated
// Map domain gradients to nodal property. The domain gradients is defined as | ||
// the gradient of the particle volume | ||
for (unsigned i = 0; i < nodes_.size(); ++i) { | ||
const auto& gradient = volume_ * dn_dx_.row(i); |
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.
const auto& gradient = volume_ * dn_dx_.row(i); | |
Eigen::Matrix<double, Tdim, 1> gradient; | |
for (unsigned j = 0; j < Tdim; ++j) | |
gradient[j] += dn_dx_[i, j] * volume; |
Describe the PR
Implementation to compute the normal unit vector at every node with more than one materials. In order to do this, a function in
Particle
class to map the domain gradients (gradient of volumes) is implemented.Then, the normal unit vector is calculated at every node by means of a function implemented in the
Node
class computing the unit vector as the domain gradient divided by its norm.Related Issues/PRs
This PR is related to the RFC #636 .