Impose boundary conditions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrand_ladvection), | intent(in) | :: | self | Advection field. |
||
real(kind=R_P), | intent(inout) | :: | u(1-self%Ng:) | Conservative variables. |
pure subroutine impose_boundary_conditions(self, u)
!< Impose boundary conditions.
class(integrand_ladvection), intent(in) :: self !< Advection field.
real(R_P), intent(inout) :: u(1-self%Ng:) !< Conservative variables.
integer(I_P) :: i !< Space counter.
do i=1-self%Ng, 0
u(i) = u(self%Ni+i)
enddo
do i=self%Ni+1, self%Ni+self%Ng
u(i) = u(i-self%Ni)
enddo
endsubroutine impose_boundary_conditions