calculatevol.F [SRC] [CPP] [JOB] [SCAN] TOOLS / PREDATAS / GENERIC

```   1 | include(dom.inc)
2 |
3 |       SUBROUTINE calculatevol(ndim,eltype,nnodes,nodescoor,normlist,vol)
4 |
5 | !       ================================================================!
6 | !                                                                       !
7 | !       calculatevol.F : Calculates the volume of any given cell        !
8 | !                                                                       !
9 | !       in             : The number of dimensions 'ndim'                !
10 | !                        The element type 'eltype'                      !
11 | !                        The number of nodes of the cell 'nnodes'       !
12 | !                        The list of the coordinates 'nodescoor'        !
13 | !                        The list of the reduced normals at each node   !
14 | !                        'normlist'                                     !
15 | !       out            : The volume of the cell 'vol'                   !
16 | !                                                                       !
17 | !       author         : J. AMAYA (avril 2007)                          !
18 | !                                                                       !
19 | !       ================================================================!
20 |
21 |         IMPLICIT NONE
22 |
23 |         INCLUDE 'dom_constants.h'
24 |
25 | !       IN
26 |         DOM_INT  :: ndim, nnodes, eltype
27 |         DOM_REAL :: nodescoor(ndim,nnodes)
28 |         DOM_REAL :: normlist(ndim,nnodes)
29 |
30 | !       OUT
31 |         DOM_REAL :: vol
32 |
33 | !       LOCAL
34 |         DOM_INT  :: i, j
35 |
36 |         vol = 0.0d0
37 |
38 |         DO i=1,nnodes
39 |           DO j=1, ndim
40 |             vol = vol + nodescoor(j,i)*normlist(j,i)
41 |           ENDDO
42 |         ENDDO
43 |
44 |         vol = vol / (ndim*ndim)
45 |
46 | !       ------------------------------!
47 | !       Volume correction coefficient !
48 | !       ------------------------------!
49 |
50 |         IF (eltype.eq.EL_HEXA) THEN
51 |           vol = vol * 0.75d0
52 |         ENDIF
53 |
54 |       END SUBROUTINE calculatevol
```

calculatevol.F could be called by:
 addcell.F [TOOLS/PREDATAS/DATAS] - 216 addcell.F_bup [TOOLS/PREDATAS/DATAS] - 212 Makefile [TOOLS/PREDATAS] - 83