16 integer (kind=kint),
allocatable ::
pointers(:)
17 integer (kind=kint),
allocatable ::
indices(:)
18 real (kind=kreal) ,
allocatable ::
values(:)
29 type(hecmwst_matrix) :: hecMAT
30 type (fstrST_matrix_contact_lagrange) :: fstrMAT
33 integer (kind=kint) :: np
34 integer (kind=kint) :: ndof
35 integer (kind=kint) :: num_lagrange
36 integer (kind=kint) :: nn
37 integer (kind=kint) :: ierr
38 integer (kind=kint) :: i, j, k, l, countNon0
42 np = hecmat%NP ; ndof = hecmat%NDOF ; num_lagrange = fstrmat%num_lagrange
43 nn = np*ndof + num_lagrange + 1
46 numnon0 = hecmat%NPU*ndof**2+hecmat%NP*ndof*(ndof+1)/2 &
47 + (fstrmat%numU_lagrange)*ndof+fstrmat%num_lagrange
49 numnon0 = (hecmat%NPL+hecmat%NPU+hecmat%NP)*ndof**2 &
50 + (fstrmat%numL_lagrange+fstrmat%numU_lagrange)*ndof
55 if( ierr /= 0 ) stop
" Allocation error, mkl%pointers "
60 if( ierr /= 0 ) stop
" Allocation error, mkl%indices "
69 do l = hecmat%indexL(i-1)+1, hecmat%indexL(i)
71 indices(countnon0) = (hecmat%itemL(l)-1)*ndof + k
72 countnon0 = countnon0 + 1
76 indices(countnon0) = (i-1)*ndof + k
77 countnon0 = countnon0 + 1
81 indices(countnon0) = (i-1)*ndof + k
82 countnon0 = countnon0 + 1
84 do l = hecmat%indexU(i-1)+1, hecmat%indexU(i)
86 indices(countnon0) = (hecmat%itemU(l)-1)*ndof + k
87 countnon0 = countnon0 + 1
90 if( num_lagrange > 0 )
then
91 do l = fstrmat%indexU_lagrange(i-1)+1, fstrmat%indexU_lagrange(i)
92 indices(countnon0) = np*ndof + fstrmat%itemU_lagrange(l)
93 countnon0 = countnon0 + 1
100 if( num_lagrange > 0 )
then
101 do i = 1, num_lagrange
103 indices(countnon0) = np*ndof + i
104 countnon0 = countnon0 + 1
106 do l = fstrmat%indexL_lagrange(i-1)+1, fstrmat%indexL_lagrange(i)
108 indices(countnon0) = (fstrmat%itemL_lagrange(l)-1)*ndof + k
109 countnon0 = countnon0 + 1
125 type(hecmwst_matrix) :: hecMAT
126 type (fstrST_matrix_contact_lagrange) :: fstrMAT
128 integer (kind=kint) :: np
129 integer (kind=kint) :: ndof
130 integer (kind=kint) :: num_lagrange
131 integer (kind=kint) :: ierr
132 integer (kind=kint) :: i, j, k, l
133 integer (kind=kint) :: countNon0, locINal, locINd, locINau, locINal_lag, locINau_lag
135 np = hecmat%NP ; ndof = hecmat%NDOF ; num_lagrange = fstrmat%num_lagrange
139 if( ierr /= 0 ) stop
" Allocation error, mkl%values "
146 do l = hecmat%indexL(i-1)+1, hecmat%indexL(i)
148 locinal = ((l-1)*ndof+j-1)*ndof + k
149 values(countnon0) = hecmat%AL(locinal)
150 countnon0 = countnon0 + 1
154 locind = ((i-1)*ndof+j-1)*ndof + k
155 values(countnon0) = hecmat%D(locind)
156 countnon0 = countnon0 + 1
160 locind = ((i-1)*ndof+j-1)*ndof + k
161 values(countnon0) = hecmat%D(locind)
162 countnon0 = countnon0 + 1
164 do l = hecmat%indexU(i-1)+1, hecmat%indexU(i)
166 locinau = ((l-1)*ndof+j-1)*ndof + k
167 values(countnon0) = hecmat%AU(locinau)
168 countnon0 = countnon0 + 1
171 if( num_lagrange > 0 )
then
172 do l = fstrmat%indexU_lagrange(i-1)+1, fstrmat%indexU_lagrange(i)
173 locinau_lag = (l-1)*ndof + j
174 values(countnon0) = fstrmat%AU_lagrange(locinau_lag)
175 countnon0 = countnon0 + 1
182 do i = 1, num_lagrange
183 do l = fstrmat%indexL_lagrange(i-1)+1, fstrmat%indexL_lagrange(i)
185 locinal_lag = (l-1)*ndof + k
186 values(countnon0) = fstrmat%AL_lagrange(locinal_lag)
187 countnon0 = countnon0 + 1
198 integer(kind=kint) :: ntdf
199 integer(kind=kint) :: i, j, k
200 real(kind=kreal) :: x(ntdf)
201 real(kind=kreal) :: y(ntdf)
207 y(i) = y(i) +
values(j)*x(k)
217 type(hecmwst_matrix) :: hecmat
219 integer(kind=kint) :: ntdf
220 real(kind=kreal),
allocatable :: y(:)
221 real(kind=kreal) :: residual_max
223 ntdf = hecmat%NP*hecmat%NDOF + fstrmat%num_lagrange
225 allocate(y(
size(hecmat%B)))
228 residual_max=maxval(dabs(y-hecmat%B))
229 write(*,*)
' maximum residual = ',residual_max
230 if( dabs(residual_max) >= 1.0d-8)
then
231 write(*,*)
' ###Maximum residual exceeded 1.0d-8---Direct Solver### '
This module defined coomon data and basic structures for analysis.