OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
build_msg.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!|| build_msg ../starter/source/output/message/build_msg.F
25!||--- called by ------------------------------------------------------
26!|| execargcheck ../starter/source/starter/execargcheck.F
27!|| starter0 ../starter/source/starter/starter0.f
28!||--- calls -----------------------------------------------------
29!|| fredec2im ../starter/source/output/message/fredec2im.F
30!|| fredec3m ../starter/source/output/message/fredec3m.F
31!|| stock_msg ../starter/source/output/message/stock_msg.F
32!||--- uses -----------------------------------------------------
33!|| message_mod ../starter/share/message_module/message_mod.F
34!||====================================================================
35 SUBROUTINE build_msg()
36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
39 USE message_mod
41C-----------------------------------------------
42C I m p l i c i t T y p e s
43C-----------------------------------------------
44#include "implicit_f.inc"
45C-----------------------------------------------
46C C o m m o n B l o c k s
47C-----------------------------------------------
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 CHARACTER(LEN=NCHARLINE) :: BUFMSG(100)
52C-----------------------------------------------
53C L o c a l V a r i a b l e s
54C-----------------------------------------------
55 CHARACTER(LEN=NCHARLINE) :: LINE1,KEY,KEYST
56 INTEGER I,J,ID,ITYPE,INDX,SBUFMSG,ISTYPE
57C predim
58 smessages=1
59 DO i=1,100
60 bufmsg(i)=' '
61 END DO
62 DO i=1,smessagesfile
63C fill MESSAGES
64 line1=messagesfile(i)
65 IF (line1(1:9)=='/MESSAGE/') THEN
66 CALL fredec2im(line1,id)
67 IF (id>smessages) THEN
68 smessages=id
69 END IF
70 END IF
71 END DO
72 smessages=min(smessages,smessagesmax)
73 ALLOCATE(messages(smsgtype,smessages))
74 DO i=1,smessagesfile
75 DO j=1,smsgtype
76 messages(j,i)%SMESSAGE=0
77 END DO
78 END DO
79 id=0
80 sbufmsg=0
81 itype=0
82 DO i=1,smessagesfile
83C remplir MESSAGES
84 line1=messagesfile(i)
85 IF (line1(1:9)=='/MESSAGE/') THEN
86 IF (id>0.AND.id<=smessagesmax.AND.itype/=0) THEN
87 CALL stock_msg(id,itype,sbufmsg,bufmsg)
88 END IF
89 sbufmsg=0
90 id=1
91 CALL fredec2im(line1,id)
92 CALL fredec3m(line1,key)
93 itype=1
94 IF (key(1:5)=='TITLE') THEN
95 itype=1
96 ELSE IF (key(1:11)=='DESCRIPTION') THEN
97 itype=2
98 ELSE IF (key(1:8)=='SOLUTION') THEN
99 itype=3
100 ELSE IF (key(1:4)=='DATA') THEN
101 itype=4
102 END IF
103 ELSE
104 IF (id>0.AND.line1(1:1)/='#') THEN
105 sbufmsg=sbufmsg+1
106 bufmsg(sbufmsg)=line1
107 END IF
108 END IF
109 END DO
110 IF (id>0.AND.id<=smessagesmax.AND.itype/=0) THEN
111 CALL stock_msg(id,itype,sbufmsg,bufmsg)
112 END IF
113 RETURN
114 END SUBROUTINE
subroutine fredec2im(line1, id)
Definition fredec2im.F:32
subroutine fredec3m(line1, key)
Definition fredec3m.F:32
#define min(a, b)
Definition macros.h:20
integer, parameter ncharline
subroutine starter0
Definition starter0.F:79
subroutine build_msg()
Definition build_msg.F:36
subroutine stock_msg(id, itype, sbufmsg, bufmsg)
Definition stock_msg.F:31
program starter
Definition starter.F:39