| programmer's documentation

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Global efforts

# Global efforts

This is an example of cs_user_extra_operations which computes global efforts

## Local variables to be added

integer ifac
integer ii
integer ilelt , nlelt
double precision xfor(3)
integer, allocatable, dimension(:) :: lstelt

## Body

Example: compute global efforts on a subset of faces. If efforts have been calculated correctly:

if (ineedf.eq.1) then
do ii = 1, ndim
xfor(ii) = 0.d0
enddo
call getfbr('2 or 3', nlelt, lstelt)
!==========
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
do ii = 1, ndim
xfor(ii) = xfor(ii) + forbr(ii, ifac)
enddo
enddo
if (irangp.ge.0) then
call parrsm(ndim,xfor)
endif
endif