5. Writing the calculation in the te#

We perform the calculation in a te file by:

  • retrieving the local sizes and memory addresses of the input and output fields by the tecach routine

  • calculating the mean by components between the Gauss points

    subroutine te0336 (option, name)
!
    Implicit none
!
#include "asterfort/tecach.h"
#include "I want to."
!
    character (len=16), intent (in):: option, name
!
    integer:: i, iret, j, ncmp, ncmp, png, tabin (7), tabout (7)
!
! --- Retrieving input and output local fields
!
    call catch ('OOO', 'PSIEFR', '', 'L', iret, nval=7, itab=tabin)
    call catch ('OOO', 'PSIGMER', '', 'E', iret, nval=7, itab=tabout)
!
! --- Retrieve number of Gauss points and components
!
    ! png =...
    ! ncmp =...
!
! --- Loop over components
    Do i = 1, ncmp
        !
        ! --- Loop over Gauss points
        ! ...
        Do j = 1, NPG
            ! ...
        End Do
        ! ...
    End Do
!
End subroutine