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)
double precision, dimension(:,:), pointer :: bfprp_for
integer, allocatable, dimension(:) :: lstelt
Body
Example: compute global efforts on a subset of faces. If efforts have been calculated correctly:
if (iforbr.ge.0) 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) + bfprp_for(ii, ifac)
enddo
enddo
if (irangp.ge.0) then
call parrsm(ndim,xfor)
endif
endif