summaryrefslogtreecommitdiff
path: root/Dragon/src/LIBNOT.f
diff options
context:
space:
mode:
authorstainer_t <thomas.stainer@oecd-nea.org>2025-09-08 13:48:49 +0200
committerstainer_t <thomas.stainer@oecd-nea.org>2025-09-08 13:48:49 +0200
commit7dfcc480ba1e19bd3232349fc733caef94034292 (patch)
tree03ee104eb8846d5cc1a981d267687a729185d3f3 /Dragon/src/LIBNOT.f
Initial commit from Polytechnique Montreal
Diffstat (limited to 'Dragon/src/LIBNOT.f')
-rw-r--r--Dragon/src/LIBNOT.f140
1 files changed, 140 insertions, 0 deletions
diff --git a/Dragon/src/LIBNOT.f b/Dragon/src/LIBNOT.f
new file mode 100644
index 0000000..6ac7da0
--- /dev/null
+++ b/Dragon/src/LIBNOT.f
@@ -0,0 +1,140 @@
+*DECK LIBNOT
+ SUBROUTINE LIBNOT (IPLIB,NGRO,NL,NDIL,NED,NDEL,IMPX,LSCAT,LSIGF,
+ 1 LADD,DILUT,FLUX,TOTAL,SIGF,SIGS,SCAT,SADD,ZDEL,HVECT)
+*
+*-----------------------------------------------------------------------
+*
+*Purpose:
+* Write the incremental x-s data on a temperature-independant Draglib.
+*
+*Copyright:
+* Copyright (C) 2002 Ecole Polytechnique de Montreal
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2.1 of the License, or (at your option) any later version
+*
+*Author(s): A. Hebert
+*
+*Parameters: input
+* IPLIB pointer to the internal library (L_LIBRARY signature).
+* NGRO number of energy groups.
+* NL number of Legendre orders required in the calculation
+* (NL=1 or higher).
+* NDIL number of finite dilutions.
+* NED number of extra vector edits.
+* NDEL number of delayed neutron precursor groups.
+* IMPX print flag.
+* LSCAT Legendre flag (=.true. if a given Legendre order of the
+* scattering cross section exists).
+* LSIGF fission flag (=.true. if the isotope can fission).
+* LADD additional xs flag (=.true. if a given additional cross
+* section exists).
+* DILUT dilutions.
+* FLUX weighting flux.
+* TOTAL total cross sections.
+* SIGF nu*fission cross sections.
+* SIGS diffusion cross sections.
+* SCAT scattering transfer matrices (sec,prim,Legendre,dilution).
+* SADD additional cross sections.
+* ZDEL delayed nu-sigf cross sections.
+* HVECT names of the extra vector edits.
+*
+*-----------------------------------------------------------------------
+*
+ USE GANLIB
+*----
+* SUBROUTINE ARGUMENTS
+*----
+ TYPE(C_PTR) IPLIB
+ INTEGER NGRO,NL,NDIL,NED,NDEL,IMPX
+ REAL DILUT(NDIL+1),FLUX(NGRO,NDIL+1),TOTAL(NGRO,NDIL+1),
+ 1 SIGF(NGRO,NDIL+1),SIGS(NGRO,NL,NDIL+1),SCAT(NGRO,NGRO,NL,NDIL+1),
+ 2 SADD(NGRO,NED,NDIL+1),ZDEL(NGRO,NDEL,NDIL+1)
+ LOGICAL LSIGF,LSCAT(NL),LADD(NED)
+ CHARACTER HVECT(NED)*8
+*----
+* LOCAL VARIABLES
+*----
+ CHARACTER TEXT12*12,CD*4
+ INTEGER, ALLOCATABLE, DIMENSION(:) :: ITYPRO
+ REAL, ALLOCATABLE, DIMENSION(:) :: GAS
+ REAL, ALLOCATABLE, DIMENSION(:,:) :: GA1
+ REAL, ALLOCATABLE, DIMENSION(:,:,:) :: GA2
+*----
+* SCRATCH STORAGE ALLOCATION
+*----
+ ALLOCATE(ITYPRO(NL))
+ ALLOCATE(GAS(NGRO),GA1(NGRO,NL),GA2(NGRO,NGRO,NL))
+*
+ CALL LCMPUT(IPLIB,'DILUTION',NDIL,2,DILUT)
+ DO 130 IDIL=1,NDIL
+ WRITE (CD,'(I4.4)') IDIL
+ CALL LCMSIX(IPLIB,'SUBMAT'//CD,1)
+ DO 10 IG1=1,NGRO
+ GAS(IG1)=FLUX(IG1,IDIL)-1.0
+ 10 CONTINUE
+ CALL LCMPUT(IPLIB,'NWT0',NGRO,2,GAS)
+ DO 20 IG1=1,NGRO
+ GAS(IG1)=TOTAL(IG1,IDIL)*FLUX(IG1,IDIL)-TOTAL(IG1,NDIL+1)
+ 20 CONTINUE
+ CALL LC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