OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
int18_law151_omp_accumulation.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!|| int18_law151_omp_accumulation ../engine/source/interfaces/int18/int18_law151_omp_accumulation.F
25!||--- called by ------------------------------------------------------
26!|| resol ../engine/source/engine/resol.F
27!||--- uses -----------------------------------------------------
28!|| message_mod ../engine/share/message_module/message_mod.F
29!|| multi_fvm_mod ../common_source/modules/ale/multi_fvm_mod.F90
30!|| tri7box ../engine/share/modules/tri7box.f
31!||====================================================================
32 SUBROUTINE int18_law151_omp_accumulation( MULTI_FVM )
33!$COMMENT
34! INT18_LAW151_OMP_ACCUMULATION description
35! accumulation of force for remote nodes on the
36! main OpenMP thread
37! only useful when OMP_NUM_THREADS > 1
38!
39! INT18_LAW151_OMP_ACCUMULATION organization :
40! loop over the NTHREADS OpenMP task + NODFI phantom nodes
41! & accumulation in the 1rst memory cell
42!$ENDCOMMENT
43C-----------------------------------------------
44C M o d u l e s
45C-----------------------------------------------
46 USE tri7box
47 USE message_mod
48 USE multi_fvm_mod
49C-----------------------------------------------
50C I m p l i c i t T y p e s
51C-----------------------------------------------
52#include "implicit_f.inc"
53#include "comlock.inc"
54C-----------------------------------------------
55C C o m m o n B l o c k s
56C-----------------------------------------------
57#include "task_c.inc"
58C-----------------------------------------------
59C D u m m y A r g u m e n t s
60C-----------------------------------------------
61 TYPE(multi_fvm_struct), INTENT(INOUT) :: MULTI_FVM
62C-----------------------------------------------
63C L o c a l V a r i a b l e s
64C-----------------------------------------------
65 INTEGER :: J,N,NN
66 INTEGER :: NODFI,SHIFT_FORCE_INT
67! -----------------------------------
68 IF(nthread > 1) THEN
69 DO nn=1,multi_fvm%NUMBER_INT18
70 n = multi_fvm%INT18_LIST(nn)
71 nodfi = multi_fvm%R_AFI(n)%NODFI
72 DO j=2,nthread
73 shift_force_int = (j-1)*nodfi
74 multi_fvm%R_AFI(n)%R_FORCE_INT(1:3,1:6,1:nodfi) =
75 . multi_fvm%R_AFI(n)%R_FORCE_INT(1:3,1:6,1:nodfi)
76 . + multi_fvm%R_AFI(n)%R_FORCE_INT(1:3,1:6,1+shift_force_int:nodfi+shift_force_int)
77 multi_fvm%R_AFI(n)%R_FORCE_INT(1:3,1:6,1+shift_force_int:nodfi+shift_force_int) = 0.d+00
78 ENDDO
79 ENDDO
80 ENDIF
81
82 RETURN
subroutine int18_law151_omp_accumulation(multi_fvm)