Write solution%extBoundary on the interface faces of set iset from the ghost traces of the last exchange:
extBoundary(i,j,s,e,v) = ghost(i,j,v,f), v = 1..nvar,
for each interface face f = (e,s) of the set. The partner set must have the same nvar; otherwise this stops with an error. Override it to convert between the variables of different set models (for example acoustic and elastic states). Runs on the host; a GPU override must write the device copy of extBoundary.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(MultiSetModel3D_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | iset |
subroutine FillInterfaceBoundary_MultiSetModel3D_t(this,iset)
!! Write solution%extBoundary on the interface faces of set iset from the ghost
!! traces of the last exchange:
!!
!! extBoundary(i,j,s,e,v) = ghost(i,j,v,f), v = 1..nvar,
!!
!! for each interface face f = (e,s) of the set. The partner set must have the same
!! nvar; otherwise this stops with an error. Override it to convert between the
!! variables of different set models (for example acoustic and elastic states).
!! Runs on the host; a GPU override must write the device copy of extBoundary.
implicit none
class(MultiSetModel3D_t),intent(inout) :: this
integer,intent(in) :: iset
! Local
integer :: f,nvar
nvar = this%sets(iset)%model%nvar
do f = this%iface%setFaceStart(iset),this%iface%setFaceStart(iset+1)-1
if(this%iface%nvarOfSet(this%iface%facePartnerSet(f)) /= nvar) then
print*,__FILE__," : sets ",iset," and ",this%iface%facePartnerSet(f), &
" have different nvar"
error stop "MultiSetModel3D : override FillInterfaceBoundary to couple these sets"
endif
this%sets(iset)%model%solution%extBoundary(:,:,this%iface%faceSide(f), &
this%iface%faceElem(f),1:nvar) = &
this%iface%ghost(:,:,1:nvar,f)
enddo
endsubroutine FillInterfaceBoundary_MultiSetModel3D_t