OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
link_with_unique_master_cell.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!|| link_with_unique_main_cell ../engine/source/interfaces/int22/link_with_unique_master_cell.F
25!||--- called by ------------------------------------------------------
26!|| sinit22_fvm ../engine/source/interfaces/int22/sinit22_fvm.F
27!||--- uses -----------------------------------------------------
28!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
29!|| i22bufbric_mod ../common_source/modules/interfaces/cut-cell-search_mod.F
30!|| i22tri_mod ../common_source/modules/interfaces/cut-cell-search_mod.F
31!|| initbuf_mod ../engine/share/resol/initbuf.F
32!||====================================================================
34 . SharedFACE, Centroid )
35C-----------------------------------------------
36C D e s c r i p t i o n
37C-----------------------------------------------
38C Interface Type22 (/INTER/TYPE22) is an FSI coupling method based on cut cell method.
39C This experimental cut cell method is not completed, abandoned, and is not an official option.
40C
41! With interface 22 Hexahedral cell is cut and
42! main one is the biggest one which is greater
43! then 50%. In case of multiple choice (2 are
44! 50%-50% or several if criteria is reduced) we
45! must ensure a unique choice which is repeatable
46! with plateform and also different numbering.
47!
48! Here is chosen a sort by coordinates weighting
49! X,Y,Z components. a score is computed
50C-----------------------------------------------
51C M o d u l e s
52C-----------------------------------------------
53 USE initbuf_mod
55 USE i22tri_mod
56 USE elbufdef_mod
57C-----------------------------------------------
58C I m p l i c i t T y p e s
59C-----------------------------------------------
60#include "implicit_f.inc"
61C-----------------------------------------------
62C C o m m o n B l o c k s
63C-----------------------------------------------
64#include "comlock.inc"
65C-----------------------------------------------
66C D u m m y A r g u m e n t s
67C-----------------------------------------------
69 my_real :: sharedface(6), centroid(3,6)
70C-----------------------------------------------
71C L o c a l V a r i a b l e s
72C-----------------------------------------------
73 INTEGER :: ismain, n, ipos, level, iip
74 my_real :: score(6), max, nextmax, mysum
75 my_real :: xyzmax(3)
76C-----------------------------------------------
77C P r e - C o n d i t i o n
78C-----------------------------------------------
79 !IF(INT22==0)RETURN !already checked
80 !IF(K<2) RETURN !already checked
81C-----------------------------------------------
82C S o u r c e L i n e s
83C-----------------------------------------------
84 ipos = 1
85 level = 3 !3:X, 2:Y, 1:Z
86 score(1:6) = zero
87
88 ipos = maxloc(sharedface(1:6),1)
89
90 IF(sharedface(ipos) == zero) THEN
92 RETURN
93 ENDIF
94
95 mysum = sum(sharedface(1:ipos-1))
96 IF (ipos/=6)THEN
97 mysum = mysum + sum(sharedface(ipos+1:6))
98 ENDIF
99 IF (mysum == zero)THEN
101 RETURN
102 ENDIF
103
104 xyzmax(1) = maxval(centroid(1,1:6))
105 xyzmax(2) = maxval(centroid(2,1:6))
106 xyzmax(3) = maxval(centroid(3,1:6))
107
108 !find max
109 max = sharedface(ipos) !init with maximum value
111 !score it
112 score(ipos) = 1000*(xyzmax(1)-centroid(1,ipos))+ 100*(xyzmax(2)-centroid(2,ipos))+ 10*(xyzmax(3)-centroid(3,ipos))
113
114 !find other ones equal to MAX
115 IF (ipos == 6)RETURN
116 iip = ipos
117 DO WHILE(iip < 6)
118 iip = maxloc(sharedface(iip+1:6),1)
119 nextmax = sharedface(iip)
120 IF (nextmax == max) THEN
121 score(ipos) = 1000*(xyzmax(1)-centroid(1,iip))+100 * (xyzmax(2)-centroid(2,iip)) + 10*(xyzmax(3)-centroid(3,iip))
122 ENDIF
123 ENDDO
124
125 ipos = maxloc(score(1:6),1)
127
128 RETURN
129 END
#define my_real
Definition cppsort.cpp:32
#define max(a, b)
Definition macros.h:21