OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_exch_output_noda_pext.F
Go to the documentation of this file.
1!Copyright> OpenRadioss
2!Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3!Copyright>
4!Copyright> This program is free software: you can redistribute it and/or modify
5!Copyright> it under the terms of the GNU Affero General Public License as published by
6!Copyright> the Free Software Foundation, either version 3 of the License, or
7!Copyright> (at your option) any later version.
8!Copyright>
9!Copyright> This program is distributed in the hope that it will be useful,
10!Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11!Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12!Copyright> GNU Affero General Public License for more details.
13!Copyright>
14!Copyright> You should have received a copy of the GNU Affero General Public License
15!Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16!Copyright>
17!Copyright>
18!Copyright> Commercial Alternative: Altair Radioss Software
19!Copyright>
20!Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21!Copyright> software under a commercial license. Contact Altair to discuss further if the
22!Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| spmd_exch_output_noda_pext_mod ../engine/source/mpi/output/spmd_exch_output_noda_pext.F
25!||--- called by ------------------------------------------------------
26!|| sortie_main ../engine/source/output/sortie_main.F
27!||====================================================================
29 contains
30! ======================================================================================================================
31! procedures
32! ======================================================================================================================
33!! \brief spmd exchange between domain which have comon nodes
34!! \details
35!||====================================================================
36!|| spmd_exch_output_noda_pext ../engine/source/mpi/output/spmd_exch_output_noda_pext.F
37!||--- called by ------------------------------------------------------
38!|| sortie_main ../engine/source/output/sortie_main.F
39!||--- calls -----------------------------------------------------
40!|| spmd_exch_nodarea ../engine/source/mpi/anim/spmd_exch_nodarea.F
41!|| spmd_gather_nodal_scalar ../engine/source/mpi/nodes/spmd_gather_nodal_scalar.F
42!||--- uses -----------------------------------------------------
43!|| constant_mod ../common_source/modules/constant_mod.F
44!|| nodal_arrays_mod ../common_source/modules/nodal_arrays.F90
45!|| output_mod ../common_source/modules/output/output_mod.F90
46!|| spmd_gather_nodal_scalar_mod ../engine/source/mpi/nodes/spmd_gather_nodal_scalar.F
47!|| th_mod ../engine/share/modules/th_mod.F
48!||====================================================================
49 SUBROUTINE spmd_exch_output_noda_pext(NSPMD, NODES, NUMNOD, NUMNODG,
50 . TRIGGER_TH,
51 . TRIGGER_ANIM,
52 . TRIGGER_H3D)
53! ----------------------------------------------------------------------------------------------------------------------
54! Modules
55! ----------------------------------------------------------------------------------------------------------------------
56 use th_mod , only : th_has_noda_pext
57 use nodal_arrays_mod , only : nodal_arrays_
58 use constant_mod , only : zero
59 use output_mod , only : noda_pext_g, noda_surf_g
60 use output_mod , only : noda_pext, noda_surf
61 use output_mod , only : anim_has_noda_pext, h3d_has_noda_pext
63! ----------------------------------------------------------------------------------------------------------------------
64! Implicit none
65! ----------------------------------------------------------------------------------------------------------------------
66 implicit none
67! ----------------------------------------------------------------------------------------------------------------------
68! Arguments
69! ----------------------------------------------------------------------------------------------------------------------
70 LOGICAL,INTENT(IN) :: TRIGGER_ANIM
71 LOGICAL,INTENT(IN) :: TRIGGER_H3D
72 LOGICAL,INTENT(IN) :: TRIGGER_TH
73 INTEGER,INTENT(IN) :: NSPMD
74 INTEGER,INTENT(IN) :: NUMNOD
75 INTEGER,INTENT(IN) :: NUMNODG
76 TYPE(nodal_arrays_), INTENT(IN) :: NODES
77! ----------------------------------------------------------------------------------------------------------------------
78! Local variables
79! ----------------------------------------------------------------------------------------------------------------------
80 INTEGER :: LENR
81! ----------------------------------------------------------------------------------------------------------------------
82! Body
83! ----------------------------------------------------------------------------------------------------------------------
84 IF(th_has_noda_pext > 0 .OR. anim_has_noda_pext > 0 .OR. h3d_has_noda_pext > 0 )THEN
85 IF(trigger_anim .OR. trigger_th .OR. trigger_h3d)THEN
86 IF(nspmd > 1)THEN
87 lenr = nodes%BOUNDARY_ADD(1,nspmd+1)-nodes%BOUNDARY_ADD(1,1)
88 !exchange between domains which have common nodes
89 CALL spmd_exch_nodarea(noda_pext, nodes%BOUNDARY_ADD, nodes%BOUNDARY, lenr, nodes%WEIGHT)
90 CALL spmd_exch_nodarea(noda_surf, nodes%BOUNDARY_ADD, nodes%BOUNDARY, lenr, nodes%WEIGHT)
91 !send everything to node 0 in global array (ANIM)
92 IF(anim_has_noda_pext > 0)THEN
93 CALL spmd_gather_nodal_scalar(noda_pext_g, numnodg, noda_pext, numnod, nodes%WEIGHT, nodes%NODGLOB) !NODGLOB :id_loc -> id_glob
94 CALL spmd_gather_nodal_scalar(noda_surf_g, numnodg, noda_surf, numnod, nodes%WEIGHT, nodes%NODGLOB)
95 END IF
96 ELSE
97 IF(anim_has_noda_pext > 0)THEN
98 !in this case numnodg = numnod
99 noda_pext_g(1:numnod) = noda_pext(1:numnod)
100 noda_surf_g(1:numnod) = noda_surf(1:numnod)
101 END IF
102 ENDIF
103 ENDIF
104 ENDIF
105 END SUBROUTINE spmd_exch_output_noda_pext
106! ----------------------------------------------------------------------------------------------------------------------
subroutine spmd_exch_output_noda_pext(nspmd, nodes, numnod, numnodg, trigger_th, trigger_anim, trigger_h3d)
subroutine spmd_gather_nodal_scalar(v_glob, num, v, numnod, weight, nodglob)
integer th_has_noda_pext
Definition th_mod.F:121
subroutine spmd_exch_nodarea(nodarea, iad_elem, fr_elem, lenr, weight)