OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
stock_msg.F File Reference
#include "implicit_f.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine stock_msg (id, itype, sbufmsg, bufmsg)

Function/Subroutine Documentation

◆ stock_msg()

subroutine stock_msg ( integer, intent(in) id,
integer, intent(in) itype,
integer, intent(in) sbufmsg,
character(len=ncharline), dimension(sbufmsg), intent(in) bufmsg )

Definition at line 30 of file stock_msg.F.

31C-----------------------------------------------
32C M o d u l e s
33C-----------------------------------------------
34 USE message_mod
36C-----------------------------------------------
37C I m p l i c i t T y p e s
38C-----------------------------------------------
39#include "implicit_f.inc"
40C-----------------------------------------------
41C C o m m o n B l o c k s
42C-----------------------------------------------
43C-----------------------------------------------
44C D u m m y A r g u m e n t s
45C-----------------------------------------------
46 INTEGER,INTENT(IN) :: ID,ITYPE,SBUFMSG
47 CHARACTER(LEN=NCHARLINE), INTENT(IN) :: BUFMSG(SBUFMSG)
48C-----------------------------------------------
49C L o c a l V a r i a b l e s
50C-----------------------------------------------
51 INTEGER I,J,JDX,IBACKSLASH
52 CHARACTER*1, PARAMETER :: BACKSLASH = char(92)
53C-----------------------------------------------
54C S o u r c e L i n e s
55C-----------------------------------------------
56 IF (ALLOCATED(messages(itype,id)%MESSAGE)) THEN
57 DEALLOCATE(messages(itype,id)%MESSAGE)
58 END IF
59 IF (sbufmsg==0) THEN
60 messages(itype,id)%SMESSAGE=1
61 ALLOCATE(messages(itype,id)%MESSAGE(1))
62 messages(itype,id)%MESSAGE(1)=' '
63 ELSE
64 ALLOCATE(messages(itype,id)%MESSAGE(sbufmsg))
65 messages(itype,id)%SMESSAGE=sbufmsg
66 DO i=1,sbufmsg
67 jdx=1
68 messages(itype,id)%MESSAGE(i)=' '
69 j=1
70 DO WHILE(j<=ncharline)
71 IF (bufmsg(i)(j:j)==backslash) THEN
72C => skip \ print next
73 IF (j<ncharline) THEN
74 j=j+1
75 IF (bufmsg(i)(j:j)=='n') THEN
76 messages(itype,id)%MESSAGE(i)(jdx:jdx)=char(10)
77 jdx=jdx+1
78C add here other special cases
79 ELSE
80C keep back slash for further use
81 messages(itype,id)%MESSAGE(i)(jdx:jdx)=bufmsg(i)(j-1:j-1)
82 jdx=jdx+1
83 messages(itype,id)%MESSAGE(i)(jdx:jdx)=bufmsg(i)(j:j)
84 jdx=jdx+1
85 END IF
86 ELSE
87C => end of loop
88 j=j+1
89 END IF
90 ELSE
91 messages(itype,id)%MESSAGE(i)(jdx:jdx)=bufmsg(i)(j:j)
92 jdx=jdx+1
93 END IF
94 j=j+1
95 END DO
96 END DO
97 END IF
98 RETURN
initmumps id
integer, parameter ncharline