1 line
No EOL
11 KiB
C++
Executable file
1 line
No EOL
11 KiB
C++
Executable file
************************************************************************
|
|
* UNIVERSITE DE BRETAGNE OCCIDENTALE --- I.U.T. DE LORIENT *
|
|
************************************************************************
|
|
* LABORATOIRE DE GENIE MECANIQUE ET PRODUCTIQUE *
|
|
* Tel 97.05.94.11 *
|
|
* Centre de Genie Industriel 56520 GUIDEL-PLAGES *
|
|
************************************************************************
|
|
|
|
|
|
************************************************************************
|
|
* *
|
|
* DATE: Mon Jul 6 14:54:12 WET DST 1992 *
|
|
* $ *
|
|
* AUTEUR: J-P HILY *
|
|
* $ *
|
|
* PROJET: HEREZH *
|
|
* $ *
|
|
************************************************************************
|
|
|
|
|
|
************************************************************************
|
|
* *
|
|
* VERIFICATION: *
|
|
* *
|
|
* ! date ! auteur ! but ! *
|
|
* ------------------------------------------------------------ *
|
|
* ! ! ! ! *
|
|
* *
|
|
* $ *
|
|
* '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' *
|
|
* MODIFICATIONS: *
|
|
* *
|
|
* $ *
|
|
* *
|
|
************************************************************************
|
|
|
|
|
|
************************************************************************
|
|
* *
|
|
SUBROUTINE TETRAEDRE (NBNE,NBI,KSI,ETA,DZETA,WI,PHI,DPHI)
|
|
* $ *
|
|
implicit none
|
|
* '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' *
|
|
* BUT: Interpolation pour un tetraedre. *
|
|
* $ *
|
|
* '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' *
|
|
* VARIABLES: *
|
|
* *
|
|
* ..................................... en entree *
|
|
* *
|
|
integer NBNE ! nombre de noeuds de l'element
|
|
integer NBI ! nombre de pts d'integration
|
|
* *
|
|
* ..................................... en sortie *
|
|
* *
|
|
real*8 KSI(NBI),ETA(NBI),DZETA(NBI)
|
|
! coordonnees des points d'integration
|
|
|
|
real*8 WI(NBI) ! poids d'integration du volume
|
|
|
|
real*8 PHI(NBNE,NBI),DPHI(3,NBNE,NBI)
|
|
! fonctions d'interpolation nodale et leur derivees
|
|
! PHI(r,ni) valeur de la r ieme fonction au point ni
|
|
! DPHI(i,r,ni) valeur de sa derivee suivant i
|
|
* $ *
|
|
* ...................................... internes *
|
|
* *
|
|
integer NI ! numero de points d'integration
|
|
real*8 A,B,C,D,E,R,W
|
|
real*8 LAMBDA
|
|
* *
|
|
************************************************************************
|
|
|
|
|
|
************************************************************************
|
|
* *
|
|
* CORPS DU PROGRAMME: *
|
|
* *
|
|
*----------------------------------------------------------------------*
|
|
|
|
c -------------------------------
|
|
c choix des points d'integrations
|
|
c -------------------------------
|
|
IF (NBI.EQ.1) THEN
|
|
KSI(1)= 1.d0/4.d0
|
|
ETA(1)= KSI(1)
|
|
DZETA(1)= KSI(1)
|
|
WI(1)= 1.d0/6.d0
|
|
|
|
ELSEIF (NBI.EQ.4) THEN
|
|
A= (5.d0-sqrt(5.d0))/20.d0
|
|
B= (5.d0+3*sqrt(5.d0))/20.d0
|
|
KSI(1)= A
|
|
ETA(1)= A
|
|
DZETA(1)= A
|
|
KSI(2)= A
|
|
ETA(2)= A
|
|
DZETA(2)= B
|
|
KSI(3)= A
|
|
ETA(3)= B
|
|
DZETA(3)= A
|
|
KSI(4)= B
|
|
ETA(4)= A
|
|
DZETA(4)= A
|
|
DO NI= 1,NBI
|
|
WI(NI)= 1.d0/24.d0
|
|
END DO
|
|
|
|
ELSEIF (NBI.EQ.5) THEN
|
|
A= 1.d0/4.d0
|
|
B= 1.d0/6.d0
|
|
C= 1.d0/2.d0
|
|
KSI(1)= A
|
|
ETA(1)= A
|
|
DZETA(1)= A
|
|
KSI(2)= B
|
|
ETA(2)= B
|
|
DZETA(2)= B
|
|
KSI(3)= B
|
|
ETA(3)= B
|
|
DZETA(3)= C
|
|
KSI(4)= B
|
|
ETA(4)= C
|
|
DZETA(4)= B
|
|
KSI(5)= C
|
|
ETA(5)= B
|
|
DZETA(5)= B
|
|
WI(1)= -2.d0/15.d0
|
|
DO NI= 2,NBI
|
|
WI(NI)= 3.d0/40.d0
|
|
END DO
|
|
|
|
ELSEIF (NBI.EQ.15) THEN
|
|
A= 1.d0/4.d0
|
|
KSI(1)= A
|
|
ETA(1)= A
|
|
DZETA(1)= A
|
|
WI(1)= 8.d0/405.d0
|
|
R= sqrt(15.d0)
|
|
B= (7.d0+R)/34.d0
|
|
C= (13.d0-3*R)/34.d0
|
|
KSI(2)= B
|
|
ETA(2)= B
|
|
DZETA(2)= B
|
|
KSI(3)= B
|
|
ETA(3)= B
|
|
DZETA(3)= C
|
|
KSI(4)= B
|
|
ETA(4)= C
|
|
DZETA(4)= B
|
|
KSI(5)= C
|
|
ETA(5)= B
|
|
DZETA(5)= B
|
|
W= (2665.d0-14*R)/226800
|
|
DO NI= 2,5
|
|
WI(NI)= W
|
|
END DO
|
|
B= (7.d0-R)/34.d0
|
|
C= (13.d0+3*R)/34.d0
|
|
KSI(6)= B
|
|
ETA(6)= B
|
|
DZETA(6)= B
|
|
KSI(7)= B
|
|
ETA(7)= B
|
|
DZETA(7)= C
|
|
KSI(8)= B
|
|
ETA(8)= C
|
|
DZETA(8)= B
|
|
KSI(9)= C
|
|
ETA(9)= B
|
|
DZETA(9)= B
|
|
W= (2665.d0+14*R)/226800
|
|
DO NI= 6,9
|
|
WI(NI)= W
|
|
END DO
|
|
D= (5.d0-R)/20.d0
|
|
E= (5.d0+R)/20.d0
|
|
KSI(10)= D
|
|
ETA(10)= D
|
|
DZETA(10)= E
|
|
KSI(11)= D
|
|
ETA(11)= E
|
|
DZETA(11)= D
|
|
KSI(12)= E
|
|
ETA(12)= D
|
|
DZETA(12)= D
|
|
KSI(13)= D
|
|
ETA(13)= E
|
|
DZETA(13)= E
|
|
KSI(14)= E
|
|
ETA(14)= D
|
|
DZETA(14)= E
|
|
KSI(15)= E
|
|
ETA(15)= E
|
|
DZETA(15)= D
|
|
W= 5.d0/567
|
|
DO NI= 10,NBI
|
|
WI(NI)= W
|
|
END DO
|
|
ELSE
|
|
WRITE(*,*) 'TETRAEDRE: NBI=',NBI,' ***cas non implante'
|
|
STOP
|
|
END IF
|
|
|
|
|
|
c ------------------------------------
|
|
c valeur des fonctions d'interpolation
|
|
c ------------------------------------
|
|
c -----------------------------------------------------
|
|
c ----------------- cas lineaire ----------------------
|
|
c -----------------------------------------------------
|
|
IF (NBNE.EQ.4) THEN
|
|
DO NI= 1,NBI
|
|
c ---------------------
|
|
c valeurs des fonctions
|
|
c ---------------------
|
|
PHI(1,NI)= 1.d0 -KSI(NI) -ETA(NI) -DZETA(NI)
|
|
PHI(2,NI)= KSI(NI)
|
|
PHI(3,NI)= ETA(NI)
|
|
PHI(4,NI)= DZETA(NI)
|
|
c --------------------------------
|
|
c valeurs des derivees suivant KSI
|
|
c --------------------------------
|
|
DPHI(1,1,NI)= -1.d0
|
|
DPHI(1,2,NI)= 1.d0
|
|
DPHI(1,3,NI)= 0.d0
|
|
DPHI(1,4,NI)= 0.d0
|
|
c --------------------------------
|
|
c valeurs des derivees suivant ETA
|
|
c --------------------------------
|
|
DPHI(2,1,NI)= -1.d0
|
|
DPHI(2,2,NI)= 0.d0
|
|
DPHI(2,3,NI)= 1.d0
|
|
DPHI(2,4,NI)= 0.d0
|
|
c ----------------------------------
|
|
c valeurs des derivees suivant DZETA
|
|
c ----------------------------------
|
|
DPHI(3,1,NI)= -1.d0
|
|
DPHI(3,2,NI)= 0.d0
|
|
DPHI(3,3,NI)= 0.d0
|
|
DPHI(3,4,NI)= 1.d0
|
|
END DO
|
|
|
|
c -----------------------------------------------------
|
|
c ----------------- cas quadratique -------------------
|
|
c -----------------------------------------------------
|
|
ELSEIF (NBNE.EQ.10) THEN
|
|
DO NI= 1,NBI
|
|
LAMBDA= 1.d0 -KSI(NI) -ETA(NI) -DZETA(NI)
|
|
c ---------------------
|
|
c valeurs des fonctions
|
|
c ---------------------
|
|
PHI(1,NI)= -LAMBDA*(1.d0-2.d0*LAMBDA)
|
|
PHI(2,NI)= -KSI(NI)*(1.d0-2.d0*KSI(NI))
|
|
PHI(3,NI)= -ETA(NI)*(1.d0-2.d0*ETA(NI))
|
|
PHI(4,NI)= -DZETA(NI)*(1.d0-2.d0*DZETA(NI))
|
|
PHI(5,NI)= 4.d0*KSI(NI)*LAMBDA
|
|
PHI(6,NI)= 4.d0*KSI(NI)*ETA(NI)
|
|
PHI(7,NI)= 4.d0*ETA(NI)*LAMBDA
|
|
PHI(8,NI)= 4.d0*DZETA(NI)*LAMBDA
|
|
PHI(9,NI)= 4.d0*KSI(NI)*DZETA(NI)
|
|
PHI(10,NI)= 4.d0*ETA(NI)*DZETA(NI)
|
|
c --------------------------------
|
|
c valeurs des derivees suivant KSI
|
|
c --------------------------------
|
|
DPHI(1,1,NI)= 1.d0-4.d0*LAMBDA
|
|
DPHI(1,2,NI)= -1.d0+4.d0*KSI(NI)
|
|
DPHI(1,3,NI)= 0.d0
|
|
DPHI(1,4,NI)= 0.d0
|
|
DPHI(1,5,NI)= 4.d0*(LAMBDA-KSI(NI))
|
|
DPHI(1,6,NI)= 4.d0*ETA(NI)
|
|
DPHI(1,7,NI)= -4.d0*ETA(NI)
|
|
DPHI(1,8,NI)= -4.d0*DZETA(NI)
|
|
DPHI(1,9,NI)= 4.d0*DZETA(NI)
|
|
DPHI(1,10,NI)= 0.d0
|
|
c --------------------------------
|
|
c valeurs des derivees suivant ETA
|
|
c --------------------------------
|
|
DPHI(2,1,NI)= 1.d0-4.d0*LAMBDA
|
|
DPHI(2,2,NI)= 0.d0
|
|
DPHI(2,3,NI)= -1.d0+4.d0*ETA(NI)
|
|
DPHI(2,4,NI)= 0.d0
|
|
DPHI(2,5,NI)= -4.d0*KSI(NI)
|
|
DPHI(2,6,NI)= 4.d0*KSI(NI)
|
|
DPHI(2,7,NI)= 4.d0*(LAMBDA-ETA(NI))
|
|
DPHI(2,8,NI)= -4.d0*DZETA(NI)
|
|
DPHI(2,9,NI)= 0.d0
|
|
DPHI(2,10,NI)= 4.d0*DZETA(NI)
|
|
c ----------------------------------
|
|
c valeurs des derivees suivant DZETA
|
|
c ----------------------------------
|
|
DPHI(3,1,NI)= 1.d0-4.d0*LAMBDA
|
|
DPHI(3,2,NI)= 0.d0
|
|
DPHI(3,3,NI)= 0.d0
|
|
DPHI(3,4,NI)= -1.d0+4.d0*DZETA(NI)
|
|
DPHI(3,5,NI)= -4.d0*KSI(NI)
|
|
DPHI(3,6,NI)= 0.d0
|
|
DPHI(3,7,NI)= -4.d0*ETA(NI)
|
|
DPHI(3,8,NI)= 4.d0*(LAMBDA-DZETA(NI))
|
|
DPHI(3,9,NI)= 4.d0*KSI(NI)
|
|
DPHI(3,10,NI)= 4.d0*ETA(NI)
|
|
END DO
|
|
|
|
ELSE
|
|
WRITE(*,*) 'TETRAEDRE: NBNE=',NBNE,' ***cas non implante'
|
|
STOP
|
|
END IF
|
|
|
|
END
|