Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
ddement committed Oct 21, 2024
1 parent e7b844d commit 4fb6d8f
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/openturbine.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once

#include "types.hpp"
#include "beams/beams.hpp"
#include "constraints/constraints.hpp"
#include "solver/solver.hpp"
#include "state/state.hpp"
#include "step/step.hpp"
#include "step/step_parameters.hpp"
#include "types.hpp"
3 changes: 2 additions & 1 deletion src/step/assemble_constraints_matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ void AssembleConstraintsMatrix(Solver& solver, const Constraints& constraints) {
CopyConstraintsToSparseMatrix<Solver::CrsMatrixType>{
constraints.row_range, constraints.base_node_col_range,
constraints.target_node_col_range, solver.B, constraints.base_gradient_terms,
constraints.target_gradient_terms}
constraints.target_gradient_terms
}
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/step/assemble_constraints_residual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ void AssembleConstraintsResidual(const Solver& solver, const Constraints& constr
Kokkos::parallel_for(
"ContributeConstraintsSystemResidualToVector", constraints.num,
ContributeConstraintsSystemResidualToVector{
constraints.target_node_index, solver.R, constraints.system_residual_terms}
constraints.target_node_index, solver.R, constraints.system_residual_terms
}
);

auto R = Solver::ValuesType(
Expand All @@ -42,7 +43,8 @@ void AssembleConstraintsResidual(const Solver& solver, const Constraints& constr
CopyConstraintsResidualToVector{
constraints.row_range,
Kokkos::subview(solver.R, Kokkos::make_pair(solver.num_system_dofs, solver.num_dofs)),
constraints.residual_terms}
constraints.residual_terms
}
);
}

Expand Down
3 changes: 2 additions & 1 deletion src/step/assemble_inertia_matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ void AssembleInertiaMatrix(const Beams& beams, double beta_prime, double gamma_p
IntegrateInertiaMatrix{
beams.num_nodes_per_element, beams.num_qps_per_element, beams.qp_weight,
beams.qp_jacobian, beams.shape_interp, beams.qp_Muu, beams.qp_Guu, beta_prime,
gamma_prime, beams.inertia_matrix_terms}
gamma_prime, beams.inertia_matrix_terms
}
);
}

Expand Down
3 changes: 2 additions & 1 deletion src/step/assemble_residual_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ void AssembleResidualVector(const Beams& beams) {
IntegrateResidualVector{
beams.num_nodes_per_element, beams.num_qps_per_element, beams.qp_weight,
beams.qp_jacobian, beams.shape_interp, beams.shape_deriv, beams.node_FX, beams.qp_Fc,
beams.qp_Fd, beams.qp_Fi, beams.qp_Fe, beams.qp_Fg, beams.residual_vector_terms}
beams.qp_Fd, beams.qp_Fi, beams.qp_Fe, beams.qp_Fg, beams.residual_vector_terms
}
);
}

Expand Down
3 changes: 2 additions & 1 deletion src/step/assemble_system_matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ void AssembleSystemMatrix(Solver& solver, const Beams& beams) {
Kokkos::parallel_for(
"ContributeElementsToSparseMatrix", sparse_matrix_policy,
ContributeElementsToSparseMatrix<Solver::CrsMatrixType>{
solver.K, beams.stiffness_matrix_terms}
solver.K, beams.stiffness_matrix_terms
}
);

Kokkos::fence();
Expand Down
3 changes: 2 additions & 1 deletion src/step/assemble_system_residual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ void AssembleSystemResidual(const Solver& solver, const Beams& beams) {
"ContributeElementsToVector", vector_policy,
ContributeElementsToVector{
beams.num_nodes_per_element, beams.node_state_indices, beams.residual_vector_terms,
solver.R}
solver.R
}
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/step/update_constraint_variables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ void UpdateConstraintVariables(const State& state, Constraints& constraints) {
"CalculateConstraintForce", constraints.num,
CalculateConstraintForce{
constraints.type, constraints.target_node_index, constraints.axes, constraints.input,
state.q, constraints.system_residual_terms}
state.q, constraints.system_residual_terms
}
);

Kokkos::parallel_for(
"CalculateConstraintResidualGradient", constraints.num,
CalculateConstraintResidualGradient{
constraints.type, constraints.base_node_index, constraints.target_node_index,
constraints.X0, constraints.axes, constraints.input, state.q, constraints.residual_terms,
constraints.base_gradient_terms, constraints.target_gradient_terms}
constraints.base_gradient_terms, constraints.target_gradient_terms
}
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/step/update_system_variables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ void UpdateSystemVariables(
beams.num_nodes_per_element, beams.num_qps_per_element, beams.shape_interp,
beams.shape_deriv, beams.qp_jacobian, beams.node_u, beams.node_u_dot, beams.node_u_ddot,
beams.qp_x0, beams.qp_r0, 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, beams.qp_x}
beams.qp_u_dot, beams.qp_omega, beams.qp_u_ddot, beams.qp_omega_dot, beams.qp_x
}
);

Kokkos::parallel_for(
Expand Down Expand Up @@ -81,7 +82,8 @@ void UpdateSystemVariables(
beams.qp_Puu,
beams.qp_Quu,
beams.qp_Guu,
beams.qp_Kuu}
beams.qp_Kuu
}
);

AssembleResidualVector(beams);
Expand Down

0 comments on commit 4fb6d8f

Please sign in to comment.