40
41
42
43
44
45
46
47
48
50 USE elbufdef_mod
55 use element_mod , only : nixs,nixq
56
57
58
59#include "implicit_f.inc"
60
61
62
63#include "com01_c.inc"
64#include "com04_c.inc"
65#include "param_c.inc"
66#include "inter22.inc"
67
68
69
70 INTEGER, INTENT(IN) :: IPARG(NPARG,*), IPARI(NPARI,*),IXS(NIXS,*),IXQ(NIXQ,*)
71 INTEGER, INTENT(IN) :: ITAB(NUMNOD),IFLG
72 INTEGER, INTENT(IN) :: IOK_PART(*),IS_WRITTEN_NODE(*)
73 my_real,
INTENT(INOUT) :: x(3,numnod)
74 my_real,
INTENT(INOUT) :: nodal_vector(3,*)
75
76 TYPE (ELBUF_STRUCT_), DIMENSION(NGROUP), TARGET :: ELBUF_TAB
77 TYPE (GROUP_) , DIMENSION(NGRNOD) :: IGRNOD
78
79
80
81 INTEGER :: NCELL, NBF, NBL, ICELL, NIN, NODE_ID, IB, I
82 INTEGER :: NNODES, II, J, IE, IGR
83
84 REAL,DIMENSION(:,:),ALLOCATABLE :: BUFFER
85 LOGICAL :: lStillNode
87
88
89
90 nin = 1
91 IF(int22==0) RETURN
92 IF(ipari(82,nin)==0)RETURN
93
94
95
96
97 nbf = 1
99 ALLOCATE(buffer(3,numnod))
100 buffer(:,:) = zero
101
102
103 lstillnode = .true.
104 igr = ipari(82,nin)
105 nnodes = igrnod(igr)%NENTITY
106 IF(nnodes==0)RETURN
107 ii = 1
108 DO ib=nbf,nbl
110 icell = 0
112 DO WHILE (icell<=ncell)
113 icell = icell +1
114 IF (icell>ncell .AND. ncell/=0)icell=9
115 IF(.NOT.lstillnode) cycle
116
117 DO j=1, 6
118 IF(ii>nnodes)THEN
119 lstillnode = .false.
120 print *, "** Warning inter22 : no more node in group to mark cell center"
121 EXIT
122 ENDIF
123 node_id = igrnod(igr)%ENTITY(ii)
124 IF(iflg==1)THEN
125
126 buffer(1,node_id) =
brick_list(nin,ib)%POLY(icell)%FACE(j)%Vel(1)
127 buffer(2,node_id) =
brick_list(nin,ib)%POLY(icell)%FACE(j)%Vel(2)
128 buffer(3,node_id) =
brick_list(nin,ib)%POLY(icell)%FACE(j)%Vel(3)
129 ELSEIF(iflg==2)THEN
130
131 buffer(1,node_id) = -
brick_list(nin,ib)%POLY(icell)%FACE(j)%F_FACE(1)
132 buffer(2,node_id) = -
brick_list(nin,ib)%POLY(icell)%FACE(j)%F_FACE(2)
133 buffer(3,node_id) = -
brick_list(nin,ib)%POLY(icell)%FACE(j)%F_FACE(3)
134 ELSE
135 buffer(1,node_id) = zero
136 buffer(2,node_id) = zero
137 buffer(3,node_id) = zero
138 ENDIF
139 ii = ii + 1
140 ENDDO
141 ENDDO
142 enddo
143
144 DO ii=1,nnodes
145 node_id = igrnod(igr)%ENTITY(ii)
146 x(1:3,node_id) = zero
147 ENDDO
148
149 DO i=1,numnod
150 value(1)=buffer(1,i)
151 value(2)=buffer(2,i)
152 value(3)=buffer(3,i)
154 . VALUE)
155 ENDDO
156
157 DEALLOCATE(buffer)
158
159
160 RETURN
subroutine h3d_write_vector(iok_part, is_written, vector, i, offset, nft, value)
type(brick_entity), dimension(:,:), allocatable, target brick_list