OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
write_cut_cell_buffer.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!|| write_cut_cell_buffer ../engine/source/interfaces/int22/write_cut_cell_buffer.F
25!||--- calls -----------------------------------------------------
26!|| my_barrier ../engine/source/system/machine.F
27!|| omp_get_thread_num ../engine/source/engine/openmp_stub.F90
28!||--- uses -----------------------------------------------------
29!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
30!|| i22bufbric_mod ../common_source/modules/interfaces/cut-cell-search_mod.F
31!|| i22tri_mod ../common_source/modules/interfaces/cut-cell-search_mod.F
32!|| initbuf_mod ../engine/share/resol/initbuf.F
33!||====================================================================
34 SUBROUTINE write_cut_cell_buffer ()
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
41C This subroutine was introduce for debug purpose
42C only. The aim is to print full Cut Cell Buffer
43C content and make comparison with openMP result.
44C Any difference enable to leads to OpenMP issue.
45C-----------------------------------------------
46C M o d u l e s
47C-----------------------------------------------
48 USE initbuf_mod
50 USE i22tri_mod
51 USE elbufdef_mod
52C-----------------------------------------------
53C I m p l i c i t T y p e s
54C-----------------------------------------------
55#include "implicit_f.inc"
56C-----------------------------------------------
57C C o m m o n B l o c k s
58C-----------------------------------------------
59#include "com01_c.inc"
60#include "inter22.inc"
61#include "comlock.inc"
62C-----------------------------------------------
63C D u m m y A r g u m e n t s
64C-----------------------------------------------
65! CHARACTER,INTENT(IN) :: FILENAME*(*)
66C-----------------------------------------------
67C L o c a l V a r i a b l e s
68C-----------------------------------------------
69 INTEGER :: OMP_GET_THREAD_NUM, IB, ITSK, IUNIT, NIN, J
70 EXTERNAL :: omp_get_thread_num
71 TYPE(brick_entity) ,POINTER :: pCC
72 TYPE(list_adj) ,POINTER :: pADJ
73 TYPE(cut_plane) ,POINTER :: pPLANE
74 TYPE(list_secnd) ,POINTER :: pSECND
75 TYPE(edge_entity) ,POINTER :: pEDGE
76C-----------------------------------------------
77C P r e c o n d i t i o n s
78C-----------------------------------------------
79 CALL my_barrier()
80 itsk = omp_get_thread_num()
81
82 IF(itsk/=0) RETURN
83 IF(int22 == 0) RETURN
84C-----------------------------------------------
85C S o u r c e L i n e s
86C-----------------------------------------------
87
88 print *, ""
89 print *, " |-------------------------------|"
90 print *, " | WRITE_CUT_CELL_BUFFER.F |"
91 print *, " |-------------------------------|"
92
93 nin = 1
94
95 iunit = 2201
96 OPEN( unit=iunit, file = "CutCellBuffer.txt" )
97 WRITE(unit=iunit, fmt='(A,I10)') "Writing Cut Cell Buffer, NC=", ncycle
98
99
100 DO ib=1,nb
101 pcc => brick_list(nin,ib)
102 !INTEGERS
103 WRITE(unit=iunit, fmt='(A ,2I10)') " (IB,iID)=", ib,pcc%ID
104 WRITE(unit=iunit, fmt='(A,11I10)') " 1.", pcc%NG, pcc%IDLOC, pcc%ICODE, pcc%IDBLE, pcc%NBITS, pcc%NPQTS, pcc%NBCUT
105 . , pcc%MainID , pcc%OldMainStrongNode, pcc%MLW, pcc%ITASK
106 WRITE(unit=iunit, fmt='(A,08I10) ')" 2.", pcc%SECID_Cell(1:8)
107 WRITE(unit=iunit, fmt='(A,08I10) ')" 3.", pcc%NODE(1:8)%OLD_WhichCell
108 WRITE(unit=iunit, fmt='(A,08I10) ')" 4.", pcc%NODE(1:8)%WhichCell
109 WRITE(unit=iunit, fmt='(A,09I10) ')" 5.", pcc%POLY(1:9)%NumNOD
110 WRITE(unit=iunit, fmt='(A,09I10) ')" 6.", pcc%POLY(1:9)%NumPOINT
111 WRITE(unit=iunit, fmt='(A,54I10) ')" 7.", (/ (pcc%POLY(1:9)%FACE(j)%NumPOINT,j=1,6) /)
112 WRITE(unit=iunit, fmt='(A,01I10) ')" 8.", pcc%Seg_add_LFT
113 WRITE(unit=iunit, fmt='(A,01I10) ')" 9.", pcc%Seg_add_LLT
114 WRITE(unit=iunit, fmt='(A,30I10) ')"10.", pcc%Adjacent_Brick(1:6,1:5)
115 WRITE(unit=iunit, fmt='(A,270I10) ')"11.", (/
116 . (pcc%POLY(1:9)%FACE(j)%Adjacent_Cell(1),j=1,6),
117 . (pcc%POLY(1:9)%FACE(j)%Adjacent_Cell(2),j=1,6),
118 . (pcc%POLY(1:9)%FACE(j)%Adjacent_Cell(3),j=1,6),
119 . (pcc%POLY(1:9)%FACE(j)%Adjacent_Cell(4),j=1,6),
120 . (pcc%POLY(1:9)%FACE(j)%Adjacent_Cell(5),j=1,6)
121 . /)
122 WRITE(unit=iunit, fmt='(A,54I10) ')"12.", (/ (pcc%POLY(1:9)%FACE(j)%NAdjCell ,j=1,6) /)
123 WRITE(unit=iunit, fmt='(A,72I10) ')"13.", (/ (pcc%POLY(1:9)%ListNodID(j) ,j=1,8) /)
124 WRITE(unit=iunit, fmt='(A,09I10) ')"14.", pcc%POLY(1:9)%IsMain
125 WRITE(unit=iunit, fmt='(A,08I10) ')"15.", pcc%NODE(1:8)%NodWasMain
126 WRITE(unit=iunit, fmt='(A,36I10) ')"16.", (/ (pcc%POLY(1:9)%WhereIsMain(j),j=1,4) /)
127 WRITE(unit=iunit, fmt='(A,08I10) ')"17.", pcc%NODE(1:8)%WhereWasMain
128 WRITE(unit=iunit, fmt='(A,15I10) ')"18.", pcc%MergeTarget(1:3,1:5)
129 WRITE(unit=iunit, fmt='(A,01I10) ')"19.", pcc%Ntarget
130
131 !DOUBLE PRECISION
132 WRITE(unit=iunit, fmt='(A,270F20.14)')"21.", (/
133 . (pcc%POLY(1:9)%FACE(j)%Adjacent_FLUX(1),j=1,6) ,
134 . (pcc%POLY(1:9)%FACE(j)%Adjacent_FLUX(2),j=1,6) ,
135 . (pcc%POLY(1:9)%FACE(j)%Adjacent_FLUX(3),j=1,6) ,
136 . (pcc%POLY(1:9)%FACE(j)%Adjacent_FLUX(4),j=1,6) ,
137 . (pcc%POLY(1:9)%FACE(j)%Adjacent_FLUX(5),j=1,6)
138 . /)
139 WRITE(unit=iunit, fmt='(A,270F20.14)')"22.", (/
140 . (pcc%POLY(1:9)%FACE(j)%Adjacent_upwFLUX(1),j=1,6) ,
141 . (pcc%POLY(1:9)%FACE(j)%Adjacent_upwFLUX(2),j=1,6) ,
142 . (pcc%POLY(1:9)%FACE(j)%Adjacent_upwFLUX(3),j=1,6) ,
143 . (pcc%POLY(1:9)%FACE(j)%Adjacent_upwFLUX(4),j=1,6) ,
144 . (pcc%POLY(1:9)%FACE(j)%Adjacent_upwFLUX(5),j=1,6)
145 . /)
146 WRITE(unit=iunit, fmt='(A,09F20.14) ')"23.", pcc%POLY(1:9)%Adjacent_FLU1
147 WRITE(unit=iunit, fmt='(A,18F20.14) ')"24.", pcc%N(1:6,1:3)
148 WRITE(unit=iunit, fmt='(A,09F20.14) ')"25.", pcc%POLY(1:9)%PHI
149 WRITE(unit=iunit, fmt='(A,09F20.14) ')"26.", pcc%POLY(1:9)%DPHI
150 WRITE(unit=iunit, fmt='(A,01F20.14) ')"28.", pcc%Vnew_SCell
151 WRITE(unit=iunit, fmt='(A,01F20.14) ')"29.", pcc%Vold_SCell
152 WRITE(unit=iunit, fmt='(A,09F20.14) ')"30.", pcc%POLY(1:9)%Vnew
153 WRITE(unit=iunit, fmt='(A,09F20.14) ')"31.", pcc%POLY(1:9)%Vold
154 WRITE(unit=iunit, fmt='(A,09F20.14) ')"32.", pcc%POLY(1:9)%OLD_Vnew
155 WRITE(unit=iunit, fmt='(A,18F20.14) ')"33.", (/ (pcc%POLY(1:9)%CellCenter(j),j=1,3) /)
156 WRITE(unit=iunit, fmt='(A,63F20.14) ')"34.", (/ (pcc%POLY(1:9)%Face(j) ,j=0,6) /)
157 WRITE(unit=iunit, fmt='(A,06F20.14) ')"35.", pcc%Face_Brick(1:6)
158 WRITE(unit=iunit, fmt='(A,01F20.14) ')"36.", pcc%UncutVol
159
160 !ADJACENT CELL BUFFER
161 padj => brick_list(nin,ib)%ADJ_ELEMS
162 DO j=1,48
163 WRITE(unit=iunit, fmt='(A,01I10) ')" ", padj%Num
164 WRITE(unit=iunit, fmt='(A,48I10) ')" ", padj%Num_inv(1:48)
165 WRITE(unit=iunit, fmt='(A,48I10) ')" ", padj%IV(1:48)
166 WRITE(unit=iunit, fmt='(A,48I10) ')" ", padj%IB(1:48)
167 WRITE(unit=iunit, fmt='(A,48I10) ')" ", padj%ICELL(1:48)
168 WRITE(unit=iunit, fmt='(A,48I10) ')" ", padj%SecndFACE(1:48)
169 ENDDO
170
171 !CUT PLANE BUFFER
172 DO j=1,8
173 pplane => brick_list(nin,ib)%PCUT(j)
174 WRITE(unit=iunit, fmt='(A,03F20.14)' )" ", pplane%N(1:3)
175 WRITE(unit=iunit, fmt='(A,03F20.14) ')" ", pplane%B(1:3)
176 WRITE(unit=iunit, fmt='(A,01F20.14) ')" ", pplane%SCUT
177 WRITE(unit=iunit, fmt='(A,01F20.14) ')" ", pplane%SEFF
178 WRITE(unit=iunit, fmt='(A,18F20.14) ')" ", pplane%P(1:3,1:6)
179 WRITE(unit=iunit, fmt='(A,01I10) ')" ", pplane%NP
180 ENDDO
181
182 !SECND CELL LIST
183 psecnd => brick_list(nin,ib)%SecndList
184 WRITE(unit=iunit, fmt='(A,01F20.14)' )" ", psecnd%VOL_Unmerged
185 WRITE(unit=iunit, fmt='(A,01I10)' ) " ", psecnd%Num
186 WRITE(unit=iunit, fmt='(A,01I10)' ) " ", psecnd%NumSecndNodes
187 WRITE(unit=iunit, fmt='(A,24I10)' ) " ", psecnd%FM(1:24)
188 WRITE(unit=iunit, fmt='(A,24I10)' ) " ", psecnd%FV(1:24)
189 WRITE(unit=iunit, fmt='(A,24I10)' ) " ", psecnd%IV(1:24)
190 WRITE(unit=iunit, fmt='(A,24I10)' ) " ", psecnd%IBV(1:24)
191 WRITE(unit=iunit, fmt='(A,24I10)' ) " ", psecnd%ICELLv(1:24)
192 WRITE(unit=iunit, fmt='(A,24F20.14)' )" ", psecnd%VOL(1:24)
193
194 !EDGE BUFFER
195 DO j=1,12
196 pedge => brick_list(nin,ib)%Edge(j)
197 WRITE(unit=iunit, fmt='(A,02I10)' ) " ", pedge%NODE(1:2)
198 WRITE(unit=iunit, fmt='(A,01I10)' ) " ", pedge%NBCUT
199 WRITE(unit=iunit, fmt='(A,02I10)' ) " ", pedge%CUTSHELL(1:2)
200 WRITE(unit=iunit, fmt='(A,02F20.14)') " ", pedge%CUTCOOR(1:2)
201 WRITE(unit=iunit, fmt='(A,06F20.14)') " ", pedge%CUTPOINT(1:3,1:2)
202 WRITE(unit=iunit, fmt='(A,06F20.14)') " ", pedge%CUTVEL(1:3,1:2)
203 WRITE(unit=iunit, fmt='(A,03F20.14)') " ", pedge%VECTOR(1:3)
204 WRITE(unit=iunit, fmt='(A,01F20.14)') " ", pedge%LEN
205 ENDDO
206
207 !SECTYPES
208 WRITE(unit=iunit, fmt='(8A14)' ) " ", (pcc%SECTYPE(j),j=1,8)
209
210 ENDDO
211
212C pause
213
214C-----------------------------------------------
215 RETURN
216 END SUBROUTINE write_cut_cell_buffer
217
218
type(brick_entity), dimension(:,:), allocatable, target brick_list
subroutine my_barrier
Definition machine.F:31
subroutine write_cut_cell_buffer()