46 logical,
private :: active
61 integer(kind=kint) :: cstep
62 integer(kind=kint) :: ctAlgo
63 integer(kind=kint) :: iter
64 type(hecmwst_local_mesh) :: hecMESH
65 type(hecmwst_matrix) :: conMAT
67 type(hecmwst_matrix_lagrange) :: hecLagMAT
68 integer(kind=kint) :: i, grpid
70 if(
associated(heclagmat%AL_lagrange) ) heclagmat%AL_lagrange = 0.0d0
71 if(
associated(heclagmat%AU_lagrange) ) heclagmat%AU_lagrange = 0.0d0
73 do i = 1, fstrsolid%n_contacts
75 grpid = fstrsolid%contacts(i)%group
79 fstrsolid%dunode(:), iter, heclagmat%Lagrange(:), conmat, heclagmat)
83 do i = 1, fstrsolid%n_embeds
85 grpid = fstrsolid%embeds(i)%group
89 fstrsolid%dunode(:), iter, heclagmat%Lagrange(:), conmat, heclagmat)
97 integer(kind=kint),
intent(in) :: cstep
98 integer(kind=kint),
intent(in) :: ctAlgo
99 type(hecmwst_local_mesh) :: hecMESH
101 type(hecmwst_matrix_lagrange) :: hecLagMAT
102 type(hecmwst_matrix) :: conMAT
110 integer(kind=kint),
intent(in) :: cstep
111 integer(kind=kint),
intent(in) :: ctAlgo
112 type(hecmwst_local_mesh) :: hecMESH
114 type(hecmwst_matrix_lagrange) :: hecLagMAT
115 type(hecmwst_matrix) :: conMAT
125 integer(kind=kint),
intent(in) :: purpose
126 integer(kind=kint),
intent(in) :: cstep
127 integer(kind=kint),
intent(in) :: ctAlgo
128 type(hecmwst_local_mesh) :: hecMESH
130 type(hecmwst_matrix_lagrange) :: hecLagMAT
131 type(hecmwst_matrix) :: conMAT
132 integer(kind=kint) :: i, grpid
136 if(
associated(fstrsolid%CONT_NFORCE) ) fstrsolid%CONT_NFORCE(:) = 0.d0
137 if(
associated(fstrsolid%CONT_FRIC) ) fstrsolid%CONT_FRIC(:) = 0.d0
138 if(
associated(fstrsolid%EMBED_NFORCE) ) fstrsolid%EMBED_NFORCE(:) = 0.d0
141 do i = 1, fstrsolid%n_contacts
142 grpid = fstrsolid%contacts(i)%group
145 fstrsolid%dunode(:), heclagmat%Lagrange(:), conmat, &
146 fstrsolid%CONT_NFORCE, fstrsolid%CONT_FRIC, heclagmat )
149 do i = 1, fstrsolid%n_embeds
150 grpid = fstrsolid%embeds(i)%group
153 fstrsolid%dunode(:), heclagmat%Lagrange(:), conmat, &
154 fstrsolid%EMBED_NFORCE, fstrsolid%EMBED_NFORCE, heclagmat )
162 integer(kind=kint),
intent(in) :: cstep
163 type(hecmwst_local_mesh) :: hecMESH
164 type(hecmwst_matrix) :: hecMAT
167 integer(kind=kint) :: i, grpid, ndof
168 real(kind=kreal),
pointer :: diag(:)
176 do i = 1, fstrsolid%n_contacts
177 grpid = fstrsolid%contacts(i)%group
184 do i = 1, fstrsolid%n_embeds
185 grpid = fstrsolid%embeds(i)%group
196 integer(kind=kint),
intent(in) :: cstep
197 integer(kind=kint),
intent(in) :: sub_step
198 integer(kind=kint),
intent(in) :: cont_step
199 real(kind=kreal),
intent(in) ::
dt
200 integer(kind=kint),
intent(in) :: ctAlgo
201 type( hecmwst_local_mesh ),
intent(in) :: hecMESH
204 character(len=9) :: flag_ctAlgo
205 integer(kind=kint) :: i, grpid
206 logical :: iactive, is_init
208 if(
associated( fstrsolid%CONT_RELVEL ) ) fstrsolid%CONT_RELVEL(:) = 0.d0
209 if(
associated( fstrsolid%CONT_STATE ) ) fstrsolid%CONT_STATE(:) = 0.d0
212 flag_ctalgo =
'SLagrange'
214 flag_ctalgo =
'ALagrange'
219 do i = 1,
size(fstrsolid%unode)
220 fstrsolid%ddunode(i) = hecmesh%node(i) + fstrsolid%unode(i) + fstrsolid%dunode(i)
224 infoctchange%contact2free = 0
225 infoctchange%contact2neighbor = 0
226 infoctchange%contact2diffLpos = 0
227 infoctchange%free2contact = 0
228 infoctchange%contactNode_current = 0
230 is_init = ( cstep == 1 .and. sub_step == 1 .and. cont_step == 0 )
232 do i=1,fstrsolid%n_contacts
233 grpid = fstrsolid%contacts(i)%group
238 & fstrsolid%ddunode(:), fstrsolid%dunode(:), infoctchange, &
239 & hecmesh%global_node_ID(:), hecmesh%global_elem_ID(:), &
240 & is_init, iactive, hecmesh=hecmesh, &
241 & flag_ctalgo=flag_ctalgo, ndforce=fstrsolid%QFORCE(:) )
242 if( .not. active ) active = iactive
245 do i=1,fstrsolid%n_embeds
246 grpid = fstrsolid%embeds(i)%group
250 call scan_embed_state( flag_ctalgo, fstrsolid%embeds(i), fstrsolid%ddunode(:), fstrsolid%dunode(:), &
251 & fstrsolid%QFORCE(:), infoctchange, hecmesh%global_node_ID(:), hecmesh%global_elem_ID(:), is_init, iactive )
252 if( .not. active ) active = iactive
255 if( is_init .and. ctalgo ==
kcaslagrange .and. fstrsolid%n_contacts > 0 ) &
258 infoctchange%contactNode_current = infoctchange%contactNode_previous+infoctchange%free2contact-infoctchange%contact2free
259 infoctchange%contactNode_previous = infoctchange%contactNode_current
261 if( .not. active )
then
262 if(
associated( fstrsolid%CONT_NFORCE ) ) fstrsolid%CONT_NFORCE(:) = 0.d0
263 if(
associated( fstrsolid%CONT_FRIC ) ) fstrsolid%CONT_FRIC(:) = 0.d0
270 integer(kind=kint),
intent(in) :: cstep
271 type( hecmwst_local_mesh ),
intent(in) :: hecMESH
275 integer(kind=kint) :: i
276 logical :: iactive, is_init
281 do i = 1,
size(fstrsolid%unode)
282 fstrsolid%ddunode(i) = hecmesh%node(i) + fstrsolid%unode(i) + fstrsolid%dunode(i)
284 infoctchange%active = .false.
286 infoctchange%contact2free = 0
287 infoctchange%contact2neighbor = 0
288 infoctchange%contact2diffLpos = 0
289 infoctchange%free2contact = 0
290 infoctchange%contactNode_current = 0
292 is_init = ( cstep == 1 )
294 do i=1,fstrsolid%n_contacts
300 call scan_contact_state( fstrsolid%contacts(i), fstrsolid%ddunode(:), fstrsolid%dunode(:), &
301 & infoctchange, hecmesh%global_node_ID(:), hecmesh%global_elem_ID(:), is_init, iactive, hecmesh )
303 infoctchange%active = infoctchange%active .or. iactive
306 infoctchange%contactNode_current = infoctchange%contactNode_previous+infoctchange%free2contact-infoctchange%contact2free
307 infoctchange%contactNode_previous = infoctchange%contactNode_current
308 fstrsolid%ddunode = 0.d0
316 logical,
intent(in) :: a
321 integer(kind=kint),
intent(in) :: ctalgo
323 type (hecmwst_local_mesh),
intent(in) :: hecmesh
326 if( infoctchange%contact2free+infoctchange%contact2neighbor+ &
327 infoctchange%contact2difflpos+infoctchange%free2contact == 0 ) &
336 if( infoctchange%contact2free+infoctchange%contact2neighbor+infoctchange%free2contact > 0 ) &
341 integer(kind=kint),
intent(in) :: cstep
342 integer(kind=kint),
intent(in) :: ctAlgo
343 type( hecmwst_local_mesh ),
intent(in) :: hecMESH
344 type(hecmwst_matrix_lagrange),
intent(in) :: hecLagMAT
346 logical,
intent(out) :: ctchanged
348 integer(kind=kint) :: i, nc, algtype, grpid
350 gnt = 0.d0; ctchanged = .false.
351 nc = fstrsolid%n_contacts+fstrsolid%n_embeds
352 do i=1, fstrsolid%n_contacts
353 grpid = fstrsolid%contacts(i)%group
356 algtype = fstrsolid%contacts(i)%algtype
359 fstrsolid%dunode(:), fstrsolid%contacts(i)%fcoeff, &
360 hecmesh, heclagmat,
gnt, ctchanged )
367 do i=1, fstrsolid%n_embeds
372 call hecmw_allreduce_l1(hecmesh, ctchanged, hecmw_lor)
379 integer(kind=kint),
intent(in) :: cstep
382 integer(kind=kint) :: i, grpid
384 do i=1, fstrsolid%n_contacts
386 grpid = fstrsolid%contacts(i)%group
396 real(kind=kreal),
intent(in) ::
dt
398 integer(kind=kint) :: i
400 if(
associated( fstrsolid%CONT_RELVEL ) ) fstrsolid%CONT_RELVEL(:) = 0.d0
401 if(
associated( fstrsolid%CONT_STATE ) ) fstrsolid%CONT_STATE(:) = 0.d0
403 do i=1, fstrsolid%n_contacts
real(kind=kreal) function, dimension(:), pointer, public hecmw_mat_diag(hecMAT)
Extract diagonal components from matrix D into a 1D vector Returns: diag(i) = D(ndof*ndof*(node-1) + ...
This module defines common data and basic structures for analysis.
logical function fstr_isembedactive(fstrSOLID, nbc, cstep)
logical function fstr_iscontactactive(fstrSOLID, nbc, cstep)
integer(kind=kint), parameter kcaslagrange
contact analysis algorithm
real(kind=kreal) dt
ANALYSIS CONTROL for NLGEOM and HEAT.
integer(kind=kint), parameter kcaalagrange