5. Ecriture du calcul dans le te#

On effectue le calcul dans un fichier te en:

  • récupérant les tailles locales et adresses mémoire des champs entrée et sortie par la routine tecach

  • calculant la moyenne par composantes entre les points de Gauss

    subroutine te0336(option, nomte)
!
    implicit none
!
#include "asterfort/tecach.h"
#include "jeveux.h"
!
    character(len=16), intent(in) :: option, nomte
!
    integer :: i, iret, j, ncmp, npg, tabin(7), tabout(7)
!
! --- Retrieving input and output local fields
!
    call tecach('OOO', 'PSIEFR', 'L', iret, nval=7, itab=tabin)
    call tecach('OOO', 'PSIGMER', 'E', iret, nval=7, itab=tabout)
!
! --- Retrieve number of Gauss points and components
!
    ! npg = ...
    ! ncmp = ...
!
! --- Loop over components
    do i = 1, ncmp
        !
        ! --- Loop over Gauss points
        ! ...
        do j = 1, npg
            ! ...
        end do
        ! ...
    end do
!
end subroutine