Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ObserverClass) | :: | self | ||||
class(HexMesh), | intent(in) | :: | mesh | |||
integer, | intent(in) | :: | bufferPosition | |||
logical, | intent(in) | :: | isSolid | |||
real(kind=RP), | intent(in) | :: | tsource |
Subroutine ObserverUpdateOneStep(self, mesh, BufferPosition, isSolid, tsource) implicit none class (ObserverClass) :: self class (HexMesh), intent(in) :: mesh integer,intent(in) :: bufferPosition logical, intent(in) :: isSolid real(kind=RP), intent(in) :: tsource ! local variables real(kind=RP) :: tobserver integer :: i integer, dimension(self%numberOfFaces) :: nDiscard ! store the solution of each pair at the last position, by not giving the bufferPosition call self % update(mesh, isSolid, interpolate=.TRUE.) ! interpolate the solution of each pair at first position ! and save the time of each pair at its last position tobserver = tsource + self % tDelay !$omp parallel shared(self) !$omp do schedule(runtime) do i = 1, self % numberOfFaces if (self % sourcePair(i) % tDelay .eq. self % tDelay) cycle call self % sourcePair(i) % interpolateSolS(tobserver, tsource) end do !$omp end do !$omp end parallel ! sum all the pair solution and save it at bufferPosition of the observer sol nDiscard = 0 call self % sumIntegrals(nDiscard, 1, bufferPosition, bufferPosition) ! update the solution of each pair and its times for next iteration !$omp parallel shared(self) !$omp do schedule(runtime) do i = 1, self % numberOfFaces call self % sourcePair(i) % updateOneStep() end do !$omp end do !$omp end parallel End Subroutine ObserverUpdateOneStep