Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into feature/sgbc
Browse files Browse the repository at this point in the history
  • Loading branch information
lmdiazangulo committed Dec 21, 2024
2 parents e630e8d + 57a3833 commit d3a3832
Show file tree
Hide file tree
Showing 10 changed files with 100 additions and 54 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ endif()
add_definitions(
-DCompileWithInt2
-DCompileWithReal4
-DCompileWithOpenMP
-DCompileWithOpenMP
)

include("${CMAKE_CURRENT_SOURCE_DIR}/set_precompiled_libraries.cmake")
Expand Down
8 changes: 8 additions & 0 deletions src_main_pub/fdetypes.F90
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,14 @@ module FDETYPES
INTEGER (KIND=4) :: Or !to include possible orientations (nodal sources 180915)
end type

type tagnumber_t
integer (KIND=IKINDMTAG) , allocatable , dimension(:,:,:) :: x, y, z
end type

type taglist_t
type (tagnumber_t) :: edge, face
end type

!
type bounds_t
type (limit_t) :: sggMiEx,sggMiEy,sggMiEz,sggMiHx,sggMiHy,sggMiHz
Expand Down
42 changes: 30 additions & 12 deletions src_main_pub/healer.F90
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ SUBROUTINE CreateVolumeMM (layoutnumber, Mtag, numertag, MMiEx, MMiEy, MMiEz, MM
! Outputs : M(field)%Mediamatrix(i,j,k) = type of medium indicemedio set for all the fields at each voxel centered at i,j,k
! (usual convention)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
SUBROUTINE CreateSurfaceMM (layoutnumber, Mtag, numertag, MMiEx, MMiEy, MMiEz, MMiHx, &
SUBROUTINE CreateSurfaceMM (layoutnumber, Mtag, tags, numertag, MMiEx, MMiEy, MMiEz, MMiHx, &
& MMiHy, MMiHz, &
& Alloc_iEx_XI, Alloc_iEx_XE, Alloc_iEx_YI, Alloc_iEx_YE, Alloc_iEx_ZI, Alloc_iEx_ZE, &
& Alloc_iEy_XI, Alloc_iEy_XE, Alloc_iEy_YI, Alloc_iEy_YE, Alloc_iEy_ZI, Alloc_iEy_ZE, &
Expand All @@ -283,8 +283,9 @@ SUBROUTINE CreateSurfaceMM (layoutnumber, Mtag, numertag, MMiEx, MMiEy, MMiEz, M
& Alloc_iEy_XE, Alloc_iEy_YI, Alloc_iEy_YE, Alloc_iEy_ZI, Alloc_iEy_ZE, Alloc_iEz_XI, Alloc_iEz_XE, Alloc_iEz_YI, &
& Alloc_iEz_YE, Alloc_iEz_ZI, Alloc_iEz_ZE, Alloc_iHx_XI, Alloc_iHx_XE, Alloc_iHx_YI, Alloc_iHx_YE, Alloc_iHx_ZI, &
& Alloc_iHx_ZE, Alloc_iHy_XI, Alloc_iHy_XE, Alloc_iHy_YI, Alloc_iHy_YE, Alloc_iHy_ZI, Alloc_iHy_ZE, Alloc_iHz_XI, &
& Alloc_iHz_XE, Alloc_iHz_YI, Alloc_iHz_YE, Alloc_iHz_ZI, Alloc_iHz_ZE
& Alloc_iHz_XE, Alloc_iHz_YI , Alloc_iHz_YE, Alloc_iHz_ZI, Alloc_iHz_ZE
!
type(taglist_t) :: tags
INTEGER (KIND=IKINDMTAG) numertag
INTEGER (KIND=IKINDMTAG ) :: Mtag (Alloc_iHx_XI:Alloc_iHx_XE, Alloc_iHy_YI:Alloc_iHy_YE, Alloc_iHz_ZI:Alloc_iHz_ZE)
INTEGER (KIND=INTEGERSIZEOFMEDIAMATRICES) :: MMiEx (Alloc_iEx_XI:Alloc_iEx_XE, Alloc_iEx_YI:Alloc_iEx_YE, Alloc_iEx_ZI:Alloc_iEx_ZE)
Expand All @@ -294,8 +295,7 @@ SUBROUTINE CreateSurfaceMM (layoutnumber, Mtag, numertag, MMiEx, MMiEy, MMiEz, M
INTEGER (KIND=INTEGERSIZEOFMEDIAMATRICES) :: MMiHy (Alloc_iHy_XI:Alloc_iHy_XE, Alloc_iHy_YI:Alloc_iHy_YE, Alloc_iHy_ZI:Alloc_iHy_ZE)
INTEGER (KIND=INTEGERSIZEOFMEDIAMATRICES) :: MMiHz (Alloc_iHz_XI:Alloc_iHz_XE, Alloc_iHz_YI:Alloc_iHz_YE, Alloc_iHz_ZI:Alloc_iHz_ZE)
med(indicemedio)%Is%Surface = .TRUE.
!
!

call SortInitEndWithIncreasingOrder(point)
!
punto%XI = Max (point%XI, Min(BoundingBox%XI, BoundingBox%XE))
Expand Down Expand Up @@ -323,7 +323,9 @@ SUBROUTINE CreateSurfaceMM (layoutnumber, Mtag, numertag, MMiEx, MMiEy, MMiEz, M
DO k = punto%ZI, puntoPlus1%ZE
medio = MMiEy (i, j, k)
IF (med(indicemedio)%Priority > med(medio)%Priority) THEN
MMiEy (i, j, k) = indicemedio; Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,1);
MMiEy (i, j, k) = indicemedio;
Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,1);
tags%edge%y(i,j,k) = 64*numertag
ELSE IF ((med(indicemedio)%Priority == med(medio)%Priority) .AND. (medio /= indicemedio)) THEN
CALL AddToShared (iEy, i, j, k, indicemedio, medio, Eshared)
END IF
Expand All @@ -333,7 +335,9 @@ SUBROUTINE CreateSurfaceMM (layoutnumber, Mtag, numertag, MMiEx, MMiEy, MMiEz, M
DO k = punto%ZI, punto%ZE
medio = MMiEz (i, j, k)
IF (med(indicemedio)%Priority > med(medio)%Priority) THEN
MMiEz (i, j, k) = indicemedio; Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,2);
MMiEz (i, j, k) = indicemedio;
Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,2);
tags%edge%z(i,j,k) = 64*numertag
ELSE IF ((med(indicemedio)%Priority == med(medio)%Priority) .AND. (medio /= indicemedio)) THEN
CALL AddToShared (iEz, i, j, k, indicemedio, medio, Eshared)
END IF
Expand All @@ -344,7 +348,9 @@ SUBROUTINE CreateSurfaceMM (layoutnumber, Mtag, numertag, MMiEx, MMiEy, MMiEz, M
medio = MMiHx (i, j, k)
! IF (medio /= 0) THEN !ojo esto estaba antes de 031016 y daba maxima prioridad al medio 0 PEC. Ahora puedo tener medios con mas prioridad!!! !?!? cambio agresivo 031016!!!
IF (med(indicemedio)%Priority >= med(medio)%Priority) then
MMiHx (i, j, k) = indicemedio; Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,3);
MMiHx (i, j, k) = indicemedio;
Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,3);
tags%face%x(i,j,k) = 64*numertag
endif
! END IF
END DO
Expand All @@ -359,7 +365,9 @@ SUBROUTINE CreateSurfaceMM (layoutnumber, Mtag, numertag, MMiEx, MMiEy, MMiEz, M
DO k = punto%ZI, punto%ZE
medio = MMiEz (i, j, k)
IF (med(indicemedio)%Priority > med(medio)%Priority) THEN
MMiEz (i, j, k) = indicemedio; Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,2);
MMiEz (i, j, k) = indicemedio;
Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,2);
tags%edge%z(i,j,k) = 64*numertag
ELSE IF ((med(indicemedio)%Priority == med(medio)%Priority) .AND. (medio /= indicemedio)) THEN
CALL AddToShared (iEz, i, j, k, indicemedio, medio, Eshared)
END IF
Expand All @@ -369,7 +377,9 @@ SUBROUTINE CreateSurfaceMM (layoutnumber, Mtag, numertag, MMiEx, MMiEy, MMiEz, M
DO k = punto%ZI, puntoPlus1%ZE
medio = MMiEx (i, j, k)
IF (med(indicemedio)%Priority > med(medio)%Priority) THEN
MMiEx (i, j, k) = indicemedio; Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,0);
MMiEx (i, j, k) = indicemedio;
Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,0);
tags%edge%x(i,j,k) = 64*numertag
ELSE IF ((med(indicemedio)%Priority == med(medio)%Priority) .AND. (medio /= indicemedio)) THEN
CALL AddToShared (iEx, i, j, k, indicemedio, medio, Eshared)
END IF
Expand All @@ -380,7 +390,9 @@ SUBROUTINE CreateSurfaceMM (layoutnumber, Mtag, numertag, MMiEx, MMiEy, MMiEz, M
medio = MMiHy (i, j, k)
! IF (medio /= 0) THEN !ojo esto estaba antes de 031016 y daba maxima prioridad al medio 0 PEC. Ahora puedo tener medios con mas prioridad!!! !?!? cambio agresivo 031016!!!
IF (med(indicemedio)%Priority >= med(medio)%Priority) then
MMiHy (i, j, k) = indicemedio; Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,4);;
MMiHy (i, j, k) = indicemedio;
Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,4);;
tags%face%y(i,j,k) = 64*numertag
endif
! END IF
END DO
Expand All @@ -395,7 +407,9 @@ SUBROUTINE CreateSurfaceMM (layoutnumber, Mtag, numertag, MMiEx, MMiEy, MMiEz, M
DO j = punto%YI, puntoPlus1%YE
medio = MMiEx (i, j, k)
IF (med(indicemedio)%Priority > med(medio)%Priority) THEN
MMiEx (i, j, k) = indicemedio; Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,0);
MMiEx (i, j, k) = indicemedio;
Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,0);
tags%edge%x(i,j,k) = 64*numertag
ELSE IF ((med(indicemedio)%Priority == med(medio)%Priority) .AND. (medio /= indicemedio)) THEN
CALL AddToShared (iEx, i, j, k, indicemedio, medio, Eshared)
END IF
Expand All @@ -406,6 +420,7 @@ SUBROUTINE CreateSurfaceMM (layoutnumber, Mtag, numertag, MMiEx, MMiEy, MMiEz, M
medio = MMiEy (i, j, k)
IF (med(indicemedio)%Priority > med(medio)%Priority) THEN
MMiEy (i, j, k) = indicemedio; Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,1);
tags%edge%y(i,j,k) = 64*numertag
ELSE IF ((med(indicemedio)%Priority == med(medio)%Priority) .AND. (medio /= indicemedio)) THEN
CALL AddToShared (iEy, i, j, k, indicemedio, medio, Eshared)
END IF
Expand All @@ -416,7 +431,10 @@ SUBROUTINE CreateSurfaceMM (layoutnumber, Mtag, numertag, MMiEx, MMiEy, MMiEz, M
medio = MMiHz (i, j, k)
! IF (medio /= 0) THEN !ojo esto estaba antes de 031016 y daba maxima prioridad al medio 0 PEC. Ahora puedo tener medios con mas prioridad!!! !?!? cambio agresivo 031016!!!
IF (med(indicemedio)%Priority >= med(medio)%Priority) then
MMiHz (i, j, k) = indicemedio; Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,5);
MMiHz (i, j, k) = indicemedio;
Mtag(i,j,k)=64*numertag ! if (.true..or.(Mtag(i,j,k)==0).or.(int(Mtag(i,j,k)/64) == numertag)) Mtag(i,j,k) = IBSET(64*numertag,5);
tags%face%z(i,j,k) = 64*numertag

endif
! END IF
END DO
Expand Down
4 changes: 0 additions & 4 deletions src_main_pub/interpreta_switches.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2154,10 +2154,6 @@ subroutine default_flags(l)
!!! l%run_with_abrezanjas = .true. !OJO 0323 A VECES DA ERROR. PONER A FALSE SI SUCEDE
l%run_with_abrezanjas = .false. !OJO 0323 A VECES DA ERROR. PONER A FALSE SI SUCEDE
!!!!l%run_with_abrezanjas = .false.
if (.NOT.l%input_conformal_flag) then
l%conformal_file_input_name = char(0)
l%input_conformal_flag = .true.
end if
#else
l%run_with_abrezanjas = .false.
#endif
Expand Down
Loading

0 comments on commit d3a3832

Please sign in to comment.