Get the field update for this cells data Note still need to reduce across other cells in this supercell.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(cell_type), | intent(inout) | :: | self | |||
complex, | intent(in), | dimension(self%ncol) | :: | fq | ||
complex, | intent(in), | dimension(self%ncol) | :: | fqa | ||
complex, | intent(in), | dimension(self%ncol) | :: | fqp |
subroutine c_get_field_update(self,fq,fqa,fqp)
use run_parameters, only: has_phi, has_apar, has_bpar
implicit none
class(cell_type), intent(inout) :: self
complex, dimension(self%ncol), intent(in) :: fq,fqa,fqp
integer :: ifq
!If we don't have any data then exit
if(self%is_empty) return
!First do the multiplication at rowblock level
ifq=0
if(has_phi) then
ifq=ifq+1
call self%mv_mult_rb(fq,ifq)
endif
if(has_apar) then
ifq=ifq+1
call self%mv_mult_rb(fqa,ifq)
endif
if(has_bpar) then
ifq=ifq+1
call self%mv_mult_rb(fqp,ifq)
endif
!Now store at cell level
self%tmp_sum=0
do ifq=1,self%nrb
self%tmp_sum(self%rb(ifq)%row_llim:self%rb(ifq)%row_ulim)=&
self%tmp_sum(self%rb(ifq)%row_llim:self%rb(ifq)%row_ulim)&
-self%rb(ifq)%tmp_sum
enddo
end subroutine c_get_field_update