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
53C-----------------------------------------------
54C I m p l i c i t T y p e s
55C-----------------------------------------------
56#include "implicit_f.inc"
57C-----------------------------------------------
58C A n a l y s e M o d u l e
59C-----------------------------------------------
60#include "analyse_name.inc"
61C-----------------------------------------------
62C C o m m o n B l o c k s
63C-----------------------------------------------
64#include "scr17_c.inc"
65#include "units_c.inc"
66#include "com04_c.inc"
67#include "param_c.inc"
68#include "sphcom.inc"
69C-----------------------------------------------
70C D u m m y A r g u m e n t s
71C-----------------------------------------------
72 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
73 INTEGER ITABM1(*), LACCELM(3,*),
74 . ixc(nixc,*),iskn(liskn,*)
75 INTEGER NOM_OPT(LNOPT1,*)
76C REAL
77 TYPE(submodel_data), DIMENSION(NSUBMOD), INTENT(IN) :: LSUBMODEL
78 my_real accelm(llaccelm,*)
79C-----------------------------------------------
80C E x t e r n a l F u n c t i o n s
81C-----------------------------------------------
82 INTEGER USR2SYS
83C-----------------------------------------------
84C L o c a l V a r i a b l e s
85C-----------------------------------------------
86 INTEGER I, J, ID, NOD, ISK, UID, IG, L
87 INTEGER N, NS
88 my_real :: f, bid ,dist
89 CHARACTER MESS*40
90 CHARACTER(LEN=NCHARTITLE) :: TITR
91 CHARACTER(LEN=NCHARKEY) :: KEY2
92 LOGICAL :: IS_AVAILABLE, FOUND
93C-----------------------------------------------
94C D a t a
95C-----------------------------------------------
96 DATA mess/'ACCELEROMETER DEFINITION '/
97C---------------------------------------------------
98C B e g i n n i n g o f S u b r o u t i n e
99C---------------------------------------------------
100 WRITE(istdo,'(A)')' .. ACCELEROMETERS'
101 is_available = .false.
102 CALL hm_option_start('/ACCEL')
103 DO i = 1, naccelm
104 CALL hm_option_read_key(lsubmodel, option_titr = titr, option_id = id, unit_id = uid)
105 nom_opt(1, i) = id
106 CALL fretitl(titr, nom_opt(lnopt1-ltitr+1, i), ltitr)
107 found = .false.
108 DO j=1,unitab%NUNITS
109 IF (unitab%UNIT_ID(j) == uid) THEN
110 found = .true.
111 EXIT
112 ENDIF
113 ENDDO
114 IF (.NOT. (uid == 0 .OR. found)) THEN
115 CALL ancmsg(msgid = 659, anmode = aninfo, msgtype = msgerror,
116 . c1 = 'ACCELEROMETER', c2 = 'ACCELEROMETER', c3 = titr,
117 . i2 = uid, i1 = id)
118 ENDIF
119 dist = zero
120 CALL hm_get_intv('nodeid', nod, is_available, lsubmodel)
121 CALL hm_get_intv('skewid', isk, is_available, lsubmodel)
122 CALL hm_get_floatv('cutoff', f, is_available, lsubmodel, unitab)
123C
124 found = .false.
125 DO j = 0, numskw + min(1, nspcond) * numsph + nsubmod
126 IF(isk == iskn(4, j + 1)) THEN
127 isk = j + 1
128 found = .true.
129 EXIT
130 ENDIF
131 ENDDO
132 IF (.NOT. found) THEN
133 CALL ancmsg(msgid = 137, anmode = aninfo, msgtype = msgerror,
134 . c1 = 'ACCELEROMETER', c2 = 'ACCELEROMETER', c3 = titr,
135 . i1 = id, i2 = isk)
136 ENDIF
137
138C
139 laccelm(1,i)=usr2sys(nod,itabm1,mess,id)
140 CALL anodset(laccelm(1,i), check_used)
141 laccelm(2,i)=id
142 laccelm(3,i)=isk
143 accelm(1,i)=f
144C-------------------------------------
145 WRITE (iout,'(///,A)')' ACCELEROMETER'
146 WRITE (iout,'(A/)') ' -------------'
147 WRITE (iout,'(A,I10)')
148 . ' ACCELEROMETER NUMBER . . . . . . . . .',id,
149 . ' NODE NUMBER. . . . . . . . . . . . . .',nod,
150 . ' SKEW FRAME NUMBER. . . . . . . . . . .',iskn(4,isk)
151 WRITE (iout,'(A,1PG20.13)')
152 . ' 4-POLE BUTTERWORTH CORNER FREQUENCY. .',f
153 ENDDO
154C-------------------------------------
155C Searching for duplicate ID
156C-------------------------------------
157 naccelm=naccelm
158 CALL vdouble(nom_opt,lnopt1,naccelm,mess,0,bid)
159C----
160 RETURN
161 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:889
subroutine fretitl(titr, iasc, l)
Definition freform.F:620
subroutine vdouble(list, ilist, nlist, mess, ir, rlist)
Definition sysfus.F:884
program starter
Definition starter.F:39