OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
ortho_normalization.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!|| orthrg ../starter/source/constraints/fxbody/ortho_normalization.F
25!||--- called by ------------------------------------------------------
26!|| ini_fxbody ../starter/source/constraints/fxbody/ini_fxbody.F
27!||--- calls -----------------------------------------------------
28!|| prscal ../starter/source/constraints/fxbody/ortho_normalization.F
29!|| wsum ../starter/source/constraints/fxbody/ortho_normalization.F
30!||====================================================================
31 SUBROUTINE orthrg(VECT, MAS, NDDL,NB_MODES )
32C-----------------------------------------------
33C I m p l i c i t T y p e s
34C-----------------------------------------------
35#include "implicit_f.inc"
36C-----------------------------------------------
37C D u m m y A r g u m e n t s
38C-----------------------------------------------
39 INTEGER NDDL, NB_MODES
41 . vect(nddl,*), mas(nddl,nddl)
42C-----------------------------------------------
43C L o c a l V a r i a b l e s
44C-----------------------------------------------
45 INTEGER I, II
47 . vt(nddl), s, ms, uns
48C
50 . prscal
51 EXTERNAL prscal
52C
53 DO i=1,nddl
54 vt(i)=zero
55 ENDDO
56 DO i=1,nb_modes
57 CALL wsum(vt, vect(1,i), zero, one, nddl)
58 DO ii=1,i-1
59 s=prscal(vt, vect(1,ii), nddl, mas)
60 ms=-s
61 CALL wsum(vect(1,i), vect(1,ii), one, ms, nddl)
62 ENDDO
63 s=prscal(vect(1,i), vect(1,i), nddl, mas)
64 uns=one/sqrt(s)
65 CALL wsum(vect(1,i), vt, uns, zero, nddl)
66 ENDDO
67C
68 RETURN
69 END
70C
71!||====================================================================
72!|| orthsr ../starter/source/constraints/fxbody/ortho_normalization.F
73!||--- called by ------------------------------------------------------
74!|| ini_fxbody ../starter/source/constraints/fxbody/ini_fxbody.F
75!||--- calls -----------------------------------------------------
76!|| prscal ../starter/source/constraints/fxbody/ortho_normalization.F
77!|| wsum ../starter/source/constraints/fxbody/ortho_normalization.F
78!||====================================================================
79 SUBROUTINE orthsr(VECTS, VECTR, MAS, NDDL, NMS,NMR)
80C-----------------------------------------------
81C I m p l i c i t T y p e s
82C-----------------------------------------------
83#include "implicit_f.inc"
84C-----------------------------------------------
85C D u m m y A r g u m e n t s
86C-----------------------------------------------
87 INTEGER NDDL, NMS, NMR
89 . vects(nddl,*), vectr(nddl,*), mas(nddl,nddl)
90C-----------------------------------------------
91C L o c a l V a r i a b l e s
92C-----------------------------------------------
93 INTEGER I, II
95 . vt(nddl), s, ms
96C
97 my_real
98 . prscal
99 EXTERNAL prscal
100C
101 DO i=1,nddl
102 vt(i)=zero
103 ENDDO
104 DO i=1,nms
105 CALL wsum(vt, vects(1,i), zero, one, nddl)
106 DO ii=1,nmr
107 s=prscal(vt, vectr(1,ii), nddl, mas)
108 ms=-s
109 CALL wsum(vects(1,i), vectr(1,ii), one, ms, nddl)
110 ENDDO
111 ENDDO
112C
113 RETURN
114 END
115C
116!||====================================================================
117!|| orthst ../starter/source/constraints/fxbody/ortho_normalization.F
118!||--- called by ------------------------------------------------------
119!|| ini_fxbody ../starter/source/constraints/fxbody/ini_fxbody.F
120!||--- calls -----------------------------------------------------
121!|| prscal ../starter/source/constraints/fxbody/ortho_normalization.F
122!|| wsum ../starter/source/constraints/fxbody/ortho_normalization.F
123!||====================================================================
124 SUBROUTINE orthst(VECTS, MAS , NDDL, NMS, NMSF,TOLE)
125C-----------------------------------------------
126C I m p l i c i t T y p e s
127C-----------------------------------------------
128#include "implicit_f.inc"
129C-----------------------------------------------
130C D u m m y A r g u m e n t s
131C-----------------------------------------------
132 INTEGER NDDL, NMS, NMSF
133 my_real
134 . vects(nddl,*), mas(nddl,nddl), tole
135C-----------------------------------------------
136C L o c a l V a r i a b l e s
137C-----------------------------------------------
138 INTEGER I, II
139 my_real
140 . s, ms, norm, unsn, ref, vt(nddl)
141C
142 my_real
143 . prscal,maxi
144C-----------------------------------------------
145 EXTERNAL prscal
146C-----------------------------------------------
147C
148 DO i=1,nddl
149 vt(i)=zero
150 ENDDO
151
152 maxi = zero
153 DO i=1,nms
154 norm=prscal(vects(1,i), vects(1,i), nddl, mas)
155 IF (sqrt(norm)>maxi) maxi = max(maxi,sqrt(norm))
156 ENDDO
157 ref = maxi
158 nmsf=0
159C
160 DO i=1,nms
161C
162 CALL wsum(vt, vects(1,i), zero, one, nddl)
163 DO ii=1,nmsf
164 s=prscal(vt, vects(1,ii), nddl, mas)
165 ms=-s
166 CALL wsum(vects(1,i), vects(1,ii), one, ms, nddl)
167 ENDDO
168 norm=prscal(vects(1,i), vects(1,i), nddl, mas)
169 IF (sqrt(norm)>tole*ref) THEN
170 nmsf=nmsf+1
171 unsn=one/sqrt(norm)
172 CALL wsum(vects(1,nmsf), vects(1,i), zero, unsn, nddl)
173 ENDIF
174 ENDDO
175C
176 RETURN
177 END
178!||====================================================================
179!|| prscal ../starter/source/constraints/fxbody/ortho_normalization.F
180!||--- called by ------------------------------------------------------
181!|| ini_fxbody ../starter/source/constraints/fxbody/ini_fxbody.F
182!|| orthrg ../starter/source/constraints/fxbody/ortho_normalization.F
183!|| orthsr ../starter/source/constraints/fxbody/ortho_normalization.F
184!|| orthst ../starter/source/constraints/fxbody/ortho_normalization.F
185!||====================================================================
186 my_real FUNCTION prscal(V1 , V2, NDDL, VALUE)
187C-----------------------------------------------
188C I m p l i c i t T y p e s
189C-----------------------------------------------
190#include "implicit_f.inc"
191C-----------------------------------------------
192C D u m m y A r g u m e n t s
193C-----------------------------------------------
194 INTEGER nddl
195 my_real
196 . v1(*), v2(*), VALUE(nddl,nddl)
197C-----------------------------------------------
198C L o c a l V a r i a b l e s
199C-----------------------------------------------
200 INTEGER i,cpt
201 my_real
202 . val
203C
204 prscal=zero
205 DO i=1,nddl
206 val=zero
207 DO cpt=1,nddl
208 val=val+value(i,cpt)*v2(cpt)
209 ENDDO
210 prscal=prscal+v1(i)*val
211 ENDDO
212C
213 END
214C
215!||====================================================================
216!|| wsum ../starter/source/constraints/fxbody/ortho_normalization.F
217!||--- called by ------------------------------------------------------
218!|| orthrg ../starter/source/constraints/fxbody/ortho_normalization.F
219!|| orthsr ../starter/source/constraints/fxbody/ortho_normalization.F
220!|| orthst ../starter/source/constraints/fxbody/ortho_normalization.F
221!||====================================================================
222 SUBROUTINE wsum(V1, V2, A1, A2, NDDL)
223C-----------------------------------------------
224C I m p l i c i t T y p e s
225C-----------------------------------------------
226#include "implicit_f.inc"
227C-----------------------------------------------
228C D u m m y A r g u m e n t s
229C-----------------------------------------------
230 INTEGER NDDL
231 my_real
232 . v1(*), v2(*), a1, a2
233C-----------------------------------------------
234C L o c a l V a r i a b l e s
235C-----------------------------------------------
236 INTEGER I
237C
238 DO i=1,nddl
239 v1(i)=a1*v1(i)+a2*v2(i)
240 ENDDO
241C
242 RETURN
243 END
#define my_real
Definition cppsort.cpp:32
norm(diag(diag(diag(inv(mat))) -id.SOL), 2) % destroy mumps instance id.JOB
#define max(a, b)
Definition macros.h:21
subroutine orthsr(vects, vectr, mas, nddl, nms, nmr)
subroutine orthrg(vect, mas, nddl, nb_modes)
subroutine orthst(vects, mas, nddl, nms, nmsf, tole)
subroutine wsum(v1, v2, a1, a2, nddl)