OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
nbsph.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!|| nbsph ../starter/source/elements/sph/nbsph.F
25!||--- called by ------------------------------------------------------
26!|| contrl ../starter/source/starter/contrl.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.f
29!|| hm_get_intv ../starter/source/devtools/hm_reader/hm_get_intv.F
30!|| hm_option_count ../starter/source/devtools/hm_reader/hm_option_count.F
31!|| hm_option_read_key ../starter/source/devtools/hm_reader/hm_option_read_key.F
32!|| hm_option_start ../starter/source/devtools/hm_reader/hm_option_start.F
33!||--- uses -----------------------------------------------------
34!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
35!|| message_mod ../starter/share/message_module/message_mod.F
36!|| submodel_mod ../starter/share/modules1/submodel_mod.F
37!||====================================================================
38 SUBROUTINE nbsph(LSUBMODEL)
39C-----------------------------------------------
40C M o d u l e s
41C-----------------------------------------------
43 USE submodel_mod
45 USE message_mod
46C----------------------------------------------------------
47C Format par BLOCS.
48C-----------------------------------------------
49C I m p l i c i t T y p e s
50C-----------------------------------------------
51#include "implicit_f.inc"
52C-----------------------------------------------
53C C o m m o n B l o c k s
54C-----------------------------------------------
55#include "com01_c.inc"
56#include "sphcom.inc"
57C-----------------------------------------------
58C D u m m y A r g u m e n t s
59C-----------------------------------------------
60 TYPE(submodel_data) LSUBMODEL(*)
61C-----------------------------------------------
62C L o c a l V a r i a b l e s
63C-----------------------------------------------
64 INTEGER :: N,ID,KRESERV
65 CHARACTER :: MESS*40
66 LOGICAL :: IS_AVAILABLE
67C-----------------------------------------------
68C E x t e r n a l F u n c t i o n s
69C-----------------------------------------------
70 DATA mess /'SPH OPTIONS DEFINITION '/
71C-----------------------------------------------
72 nsphio =0
73 nsphres=0
74C
75 CALL hm_option_count('/SPH/RESERVE',nbpartinlet)
76 CALL hm_option_start('/SPH/RESERVE')
77 DO n=1,nbpartinlet
78 CALL hm_option_read_key(lsubmodel,option_id = id)
79 CALL hm_get_intv('Np',kreserv,is_available,lsubmodel)
80 nsphres=nsphres+kreserv
81 ENDDO
82C
83 CALL hm_option_count('/SPH/INOUT',nsphio)
84c
85c NSPHRES (number of SPH reserve for inlet) for each proc
86c in order to assure an suffisant number of reserve for inlet in SPMD
87 nsphres = nsphres*max(1,nspmd)
88
89 IF (nbpartinlet > 0 .AND. nsphres == 0) THEN
90 WRITE(mess,*)'SPH/RESERVE option is missing'
91 CALL ancmsg(msgid=3094,
92 . msgtype=msgerror,
93 . anmode=aninfo,
94 . i1=id)
95 ENDIF
96C-------------------------------------
97 RETURN
98C-------------------------------------
99 END
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_count(entity_type, hm_option_number)
subroutine hm_option_start(entity_type)
#define max(a, b)
Definition macros.h:21
integer, parameter ncharkey
subroutine nbsph(lsubmodel)
Definition nbsph.F:39
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:889
program starter
Definition starter.F:39