Skip to content

Commit

Permalink
Merge pull request #211 from Exawind/test_consolidate_interpolate_redux
Browse files Browse the repository at this point in the history
Add Tests and Refactor Interpolation Code
  • Loading branch information
ddement authored Jul 19, 2024
2 parents da7b4ca + b3f6f39 commit 62cb9c9
Show file tree
Hide file tree
Showing 12 changed files with 727 additions and 517 deletions.
37 changes: 7 additions & 30 deletions src/restruct_poc/beams/create_beams.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

#include "beams.hpp"
#include "calculate_jacobian.hpp"
#include "interpolate_QP_acceleration.hpp"
#include "interpolate_QP_position.hpp"
#include "interpolate_QP_rotation.hpp"
#include "interpolate_QP_state.hpp"
#include "interpolate_QP_velocity.hpp"
#include "interpolate_to_quadrature_points.hpp"
#include "populate_element_views.hpp"
#include "set_node_state_indices.hpp"

Expand Down Expand Up @@ -105,35 +103,14 @@ inline Beams CreateBeams(const BeamsInput& beams_input) {
}
);

auto range_policy = Kokkos::TeamPolicy<>(beams.num_elems, Kokkos::AUTO());
Kokkos::parallel_for(
"InterpolateQPState", beams.num_elems,
InterpolateQPState{
"InterpolateToQuadraturePoints", range_policy,
InterpolateToQuadraturePoints{
beams.elem_indices, beams.shape_interp, beams.shape_deriv, beams.qp_jacobian,
beams.node_u, beams.qp_u, beams.qp_u_prime, beams.qp_r, beams.qp_r_prime}
);
Kokkos::parallel_for(
"InterpolateQPVelocity",
Kokkos::MDRangePolicy{{0, 0}, {beams.num_elems, beams.max_elem_qps}},
InterpolateQPVelocity_Translation{
beams.elem_indices, beams.shape_interp, beams.node_u_dot, beams.qp_u_dot}
);
Kokkos::parallel_for(
"InterpolateQPVelocity",
Kokkos::MDRangePolicy{{0, 0}, {beams.num_elems, beams.max_elem_qps}},
InterpolateQPVelocity_Angular{
beams.elem_indices, beams.shape_interp, beams.node_u_dot, beams.qp_omega}
);
Kokkos::parallel_for(
"InterpolateQPAcceleration",
Kokkos::MDRangePolicy{{0, 0}, {beams.num_elems, beams.max_elem_qps}},
InterpolateQPAcceleration_Translation{
beams.elem_indices, beams.shape_interp, beams.node_u_ddot, beams.qp_u_ddot}
);
Kokkos::parallel_for(
"InterpolateQPAcceleration",
Kokkos::MDRangePolicy{{0, 0}, {beams.num_elems, beams.max_elem_qps}},
InterpolateQPAcceleration_Angular{
beams.elem_indices, beams.shape_interp, beams.node_u_ddot, beams.qp_omega_dot}
beams.node_u, beams.node_u_dot, beams.node_u_ddot, beams.qp_u, beams.qp_u_prime,
beams.qp_r, beams.qp_r_prime, beams.qp_u_dot, beams.qp_omega, beams.qp_u_ddot,
beams.qp_omega_dot}
);
return beams;
}
Expand Down
105 changes: 0 additions & 105 deletions src/restruct_poc/beams/interpolate_QP_acceleration.hpp

This file was deleted.

Loading

0 comments on commit 62cb9c9

Please sign in to comment.