OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
lecacc.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/.
23C=======================================================================
24!||====================================================================
25!|| lecacc ../starter/source/tools/accele/lecacc.F
26!||--- called by ------------------------------------------------------
27!|| lectur ../starter/source/starter/lectur.F
28!||--- calls -----------------------------------------------------
29!|| ancmsg ../starter/source/output/message/message.F
30!|| anodset ../starter/source/output/analyse/analyse_node.c
31!|| fretitl ../starter/source/starter/freform.F
32!|| hm_get_floatv ../starter/source/devtools/hm_reader/hm_get_floatv.F
33!|| hm_get_intv ../starter/source/devtools/hm_reader/hm_get_intv.F
34!|| hm_option_read_key ../starter/source/devtools/hm_reader/hm_option_read_key.F
35!|| hm_option_start ../starter/source/devtools/hm_reader/hm_option_start.F
36!|| usr2sys ../starter/source/system/sysfus.F
37!|| vdouble ../starter/source/system/sysfus.F
38!||--- uses -----------------------------------------------------
39!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
40!|| message_mod ../starter/share/message_module/message_mod.F
41!|| submodel_mod ../starter/share/modules1/submodel_mod.F
42!||====================================================================
43 SUBROUTINE lecacc(LACCELM,ACCELM,ITABM1,UNITAB,IXC,
44 . ISKN, NOM_OPT, LSUBMODEL)
45C-----------------------------------------------
46C M o d u l e s
47C----------------------------------------------
48 USE unitab_mod
49 USE message_mod
50 USE submodel_mod
53 use element_mod , only : nixc
54C-----------------------------------------------
55C I m p l i c i t T y p e s
56C-----------------------------------------------
57#include "implicit_f.inc"
58C-----------------------------------------------
59C A n a l y s e M o d u l e
60C-----------------------------------------------
61#include "analyse_name.inc"
62C-----------------------------------------------
63C C o m m o n B l o c k s
64C-----------------------------------------------
65#include "scr17_c.inc"
66#include "units_c.inc"
67#include "com04_c.inc"
68#include "param_c.inc"
69#include "sphcom.inc"
70C-----------------------------------------------
71C D u m m y A r g u m e n t s
72C-----------------------------------------------
73 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
74 INTEGER ITABM1(*), LACCELM(3,*),
75 . ixc(nixc,*),iskn(liskn,*)
76 INTEGER NOM_OPT(LNOPT1,*)
77C REAL
78 TYPE(submodel_data), DIMENSION(NSUBMOD), INTENT(IN) :: LSUBMODEL
79 my_real accelm(llaccelm,*)
80C-----------------------------------------------
81C E x t e r n a l F u n c t i o n s
82C-----------------------------------------------
83 INTEGER USR2SYS
84C-----------------------------------------------
85C L o c a l V a r i a b l e s
86C-----------------------------------------------
87 INTEGER I, J, ID, NOD, ISK, UID, IG, L
88 INTEGER N, NS
89 my_real :: f, bid ,dist
90 CHARACTER MESS*40
91 CHARACTER(LEN=NCHARTITLE) :: TITR
92 CHARACTER(LEN=NCHARKEY) :: KEY2
93 LOGICAL :: IS_AVAILABLE, FOUND
94C-----------------------------------------------
95C D a t a
96C-----------------------------------------------
97 DATA mess/'ACCELEROMETER DEFINITION '/
98C---------------------------------------------------
99C B e g i n n i n g o f S u b r o u t i n e
100C---------------------------------------------------
101 WRITE(istdo,'(A)')' .. ACCELEROMETERS'
102 is_available = .false.
103 CALL hm_option_start('/ACCEL')
104 DO i = 1, naccelm
105 CALL hm_option_read_key(lsubmodel, option_titr = titr, option_id = id, unit_id = uid)
106 nom_opt(1, i) = id
107 CALL fretitl(titr, nom_opt(lnopt1-ltitr+1, i), ltitr)
108 found = .false.
109 DO j=1,unitab%NUNITS
110 IF (unitab%UNIT_ID(j) == uid) THEN
111 found = .true.
112 EXIT
113 ENDIF
114 ENDDO
115 IF (.NOT. (uid == 0 .OR. found)) THEN
116 CALL ancmsg(msgid = 659, anmode = aninfo, msgtype = msgerror,
117 . c1 = 'ACCELEROMETER', c2 = 'ACCELEROMETER', c3 = titr,
118 . i2 = uid, i1 = id)
119 ENDIF
120 dist = zero
121 CALL hm_get_intv('nodeid', nod, is_available, lsubmodel)
122 CALL hm_get_intv('skewid', isk, is_available, lsubmodel)
123 CALL hm_get_floatv('cutoff', f, is_available, lsubmodel, unitab)
124C
125 found = .false.
126 DO j = 0, numskw + min(1, nspcond) * numsph + nsubmod
127 IF(isk == iskn(4, j + 1)) THEN
128 isk = j + 1
129 found = .true.
130 EXIT
131 ENDIF
132 ENDDO
133 IF (.NOT. found) THEN
134 CALL ancmsg(msgid = 137, anmode = aninfo, msgtype = msgerror,
135 . c1 = 'ACCELEROMETER', c2 = 'ACCELEROMETER', c3 = titr,
136 . i1 = id, i2 = isk)
137 ENDIF
138
139C
140 laccelm(1,i)=usr2sys(nod,itabm1,mess,id)
141 CALL anodset(laccelm(1,i), check_used)
142 laccelm(2,i)=id
143 laccelm(3,i)=isk
144 accelm(1,i)=f
145C-------------------------------------
146 WRITE (iout,'(///,A)')' ACCELEROMETER'
147 WRITE (iout,'(A/)') ' -------------'
148 WRITE (iout,'(A,I10)')
149 . ' ACCELEROMETER NUMBER . . . . . . . . .',id,
150 . ' NODE NUMBER. . . . . . . . . . . . . .',nod,
151 . ' SKEW FRAME NUMBER. . . . . . . . . . .',iskn(4,isk)
152 WRITE (iout,'(A,1PG20.13)')
153 . ' 4-POLE BUTTERWORTH CORNER FREQUENCY. .',f
154 ENDDO
155C-------------------------------------
156C Searching for duplicate ID
157C-------------------------------------
158 naccelm=naccelm
159 CALL vdouble(nom_opt,lnopt1,naccelm,mess,0,bid)
160C----
161 RETURN
162 END
void anodset(int *id, int *type)
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_start(entity_type)
subroutine lecacc(laccelm, accelm, itabm1, unitab, ixc, iskn, nom_opt, lsubmodel)
Definition lecacc.F:45
#define min(a, b)
Definition macros.h:20
integer, parameter nchartitle
integer, parameter ncharkey
integer nsubmod
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:895
subroutine fretitl(titr, iasc, l)
Definition freform.F:615
subroutine vdouble(list, ilist, nlist, mess, ir, rlist)
Definition sysfus.F:868