From 7dfcc480ba1e19bd3232349fc733caef94034292 Mon Sep 17 00:00:00 2001 From: stainer_t Date: Mon, 8 Sep 2025 13:48:49 +0200 Subject: Initial commit from Polytechnique Montreal --- Trivac/src/FLDTH2.f | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100755 Trivac/src/FLDTH2.f (limited to 'Trivac/src/FLDTH2.f') diff --git a/Trivac/src/FLDTH2.f b/Trivac/src/FLDTH2.f new file mode 100755 index 0000000..f90b0be --- /dev/null +++ b/Trivac/src/FLDTH2.f @@ -0,0 +1,80 @@ +*DECK FLDTH2 + SUBROUTINE FLDTH2 (ISPLH,NEL,NUN,EVECT,MAT,VOL,IDL,KN) +* +*----------------------------------------------------------------------- +* +*Purpose: +* Calculation of the averaged flux with a linear Lagrangian finite +* element or mesh corner finite difference method in hexagonal geometry. +* +*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 +* ISPLH type of hexagonal mesh-splitting: =1 for complete hexagons; +* =2 for triangular mesh-splitting. +* NEL total number of finite elements. +* NUN total number of unknowns per energy group. +* EVECT variational coefficients of the flux. The information is +* contained in position EVECT(1) to EVECT(LL4) where LL4 is +* the order of the system matrices. +* MAT mixture index assigned to each element. +* VOL volume of each element. +* IDL position of the average flux component associated with each +* volume. +* KN element-ordered unknown list. +* +*Parameters: output +* EVECT averaged fluxes. The information is contained in positions +* EVECT(IDL(I)). +* +*----------------------------------------------------------------------- +* +*---- +* SUBROUTINE ARGUMENTS +*---- + INTEGER ISPLH,NEL,NUN,MAT(NEL),IDL(NEL),KN(14*NEL) + REAL EVECT(NUN),VOL(NEL) +*---- +* LOCAL VARIABLES +*---- + REAL TH(14) + SAVE TH + DATA TH/3*0.055555555556,0.166666666667,6*0.055555555556, + 1 0.166666666667,3*0.055555555556/ +* + NUM1=0 + IF(ISPLH.EQ.1) THEN + SS=1.0/12.0 + DO 40 K=1,NEL + IF(MAT(K).EQ.0) GO TO 40 + EVECT(IDL(K))=0.0 + IF(VOL(K).EQ.0.0) GO TO 30 + DO 20 I=1,12 + IND1=KN(NUM1+I) + IF(IND1.EQ.0) GO TO 20 + EVECT(IDL(K))=EVECT(IDL(K))+SS*EVECT(IND1) + 20 CONTINUE + 30 NUM1=NUM1+12 + 40 CONTINUE + ELSE IF(ISPLH.EQ.2) THEN + DO 70 K=1,NEL + IF(MAT(K).EQ.0) GO TO 70 + EVECT(IDL(K))=0.0 + IF(VOL(K).EQ.0.0) GO TO 60 + DO 50 I=1,14 + IND1=KN(NUM1+I) + IF(IND1.EQ.0) GO TO 50 + EVECT(IDL(K))=EVECT(IDL(K))+TH(I)*EVECT(IND1) + 50 CONTINUE + 60 NUM1=NUM1+14 + 70 CONTINUE + ENDIF + RETURN + END -- cgit v1.2.3