Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions modules/beamdyn/src/BeamDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2662,21 +2662,22 @@ SUBROUTINE BD_QPData_mEta_rho( p, m )
do nelem = 1, p%elem_total
qp_start = (nelem-1)*p%nqp
do idx_qp = 1, p%nqp
call Calc_RR0mEta_rho(m%qp%RR0(:,:,idx_qp,nelem), &
call Calc_RR0mEta_rho(p%qp%mEta(:,idx_qp,nelem), &
m%qp%RR0(:,:,idx_qp,nelem), &
p%Mass0_QP(:,:,qp_start+idx_qp), &
m%qp%RR0mEta(:,idx_qp,nelem), &
m%qp%rho(:,:,idx_qp,nelem))
end do
end do

contains
subroutine Calc_RR0mEta_rho(RR0, Mass0, RR0mEta, rho)
real(BDKi), intent(in) :: RR0(:,:), Mass0(:,:)
subroutine Calc_RR0mEta_rho(mEta, RR0, Mass0, RR0mEta, rho)
real(BDKi), intent(in) :: mEta(:), RR0(:,:), Mass0(:,:)
real(BDKi), intent(out) :: RR0mEta(:), rho(:,:)

!> Calculate the new center of mass times mass at the deflected location
!! as \f$ \left(\underline{\underline{R}}\underline{\underline{R}}_0\right) m \underline{\eta} \f$
m%qp%RR0mEta(:,idx_qp,nelem) = MATMUL(RR0, p%qp%mEta(:,idx_qp,nelem))
RR0mEta(:) = MATMUL(RR0, mEta)

!> Calculate \f$ \rho = \left(\underline{\underline{R}}\underline{\underline{R}}_0\right)
!! \underline{\underline{M}}_{2,2}
Expand Down