11 subroutine fstr_addspring(cstep, hecMESH, hecMAT, fstrSOLID, fstrPARAM)
14 integer,
intent(in) :: cstep
15 type (hecmwST_matrix),
intent(inout) :: hecMAT
16 type (hecmwST_local_mesh),
intent(in) :: hecMESH
17 type (fstr_solid),
intent(inout) :: fstrSOLID
18 type (fstr_param),
intent(inout) :: fstrPARAM
20 integer(kind=kint) :: grpid, ndof, ig0, ig, ityp, iS0, iE0, ik, in, idx, num
21 real(kind=kreal) :: fval, factor
23 factor = fstrsolid%factor(2)
26 do ig0= 1, fstrsolid%SPRING_ngrp_tot
27 grpid = fstrsolid%SPRING_ngrp_GRPID(ig0)
29 ig= fstrsolid%SPRING_ngrp_ID(ig0)
30 ityp= fstrsolid%SPRING_ngrp_DOF(ig0)
31 fval= fstrsolid%SPRING_ngrp_val(ig0)
32 if( fval < 0.d0 ) fval = -fval*(1.d0-factor)
34 is0= hecmesh%node_group%grp_index(ig-1) + 1
35 ie0= hecmesh%node_group%grp_index(ig )
37 in = hecmesh%node_group%grp_item(ik)
38 idx = ndof**2 * (in - 1) + ndof * (ityp - 1) + ityp
39 hecmat%D(idx) = hecmat%D(idx) + fval
47 integer(kind=kint),
intent(in) :: cstep
48 type (hecmwST_local_mesh),
intent(in) :: hecMESH
49 type (fstr_solid),
intent(in) :: fstrSOLID
50 real(kind=kreal),
intent(inout) :: b(:)
52 integer(kind=kint) ndof,ig0,ig,ityp,iS0,iE0,ik,in,idx,num
53 integer(kind=kint) :: grpid
54 real(kind=kreal) :: fval, factor
56 factor = fstrsolid%factor(2)
59 do ig0= 1, fstrsolid%SPRING_ngrp_tot
60 grpid = fstrsolid%SPRING_ngrp_GRPID(ig0)
62 ig= fstrsolid%SPRING_ngrp_ID(ig0)
63 ityp= fstrsolid%SPRING_ngrp_DOF(ig0)
64 fval= fstrsolid%SPRING_ngrp_val(ig0)
65 if( fval < 0.d0 ) fval = -fval*(1.d0-factor)
67 is0= hecmesh%node_group%grp_index(ig-1) + 1
68 ie0= hecmesh%node_group%grp_index(ig )
70 in = hecmesh%node_group%grp_item(ik)
71 idx = ndof * (in - 1) + ityp
72 b(idx) = b(idx) - fval * ( fstrsolid%dunode( idx ) + fstrsolid%unode( idx ) )