15 logical,
private :: is_cutback_active = .false.
25 type(hecmwst_local_mesh) :: hecMESH
29 integer(kind=kint) :: istep, i, j
30 integer(kind=kint) :: ng
31 integer(kind=kint) :: ncont, nstate
33 do istep=1,fstrsolid%nstep_tot
34 if( fstrsolid%step_ctrl(istep)%inc_type == stepautoinc ) is_cutback_active = .true.
37 if( .not. is_cutback_active )
return
41 allocate(fstrsolid%unode_bkup(
size(fstrsolid%unode)))
42 allocate(fstrsolid%QFORCE_bkup(
size(fstrsolid%QFORCE)))
43 if( fstrsolid%TEMP_ngrp_tot > 0 .or. fstrsolid%TEMP_irres > 0 )
then
44 allocate(fstrsolid%last_temp_bkup(
size(fstrsolid%last_temp)))
48 allocate(fstrsolid%elements_bkup(
size(fstrsolid%elements)))
49 do i=1,
size(fstrsolid%elements)
50 if (hecmw_is_etype_link( fstrsolid%elements(i)%etype )) cycle
51 if (hecmw_is_etype_patch( fstrsolid%elements(i)%etype )) cycle
53 allocate( fstrsolid%elements_bkup(i)%gausses(ng) )
55 fstrsolid%elements_bkup(i)%gausses(j)%pMaterial => fstrsolid%elements(i)%gausses(j)%pMaterial
58 if(
associated( fstrsolid%elements(i)%aux ) )
then
59 allocate( fstrsolid%elements_bkup(i)%aux(3,3) )
64 ncont = fstrsolid%n_contacts
65 if(
associated(fstrsolid%contacts) )
then
66 allocate(fstrsolid%contacts_bkup(ncont))
68 nstate =
size(fstrsolid%contacts(i)%states)
69 allocate(fstrsolid%contacts_bkup(i)%states(nstate))
74 ncont = fstrsolid%n_embeds
75 if(
associated(fstrsolid%embeds) )
then
76 allocate(fstrsolid%embeds_bkup(ncont))
78 nstate =
size(fstrsolid%embeds(i)%states)
79 allocate(fstrsolid%embeds_bkup(i)%states(nstate))
89 integer(kind=kint) :: i, j
90 integer(kind=kint) :: ng
91 integer(kind=kint) :: ncont
93 if( .not. is_cutback_active )
return
97 if(
associated(fstrsolid%unode_bkup) )
deallocate(fstrsolid%unode_bkup)
98 if(
associated(fstrsolid%QFORCE_bkup) )
deallocate(fstrsolid%QFORCE_bkup)
99 if( fstrsolid%TEMP_ngrp_tot > 0 .or. fstrsolid%TEMP_irres > 0 )
then
100 if(
associated(fstrsolid%last_temp_bkup) )
deallocate(fstrsolid%last_temp_bkup)
104 do i=1,
size(fstrsolid%elements)
105 if (hecmw_is_etype_link( fstrsolid%elements(i)%etype )) cycle
106 if (hecmw_is_etype_patch( fstrsolid%elements(i)%etype )) cycle
111 deallocate( fstrsolid%elements_bkup(i)%gausses )
112 if(
associated( fstrsolid%elements_bkup(i)%aux ) )
then
113 deallocate( fstrsolid%elements_bkup(i)%aux )
116 deallocate(fstrsolid%elements_bkup)
119 ncont = fstrsolid%n_contacts
120 if(
associated(fstrsolid%contacts) )
then
122 deallocate(fstrsolid%contacts_bkup(i)%states)
124 deallocate(fstrsolid%contacts_bkup)
128 ncont = fstrsolid%n_embeds
129 if(
associated(fstrsolid%embeds) )
then
131 deallocate(fstrsolid%embeds_bkup(i)%states)
133 deallocate(fstrsolid%embeds_bkup)
145 integer(kind=kint) :: i, j
146 integer(kind=kint) :: ng
147 integer(kind=kint) :: ncont, nstate
149 if( .not. is_cutback_active )
return
152 do i=1,
size(fstrsolid%unode)
153 fstrsolid%unode_bkup(i) = fstrsolid%unode(i)
155 do i=1,
size(fstrsolid%QFORCE)
156 fstrsolid%QFORCE_bkup(i) = fstrsolid%QFORCE(i)
158 if( fstrsolid%TEMP_ngrp_tot > 0 .or. fstrsolid%TEMP_irres > 0 )
then
159 do i=1,
size(fstrsolid%last_temp)
160 fstrsolid%last_temp_bkup(i) = fstrsolid%last_temp(i)
165 do i=1,
size(fstrsolid%elements)
166 if (hecmw_is_etype_link( fstrsolid%elements(i)%etype )) cycle
167 if (hecmw_is_etype_patch( fstrsolid%elements(i)%etype )) cycle
170 call fstr_copy_gauss( fstrsolid%elements(i)%gausses(j), fstrsolid%elements_bkup(i)%gausses(j) )
172 if(
associated( fstrsolid%elements(i)%aux ) )
then
173 fstrsolid%elements_bkup(i)%aux(:,:) = fstrsolid%elements(i)%aux(:,:)
178 ncont = fstrsolid%n_contacts
179 if(
associated(fstrsolid%contacts) )
then
181 nstate =
size(fstrsolid%contacts(i)%states)
183 call contact_state_copy(fstrsolid%contacts(i)%states(j), fstrsolid%contacts_bkup(i)%states(j))
186 infoctchange_bak = infoctchange
190 ncont = fstrsolid%n_embeds
191 if(
associated(fstrsolid%embeds) )
then
193 nstate =
size(fstrsolid%embeds(i)%states)
195 call contact_state_copy(fstrsolid%embeds(i)%states(j), fstrsolid%embeds_bkup(i)%states(j))
198 infoctchange_bak = infoctchange
208 integer(kind=kint) :: i, j
209 integer(kind=kint) :: ng
210 integer(kind=kint) :: ncont, nstate
212 if( .not. is_cutback_active )
return
215 do i=1,
size(fstrsolid%unode)
216 fstrsolid%unode(i) = fstrsolid%unode_bkup(i)
218 do i=1,
size(fstrsolid%QFORCE)
219 fstrsolid%QFORCE(i) = fstrsolid%QFORCE_bkup(i)
221 if( fstrsolid%TEMP_ngrp_tot > 0 .or. fstrsolid%TEMP_irres > 0 )
then
222 do i=1,
size(fstrsolid%last_temp)
223 fstrsolid%last_temp(i) = fstrsolid%last_temp_bkup(i)
228 do i=1,
size(fstrsolid%elements)
229 if (hecmw_is_etype_link( fstrsolid%elements(i)%etype )) cycle
230 if (hecmw_is_etype_patch( fstrsolid%elements(i)%etype )) cycle
233 call fstr_copy_gauss( fstrsolid%elements_bkup(i)%gausses(j), fstrsolid%elements(i)%gausses(j) )
235 if(
associated( fstrsolid%elements(i)%aux ) )
then
236 fstrsolid%elements(i)%aux(:,:) = fstrsolid%elements_bkup(i)%aux(:,:)
241 ncont = fstrsolid%n_contacts
242 if(
associated(fstrsolid%contacts) )
then
244 nstate =
size(fstrsolid%contacts(i)%states)
246 call contact_state_copy(fstrsolid%contacts_bkup(i)%states(j), fstrsolid%contacts(i)%states(j))
249 infoctchange = infoctchange_bak
253 ncont = fstrsolid%n_embeds
254 if(
associated(fstrsolid%embeds) )
then
256 nstate =
size(fstrsolid%embeds(i)%states)
258 call contact_state_copy(fstrsolid%embeds_bkup(i)%states(j), fstrsolid%embeds(i)%states(j))
261 infoctchange = infoctchange_bak