subroutine SideExchange_MappedScalar1D_t(this,mesh)
implicit none
class(MappedScalar1D_t),intent(inout) :: this
type(Mesh1D),intent(inout) :: mesh
! Local
integer :: e1,e2,s1,s2
integer :: ivar
do concurrent(e1=1:mesh%nElem,ivar=1:this%nvar)
if(e1 == 1) then
s1 = 2
e2 = e1+1
s2 = 1
this%extBoundary(s1,e1,ivar) = this%boundary(s2,e2,ivar)
elseif(e1 == mesh%nElem) then
s1 = 1
e2 = e1-1
s2 = 2
this%extBoundary(s1,e1,ivar) = this%boundary(s2,e2,ivar)
else
s1 = 1
e2 = e1-1
s2 = 2
this%extBoundary(s1,e1,ivar) = this%boundary(s2,e2,ivar)
s1 = 2
e2 = e1+1
s2 = 1
this%extBoundary(s1,e1,ivar) = this%boundary(s2,e2,ivar)
endif
enddo
endsubroutine SideExchange_MappedScalar1D_t