OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
intbuf_fric_copy.F File Reference
#include "implicit_f.inc"
#include "com04_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine intbuf_fric_copy (tabcoupleparts_fric_tmp, tabcoef_fric_tmp, tabparts_fric_tmp, nsetinit, ifricorth_tmp, intbuf_fric_tab)

Function/Subroutine Documentation

◆ intbuf_fric_copy()

subroutine intbuf_fric_copy ( integer, dimension(ninterfric,*) tabcoupleparts_fric_tmp,
tabcoef_fric_tmp,
integer, dimension(ninterfric,*) tabparts_fric_tmp,
integer, dimension(ninterfric) nsetinit,
integer, dimension(ninterfric,*) ifricorth_tmp,
type(intbuf_fric_struct_), dimension(*), target intbuf_fric_tab )

Definition at line 30 of file intbuf_fric_copy.F.

33C============================================================================
34C M o d u l e s
35C-----------------------------------------------
36 USE message_mod
37 USE intbuf_fric_mod
38C-----------------------------------------------
39C I m p l i c i t T y p e s
40C-----------------------------------------------
41#include "implicit_f.inc"
42C-----------------------------------------------
43C C o m m o n B l o c k s
44C-----------------------------------------------
45#include "com04_c.inc"
46C-----------------------------------------------
47C D u m m y A r g u m e n t s
48C-----------------------------------------------
49 INTEGER TABCOUPLEPARTS_FRIC_TMP(NINTERFRIC,*),TABPARTS_FRIC_TMP(NINTERFRIC,*),
50 . NSETINIT(NINTERFRIC) ,IFRICORTH_TMP(NINTERFRIC,*)
52 . tabcoef_fric_tmp(ninterfric,*)
53
54 TYPE(INTBUF_FRIC_STRUCT_), TARGET, DIMENSION(NINTERFRIC) :: INTBUF_FRIC_TAB(*)
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58 INTEGER NIF , NSET ,I ,J ,K ,N ,IP ,NSETT ,NPARTF ,IORTH ,MFROT ,LENC
59 INTEGER, DIMENSION(:) ,POINTER :: TABCOUPLEPARTS_FRIC
60 INTEGER, DIMENSION(:) ,POINTER :: TABPARTS_FRIC
61 INTEGER, DIMENSION(:) ,POINTER :: ADPART_FRIC
62 INTEGER, DIMENSION(:) ,POINTER :: IFRICORTH
63 my_real, DIMENSION(:) ,POINTER :: tabcoef_fric
64C
65C--------------------------------------------
66C=======================================================================
67
68 DO nif = 1, ninterfric
69 tabcoupleparts_fric => intbuf_fric_tab(nif)%TABCOUPLEPARTS_FRIC
70 tabcoef_fric => intbuf_fric_tab(nif)%TABCOEF_FRIC
71 tabparts_fric => intbuf_fric_tab(nif)%TABPARTS_FRIC
72 adpart_fric => intbuf_fric_tab(nif)%ADPARTS_FRIC
73 nset = intbuf_fric_tab(nif)%NSETPRTS
74 nsett = nsetinit(nif)
75 npartf = intbuf_fric_tab(nif)%S_TABPARTS_FRIC
76 iorth = intbuf_fric_tab(nif)%IORTHFRIC
77 ifricorth => intbuf_fric_tab(nif)%IFRICORTH
78 mfrot = intbuf_fric_tab(nif)%FRICMOD
79
80 IF(mfrot ==0 ) THEN
81 lenc =2
82 ELSE
83 lenc = 8
84 ENDIF
85
86C----------Copying default values of friction in the top of the Tab TABCOEF_FRIC_TMP
87 DO j=1,lenc
88 tabcoef_fric(j) =tabcoef_fric_tmp(nif,j)
89 ENDDO
90C----------Copying parts numbers and coefficient in the new structure and omitting duplicated couple of parts
91 j = 1
92 k = 0
93 IF(iorth == 0) THEN
94 DO i=1,nsett
95 IF( tabcoupleparts_fric_tmp(nif,j)/= 0) THEN
96 k = k +1
97C
98 tabcoupleparts_fric(k) = tabcoupleparts_fric_tmp(nif,j+1)
99C
100 DO n=1,lenc
101 tabcoef_fric(lenc*k+n) =tabcoef_fric_tmp(nif,i*8+n)
102 ENDDO
103C
104 ifricorth(k) = ifricorth_tmp(nif,i)
105 ENDIF
106 j = j+2
107 ENDDO
108 ELSEIF(iorth==1) THEN
109 DO i=1,nsett
110 IF( tabcoupleparts_fric_tmp(nif,j)/= 0) THEN
111 k = k +1
112C
113 tabcoupleparts_fric(k) = tabcoupleparts_fric_tmp(nif,j+1)
114C
115 DO n=1,lenc
116 tabcoef_fric(lenc+2*lenc*(k-1)+n) =tabcoef_fric_tmp(nif,8+16*(i-1)+n)
117 tabcoef_fric(2*k*lenc+n) =tabcoef_fric_tmp(nif,16*i+n)
118 ENDDO
119 ifricorth(k) = ifricorth_tmp(nif,i)
120 ENDIF
121C
122
123 j = j+2
124 ENDDO
125
126 ENDIF
127
128C----------Copying parts tab tagged by friction model
129 DO i=1,npartf
130 tabparts_fric(i) = tabparts_fric_tmp(nif,i)
131 ENDDO
132
133C----------Computation of the address of each part in the tabs TABPARTSFRIC TABCOEF_FRIC_TMP
134 adpart_fric(1) = 1
135 adpart_fric(2:npartf+1) = 0
136 DO i=1,npartf
137 k = 0
138 j = 1
139 DO n=1,nsett
140 IF( tabcoupleparts_fric_tmp(nif,j)/= 0) THEN
141 k = k + 1
142 IF(tabcoupleparts_fric_tmp(nif,j) == tabparts_fric(i)) THEN
143 adpart_fric(i+1) = adpart_fric(i+1) + 1
144 ENDIF
145 ENDIF
146 j = j +2
147 ENDDO
148 ENDDO
149 DO i=1,npartf
150 k = i +1
151 adpart_fric(k) =adpart_fric(k) +adpart_fric(i)
152 ENDDO
153
154 ENDDO
155C
156 RETURN
157
#define my_real
Definition cppsort.cpp:32