FrontISTR  5.9.0
Large-scale structural analysis program with finit element method
hecmw_matrix_misc.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
2 ! Copyright (c) 2019 FrontISTR Commons
3 ! This software is released under the MIT License, see LICENSE.txt
4 !-------------------------------------------------------------------------------
5 
7  use hecmw_util
9  implicit none
10 
11  private
12  public :: hecmw_mat_clear
13  public :: hecmw_mat_clear_b
14  public :: hecmw_mat_init
15  public :: hecmw_mat_finalize
16  public :: hecmw_mat_copy_profile
17  public :: hecmw_mat_copy_val
18 
19  public :: hecmw_mat_set_iter
20  public :: hecmw_mat_get_iter
21  public :: hecmw_mat_set_method
22  public :: hecmw_mat_get_method
23  public :: hecmw_mat_set_precond
24  public :: hecmw_mat_get_precond
25  public :: hecmw_mat_set_nset
26  public :: hecmw_mat_get_nset
27  public :: hecmw_mat_set_iterpremax
28  public :: hecmw_mat_get_iterpremax
29  public :: hecmw_mat_set_nrest
30  public :: hecmw_mat_get_nrest
31  public :: hecmw_mat_set_nbfgs
32  public :: hecmw_mat_get_nbfgs
33  public :: hecmw_mat_set_scaling
34  public :: hecmw_mat_get_scaling
35  public :: hecmw_mat_set_penalized
36  public :: hecmw_mat_get_penalized
39  public :: hecmw_mat_set_mpc_method
40  public :: hecmw_mat_get_mpc_method
41  public :: hecmw_mat_set_estcond
42  public :: hecmw_mat_get_estcond
45  public :: hecmw_mat_set_iterlog
46  public :: hecmw_mat_get_iterlog
47  public :: hecmw_mat_set_timelog
48  public :: hecmw_mat_get_timelog
49  public :: hecmw_mat_set_loglevel
50  public :: hecmw_mat_get_loglevel
51  public :: hecmw_mat_set_dump
52  public :: hecmw_mat_get_dump
53  public :: hecmw_mat_set_dump_exit
54  public :: hecmw_mat_get_dump_exit
55  public :: hecmw_mat_set_usejad
56  public :: hecmw_mat_get_usejad
57  public :: hecmw_mat_set_ncolor_in
58  public :: hecmw_mat_get_ncolor_in
71 
72  public :: hecmw_mat_set_method2
73  public :: hecmw_mat_get_method2
80 
81  public :: hecmw_mat_set_solver_opt
82  public :: hecmw_mat_get_solver_opt
85 
86  public :: hecmw_mat_set_resid
87  public :: hecmw_mat_get_resid
88  public :: hecmw_mat_set_sigma_diag
89  public :: hecmw_mat_get_sigma_diag
90  public :: hecmw_mat_set_sigma
91  public :: hecmw_mat_get_sigma
92  public :: hecmw_mat_set_thresh
93  public :: hecmw_mat_get_thresh
94  public :: hecmw_mat_set_filter
95  public :: hecmw_mat_get_filter
96  public :: hecmw_mat_set_penalty
97  public :: hecmw_mat_get_penalty
100 
101  public :: hecmw_mat_diag_max
102  public :: hecmw_mat_diag
104  public :: hecmw_mat_substitute
105  public :: hecmw_mat_integrate
106 
107  integer, parameter :: IDX_I_ITER = 1
108  integer, parameter :: IDX_I_METHOD = 2
109  integer, parameter :: IDX_I_PRECOND = 3
110  integer, parameter :: IDX_I_NSET = 4
111  integer, parameter :: IDX_I_ITERPREMAX = 5
112  integer, parameter :: IDX_I_NREST = 6
113  integer, parameter :: IDX_I_NBFGS = 60
114  integer, parameter :: IDX_I_SCALING = 7
115  integer, parameter :: IDX_I_PENALIZED = 11
116  integer, parameter :: IDX_I_PENALIZED_B = 12
117  integer, parameter :: IDX_I_MPC_METHOD = 13
118  integer, parameter :: IDX_I_ESTCOND = 14
119  integer, parameter :: IDX_I_CONTACT_ELIM = 15
120  integer, parameter :: IDX_I_ITERLOG = 21
121  integer, parameter :: IDX_I_TIMELOG = 22
122  integer, parameter :: IDX_I_LOGLEVEL = 24 ! 23 is steplog (svIarray)
123  integer, parameter :: IDX_I_DUMP = 31
124  integer, parameter :: IDX_I_DUMP_EXIT = 32
125  integer, parameter :: IDX_I_USEJAD = 33
126  integer, parameter :: IDX_I_NCOLOR_IN = 34
127  integer, parameter :: IDX_I_MAXRECYCLE_PRECOND = 35
128  integer, parameter :: IDX_I_NRECYCLE_PRECOND = 96
129  integer, parameter :: IDX_I_FLAG_NUMFACT = 97
130  integer, parameter :: IDX_I_FLAG_SYMBFACT = 98
131  integer, parameter :: IDX_I_SOLVER_TYPE = 99
132 
133  integer, parameter :: IDX_I_METHOD2 = 8
134  integer, parameter :: IDX_I_FLAG_CONVERGED = 81
135  integer, parameter :: IDX_I_FLAG_DIVERGED = 82
136  integer, parameter :: IDX_I_FLAG_MPCMATVEC = 83
137 
138  integer, parameter :: IDX_I_SOLVER_OPT_S = 41
139  integer, parameter :: IDX_I_SOLVER_OPT_E = 50
140 
141  integer, parameter :: IDX_R_RESID = 1
142  integer, parameter :: IDX_R_SIGMA_DIAG = 2
143  integer, parameter :: IDX_R_SIGMA = 3
144  integer, parameter :: IDX_R_THRESH = 4
145  integer, parameter :: IDX_R_FILTER = 5
146  integer, parameter :: IDX_R_PENALTY = 11
147  integer, parameter :: IDX_R_PENALTY_ALPHA = 12
148  ! real-valued solver options, mirroring the integer SOLVER_OPT block (41:50)
149  integer, parameter :: IDX_R_SOLVER_OPT_S = 41
150  integer, parameter :: IDX_R_SOLVER_OPT_E = 50
151 
152 contains
153 
154  subroutine hecmw_mat_clear( hecMAT )
155  type(hecmwst_matrix) :: hecmat
156 
157  hecmat%D = 0.0d0
158  hecmat%AL = 0.0d0
159  hecmat%AU = 0.0d0
160  call hecmw_mat_set_penalized( hecmat, 0 )
161  call hecmw_mat_set_penalty_alpha( hecmat, 0.d0 )
162  end subroutine hecmw_mat_clear
163 
164  subroutine hecmw_mat_clear_b( hecMAT )
165  type(hecmwst_matrix) :: hecmat
166 
167  hecmat%B = 0.0d0
168  call hecmw_mat_set_penalized_b( hecmat, 0 )
169  end subroutine hecmw_mat_clear_b
170 
171  subroutine hecmw_mat_init( hecMAT )
172  type(hecmwst_matrix) :: hecmat
173 
174  call hecmw_nullify_matrix( hecmat )
175 
176  hecmat%Iarray = 0
177  hecmat%Rarray = 0.d0
178 
179  call hecmw_mat_set_iter( hecmat, 100 )
180  call hecmw_mat_set_method( hecmat, 1 )
181  call hecmw_mat_set_precond( hecmat, 1 )
182  call hecmw_mat_set_nset( hecmat, 0 )
183  call hecmw_mat_set_iterpremax( hecmat, 1 )
184  call hecmw_mat_set_nrest( hecmat, 10 )
185  call hecmw_mat_set_nbfgs( hecmat, 0 )
186  call hecmw_mat_set_scaling( hecmat, 0 )
187  call hecmw_mat_set_iterlog( hecmat, 0 )
188  call hecmw_mat_set_timelog( hecmat, 0 )
189  call hecmw_mat_set_loglevel( hecmat, -1 ) ! -1 = unset: consumers fall back to their default
190  call hecmw_mat_set_dump( hecmat, 0 )
191  call hecmw_mat_set_dump_exit( hecmat, 0 )
192  call hecmw_mat_set_usejad( hecmat, 0 )
193  call hecmw_mat_set_ncolor_in( hecmat, 10 )
194  call hecmw_mat_set_estcond( hecmat, 0 )
195  call hecmw_mat_set_maxrecycle_precond( hecmat, 3 )
196 
197  call hecmw_mat_set_resid( hecmat, 1.d-8 )
198  call hecmw_mat_set_sigma_diag( hecmat, 1.d0 )
199  call hecmw_mat_set_sigma( hecmat, 0.d0 )
200  call hecmw_mat_set_thresh( hecmat, 0.10d0 )
201  call hecmw_mat_set_filter( hecmat, 0.10d0 )
202 
203  call hecmw_mat_set_penalized( hecmat, 0 )
204  call hecmw_mat_set_penalty( hecmat, 1.d+4 )
205  call hecmw_mat_set_penalty_alpha( hecmat, 0.d0 )
206  call hecmw_mat_set_mpc_method( hecmat, 0 )
207 
208  call hecmw_mat_reset_nrecycle_precond( hecmat )
209  call hecmw_mat_set_flag_numfact( hecmat, 1 )
210  call hecmw_mat_set_flag_symbfact( hecmat, 1 )
211  call hecmw_mat_set_solver_type( hecmat, 1 )
212  end subroutine hecmw_mat_init
213 
214  subroutine hecmw_mat_finalize( hecMAT )
215  type(hecmwst_matrix) :: hecmat
216  if (associated(hecmat%D)) deallocate(hecmat%D)
217  if (associated(hecmat%B)) deallocate(hecmat%B)
218  if (associated(hecmat%X)) deallocate(hecmat%X)
219  if (associated(hecmat%AL)) deallocate(hecmat%AL)
220  if (associated(hecmat%AU)) deallocate(hecmat%AU)
221  if (associated(hecmat%indexL)) deallocate(hecmat%indexL)
222  if (associated(hecmat%indexU)) deallocate(hecmat%indexU)
223  if (associated(hecmat%itemL)) deallocate(hecmat%itemL)
224  if (associated(hecmat%itemU)) deallocate(hecmat%itemU)
225 #ifdef _OPENACC
226  if (associated(hecmat%A)) deallocate(hecmat%A)
227  if (associated(hecmat%indexA)) deallocate(hecmat%indexA)
228  if (associated(hecmat%itemA)) deallocate(hecmat%itemA)
229 #endif
230  end subroutine hecmw_mat_finalize
231 
232  subroutine hecmw_mat_copy_profile( hecMATorg, hecMAT )
233  type(hecmwst_matrix), intent(in) :: hecmatorg
234  type(hecmwst_matrix), intent(inout) :: hecmat
235  hecmat%N = hecmatorg%N
236  hecmat%NP = hecmatorg%NP
237  hecmat%NDOF = hecmatorg%NDOF
238  hecmat%NPL = hecmatorg%NPL
239  hecmat%NPU = hecmatorg%NPU
240  allocate(hecmat%indexL(0:size(hecmatorg%indexL)-1))
241  allocate(hecmat%indexU(0:size(hecmatorg%indexU)-1))
242  allocate(hecmat%itemL (size(hecmatorg%itemL )))
243  allocate(hecmat%itemU (size(hecmatorg%itemU )))
244  allocate(hecmat%D (size(hecmatorg%D )))
245  allocate(hecmat%AL(size(hecmatorg%AL)))
246  allocate(hecmat%AU(size(hecmatorg%AU)))
247  allocate(hecmat%B (size(hecmatorg%B )))
248  allocate(hecmat%X (size(hecmatorg%X )))
249  hecmat%indexL = hecmatorg%indexL
250  hecmat%indexU = hecmatorg%indexU
251  hecmat%itemL = hecmatorg%itemL
252  hecmat%itemU = hecmatorg%itemU
253  hecmat%D = 0.d0
254  hecmat%AL = 0.d0
255  hecmat%AU = 0.d0
256  hecmat%B = 0.d0
257  hecmat%X = 0.d0
258  end subroutine hecmw_mat_copy_profile
259 
260  subroutine hecmw_mat_copy_val( hecMATorg, hecMAT )
261  type(hecmwst_matrix), intent(in) :: hecmatorg
262  type(hecmwst_matrix), intent(inout) :: hecmat
263  integer(kind=kint) :: ierr
264  integer(kind=kint) :: i
265  ierr = 0
266  if (hecmat%N /= hecmatorg%N) ierr = 1
267  if (hecmat%NP /= hecmatorg%NP) ierr = 1
268  if (hecmat%NDOF /= hecmatorg%NDOF) ierr = 1
269  if (hecmat%NPL /= hecmatorg%NPL) ierr = 1
270  if (hecmat%NPU /= hecmatorg%NPU) ierr = 1
271  if (ierr /= 0) then
272  write(0,*) 'ERROR: hecmw_mat_copy_val: different profile'
273  stop
274  endif
275  do i = 1, size(hecmat%D)
276  hecmat%D(i) = hecmatorg%D(i)
277  enddo
278  do i = 1, size(hecmat%AL)
279  hecmat%AL(i) = hecmatorg%AL(i)
280  enddo
281  do i = 1, size(hecmat%AU)
282  hecmat%AU(i) = hecmatorg%AU(i)
283  enddo
284  end subroutine hecmw_mat_copy_val
285 
286  subroutine hecmw_mat_set_iter( hecMAT, iter )
287  type(hecmwst_matrix) :: hecmat
288  integer(kind=kint) :: iter
289 
290  hecmat%Iarray(idx_i_iter) = iter
291  end subroutine hecmw_mat_set_iter
292 
293  function hecmw_mat_get_iter( hecMAT )
294  integer(kind=kint) :: hecmw_mat_get_iter
295  type(hecmwst_matrix) :: hecmat
296 
297  hecmw_mat_get_iter = hecmat%Iarray(idx_i_iter)
298  end function hecmw_mat_get_iter
299 
300  subroutine hecmw_mat_set_method( hecMAT, method )
301  type(hecmwst_matrix) :: hecmat
302  integer(kind=kint) :: method
303 
304  hecmat%Iarray(idx_i_method) = method
305  end subroutine hecmw_mat_set_method
306 
307  function hecmw_mat_get_method( hecMAT )
308  integer(kind=kint) :: hecmw_mat_get_method
309  type(hecmwst_matrix) :: hecmat
310 
311  hecmw_mat_get_method = hecmat%Iarray(idx_i_method)
312  end function hecmw_mat_get_method
313 
314  subroutine hecmw_mat_set_method2( hecMAT, method2 )
315  type(hecmwst_matrix) :: hecmat
316  integer(kind=kint) :: method2
317 
318  hecmat%Iarray(idx_i_method2) = method2
319  end subroutine hecmw_mat_set_method2
320 
321  function hecmw_mat_get_method2( hecMAT )
322  integer(kind=kint) :: hecmw_mat_get_method2
323  type(hecmwst_matrix) :: hecmat
324 
325  hecmw_mat_get_method2 = hecmat%Iarray(idx_i_method2)
326  end function hecmw_mat_get_method2
327 
328  subroutine hecmw_mat_set_precond( hecMAT, precond )
329  type(hecmwst_matrix) :: hecmat
330  integer(kind=kint) :: precond
331 
332  hecmat%Iarray(idx_i_precond) = precond
333  end subroutine hecmw_mat_set_precond
334 
335  function hecmw_mat_get_precond( hecMAT )
336  integer(kind=kint) :: hecmw_mat_get_precond
337  type(hecmwst_matrix) :: hecmat
338 
339  hecmw_mat_get_precond = hecmat%Iarray(idx_i_precond)
340  end function hecmw_mat_get_precond
341 
342  subroutine hecmw_mat_set_nset( hecMAT, nset )
343  type(hecmwst_matrix) :: hecmat
344  integer(kind=kint) :: nset
345 
346  hecmat%Iarray(idx_i_nset) = nset
347  end subroutine hecmw_mat_set_nset
348 
349  function hecmw_mat_get_nset( hecMAT )
350  integer(kind=kint) :: hecmw_mat_get_nset
351  type(hecmwst_matrix) :: hecmat
352 
353  hecmw_mat_get_nset = hecmat%Iarray(idx_i_nset)
354  end function hecmw_mat_get_nset
355 
356  subroutine hecmw_mat_set_iterpremax( hecMAT, iterpremax )
357  type(hecmwst_matrix) :: hecmat
358  integer(kind=kint) :: iterpremax
359 
360  if (iterpremax.lt.0) iterpremax= 0
361  if (iterpremax.gt.4) iterpremax= 4
362 
363  hecmat%Iarray(idx_i_iterpremax) = iterpremax
364  end subroutine hecmw_mat_set_iterpremax
365 
366  function hecmw_mat_get_iterpremax( hecMAT )
367  integer(kind=kint) :: hecmw_mat_get_iterpremax
368  type(hecmwst_matrix) :: hecmat
369 
370  hecmw_mat_get_iterpremax = hecmat%Iarray(idx_i_iterpremax)
371  end function hecmw_mat_get_iterpremax
372 
373  subroutine hecmw_mat_set_nrest( hecMAT, nrest )
374  type(hecmwst_matrix) :: hecmat
375  integer(kind=kint) :: nrest
376 
377  hecmat%Iarray(idx_i_nrest) = nrest
378  end subroutine hecmw_mat_set_nrest
379 
380  function hecmw_mat_get_nrest( hecMAT )
381  integer(kind=kint) :: hecmw_mat_get_nrest
382  type(hecmwst_matrix) :: hecmat
383 
384  hecmw_mat_get_nrest = hecmat%Iarray(idx_i_nrest)
385  end function hecmw_mat_get_nrest
386 
387  subroutine hecmw_mat_set_nbfgs( hecMAT, nbfgs )
388  type(hecmwst_matrix) :: hecmat
389  integer(kind=kint) :: nbfgs
390 
391  hecmat%Iarray(idx_i_nbfgs) = nbfgs
392  end subroutine hecmw_mat_set_nbfgs
393 
394  function hecmw_mat_get_nbfgs( hecMAT )
395  integer(kind=kint) :: hecmw_mat_get_nbfgs
396  type(hecmwst_matrix) :: hecmat
397 
398  hecmw_mat_get_nbfgs = hecmat%Iarray(idx_i_nbfgs)
399  end function hecmw_mat_get_nbfgs
400 
401  subroutine hecmw_mat_set_scaling( hecMAT, scaling )
402  type(hecmwst_matrix) :: hecmat
403  integer(kind=kint) :: scaling
404 
405  hecmat%Iarray(idx_i_scaling) = scaling
406  end subroutine hecmw_mat_set_scaling
407 
408  function hecmw_mat_get_scaling( hecMAT )
409  integer(kind=kint) :: hecmw_mat_get_scaling
410  type(hecmwst_matrix) :: hecmat
411 
412  hecmw_mat_get_scaling = hecmat%Iarray(idx_i_scaling)
413  end function hecmw_mat_get_scaling
414 
415  subroutine hecmw_mat_set_penalized( hecMAT, penalized )
416  type(hecmwst_matrix) :: hecmat
417  integer(kind=kint) :: penalized
418 
419  hecmat%Iarray(idx_i_penalized) = penalized
420  end subroutine hecmw_mat_set_penalized
421 
422  function hecmw_mat_get_penalized( hecMAT )
423  integer(kind=kint) :: hecmw_mat_get_penalized
424  type(hecmwst_matrix) :: hecmat
425 
426  hecmw_mat_get_penalized = hecmat%Iarray(idx_i_penalized)
427  end function hecmw_mat_get_penalized
428 
429  subroutine hecmw_mat_set_penalized_b( hecMAT, penalized_b )
430  type(hecmwst_matrix) :: hecmat
431  integer(kind=kint) :: penalized_b
432 
433  hecmat%Iarray(idx_i_penalized_b) = penalized_b
434  end subroutine hecmw_mat_set_penalized_b
435 
436  function hecmw_mat_get_penalized_b( hecMAT )
437  integer(kind=kint) :: hecmw_mat_get_penalized_b
438  type(hecmwst_matrix) :: hecmat
439 
440  hecmw_mat_get_penalized_b = hecmat%Iarray(idx_i_penalized_b)
441  end function hecmw_mat_get_penalized_b
442 
443  subroutine hecmw_mat_set_mpc_method( hecMAT, mpc_method )
444  type(hecmwst_matrix) :: hecmat
445  integer(kind=kint) :: mpc_method
446 
447  hecmat%Iarray(idx_i_mpc_method) = mpc_method
448  end subroutine hecmw_mat_set_mpc_method
449 
450  function hecmw_mat_get_mpc_method( hecMAT )
451  integer(kind=kint) :: hecmw_mat_get_mpc_method
452  type(hecmwst_matrix) :: hecmat
453 
454  hecmw_mat_get_mpc_method = hecmat%Iarray(idx_i_mpc_method)
455  end function hecmw_mat_get_mpc_method
456 
457  function hecmw_mat_get_estcond( hecMAT )
458  integer(kind=kint) :: hecmw_mat_get_estcond
459  type(hecmwst_matrix) :: hecmat
460  hecmw_mat_get_estcond = hecmat%Iarray(idx_i_estcond)
461  end function hecmw_mat_get_estcond
462 
463  subroutine hecmw_mat_set_estcond( hecMAT, estcond )
464  type(hecmwst_matrix) :: hecmat
465  integer(kind=kint) :: estcond
466  hecmat%Iarray(idx_i_estcond) = estcond
467  end subroutine hecmw_mat_set_estcond
468 
469  function hecmw_mat_get_contact_elim( hecMAT )
470  integer(kind=kint) :: hecmw_mat_get_contact_elim
471  type(hecmwst_matrix) :: hecmat
472  hecmw_mat_get_contact_elim = hecmat%Iarray(idx_i_contact_elim)
473  end function hecmw_mat_get_contact_elim
474 
475  subroutine hecmw_mat_set_contact_elim( hecMAT, contact_elim )
476  type(hecmwst_matrix) :: hecmat
477  integer(kind=kint) :: contact_elim
478  hecmat%Iarray(idx_i_contact_elim) = contact_elim
479  end subroutine hecmw_mat_set_contact_elim
480 
481  subroutine hecmw_mat_set_iterlog( hecMAT, iterlog )
482  type(hecmwst_matrix) :: hecmat
483  integer(kind=kint) :: iterlog
484 
485  hecmat%Iarray(idx_i_iterlog) = iterlog
486  end subroutine hecmw_mat_set_iterlog
487 
488  function hecmw_mat_get_iterlog( hecMAT )
489  integer(kind=kint) :: hecmw_mat_get_iterlog
490  type(hecmwst_matrix) :: hecmat
491 
492  hecmw_mat_get_iterlog = hecmat%Iarray(idx_i_iterlog)
493  end function hecmw_mat_get_iterlog
494 
495  subroutine hecmw_mat_set_timelog( hecMAT, timelog )
496  type(hecmwst_matrix) :: hecmat
497  integer(kind=kint) :: timelog
498 
499  hecmat%Iarray(idx_i_timelog) = timelog
500  end subroutine hecmw_mat_set_timelog
501 
502  function hecmw_mat_get_timelog( hecMAT )
503  integer(kind=kint) :: hecmw_mat_get_timelog
504  type(hecmwst_matrix) :: hecmat
505 
506  hecmw_mat_get_timelog = hecmat%Iarray(idx_i_timelog)
507  end function hecmw_mat_get_timelog
508 
512  subroutine hecmw_mat_set_loglevel( hecMAT, loglevel )
513  type(hecmwst_matrix) :: hecmat
514  integer(kind=kint) :: loglevel
515 
516  hecmat%Iarray(idx_i_loglevel) = loglevel
517  end subroutine hecmw_mat_set_loglevel
518 
519  function hecmw_mat_get_loglevel( hecMAT )
520  integer(kind=kint) :: hecmw_mat_get_loglevel
521  type(hecmwst_matrix) :: hecmat
522 
523  hecmw_mat_get_loglevel = hecmat%Iarray(idx_i_loglevel)
524  end function hecmw_mat_get_loglevel
525 
526  function hecmw_mat_get_dump( hecMAT )
527  integer(kind=kint) :: hecmw_mat_get_dump
528  type(hecmwst_matrix) :: hecmat
529  hecmw_mat_get_dump = hecmat%Iarray(idx_i_dump)
530  end function hecmw_mat_get_dump
531 
532  subroutine hecmw_mat_set_dump( hecMAT, dump_type )
533  type(hecmwst_matrix) :: hecmat
534  integer(kind=kint) :: dump_type
535  hecmat%Iarray(idx_i_dump) = dump_type
536  end subroutine hecmw_mat_set_dump
537 
538  function hecmw_mat_get_dump_exit( hecMAT )
539  integer(kind=kint) :: hecmw_mat_get_dump_exit
540  type(hecmwst_matrix) :: hecmat
541  hecmw_mat_get_dump_exit = hecmat%Iarray(idx_i_dump_exit)
542  end function hecmw_mat_get_dump_exit
543 
544  subroutine hecmw_mat_set_dump_exit( hecMAT, dump_exit )
545  type(hecmwst_matrix) :: hecmat
546  integer(kind=kint) :: dump_exit
547  hecmat%Iarray(idx_i_dump_exit) = dump_exit
548  end subroutine hecmw_mat_set_dump_exit
549 
550  function hecmw_mat_get_usejad( hecMAT )
551  integer(kind=kint) :: hecmw_mat_get_usejad
552  type(hecmwst_matrix) :: hecmat
553  hecmw_mat_get_usejad = hecmat%Iarray(idx_i_usejad)
554  end function hecmw_mat_get_usejad
555 
556  subroutine hecmw_mat_set_usejad( hecMAT, usejad )
557  type(hecmwst_matrix) :: hecmat
558  integer(kind=kint) :: usejad
559  hecmat%Iarray(idx_i_usejad) = usejad
560  end subroutine hecmw_mat_set_usejad
561 
562  function hecmw_mat_get_ncolor_in( hecMAT )
563  integer(kind=kint) :: hecmw_mat_get_ncolor_in
564  type(hecmwst_matrix) :: hecmat
565  hecmw_mat_get_ncolor_in = hecmat%Iarray(idx_i_ncolor_in)
566  end function hecmw_mat_get_ncolor_in
567 
568  subroutine hecmw_mat_set_ncolor_in( hecMAT, ncolor_in )
569  type(hecmwst_matrix) :: hecmat
570  integer(kind=kint) :: ncolor_in
571  hecmat%Iarray(idx_i_ncolor_in) = ncolor_in
572  end subroutine hecmw_mat_set_ncolor_in
573 
575  integer(kind=kint) :: hecmw_mat_get_maxrecycle_precond
576  type(hecmwst_matrix) :: hecmat
577  hecmw_mat_get_maxrecycle_precond = hecmat%Iarray(idx_i_maxrecycle_precond)
579 
580  subroutine hecmw_mat_set_maxrecycle_precond( hecMAT, maxrecycle_precond )
581  type(hecmwst_matrix) :: hecmat
582  integer(kind=kint) :: maxrecycle_precond
583  if (maxrecycle_precond > 100) maxrecycle_precond = 100
584  hecmat%Iarray(idx_i_maxrecycle_precond) = maxrecycle_precond
585  end subroutine hecmw_mat_set_maxrecycle_precond
586 
588  integer(kind=kint) :: hecmw_mat_get_nrecycle_precond
589  type(hecmwst_matrix) :: hecmat
590  hecmw_mat_get_nrecycle_precond = hecmat%Iarray(idx_i_nrecycle_precond)
591  end function hecmw_mat_get_nrecycle_precond
592 
593  subroutine hecmw_mat_reset_nrecycle_precond( hecMAT )
594  type(hecmwst_matrix) :: hecmat
595  hecmat%Iarray(idx_i_nrecycle_precond) = 0
596  end subroutine hecmw_mat_reset_nrecycle_precond
597 
598  subroutine hecmw_mat_incr_nrecycle_precond( hecMAT )
599  type(hecmwst_matrix) :: hecmat
600  hecmat%Iarray(idx_i_nrecycle_precond) = hecmat%Iarray(idx_i_nrecycle_precond) + 1
601  end subroutine hecmw_mat_incr_nrecycle_precond
602 
603  function hecmw_mat_get_flag_numfact( hecMAT )
604  integer(kind=kint) :: hecmw_mat_get_flag_numfact
605  type(hecmwst_matrix) :: hecmat
606  hecmw_mat_get_flag_numfact = hecmat%Iarray(idx_i_flag_numfact)
607  end function hecmw_mat_get_flag_numfact
608 
609  subroutine hecmw_mat_set_flag_numfact( hecMAT, flag_numfact )
610  type(hecmwst_matrix) :: hecmat
611  integer(kind=kint) :: flag_numfact
612  hecmat%Iarray(idx_i_flag_numfact) = flag_numfact
613  end subroutine hecmw_mat_set_flag_numfact
614 
615  function hecmw_mat_get_flag_symbfact( hecMAT )
616  integer(kind=kint) :: hecmw_mat_get_flag_symbfact
617  type(hecmwst_matrix) :: hecmat
618  hecmw_mat_get_flag_symbfact = hecmat%Iarray(idx_i_flag_symbfact)
619  end function hecmw_mat_get_flag_symbfact
620 
621  subroutine hecmw_mat_set_flag_symbfact( hecMAT, flag_symbfact )
622  type(hecmwst_matrix) :: hecmat
623  integer(kind=kint) :: flag_symbfact
624  hecmat%Iarray(idx_i_flag_symbfact) = flag_symbfact
625  end subroutine hecmw_mat_set_flag_symbfact
626 
627  subroutine hecmw_mat_clear_flag_symbfact( hecMAT )
628  type(hecmwst_matrix) :: hecmat
629  hecmat%Iarray(idx_i_flag_symbfact) = 0
630  end subroutine hecmw_mat_clear_flag_symbfact
631 
632  function hecmw_mat_get_solver_type( hecMAT )
633  integer(kind=kint) :: hecmw_mat_get_solver_type
634  type(hecmwst_matrix) :: hecmat
635  hecmw_mat_get_solver_type = hecmat%Iarray(idx_i_solver_type)
636  end function hecmw_mat_get_solver_type
637 
638  subroutine hecmw_mat_set_solver_type( hecMAT, solver_type )
639  type(hecmwst_matrix) :: hecmat
640  integer(kind=kint) :: solver_type
641  hecmat%Iarray(idx_i_solver_type) = solver_type
642  end subroutine hecmw_mat_set_solver_type
643 
644  subroutine hecmw_mat_set_flag_converged( hecMAT, flag_converged )
645  type(hecmwst_matrix) :: hecmat
646  integer(kind=kint) :: flag_converged
647  hecmat%Iarray(idx_i_flag_converged) = flag_converged
648  end subroutine hecmw_mat_set_flag_converged
649 
650  function hecmw_mat_get_flag_converged( hecMAT )
651  integer(kind=kint) :: hecmw_mat_get_flag_converged
652  type(hecmwst_matrix) :: hecmat
653  hecmw_mat_get_flag_converged = hecmat%Iarray(idx_i_flag_converged)
654  end function hecmw_mat_get_flag_converged
655 
656  subroutine hecmw_mat_set_flag_diverged( hecMAT, flag_diverged )
657  type(hecmwst_matrix) :: hecmat
658  integer(kind=kint) :: flag_diverged
659  hecmat%Iarray(idx_i_flag_diverged) = flag_diverged
660  end subroutine hecmw_mat_set_flag_diverged
661 
662  function hecmw_mat_get_flag_diverged( hecMAT )
663  integer(kind=kint) :: hecmw_mat_get_flag_diverged
664  type(hecmwst_matrix) :: hecmat
665  hecmw_mat_get_flag_diverged = hecmat%Iarray(idx_i_flag_diverged)
666  end function hecmw_mat_get_flag_diverged
667 
668  subroutine hecmw_mat_set_flag_mpcmatvec( hecMAT, flag_mpcmatvec )
669  type(hecmwst_matrix) :: hecmat
670  integer(kind=kint) :: flag_mpcmatvec
671  hecmat%Iarray(idx_i_flag_mpcmatvec) = flag_mpcmatvec
672  end subroutine hecmw_mat_set_flag_mpcmatvec
673 
674  function hecmw_mat_get_flag_mpcmatvec( hecMAT )
675  integer(kind=kint) :: hecmw_mat_get_flag_mpcmatvec
676  type(hecmwst_matrix) :: hecmat
677  hecmw_mat_get_flag_mpcmatvec = hecmat%Iarray(idx_i_flag_mpcmatvec)
678  end function hecmw_mat_get_flag_mpcmatvec
679 
680  subroutine hecmw_mat_set_solver_opt( hecMAT, solver_opt )
681  type(hecmwst_matrix) :: hecmat
682  integer(kind=kint) :: solver_opt(:)
683  integer(kind=kint) :: nopt
684  nopt = idx_i_solver_opt_e - idx_i_solver_opt_s + 1
685  hecmat%Iarray(idx_i_solver_opt_s:idx_i_solver_opt_e) = solver_opt(1:nopt)
686  end subroutine hecmw_mat_set_solver_opt
687 
688  subroutine hecmw_mat_get_solver_opt( hecMAT, solver_opt )
689  type(hecmwst_matrix) :: hecmat
690  integer(kind=kint) :: solver_opt(:)
691  integer(kind=kint) :: nopt
692  nopt = idx_i_solver_opt_e - idx_i_solver_opt_s + 1
693  solver_opt(1:nopt) = hecmat%Iarray(idx_i_solver_opt_s:idx_i_solver_opt_e)
694  end subroutine hecmw_mat_get_solver_opt
695 
696  subroutine hecmw_mat_set_solver_ropt( hecMAT, solver_ropt )
697  type(hecmwst_matrix) :: hecmat
698  real(kind=kreal) :: solver_ropt(:)
699  integer(kind=kint) :: nopt
700  nopt = idx_r_solver_opt_e - idx_r_solver_opt_s + 1
701  hecmat%Rarray(idx_r_solver_opt_s:idx_r_solver_opt_e) = solver_ropt(1:nopt)
702  end subroutine hecmw_mat_set_solver_ropt
703 
704  subroutine hecmw_mat_get_solver_ropt( hecMAT, solver_ropt )
705  type(hecmwst_matrix) :: hecmat
706  real(kind=kreal) :: solver_ropt(:)
707  integer(kind=kint) :: nopt
708  nopt = idx_r_solver_opt_e - idx_r_solver_opt_s + 1
709  solver_ropt(1:nopt) = hecmat%Rarray(idx_r_solver_opt_s:idx_r_solver_opt_e)
710  end subroutine hecmw_mat_get_solver_ropt
711 
712  subroutine hecmw_mat_set_resid( hecMAT, resid )
713  type(hecmwst_matrix) :: hecmat
714  real(kind=kreal) :: resid
715 
716  hecmat%Rarray(idx_r_resid) = resid
717  end subroutine hecmw_mat_set_resid
718 
719  function hecmw_mat_get_resid( hecMAT )
720  real(kind=kreal) :: hecmw_mat_get_resid
721  type(hecmwst_matrix) :: hecmat
722 
723  hecmw_mat_get_resid = hecmat%Rarray(idx_r_resid)
724  end function hecmw_mat_get_resid
725 
726  subroutine hecmw_mat_set_sigma_diag( hecMAT, sigma_diag )
727  type(hecmwst_matrix) :: hecmat
728  real(kind=kreal) :: sigma_diag
729 
730  if( sigma_diag < 0.d0 ) then
731  hecmat%Rarray(idx_r_sigma_diag) = -1.d0
732  elseif( sigma_diag < 1.d0 ) then
733  hecmat%Rarray(idx_r_sigma_diag) = 1.d0
734  elseif( sigma_diag > 2.d0 ) then
735  hecmat%Rarray(idx_r_sigma_diag) = 2.d0
736  else
737  hecmat%Rarray(idx_r_sigma_diag) = sigma_diag
738  endif
739  end subroutine hecmw_mat_set_sigma_diag
740 
741  function hecmw_mat_get_sigma_diag( hecMAT )
742  real(kind=kreal) :: hecmw_mat_get_sigma_diag
743  type(hecmwst_matrix) :: hecmat
744 
745  hecmw_mat_get_sigma_diag = hecmat%Rarray(idx_r_sigma_diag)
746  end function hecmw_mat_get_sigma_diag
747 
748  subroutine hecmw_mat_set_sigma( hecMAT, sigma )
749  type(hecmwst_matrix) :: hecmat
750  real(kind=kreal) :: sigma
751 
752  if (sigma < 0.d0) then
753  hecmat%Rarray(idx_r_sigma) = 0.d0
754  elseif (sigma > 1.d0) then
755  hecmat%Rarray(idx_r_sigma) = 1.d0
756  else
757  hecmat%Rarray(idx_r_sigma) = sigma
758  endif
759  end subroutine hecmw_mat_set_sigma
760 
761  function hecmw_mat_get_sigma( hecMAT )
762  real(kind=kreal) :: hecmw_mat_get_sigma
763  type(hecmwst_matrix) :: hecmat
764 
765  hecmw_mat_get_sigma = hecmat%Rarray(idx_r_sigma)
766  end function hecmw_mat_get_sigma
767 
768  subroutine hecmw_mat_set_thresh( hecMAT, thresh )
769  type(hecmwst_matrix) :: hecmat
770  real(kind=kreal) :: thresh
771 
772  hecmat%Rarray(idx_r_thresh) = thresh
773  end subroutine hecmw_mat_set_thresh
774 
775  function hecmw_mat_get_thresh( hecMAT )
776  real(kind=kreal) :: hecmw_mat_get_thresh
777  type(hecmwst_matrix) :: hecmat
778 
779  hecmw_mat_get_thresh = hecmat%Rarray(idx_r_thresh)
780  end function hecmw_mat_get_thresh
781 
782  subroutine hecmw_mat_set_filter( hecMAT, filter )
783  type(hecmwst_matrix) :: hecmat
784  real(kind=kreal) :: filter
785 
786  hecmat%Rarray(idx_r_filter) = filter
787  end subroutine hecmw_mat_set_filter
788 
789  function hecmw_mat_get_filter( hecMAT )
790  real(kind=kreal) :: hecmw_mat_get_filter
791  type(hecmwst_matrix) :: hecmat
792 
793  hecmw_mat_get_filter = hecmat%Rarray(idx_r_filter)
794  end function hecmw_mat_get_filter
795 
796  subroutine hecmw_mat_set_penalty( hecMAT, penalty )
797  type(hecmwst_matrix) :: hecmat
798  real(kind=kreal) :: penalty
799 
800  hecmat%Rarray(idx_r_penalty) = penalty
801  end subroutine hecmw_mat_set_penalty
802 
803  function hecmw_mat_get_penalty( hecMAT )
804  real(kind=kreal) :: hecmw_mat_get_penalty
805  type(hecmwst_matrix) :: hecmat
806 
807  hecmw_mat_get_penalty = hecmat%Rarray(idx_r_penalty)
808  end function hecmw_mat_get_penalty
809 
810  subroutine hecmw_mat_set_penalty_alpha( hecMAT, alpha )
811  type(hecmwst_matrix) :: hecmat
812  real(kind=kreal) :: alpha
813 
814  hecmat%Rarray(idx_r_penalty_alpha) = alpha
815  end subroutine hecmw_mat_set_penalty_alpha
816 
817  function hecmw_mat_get_penalty_alpha( hecMAT )
818  real(kind=kreal) :: hecmw_mat_get_penalty_alpha
819  type(hecmwst_matrix) :: hecmat
820 
821  hecmw_mat_get_penalty_alpha = hecmat%Rarray(idx_r_penalty_alpha)
822  end function hecmw_mat_get_penalty_alpha
823 
824  function hecmw_mat_diag_max(hecMAT, hecMESH)
825  real(kind=kreal) :: hecmw_mat_diag_max
826  type (hecmwst_matrix) :: hecmat
827  type (hecmwst_local_mesh) :: hecmesh
828  integer(kind=kint) :: ndiag, i
829 
830  hecmw_mat_diag_max = -1.0e20
831  ndiag = hecmat%NDOF**2 * hecmat%NP
832  do i = 1, ndiag
833  if( hecmat%D(i) > hecmw_mat_diag_max ) hecmw_mat_diag_max = hecmat%D(i)
834  enddo
836  end function hecmw_mat_diag_max
837 
841  function hecmw_mat_diag(hecMAT) result(diag)
842  type(hecmwst_matrix), intent(in), target :: hecmat
843  real(kind=kreal), pointer :: diag(:)
844  integer(kind=kint) :: i, k, idx, ndof, np
845 
846  ndof = hecmat%NDOF
847  np = hecmat%NP
848  allocate(diag(ndof * np))
849 
850  do i = 1, np
851  do k = 1, ndof
852  idx = ndof * ndof * (i - 1) + (k-1) * ndof + k
853  diag(ndof * (i - 1) + k) = hecmat%D(idx)
854  enddo
855  enddo
856  end function hecmw_mat_diag
857 
859  type (hecmwst_matrix) :: hecmat
860  integer(kind=kint) :: nrecycle, maxrecycle
861  if (hecmat%Iarray(idx_i_flag_symbfact) >= 1) then
862  hecmat%Iarray(idx_i_flag_numfact)=1
864  elseif (hecmat%Iarray(idx_i_flag_numfact) > 1) then
866  hecmat%Iarray(idx_i_flag_numfact) = 1
867  elseif (hecmat%Iarray(idx_i_flag_numfact) == 1) then
868  nrecycle = hecmw_mat_get_nrecycle_precond(hecmat)
869  maxrecycle = hecmw_mat_get_maxrecycle_precond(hecmat)
870  if ( nrecycle < maxrecycle ) then
871  hecmat%Iarray(idx_i_flag_numfact) = 0
873  else
875  endif
876  endif
877  end subroutine hecmw_mat_recycle_precond_setting
878 
879  subroutine hecmw_mat_substitute( dest, src )
880  type (hecmwst_matrix), intent(inout) :: dest
881  type (hecmwst_matrix), intent(inout) :: src
882  dest%N = src%N
883  dest%NP = src%NP
884  dest%NPL = src%NPL
885  dest%NPU = src%NPU
886  dest%NDOF = src%NDOF
887  if (associated(src%D)) dest%D => src%D
888  if (associated(src%B)) dest%B => src%B
889  if (associated(src%X)) dest%X => src%X
890  if (associated(src%AL)) dest%AL => src%AL
891  if (associated(src%AU)) dest%AU => src%AU
892  if (associated(src%indexL)) dest%indexL => src%indexL
893  if (associated(src%indexU)) dest%indexU => src%indexU
894  if (associated(src%itemL)) dest%itemL => src%itemL
895  if (associated(src%itemU)) dest%itemU => src%itemU
896  dest%Iarray(:) = src%Iarray(:)
897  dest%Rarray(:) = src%Rarray(:)
898  end subroutine hecmw_mat_substitute
899 
912  subroutine hecmw_mat_integrate( hecMAT )
913  type (hecmwst_matrix), intent(inout) :: hecmat
914 #ifdef _OPENACC
915  integer(kind=kint) :: i, j, k, nn, pre, pp, js, je
916 
917  nn = hecmat%NDOF * hecmat%NDOF
918  hecmat%NPA = hecmat%NP + hecmat%NPL + hecmat%NPU
919  if (associated(hecmat%A)) deallocate(hecmat%A)
920  if (associated(hecmat%indexA)) deallocate(hecmat%indexA)
921  if (associated(hecmat%itemA)) deallocate(hecmat%itemA)
922  allocate (hecmat%A(nn * hecmat%NPA))
923  allocate (hecmat%indexA(0:hecmat%NP))
924  allocate (hecmat%itemA(hecmat%NPA))
925  hecmat%indexA(0) = 0
926 
927  pre = 0
928  pp = 0
929  !$acc parallel loop private(i, j, k, pre, pp, jS, jE)
930  do i = 1, hecmat%NP
931  hecmat%indexA(i) = i + hecmat%indexL(i) + hecmat%indexU(i)
932 
933  pre = i - 1 + hecmat%indexU(i - 1)
934  js= hecmat%indexL(i - 1) + 1
935  je= hecmat%indexL(i )
936  do j = js, je
937  pp = pre + j
938  hecmat%itemA(pp) = hecmat%itemL(j)
939  do k = -nn+1, 0
940  hecmat%A(nn * pp + k) = hecmat%AL(nn * j + k)
941  enddo
942  enddo
943 
944  pp = i + hecmat%indexU(i - 1) + hecmat%indexL(i)
945  hecmat%itemA(pp) = i
946  do k = -nn+1, 0
947  hecmat%A(nn * pp + k) = hecmat%D(nn * i + k)
948  enddo
949 
950  pre = i + hecmat%indexL(i)
951  js= hecmat%indexU(i - 1) + 1
952  je= hecmat%indexU(i )
953  do j = js, je
954  pp = pre + j
955  hecmat%itemA(pp) = hecmat%itemU(j)
956  do k = -nn+1, 0
957  hecmat%A(nn * pp + k) = hecmat%AU(nn * j + k)
958  enddo
959  enddo
960  enddo
961  !$acc end parallel
962 #endif
963  end subroutine hecmw_mat_integrate
964 
965 end module hecmw_matrix_misc
integer(kind=kint) function, public hecmw_mat_get_solver_type(hecMAT)
integer(kind=kint) function, public hecmw_mat_get_flag_mpcmatvec(hecMAT)
subroutine, public hecmw_mat_set_usejad(hecMAT, usejad)
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) + ...
subroutine, public hecmw_mat_set_ncolor_in(hecMAT, ncolor_in)
integer(kind=kint) function, public hecmw_mat_get_flag_diverged(hecMAT)
subroutine, public hecmw_mat_integrate(hecMAT)
Integrate matrix components into a single array for efficient access.
subroutine, public hecmw_mat_clear_flag_symbfact(hecMAT)
real(kind=kreal) function, public hecmw_mat_get_sigma_diag(hecMAT)
real(kind=kreal) function, public hecmw_mat_diag_max(hecMAT, hecMESH)
integer(kind=kint) function, public hecmw_mat_get_iterpremax(hecMAT)
subroutine, public hecmw_mat_set_sigma(hecMAT, sigma)
subroutine, public hecmw_mat_set_contact_elim(hecMAT, contact_elim)
integer(kind=kint) function, public hecmw_mat_get_dump_exit(hecMAT)
integer(kind=kint) function, public hecmw_mat_get_nrest(hecMAT)
subroutine, public hecmw_mat_init(hecMAT)
subroutine, public hecmw_mat_set_iter(hecMAT, iter)
subroutine, public hecmw_mat_set_iterlog(hecMAT, iterlog)
subroutine, public hecmw_mat_finalize(hecMAT)
integer(kind=kint) function, public hecmw_mat_get_nrecycle_precond(hecMAT)
integer(kind=kint) function, public hecmw_mat_get_penalized(hecMAT)
subroutine, public hecmw_mat_copy_val(hecMATorg, hecMAT)
subroutine, public hecmw_mat_set_flag_diverged(hecMAT, flag_diverged)
subroutine, public hecmw_mat_set_penalized_b(hecMAT, penalized_b)
real(kind=kreal) function, public hecmw_mat_get_resid(hecMAT)
subroutine, public hecmw_mat_set_estcond(hecMAT, estcond)
integer(kind=kint) function, public hecmw_mat_get_maxrecycle_precond(hecMAT)
subroutine, public hecmw_mat_set_thresh(hecMAT, thresh)
subroutine, public hecmw_mat_set_flag_converged(hecMAT, flag_converged)
integer(kind=kint) function, public hecmw_mat_get_flag_converged(hecMAT)
integer(kind=kint) function, public hecmw_mat_get_penalized_b(hecMAT)
integer(kind=kint) function, public hecmw_mat_get_dump(hecMAT)
real(kind=kreal) function, public hecmw_mat_get_penalty_alpha(hecMAT)
subroutine, public hecmw_mat_get_solver_opt(hecMAT, solver_opt)
subroutine, public hecmw_mat_set_solver_ropt(hecMAT, solver_ropt)
integer(kind=kint) function, public hecmw_mat_get_nbfgs(hecMAT)
subroutine, public hecmw_mat_substitute(dest, src)
real(kind=kreal) function, public hecmw_mat_get_penalty(hecMAT)
subroutine, public hecmw_mat_recycle_precond_setting(hecMAT)
subroutine, public hecmw_mat_incr_nrecycle_precond(hecMAT)
subroutine, public hecmw_mat_set_sigma_diag(hecMAT, sigma_diag)
subroutine, public hecmw_mat_set_penalty_alpha(hecMAT, alpha)
subroutine, public hecmw_mat_clear_b(hecMAT)
subroutine, public hecmw_mat_set_dump_exit(hecMAT, dump_exit)
integer(kind=kint) function, public hecmw_mat_get_iterlog(hecMAT)
subroutine, public hecmw_mat_set_flag_symbfact(hecMAT, flag_symbfact)
integer(kind=kint) function, public hecmw_mat_get_timelog(hecMAT)
subroutine, public hecmw_mat_set_nset(hecMAT, nset)
subroutine, public hecmw_mat_set_flag_numfact(hecMAT, flag_numfact)
integer(kind=kint) function, public hecmw_mat_get_loglevel(hecMAT)
subroutine, public hecmw_mat_copy_profile(hecMATorg, hecMAT)
subroutine, public hecmw_mat_set_method(hecMAT, method)
subroutine, public hecmw_mat_set_filter(hecMAT, filter)
integer(kind=kint) function, public hecmw_mat_get_method2(hecMAT)
integer(kind=kint) function, public hecmw_mat_get_flag_numfact(hecMAT)
subroutine, public hecmw_mat_set_penalized(hecMAT, penalized)
subroutine, public hecmw_mat_set_penalty(hecMAT, penalty)
subroutine, public hecmw_mat_set_maxrecycle_precond(hecMAT, maxrecycle_precond)
subroutine, public hecmw_mat_clear(hecMAT)
integer(kind=kint) function, public hecmw_mat_get_contact_elim(hecMAT)
subroutine, public hecmw_mat_set_timelog(hecMAT, timelog)
subroutine, public hecmw_mat_set_resid(hecMAT, resid)
real(kind=kreal) function, public hecmw_mat_get_thresh(hecMAT)
integer(kind=kint) function, public hecmw_mat_get_flag_symbfact(hecMAT)
subroutine, public hecmw_mat_set_flag_mpcmatvec(hecMAT, flag_mpcmatvec)
integer(kind=kint) function, public hecmw_mat_get_method(hecMAT)
subroutine, public hecmw_mat_get_solver_ropt(hecMAT, solver_ropt)
integer(kind=kint) function, public hecmw_mat_get_precond(hecMAT)
integer(kind=kint) function, public hecmw_mat_get_nset(hecMAT)
subroutine, public hecmw_mat_set_iterpremax(hecMAT, iterpremax)
real(kind=kreal) function, public hecmw_mat_get_filter(hecMAT)
integer(kind=kint) function, public hecmw_mat_get_estcond(hecMAT)
subroutine, public hecmw_mat_set_nrest(hecMAT, nrest)
integer(kind=kint) function, public hecmw_mat_get_usejad(hecMAT)
subroutine, public hecmw_mat_set_solver_type(hecMAT, solver_type)
subroutine, public hecmw_mat_set_method2(hecMAT, method2)
integer(kind=kint) function, public hecmw_mat_get_mpc_method(hecMAT)
integer(kind=kint) function, public hecmw_mat_get_ncolor_in(hecMAT)
real(kind=kreal) function, public hecmw_mat_get_sigma(hecMAT)
subroutine, public hecmw_mat_set_nbfgs(hecMAT, nbfgs)
integer(kind=kint) function, public hecmw_mat_get_iter(hecMAT)
subroutine, public hecmw_mat_set_precond(hecMAT, precond)
subroutine, public hecmw_mat_set_solver_opt(hecMAT, solver_opt)
integer(kind=kint) function, public hecmw_mat_get_scaling(hecMAT)
subroutine, public hecmw_mat_reset_nrecycle_precond(hecMAT)
subroutine, public hecmw_mat_set_scaling(hecMAT, scaling)
subroutine, public hecmw_mat_set_mpc_method(hecMAT, mpc_method)
subroutine, public hecmw_mat_set_dump(hecMAT, dump_type)
subroutine, public hecmw_mat_set_loglevel(hecMAT, loglevel)
Diagnostic verbosity level, set independently of TIMELOG via the !SOLVER LOGLEVEL keyword (defaults t...
I/O and Utility.
Definition: hecmw_util_f.F90:7
integer(kind=kint), parameter hecmw_max
integer(kind=4), parameter kreal
subroutine hecmw_nullify_matrix(P)
subroutine hecmw_allreduce_r1(hecMESH, s, ntag)