summaryrefslogtreecommitdiff
path: root/Dragon/src
diff options
context:
space:
mode:
authorHEBERT Alain <alain.hebert@polymtl.ca>2025-10-26 06:09:46 -0400
committerHEBERT Alain <alain.hebert@polymtl.ca>2025-10-26 06:09:46 -0400
commitbb19a602772d4fe89f5fa2e534b93237330fd89f (patch)
tree7e0c68faf0ab9c65ec1ec4e8115325e314864a3f /Dragon/src
parent5321198af9510e29be2b6a5a3245314e1b5c27cb (diff)
parente2cfb58950594a3ad6f9ee3f66f97ac3ce11711e (diff)
Merge branch '8-correct-sfr-geometry-issues-in-module-salt' into 'main'
Resolve "Correct SFR geometry issues in module SALT:" See merge request dragon/5.1!17
Diffstat (limited to 'Dragon/src')
-rw-r--r--Dragon/src/MUSACG.f902
-rw-r--r--Dragon/src/g2s_g2mc.f9017
-rw-r--r--Dragon/src/g2s_g2s.f9017
-rw-r--r--Dragon/src/g2s_nodes.f907
-rw-r--r--Dragon/src/g2s_segArc.f9026
5 files changed, 37 insertions, 32 deletions
diff --git a/Dragon/src/MUSACG.f90 b/Dragon/src/MUSACG.f90
index 3d560e4..95d6a3a 100644
--- a/Dragon/src/MUSACG.f90
+++ b/Dragon/src/MUSACG.f90
@@ -427,7 +427,7 @@ SUBROUTINE MUSACG(ITRACK,IFTRK,IPRINT,IMACRO,NBSLIN,RCUTOF,GG,LGINF,NBNODE_MACRO
& GG_MAC%IDATA_BC2)
ITBC=0
IF(GG_MAC%NBBCDA>0)THEN
- DO I=1,GG%NBBCDA
+ DO I=1,GG_MAC%NBBCDA
ITBC=ITBC+1
TYPE=GG_MAC%BCDATAREAD(I)%SALTYPE
IF(TYPE.NE.0) CALL XABORT('MUSACG: TYPE=0 EXPECTED.')
diff --git a/Dragon/src/g2s_g2mc.f90 b/Dragon/src/g2s_g2mc.f90
index 4bfddfa..2b016e7 100644
--- a/Dragon/src/g2s_g2mc.f90
+++ b/Dragon/src/g2s_g2mc.f90
@@ -53,14 +53,14 @@ subroutine G2MC(NENTRY,HENTRY,IENTRY,JENTRY,KENTRY)
type(c_ptr) :: ipGeo,ipGeo_1
integer :: ipMC,ipSal,ipPs,sizeB,sizeP,sizeSA,nbNode,nbCLP,nbFlux,indic, &
- & nitma,impx
+ & nitma,impx,drawMix
real :: flott
double precision :: dflott
integer :: lgMaxGig=0
integer,dimension(10) :: datain
integer,allocatable,dimension(:) :: merg,imacro
character(len=12) :: text12
- logical :: drawNod,drawMix,lmacro
+ logical :: lmacro
real,dimension(2) :: zoomx,zoomy
ipGeo_1=c_null_ptr ! no geometry read
@@ -110,8 +110,7 @@ subroutine G2MC(NENTRY,HENTRY,IENTRY,JENTRY,KENTRY)
end if
!
impx=1
- drawNod = .false.
- drawMix = .false.
+ drawMix = 0
zoomx = (/ 0.0, 1.0 /)
zoomy = (/ 0.0, 1.0 /)
typgeo=0
@@ -124,11 +123,11 @@ subroutine G2MC(NENTRY,HENTRY,IENTRY,JENTRY,KENTRY)
call REDGET(indic,impx,flott,text12,dflott)
if (indic /= 1) call XABORT('G2MC: integer data expected.')
else if (text12 == 'DRAWNOD') then
- drawNod=.true.
- drawmix=.true.
+ drawMix=1
else if (text12 == 'DRAWMIX') then
- drawNod=.true.
- drawmix=.false.
+ drawMix=2
+ else if (text12 == 'DRAWELEM') then
+ drawMix=3
else if (text12 == 'ZOOMX') then
call REDGET(indic,nitma,zoomx(1),text12,dflott)
if (indic /= 2) call XABORT('G2S: real data expected(1).')
@@ -206,7 +205,7 @@ subroutine G2MC(NENTRY,HENTRY,IENTRY,JENTRY,KENTRY)
deallocate(merg)
!impression des segArc charges
- if (ipPs /= -1) call drawSegArc(ipPs,sizeSA,drawMix,drawNod,zoomx,zoomy)
+ if (ipPs /= -1) call drawSegArc(ipPs,sizeSA,drawMix,zoomx,zoomy)
!creation du fichier de commande Monte-Carlo
if (index(HENTRY(1),'.tp')/=0) then
diff --git a/Dragon/src/g2s_g2s.f90 b/Dragon/src/g2s_g2s.f90
index 19494f3..f64dba9 100644
--- a/Dragon/src/g2s_g2s.f90
+++ b/Dragon/src/g2s_g2s.f90
@@ -53,9 +53,9 @@ subroutine G2S(NENTRY,HENTRY,IENTRY,JENTRY,KENTRY)
type(c_ptr) :: ipGeo,ipGeo_1
integer :: sizeB,sizeP,sizeSA,nbNode,nbCLP,nbFlux,nbMacro,ipSal,ipPs,ipAl, &
- ipZa,indic,nitma,impx
+ ipZa,indic,nitma,impx,drawMix
character(len=12) :: text12
- logical :: drawNod,drawMix,lmacro
+ logical :: lmacro
real,dimension(2) :: zoomx,zoomy
integer,allocatable,dimension(:) :: gig,merg,imacro
integer,dimension(10) :: datain
@@ -133,8 +133,7 @@ subroutine G2S(NENTRY,HENTRY,IENTRY,JENTRY,KENTRY)
end if
impx=1
- drawNod = .false.
- drawMix = .false.
+ drawMix = 0
zoomx = (/ 0.0, 1.0 /)
zoomy = (/ 0.0, 1.0 /)
typgeo=0
@@ -147,11 +146,11 @@ subroutine G2S(NENTRY,HENTRY,IENTRY,JENTRY,KENTRY)
call REDGET(indic,impx,flott,text12,dflott)
if (indic /= 1) call XABORT('G2S: integer data expected(1).')
else if (text12 == 'DRAWNOD') then
- drawNod=.true.
- drawmix=.true.
+ drawMix=1
else if (text12 == 'DRAWMIX') then
- drawNod=.true.
- drawmix=.false.
+ drawMix=2
+ else if (text12 == 'DRAWELEM') then
+ drawMix=3
else if (text12 == 'ZOOMX') then
call REDGET(indic,nitma,zoomx(1),text12,dflott)
if (indic /= 2) call XABORT('G2S: real data expected(1).')
@@ -248,7 +247,7 @@ subroutine G2S(NENTRY,HENTRY,IENTRY,JENTRY,KENTRY)
endif
!impression des segArc charges
- if (ipPs /= -1) call drawSegArc(ipPs,sizeSA,drawMix,drawNod,zoomx,zoomy)
+ if (ipPs /= -1) call drawSegArc(ipPs,sizeSA,drawMix,zoomx,zoomy)
if (c_associated(ipGeo_1)) then
!creation du fichier de commande SAL
diff --git a/Dragon/src/g2s_nodes.f90 b/Dragon/src/g2s_nodes.f90
index 4d3bb19..17111b1 100644
--- a/Dragon/src/g2s_nodes.f90
+++ b/Dragon/src/g2s_nodes.f90
@@ -405,7 +405,6 @@ contains
! correction of plain CAR2D bug by Alain Hebert (May 2016)
integer :: nbFile
logical :: isOpen
- logical,parameter :: drawMix = .true.
real,parameter,dimension(2) :: zoomx = (/ 0.0, 1.0 /) ! no x zoom on postscript plot
real,parameter,dimension(2) :: zoomy = (/ 0.0, 1.0 /) ! no y zoom on postscript plot
@@ -425,14 +424,14 @@ contains
nbFile = nbFile + 1
inquire(nbFile,opened=isOpen)
if(isOpen) cycle
- open(nbFile,file='errorMix.ps')
+ open(nbFile,file='errorMix.eps')
exit
enddo
- call drawSegArc(nbFile,szSA,.false.,drawMix,zoomx,zoomy)
+ call drawSegArc(nbFile,szSA,2,zoomx,zoomy)
close(nbFile)
write(*,*) 'i,j,mixAv,mixAp : ',i,j,mixAv,mixAp
call XABORT("G2S: internal problem for mix values. See the file &
- &errorMix.ps")
+ &errorMix.eps")
endif
! CS-IV : fin de la mise en commentaires de Alain
indNodeAv=getNodeAv(i,j) ; indNodeAp=getNodeAp(i,j)
diff --git a/Dragon/src/g2s_segArc.f90 b/Dragon/src/g2s_segArc.f90
index f323f6a..8748695 100644
--- a/Dragon/src/g2s_segArc.f90
+++ b/Dragon/src/g2s_segArc.f90
@@ -1216,9 +1216,8 @@ contains
.or.(isEqualConst(cx,ex).and.isEqualConst(cy,ey)) )
end function giveExtremalsAngles
- subroutine drawSegArc(fileNbr,szSA,withNodes,drawMix,zoomx,zoomy)
- integer,intent(in) :: fileNbr,szSA
- logical,intent(in) :: withNodes,drawMix
+ subroutine drawSegArc(fileNbr,szSA,drawMix,zoomx,zoomy)
+ integer,intent(in) :: fileNbr,szSA,drawMix
real,intent(in) :: zoomx(2),zoomy(2)
type(t_segArc) :: sa
@@ -1269,23 +1268,29 @@ contains
call line(sa%x,sa%y,sa%dx,sa%dy)
cx=real((sa%dx+sa%x)*0.5d0) ; cy=real((sa%dy+sa%y)*0.5d0)
angl = real(calculeAngle(sa%x,sa%y,sa%dx,sa%dy)*rad2deg-90.d0)
- if (withNodes .and. drawMix) then
+ if (drawMix==1) then
call keknum(cx,cy,tailleNbr,real(sa%nodeg),angl,-1,2)
call keknum(cx,cy,tailleNbr,real(sa%noded),angl,-1,0)
- else if (drawMix) then
+ else if (drawMix==2) then
call keknum(cx,cy,tailleNbr,real(sa%neutronicMixg),angl,-1,2)
call keknum(cx,cy,tailleNbr,real(sa%neutronicMixd),angl,-1,0)
+ else if (drawMix==3) then
+ call keknum(cx,cy,tailleNbr,real(i),angl,-1,2)
+ call keknum(cx,cy,tailleNbr,real(i),angl,-1,0)
end if
else if (sa%typ==tcer) then
call arc(sa%x,sa%y,sa%r,0.d0,180.d0)
call arc(sa%x,sa%y,sa%r,180.d0,360.d0)
cx=real(sa%x+sa%r) ; cy=real(sa%y)
- if (withNodes .and. drawMix) then
+ if (drawMix==1) then
call keknum(cx,cy,tailleNbr,real(sa%nodeg),0.,-1,2)
call keknum(cx,cy,tailleNbr,real(sa%noded),0.,-1,0)
- else if (drawMix) then
+ else if (drawMix==2) then
call keknum(cx,cy,tailleNbr,real(sa%neutronicMixg),0.,-1,2)
call keknum(cx,cy,tailleNbr,real(sa%neutronicMixd),0.,-1,0)
+ else if (drawMix==3) then
+ call keknum(cx,cy,tailleNbr,real(i),0.,-1,2)
+ call keknum(cx,cy,tailleNbr,real(i),0.,-1,0)
end if
else
call arc(sa%x,sa%y,sa%r,sa%a*rad2deg,sa%b*rad2deg)
@@ -1296,12 +1301,15 @@ contains
end if
cx=real(sa%x+cos(angl)*sa%r) ; cy=real(sa%y+sin(angl)*sa%r)
angl=real(angl*rad2deg)
- if (withNodes .and. drawMix) then
+ if (drawMix==1) then
call keknum(cx,cy,tailleNbr,real(sa%nodeg),angl,-1,2)
call keknum(cx,cy,tailleNbr,real(sa%noded),angl,-1,0)
- else if (drawMix) then
+ else if (drawMix==2) then
call keknum(cx,cy,tailleNbr,real(sa%neutronicMixg),angl,-1,2)
call keknum(cx,cy,tailleNbr,real(sa%neutronicMixd),angl,-1,0)
+ else if (drawMix==3) then
+ call keknum(cx,cy,tailleNbr,real(i),angl,-1,2)
+ call keknum(cx,cy,tailleNbr,real(i),angl,-1,0)
end if
end if
end do