-
Notifications
You must be signed in to change notification settings - Fork 8
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
Multi material support #173
base: main
Are you sure you want to change the base?
Conversation
Variadic models, only support binary currently
@kinanbezem7 feel free to try this out or ask about the user interface here |
// Total fiber volume | ||
double Vftotal = Vf * Vd; | ||
// Total number of fibers | ||
int Nf = std::floor( Vftotal / Vfs ); |
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.
@streeve Is it OK to use int here or should we use something like the following?
auto Nfy = std::round( Ly / std::sqrt( Af ) );
Could you please check the same for Lines 115, 121, 123?
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 would leave the explicit types as they are for all of them, but it's fine either way
double zi = x( pid, 2 ); | ||
|
||
// Find ply number of particle (counting from 0) | ||
double nply = std::floor( ( zi - low_corner[2] ) / dzply ); |
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.
Everything in this lambda should use Kokkos::
math, not std::
// Total fiber volume | ||
double Vftotal = Vf * Vd; | ||
// Total number of fibers | ||
int Nf = std::floor( Vftotal / Vfs ); |
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 would leave the explicit types as they are for all of them, but it's fine either way
double nply = std::floor( ( zi - low_corner[2] ) / dzply ); | ||
|
||
// Ply fiber orientation (in radians) | ||
double theta = stacking_sequence[nply] * CabanaPD::pi / 180; |
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 missed this line - it will need to be in a Kokkos::View
since you use it in kernel
// Fiber-reinforced composite geometry parameters | ||
double Vf = inputs["fiber_volume_fraction"]; | ||
double Df = inputs["fiber_diameter"]; | ||
std::vector<double> stacking_sequence = inputs["stacking_sequence"]; |
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.
std::vector<double> stacking_sequence = inputs["stacking_sequence"]; | |
std::vector<double> stacking_vector = inputs["stacking_sequence"]; | |
`Kokkos::View<double*, memory_space> stacking_sequence( stacking_vector.data() ); |
Currently binary only (written to be easy to expand however)
ForceModels
accepts a variadic list or tuple of models and calls each model peri,j
pair as needed in the force loopTemporary changes to KW to test the capability - missing new bimaterial example
Built off of #172 for better composability
Replaces #119
Closes #109