programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Print statistical moment

Print statistical moment

This is an example of cs_user_extra_operations which print first calculated statistical moment

Local variables to be added

integer iel
integer imom , ipcmom , idtcm

Body

The body of this example:

if (nbmomt.gt.0) then
imom = 1 ! Moment number
! Position in 'propce' of the array of temporal accumulation for moments,
! propce(iel,ipcmom)
ipcmom = ipproc(icmome(imom))
! The temporal accumulation for moments must be divided by the accumulated
! time, which id an array of size ncel or a single real number:
! - array of size ncel if idtmom(imom) > 0 : propce(iel, idtcm)
! - or simple real if idtmom(imom) < 0 : dtcmom(idtcm)
if (idtmom(imom).gt.0) then
idtcm = ipproc(icdtmo(idtmom(imom)))
do iel = 1, ncel
write(nfecra, 4000) &
iel, propce(iel, ipcmom)/max(propce(iel, idtcm), epzero)
enddo
elseif (idtmom(imom).lt.0) then
idtcm = -idtmom(imom)
do iel = 1, ncel
write(nfecra,4000) &
iel, propce(iel, ipcmom)/max(dtcmom(idtcm), epzero)
enddo
endif
endif