Skip to content

Commit

Permalink
Sliding/Mortars
Browse files Browse the repository at this point in the history
  • Loading branch information
HatemKsr committed Jun 29, 2024
1 parent fda0c35 commit 19ffbc0
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 42 deletions.
72 changes: 36 additions & 36 deletions Solver/src/libs/mesh/FaceClass.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1012,23 +1012,23 @@ subroutine Face_ProjectMortarFluxToElements(self, nEqn, whichElements, fma, flux
select case (fma%Mortarpos)
case (1)

Mout(:,:,1)=(TsetM(fma % NfLeft(1), fma % Nf(1), 1, 2) % T)
Mout(:,:,2)=(TsetM(fma % NfLeft(1), fma % Nf(1), 1, 2) % T)
Mout(:,:,1)=(TsetM(fma % Nf(1), fma % NfLeft(1), 1, 2) % T)
Mout(:,:,2)=(TsetM(fma % Nf(2), fma % NfLeft(2), 1, 2) % T)
!write(*,*) 'mortar1 1 out', Mout(:,:,1)
!write(*,*) 'mortar1 2 out', Mout(:,:,2)
case (2)
Mout(:,:,1)=(TsetM(fma % NfLeft(1), fma % Nf(1), 2, 2) % T)
Mout(:,:,2)=(TsetM(fma % NfLeft(1), fma % Nf(1), 1, 2) % T)
Mout(:,:,1)=(TsetM(fma % Nf(1), fma % NfLeft(1), 2, 2) % T)
Mout(:,:,2)=(TsetM(fma % Nf(2), fma % NfLeft(2), 1, 2) % T)
!write(*,*) 'mortar2 1 out', Mout(:,:,1)
!write(*,*) 'mortar2 2 out', Mout(:,:,2)
case (3)
Mout(:,:,1)=(TsetM(fma % NfLeft(1), fma % Nf(1), 1, 2) % T)
Mout(:,:,2)=(TsetM(fma % NfLeft(1), fma % Nf(1), 2, 2) % T)
Mout(:,:,1)=(TsetM(fma % Nf(1), fma % NfLeft(1), 1, 2) % T)
Mout(:,:,2)=(TsetM(fma % Nf(2), fma % NfLeft(2), 2, 2) % T)
! write(*,*) 'mortar3 1 out', Mout(:,:,1)
!write(*,*) 'mortar3 2 out', Mout(:,:,2)
case (4)
Mout(:,:,1)=(TsetM(fma % NfLeft(1), fma % Nf(1), 2, 2) % T)
Mout(:,:,2)=(TsetM(fma % NfLeft(1), fma % Nf(1), 2, 2) % T)
Mout(:,:,1)=(TsetM(fma % Nf(1), fma % NfLeft(1), 2, 2) % T)
Mout(:,:,2)=(TsetM(fma % Nf(2), fma % NfLeft(2), 2, 2) % T)
! write(*,*) 'mortar4 1 out', Mout(:,:,1)
! write(*,*) 'mortar4 2 out', Mout(:,:,2)
end select
Expand Down Expand Up @@ -1430,17 +1430,17 @@ subroutine Face_ProjectMortarGradientFluxToElements(self, nEqn, fma, Hflux, whic

select case (fma%Mortarpos)
case (1)
Mout(:,:,1)=(TsetM(fma % NfLeft(1), fma % Nf(1), 1, 2) % T)
Mout(:,:,2)=(TsetM(fma % NfLeft(1), fma % Nf(1), 1, 2) % T)
Mout(:,:,1)=(TsetM(fma % Nf(1), fma % NfLeft(1), 1, 2) % T)
Mout(:,:,2)=(TsetM(fma % Nf(2), fma % NfLeft(2), 1, 2) % T)
case (2)
Mout(:,:,1)=(TsetM(fma % NfLeft(1), fma % Nf(1), 2, 2) % T)
Mout(:,:,2)=(TsetM(fma % NfLeft(1), fma % Nf(1), 1, 2) % T)
Mout(:,:,1)=(TsetM(fma % Nf(1), fma % NfLeft(1), 2, 2) % T)
Mout(:,:,2)=(TsetM(fma % Nf(2), fma % NfLeft(2), 1, 2) % T)
case (3)
Mout(:,:,1)=(TsetM(fma % NfLeft(1), fma % Nf(1), 1, 2) % T)
Mout(:,:,2)=(TsetM(fma % NfLeft(1), fma % Nf(1), 2, 2) % T)
Mout(:,:,1)=(TsetM(fma % Nf(1), fma % NfLeft(1), 1, 2) % T)
Mout(:,:,2)=(TsetM(fma % Nf(2), fma % NfLeft(2), 2, 2) % T)
case (4)
Mout(:,:,1)=(TsetM(fma % NfLeft(1), fma % Nf(1), 2, 2) % T)
Mout(:,:,2)=(TsetM(fma % NfLeft(1), fma % Nf(1), 2, 2) % T)
Mout(:,:,1)=(TsetM(fma % Nf(1), fma % NfLeft(1), 2, 2) % T)
Mout(:,:,2)=(TsetM(fma % Nf(2), fma % NfLeft(2), 2, 2) % T)
end select

hStarAux = 0.0_RP
Expand Down Expand Up @@ -1480,16 +1480,16 @@ subroutine Face_Interpolatebig2small(self, nEqn, fma, grad)
select case (fma%Mortarpos)
case (1)
MInt(:,:,1)=(TsetM(fma % NfLeft(1), fma % Nf(1), 1, 1) % T)
MInt(:,:,2)=(TsetM(fma % NfLeft(1), fma % Nf(1), 1, 1) % T)
MInt(:,:,2)=(TsetM(fma % NfLeft(2), fma % Nf(2), 1, 1) % T)
case (2)
MInt(:,:,1)=(TsetM(fma % NfLeft(1), fma % Nf(1), 2, 1) % T)
MInt(:,:,2)=(TsetM(fma % NfLeft(1), fma % Nf(1), 1, 1) % T)
MInt(:,:,2)=(TsetM(fma % NfLeft(), fma % Nf(2), 1, 1) % T)
case (3)
MInt(:,:,1)=(TsetM(fma % NfLeft(1), fma % Nf(1), 1, 1) % T)
MInt(:,:,2)=(TsetM(fma % NfLeft(1), fma % Nf(1), 2, 1) % T)
MInt(:,:,2)=(TsetM(fma % NfLeft(2), fma % Nf(2), 2, 1) % T)
case (4)
MInt(:,:,1)=(TsetM(fma % NfLeft(1), fma % Nf(1), 2, 1) % T)
MInt(:,:,2)=(TsetM(fma % NfLeft(1), fma % Nf(1), 2, 1) % T)
MInt(:,:,2)=(TsetM(fma % NfLeft(2), fma % Nf(2), 2, 1) % T)
end select
if (present(grad)) then
select case(grad)
Expand Down Expand Up @@ -1567,17 +1567,17 @@ SUBROUTINE Face_Interpolatesmall2big(self, nEqn, flux_M)

select case (self%Mortarpos)
case (1)
Mout(:,:,1)=(TsetM(self % NfLeft(1), self % Nf(1), 1, 2) % T)
Mout(:,:,2)=(TsetM(self % NfLeft(1), self % Nf(1), 1, 2) % T)
Mout(:,:,1)=(TsetM(self % Nf(1), self % NfLeft(1), 1, 2) % T)
Mout(:,:,2)=(TsetM(self % Nf(2), self % NfLeft(2), 1, 2) % T)
case (2)
Mout(:,:,1)=(TsetM(self % NfLeft(1), self % Nf(1), 2, 2) % T)
Mout(:,:,2)=(TsetM(self % NfLeft(1), self % Nf(1), 1, 2) % T)
Mout(:,:,1)=(TsetM(self % Nf(1), self % NfLeft(1), 2, 2) % T)
Mout(:,:,2)=(TsetM(self % Nf(2), self % NfLeft(2), 1, 2) % T)
case (3)
Mout(:,:,1)=(TsetM(self % NfLeft(1), self % Nf(1), 1, 2) % T)
Mout(:,:,2)=(TsetM(self % NfLeft(1), self % Nf(1), 2, 2) % T)
Mout(:,:,1)=(TsetM(self % Nf(1), self % NfLeft(1), 1, 2) % T)
Mout(:,:,2)=(TsetM(self % Nf(2), self % NfLeft(2), 2, 2) % T)
case (4)
Mout(:,:,1)=(TsetM(self % NfLeft(1), self % Nf(1), 2, 2) % T)
Mout(:,:,2)=(TsetM(self % NfLeft(1), self % Nf(1), 2, 2) % T)
Mout(:,:,1)=(TsetM(self % Nf(1), self % NfLeft(1), 2, 2) % T)
Mout(:,:,2)=(TsetM(self % Nf(2), self % NfLeft(2), 2, 2) % T)
end select

fStarAux(1:nEqn,:,:) = 0.0_RP
Expand Down Expand Up @@ -1617,17 +1617,17 @@ SUBROUTINE Face_Interpolatesmall2biggrad(self, nEqn, Hflux)

select case (self%Mortarpos)
case (1)
Mout(:,:,1)=(TsetM(self % NfLeft(1), self % Nf(1), 1, 2) % T)
Mout(:,:,2)=(TsetM(self % NfLeft(1), self % Nf(1), 1, 2) % T)
Mout(:,:,1)=(TsetM(self % Nf(1), self % NfLeft(1), 1, 2) % T)
Mout(:,:,2)=(TsetM(self % Nf(2), self % NfLeft(2), 1, 2) % T)
case (2)
Mout(:,:,1)=(TsetM(self % NfLeft(1), self % Nf(1), 2, 2) % T)
Mout(:,:,2)=(TsetM(self % NfLeft(1), self % Nf(1), 1, 2) % T)
Mout(:,:,1)=(TsetM(self % Nf(1), self % NfLeft(1), 2, 2) % T)
Mout(:,:,2)=(TsetM(self % Nf(2), self % NfLeft(2), 1, 2) % T)
case (3)
Mout(:,:,1)=(TsetM(self % NfLeft(1), self % Nf(1), 1, 2) % T)
Mout(:,:,2)=(TsetM(self % NfLeft(1), self % Nf(1), 2, 2) % T)
Mout(:,:,1)=(TsetM(self % Nf(1), self % NfLeft(1), 1, 2) % T)
Mout(:,:,2)=(TsetM(self % Nf(2), self % NfLeft(2), 2, 2) % T)
case (4)
Mout(:,:,1)=(TsetM(self % NfLeft(1), self % Nf(1), 2, 2) % T)
Mout(:,:,2)=(TsetM(self % NfLeft(1), self % Nf(1), 2, 2) % T)
Mout(:,:,1)=(TsetM(self % Nf(1), self % NfLeft(1), 2, 2) % T)
Mout(:,:,2)=(TsetM(self % Nf(2), self % NfLeft(2), 2, 2) % T)
end select


Expand Down
2 changes: 1 addition & 1 deletion Solver/src/libs/mesh/HexElementClass.f90
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Module ElementClass
! Main hex-element type
! ---------------------
TYPE Element
integer :: MortarFaces(6) !0=Conforming; 1=Master; 2= Slave, 3=Master_sliding; 2= Slave_sliding
integer :: MortarFaces(6) !0=Conforming; 1=Master; 2= Slave, 3=Master_sliding; 4= Slave_sliding
real(kind=RP) :: Psvv
logical :: hasSharedFaces
integer :: dir2D
Expand Down
2 changes: 1 addition & 1 deletion Solver/src/libs/mesh/MappedGeometry.f90
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ subroutine ConstructMappedGeometryFace(self, Nf, Nelf, Nel, Nel3D, spAf, spAe, g
! Perform h/p-Adaption if it's a sliding mesh
! ------------------------------------------

if (sliding==.TRUE.) then
if (sliding) then
allocate(xx(NDIM, 0:Nf(1), 0:Nf(2)))
xx= self % x
self % x = 0.0_RP
Expand Down
8 changes: 4 additions & 4 deletions Solver/src/libs/mesh/Read_HDF5Mesh_HOPR.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1141,12 +1141,12 @@ subroutine modify_mesh(self, nodes)
end do
end do
!destruct the faces
do l=1, self% numberOfFaces
call self % faces(l) % DestructFace
end do
!do l=1, self% numberOfFaces
! call self % faces(l) % DestructFace
!end do

deallocate(self % faces )
self% numberOfFaces=numberOfFaces
self% numberOfFaces=new_nFaces
allocate (self % faces (self% numberOfFaces))

!CALL SetElementBoundaryNames( self % elements(l), names )
Expand Down

0 comments on commit 19ffbc0

Please sign in to comment.