OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
daaacc.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| daaacc ../engine/source/fluid/daaacc.F
25!||--- called by ------------------------------------------------------
26!|| flow1 ../engine/source/fluid/flow1.F
27!||--- calls -----------------------------------------------------
28!|| spmd_fl_sum ../engine/source/mpi/generic/spmd_fl_sum.F
29!||====================================================================
30 SUBROUTINE daaacc(NDIM, NNO, NEL, IFLOW, IBUF, ELEM, IBUFL, CNP, A, NORMAL, ACCF)
31C-----------------------------------------------
32C I m p l i c i t T y p e s
33C-----------------------------------------------
34#include "implicit_f.inc"
35C-----------------------------------------------
36C C o m m o n B l o c k s
37C-----------------------------------------------
38#include "com01_c.inc"
39C-----------------------------------------------
40C D u m m y A r g u m e n t s
41C-----------------------------------------------
42 INTEGER NDIM, NNO, NEL, IFLOW(*), IBUF(*), ELEM(NDIM,*), IBUFL(*), CNP(*)
43 my_real a(3,*), normal(3,*), accf(nel)
44C-----------------------------------------------
45C L o c a l V a r i a b l e s
46C-----------------------------------------------
47 INTEGER I, K, N, N1, N2, N3, N4
48 INTEGER II, JJ, KK, JFORM, NNO_L, LENBUF
49 my_real ax, ay, az, wi(4,2), pm1
50 my_real al(3,nno)
51 my_real, ALLOCATABLE :: sbuf(:), rbuf(:)
52C
53 jform = iflow(4)
54C Accelerations locales SPMD
55 IF (nspmd == 1) THEN
56 DO i=1,nno
57 ii=ibuf(i)
58 al(1,i)=a(1,ii)
59 al(2,i)=a(2,ii)
60 al(3,i)=a(3,ii)
61 ENDDO
62 ELSE
63 nno_l = iflow(16)
64 lenbuf=3*nno
65 ALLOCATE(sbuf(lenbuf), rbuf(lenbuf))
66 sbuf(1:lenbuf)=zero
67 rbuf(1:lenbuf)=zero
68 DO i=1,nno_l
69 ii=ibufl(i)
70 jj=ibuf(ii)
71 kk=3*(ii-1)
72 sbuf(kk+1)=a(1,jj)/cnp(ii)
73 sbuf(kk+2)=a(2,jj)/cnp(ii)
74 sbuf(kk+3)=a(3,jj)/cnp(ii)
75 ENDDO
76
77 CALL spmd_fl_sum(sbuf, lenbuf, rbuf)
78
79 DO i=1,nno
80 k=3*(i-1)
81 al(1,i)=rbuf(k+1)
82 al(2,i)=rbuf(k+2)
83 al(3,i)=rbuf(k+3)
84 ENDDO
85 DEALLOCATE(sbuf, rbuf)
86 ENDIF
87
88 IF(jform == 1) THEN
89 DO i = 1,nel
90 n1 = elem(1,i)
91 n2 = elem(2,i)
92 n3 = elem(3,i)
93 ax = third * (al(1,n1) + al(1,n2) + al(1,n3))
94 ay = third * (al(2,n1) + al(2,n2) + al(2,n3))
95 az = third * (al(3,n1) + al(3,n2) + al(3,n3))
96 accf(i) = ax*normal(1,i)+ay*normal(2,i)+az*normal(3,i)
97 ENDDO
98 ELSEIF(jform == 2) THEN
99 wi(1,1)=fourth
100 wi(2,1)=fourth
101 wi(3,1)=fourth
102 wi(4,1)=fourth
103 wi(1,2)=third
104 wi(2,2)=third
105 wi(3,2)=one_over_6
106 wi(4,2)=one_over_6
107 DO i = 1,nel
108 n1 = elem(1,i)
109 n2 = elem(2,i)
110 n3 = elem(3,i)
111 n4 = elem(4,i)
112 k = elem(5,i)
113 ax = wi(1,k)*al(1,n1)+wi(2,k)*al(1,n2)+wi(3,k)*al(1,n3)+wi(4,k)*al(1,n4)
114 ay = wi(1,k)*al(2,n1)+wi(2,k)*al(2,n2)+wi(3,k)*al(2,n3)+wi(4,k)*al(2,n4)
115 az = wi(1,k)*al(3,n1)+wi(2,k)*al(3,n2)+wi(3,k)*al(3,n3)+wi(4,k)*al(3,n4)
116 accf(i) = ax*normal(1,i)+ay*normal(2,i)+az*normal(3,i)
117 ENDDO
118 ENDIF
119C
120 RETURN
121 END
122
#define my_real
Definition cppsort.cpp:32
subroutine daaacc(ndim, nno, nel, iflow, ibuf, elem, ibufl, cnp, a, normal, accf)
Definition daaacc.F:31
subroutine spmd_fl_sum(lsum, len, lsumt)
Definition spmd_fl_sum.F:37