OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
stock_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!|| stock_msg ../engine/source/output/message/stock_msg.F
25!||--- called by ------------------------------------------------------
26!|| build_msg ../common_source/tools/memory/my_alloc.F90
27!||--- uses -----------------------------------------------------
28!|| message_mod ../engine/share/message_module/message_mod.F
29!|| names_and_titles_mod ../common_source/modules/names_and_titles_mod.F
30!||====================================================================
31 SUBROUTINE stock_msg(ID,ITYPE,SBUFMSG,BUFMSG)
32C-----------------------------------------------
33C M o d u l e s
34C-----------------------------------------------
35 USE message_mod
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C D u m m y A r g u m e n t s
43C-----------------------------------------------
44 INTEGER,INTENT(IN) :: ID,ITYPE,SBUFMSG
45 CHARACTER(LEN=NCHARLINE100), INTENT(IN) :: BUFMSG(SBUFMSG)
46C-----------------------------------------------
47C L o c a l V a r i a b l e s
48C-----------------------------------------------
49 INTEGER I,J,JDX,IBACKSLASH
50C-----------------------------------------------
51C S o u r c e L i n e s
52C-----------------------------------------------
53 IF (ALLOCATED(messages(itype,id)%MESSAGE)) THEN
54 DEALLOCATE(messages(itype,id)%MESSAGE)
55 END IF
56 IF (sbufmsg==0) THEN
57 messages(itype,id)%SMESSAGE=1
58 ALLOCATE(messages(itype,id)%MESSAGE(1))
59 IF (itype==1) THEN
60 messages(itype,id)%MESSAGE(1)=' !!! EMPTY TITLE !!! '
61 ELSE IF (itype==2) THEN
62 messages(itype,id)%MESSAGE(1)=' !!! EMPTY DESCRIPTION !!! '
63 END IF
64 ELSE
65 ALLOCATE(messages(itype,id)%MESSAGE(sbufmsg))
66 messages(itype,id)%SMESSAGE=sbufmsg
67 DO i=1,sbufmsg
68 jdx=1
69 messages(itype,id)%MESSAGE(i)=' '
70 j=1
71 DO WHILE(j<=ncharline100)
72 IF (bufmsg(i)(j:j)==achar(92)) then !'\') THEN
73C => skip \ print next
74 IF (j<ncharline100) THEN
75 j=j+1
76 IF (bufmsg(i)(j:j)=='n') THEN
77 messages(itype,id)%MESSAGE(i)(jdx:jdx)=char(10)
78 jdx=jdx+1
79C add here other special cases
80 ELSE
81C keep back slash for further use
82 messages(itype,id)%MESSAGE(i)(jdx:jdx)= bufmsg(i)(j-1:j-1)
83 jdx=jdx+1
84 messages(itype,id)%MESSAGE(i)(jdx:jdx)= bufmsg(i)(j:j)
85 jdx=jdx+1
86 END IF
87 ELSE
88C => end of loop
89 j=j+1
90 END IF
91 ELSE
92 messages(itype,id)%MESSAGE(i)(jdx:jdx)=bufmsg(i)(j:j)
93 jdx=jdx+1
94 END IF
95 j=j+1
96 END DO
97 END DO
98 END IF
99 END SUBROUTINE
subroutine stock_msg(id, itype, sbufmsg, bufmsg)
Definition stock_msg.F:32
integer, parameter ncharline100