34 integer(kind=kint) :: contact_elim, solver_type, iterlog, timelog,
myrank
42 writelog = (
myrank==0 .and. (iterlog>0 .or. timelog>0))
44 if( contact_elim==0 )
then
45 if( solver_type==1 )
then
53 if( contact_elim==1 )
then
54 if( writelog )
write(*,*)
'solve contact with elimination'
57 if( writelog )
write(*,*)
'solve contact without elimination'
58 if( solver_type==1 )
then
59 write(*,*)
'ERROR: iterative solver without elimination not available in contact analysis'
61 elseif( solver_type==2 )
then
63 else if( solver_type==3 )
then
65 elseif( solver_type==5 )
then
79 integer(kind=kint),
intent(out) :: istat
80 real(kind=
kreal),
optional :: rf
81 logical :: is_contact_active
83 real(kind=
kreal) :: factor
84 real(kind=
kreal) :: t1, t2
85 integer(kind=kint) :: ndof
86 integer(kind=kint) :: contact_elim, solver_type
92 if(
present(rf) )factor = rf
97 if( contact_elim==1 )
then
100 if( solver_type==1 )
then
101 write(*,*)
'ERROR: iterative solver without elimination not available in contact analysis'
103 elseif( solver_type==2 )
then
105 write(*,*)
'ERROR: !SOLVER,METHOD=DIRECT not available in parallel contact analysis;',&
106 ' please use MUMPS or DIRECTmkl instead'
109 call add_conmat_to_hecmat(hecmat,conmat,heclagmat)
112 elseif( solver_type==3 )
then
116 call add_conmat_to_hecmat(hecmat,conmat,heclagmat)
119 elseif( solver_type==5 )
then
132 hecmat%X=factor*hecmat%X
137 subroutine add_conmat_to_hecmat(hecMAT,conMAT,hecLagMat)
143 integer(kind=kint) :: ndof,ndof2,i
148 do i=1,hecmat%NP*ndof + heclagmat%num_lagrange
149 hecmat%B(i) = hecmat%B(i) + conmat%B(i)
152 do i=1,hecmat%NP*ndof2
153 hecmat%D(i) = hecmat%D(i) + conmat%D(i)
156 do i=1,hecmat%NPL*ndof2
157 hecmat%AL(i) = hecmat%AL(i) + conmat%AL(i)
160 do i=1,hecmat%NPU*ndof2
161 hecmat%AU(i) = hecmat%AU(i) + conmat%AU(i)
163 end subroutine add_conmat_to_hecmat