-
Notifications
You must be signed in to change notification settings - Fork 237
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
transport velocity in soil #685
base: master
Are you sure you want to change the base?
Conversation
//---------------------------------------------------------------------- | ||
// Unified transport velocity correction | ||
//---------------------------------------------------------------------- | ||
template <typename... T> |
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 am wondering why we need this new class. Could we use a generalization-extension approach to add this new feature?
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 am wondering why we need this new class. Could we use a generalization-extension approach to add this new feature?
Yes. It's better to use a generalized approach.
A simple approach is to just add a judgment statement in the original TransportVelocityCorrection
.
When a particle is identified as a surface particle, corrections are applied only in the tangential direction. However, it is uncertain whether this approach will affect other cases.
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.
No. Using a switch is not a generalization-extension approach. We need first find a type in the original formulation such that it can be generalized, then change it to a template parameter (as a templated class) and reimplement the original class by realizing the template parameter with a small function object. For extension, we write the new feature as a new function object which substitute the template parameter in the generalized templated class. In this way, the choose new feature is don in compiling time not runtime.
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.
No. Using a switch is not a generalization-extension approach. We need first find a type in the original formulation such that it can be generalized, then change it to a template parameter (as a templated class) and reimplement the original class by realizing the template parameter with a small function object. For extension, we write the new feature as a new function object which substitute the template parameter in the generalized templated class. In this way, the choose new feature is don in compiling time not runtime.
I will think about this.
Remove the tensile instability in cohesive soil using transport velocity.