OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_exch_output_noda_pext.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!|| 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 common 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(OUTPUT, 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 : output_
61! ----------------------------------------------------------------------------------------------------------------------
62! Implicit none
63! ----------------------------------------------------------------------------------------------------------------------
64 implicit none
65! ----------------------------------------------------------------------------------------------------------------------
66! Arguments
67! ----------------------------------------------------------------------------------------------------------------------
68 TYPE(output_), INTENT(INOUT) :: OUTPUT
69 LOGICAL,INTENT(IN) :: TRIGGER_ANIM
70 LOGICAL,INTENT(IN) :: TRIGGER_H3D
71 LOGICAL,INTENT(IN) :: TRIGGER_TH
72 INTEGER,INTENT(IN) :: NSPMD
73 INTEGER,INTENT(IN) :: NUMNOD
74 INTEGER,INTENT(IN) :: NUMNODG
75 TYPE(nodal_arrays_), INTENT(IN) :: NODES
76! ----------------------------------------------------------------------------------------------------------------------
77! Local variables
78! ----------------------------------------------------------------------------------------------------------------------
79 INTEGER :: LENR
80! ----------------------------------------------------------------------------------------------------------------------
81! Body
82! ----------------------------------------------------------------------------------------------------------------------
83 IF(th_has_noda_pext > 0 .OR. output%DATA%ANIM_HAS_NODA_PEXT > 0
84 . .OR. output%DATA%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(output%DATA%NODA_PEXT, nodes%BOUNDARY_ADD, nodes%BOUNDARY, lenr, nodes%WEIGHT)
90 CALL spmd_exch_nodarea(output%DATA%NODA_SURF, nodes%BOUNDARY_ADD, nodes%BOUNDARY, lenr, nodes%WEIGHT)
91 !send everything to node 0 in global array (ANIM)
92 IF(output%DATA%ANIM_HAS_NODA_PEXT > 0)THEN
93 CALL spmd_gather_nodal_scalar(output%DATA%NODA_PEXT_G,
94 . numnodg, output%DATA%NODA_PEXT, numnod, nodes%WEIGHT, nodes%NODGLOB) !NODGLOB :id_loc -> id_glob
95 CALL spmd_gather_nodal_scalar(output%DATA%NODA_SURF_G, numnodg,
96 . output%DATA%NODA_SURF, numnod, nodes%WEIGHT, nodes%NODGLOB)
97 END IF
98 ELSE
99 IF(output%DATA%ANIM_HAS_NODA_PEXT > 0)THEN
100 !in this case numnodg = numnod
101 output%DATA%NODA_PEXT_G(1:numnod) = output%DATA%NODA_PEXT(1:numnod)
102 output%DATA%NODA_SURF_G(1:numnod) = output%DATA%NODA_SURF(1:numnod)
103 END IF
104 ENDIF
105 ENDIF
106 ENDIF
107 END SUBROUTINE spmd_exch_output_noda_pext
108! ----------------------------------------------------------------------------------------------------------------------
subroutine spmd_exch_output_noda_pext(output, 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)