-
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
[Solver] Semi-implicit Navier-Stokes solver #681
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #681 +/- ##
===========================================
- Coverage 96.66% 92.95% -3.71%
===========================================
Files 123 134 +11
Lines 25375 26420 +1045
===========================================
+ Hits 24527 24557 +30
- Misses 848 1863 +1015
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.
Remove exception handling in core computational functions, if those block enter invalid regions, the code should crash.
[Partial review]
|
||
//! Return free surface bool | ||
//! \retval free_surface_ indicating free surface cell | ||
bool free_surface() { return free_surface_; }; |
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.
Could you make all unaltered functions as const and add inline when appropriate?
template <unsigned Tdim> | ||
bool mpm::Cell<Tdim>::map_cell_volume_to_nodes(unsigned phase) { | ||
bool status = true; | ||
try { |
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.
We don't need to use exception handling here, instead, use assert. A failure here will give incorrect results, so this should fail.
indices.resize(nodes_.size()); | ||
indices.setZero(); | ||
unsigned node_idx = 0; | ||
for (auto node_itr = nodes_.cbegin(); node_itr != nodes_.cend(); |
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.
Would this be the same for both standard linear and GIMP elements?
const Eigen::MatrixXd& grad_shapefn, double pvolume, | ||
double multiplier) noexcept { | ||
|
||
std::lock_guard<std::mutex> guard(cell_mutex_); |
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 mutex lock and unlock
bool mpm::Cell<Tdim>::initialise_element_matrix() { | ||
bool status = true; | ||
if (this->status()) { | ||
try { |
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.
We don't need an exception block
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Describe the PR
A draft PR to ease to check the solver structure.