FrontISTR  5.9.0
Large-scale structural analysis program with finit element method
hecmw_util_f.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 !-------------------------------------------------------------------------------
6 
7 module hecmw_util
8 #ifndef HECMW_SERIAL
9  use mpi
10 #endif
11  implicit none
12  private :: hecmw_petot,hecmw_rank,hecmw_comm,hecmw_group
13  public
14 
15  integer(kind=4),parameter:: kint = 4
16  integer(kind=4),parameter:: kreal = 8
17 
18  integer(kind=kint),parameter :: hecmw_name_len = 63
19  integer(kind=kint),parameter :: hecmw_header_len = 127
20  integer(kind=kint),parameter :: hecmw_msg_len = 255
21  integer(kind=kint),parameter :: hecmw_filename_len = 1023
22 
24  integer(kind=kint),parameter :: hecmw_exit_success = 0
25  integer(kind=kint),parameter :: hecmw_exit_usage = 1
26  integer(kind=kint),parameter :: hecmw_exit_input = 2
27  integer(kind=kint),parameter :: hecmw_exit_model = 3
28  integer(kind=kint),parameter :: hecmw_exit_solver_setup = 4
29  integer(kind=kint),parameter :: hecmw_exit_noconv = 10
30  integer(kind=kint),parameter :: hecmw_exit_internal = 20
31 
32  integer(kind=kint),parameter :: hecmw_sum = 46801
33  integer(kind=kint),parameter :: hecmw_prod = 46802
34  integer(kind=kint),parameter :: hecmw_max = 46803
35  integer(kind=kint),parameter :: hecmw_min = 46804
36  integer(kind=kint),parameter :: hecmw_lor = 46805
37  integer(kind=kint),parameter :: hecmw_land = 46806
38  integer(kind=kint),parameter :: hecmw_integer = 53951
39  integer(kind=kint),parameter :: hecmw_single_precision = 53952
40  integer(kind=kint),parameter :: hecmw_double_precision = 53953
41  integer(kind=kint),parameter :: hecmw_character = 53954
42 
43 #ifndef HECMW_SERIAL
44  integer(kind=kint),parameter :: hecmw_status_size = mpi_status_size
45 #else
46  integer(kind=kint),parameter :: hecmw_status_size = 1
47 #endif
48 
49  integer(kind=kint) :: hecmw_petot,hecmw_rank,hecmw_comm,hecmw_group
50  !C
51  !C +---------------+
52  !C | SECTION info. |
53  !C +---------------+
54  !C===
56  integer(kind=kint) :: n_sect
57  integer(kind=kint),pointer :: sect_type(:)
58  integer(kind=kint),pointer :: sect_opt(:)
59  integer(kind=kint),pointer :: sect_mat_id_index(:)
60  integer(kind=kint),pointer :: sect_mat_id_item(:)
61  integer(kind=kint),pointer :: sect_i_index(:)
62  integer(kind=kint),pointer :: sect_i_item(:)
63  integer(kind=kint),pointer :: sect_r_index(:)
64  real(kind=kreal),pointer :: sect_r_item(:)
65  integer(kind=kint),pointer :: sect_orien_id(:) => null()
66  end type hecmwst_section
67 
68  !C for hecmwST_section%sect_type
69  integer(kind=kint),parameter :: hecmw_sect_type_solid = 1
70  integer(kind=kint),parameter :: hecmw_sect_type_shell = 2
71  integer(kind=kint),parameter :: hecmw_sect_type_beam = 3
72  integer(kind=kint),parameter :: hecmw_sect_type_interface = 4
73  !C for hecmwST_section%sect_opt
74  integer(kind=kint),parameter :: hecmw_sect_opt_pstress = 0
75  integer(kind=kint),parameter :: hecmw_sect_opt_pstrain = 1
76  integer(kind=kint),parameter :: hecmw_sect_opt_asymmetry = 2
77  integer(kind=kint),parameter :: hecmw_sect_opt_pstress_ri = 10
78  integer(kind=kint),parameter :: hecmw_sect_opt_pstrain_ri = 11
79  integer(kind=kint),parameter :: hecmw_sect_opt_asymmetry_ri = 12
80  !C===
81 
82  !C
83  !C +----------------+
84  !C | MATERIAL info. |
85  !C +----------------+
86  !C===
88  integer(kind=kint) :: n_mat
89  integer(kind=kint) :: n_mat_item
90  integer(kind=kint) :: n_mat_subitem
91  integer(kind=kint) :: n_mat_table
92  character(HECMW_NAME_LEN),pointer :: mat_name(:)
93  integer(kind=kint),pointer :: mat_item_index(:)
94  integer(kind=kint),pointer :: mat_subitem_index(:)
95  integer(kind=kint),pointer :: mat_table_index(:)
96  real(kind=kreal),pointer :: mat_val(:)
97  real(kind=kreal),pointer :: mat_temp(:)
98  end type hecmwst_material
99  !C===
100 
101  !C
102  !C +-----------+
103  !C | MPC info. |
104  !C +-----------+
105  !C===
107  integer(kind=kint) :: n_mpc
108  integer(kind=kint),pointer :: mpc_index(:)
109  integer(kind=kint),pointer :: mpc_item(:)
110  integer(kind=kint),pointer :: mpc_dof(:)
111  real(kind=kreal),pointer :: mpc_val(:)
112  real(kind=kreal),pointer :: mpc_const(:)
113  end type hecmwst_mpc
114  !C===
115 
116  !C
117  !C +-----------+
118  !C | AMPLITUDE |
119  !C +-----------+
120  !C===
122  integer(kind=kint) :: n_amp
123  character(len=HECMW_NAME_LEN),pointer :: amp_name(:)
124  integer(kind=kint),pointer :: amp_type_definition(:)
125  integer(kind=kint),pointer :: amp_type_time(:)
126  integer(kind=kint),pointer :: amp_type_value(:)
127  integer(kind=kint),pointer :: amp_index(:)
128  real(kind=kreal),pointer :: amp_val(:)
129  real(kind=kreal),pointer :: amp_table(:)
130  end type hecmwst_amplitude
131 
132  !C for hecmwST_amplitude%amp_type_definition
133  integer(kind=kint),parameter :: hecmw_amp_typedef_tabular = 1
134  !C for hecmwST_amplitude%amp_type_time
135  integer(kind=kint),parameter :: hecmw_amp_typetime_step = 1
136  integer(kind=kint),parameter :: hecmw_amp_typetime_total = 2
137  !C for hecmwST_amplitude%amp_type_value
138  integer(kind=kint),parameter :: hecmw_amp_typeval_relative = 1
139  integer(kind=kint),parameter :: hecmw_amp_typeval_absolute = 2
140  !C===
141 
142  !C
143  !C +-----------+
144  !C | NODE grp. |
145  !C +-----------+
146  !C===
148  integer(kind=kint) :: n_grp
149  integer(kind=kint) :: n_bc
150  character(HECMW_NAME_LEN),pointer :: grp_name(:)
151  integer(kind=kint),pointer :: grp_index(:)
152  integer(kind=kint),pointer :: grp_item(:)
153  integer(kind=kint),pointer :: bc_grp_id(:)
154  integer(kind=kint),pointer :: bc_grp_type(:)
155  integer(kind=kint),pointer :: bc_grp_index(:)
156  integer(kind=kint),pointer :: bc_grp_dof(:)
157  real(kind=kreal),pointer :: bc_grp_val(:)
158  end type hecmwst_node_grp
159 
160  !C for hecmwST_node_grp%bc_grp_type
161  integer(kind=kint),parameter :: hecmw_bcgrptype_desplacement = 1
162  integer(kind=kint),parameter :: hecmw_bcgrptype_flux = 2
163  !C===
164 
165  !C
166  !C +-----------+
167  !C | ELEM grp. |
168  !C +-----------+
169  !C===
171  integer(kind=kint) :: n_grp
172  integer(kind=kint) :: n_bc
173  character(HECMW_NAME_LEN),pointer :: grp_name(:)
174  integer(kind=kint),pointer :: grp_index(:)
175  integer(kind=kint),pointer :: grp_item(:)
176  integer(kind=kint),pointer :: bc_grp_id(:)
177  integer(kind=kint),pointer :: bc_grp_type(:)
178  integer(kind=kint),pointer :: bc_grp_index(:)
179  real(kind=kreal),pointer :: bc_grp_val(:)
180  end type hecmwst_elem_grp
181 
182  !C for hecmwST_elem_grp%bc_grp_type
183  !C integer(kind=kint),parameter :: HECMW_BCGRPTYPE_DESPLACEMENT = 1
184  !C integer(kind=kint),parameter :: HECMW_BCGRPTYPE_FLUX = 2
185  !C===
186 
187  !C
188  !C +-----------+
189  !C | SURF grp. |
190  !C +-----------+
191  !C===
193  integer(kind=kint) :: n_grp
194  integer(kind=kint) :: n_bc
195  character(HECMW_NAME_LEN),pointer:: grp_name(:)
196  integer(kind=kint),pointer :: grp_index(:)
197  integer(kind=kint),pointer :: grp_item(:)
198  integer(kind=kint),pointer :: bc_grp_id(:)
199  integer(kind=kint),pointer :: bc_grp_type(:)
200  integer(kind=kint),pointer :: bc_grp_index(:)
201  real(kind=kreal),pointer :: bc_grp_val(:)
202  end type hecmwst_surf_grp
203 
204  !C for hecmwST_surf_grp%bc_grp_type
205  !C integer(kind=kint),parameter :: HECMW_BCGRPTYPE_DESPLACEMENT = 1
206  !C integer(kind=kint),parameter :: HECMW_BCGRPTYPE_FLUX = 2
207  !C
208 
209  !C
210  !C +---------+
211  !C | CONTACT |
212  !C +---------+
213  !C===
215  integer(kind=kint) :: n_pair
216  character(HECMW_NAME_LEN),pointer:: name(:)
217  integer(kind=kint),pointer :: type(:)
218  integer(kind=kint),pointer :: slave_grp_id(:)
219  integer(kind=kint),pointer :: master_grp_id(:)
220  integer(kind=kint),pointer :: slave_orisgrp_id(:)
221  end type hecmwst_contact_pair
222 
223  !C for hecmwST_contact_pair%type
224  integer(kind=kint),parameter :: hecmw_contact_type_node_surf = 1
225  integer(kind=kint),parameter :: hecmw_contact_type_surf_surf = 2
226  integer(kind=kint),parameter :: hecmw_contact_type_node_elem = 3
227  !C===
228 
229  !C
230  !C +----------------+
231  !C | REFINE Origin. |
232  !C +----------------+
233  !C===
235  integer(kind=kint),pointer :: index(:)
236  integer(kind=kint),pointer :: item_index(:)
237  integer(kind=kint),pointer :: item_item(:)
238  end type hecmwst_refine_origin
239  !C===
240 
241  !C
242  !C +------------------+
243  !C | LOCAL MESH info. |
244  !C +------------------+
245  !C===
247 
248  !C
249  !C-- FILES, GENERAL
250  !C
251  character(HECMW_FILENAME_LEN) :: gridfile
252  character(HECMW_FILENAME_LEN),pointer :: files(:)
253  character(HECMW_HEADER_LEN) :: header
254  integer(kind=kint) :: hecmw_flag_adapt
255  integer(kind=kint) :: hecmw_flag_initcon
256  integer(kind=kint) :: hecmw_n_file
257  integer(kind=kint) :: hecmw_flag_parttype
258  integer(kind=kint) :: hecmw_flag_partdepth
259  integer(kind=kint) :: hecmw_flag_version
260  integer(kind=kint) :: hecmw_flag_partcontact
261  real(kind=kreal) :: zero_temp
262 
263  !C
264  !C-- NODE
265  integer(kind=kint) :: n_node
266  integer(kind=kint) :: n_node_gross
267  ! For parallel contact with hanging slave nodes
268  integer(kind=kint) :: nn_middle
269  integer(kind=kint) :: nn_internal
270  integer(kind=kint) :: n_dof
271  integer(kind=kint) :: n_dof_grp
272  integer(kind=kint) :: n_dof_tot
273  real(kind=kreal),pointer :: node(:)
274  integer(kind=kint),pointer :: node_id(:)
275  integer(kind=kint),pointer :: global_node_id(:)
276  integer(kind=kint),pointer :: node_val_index(:)
277  real(kind=kreal),pointer :: node_val_item(:)
278  integer(kind=kint),pointer :: node_dof_index(:)
279  integer(kind=kint),pointer :: node_dof_item(:)
280  integer(kind=kint),pointer :: node_init_val_index(:)
281  real(kind=kreal),pointer :: node_init_val_item(:)
282  integer(kind=kint),pointer :: node_internal_list(:)
283  !C
284  !C-- ELEMENT
285  !C
286  integer(kind=kint) :: n_elem
287  integer(kind=kint) :: n_elem_gross
288  integer(kind=kint) :: ne_internal
289  integer(kind=kint) :: n_elem_type
290  integer(kind=kint) :: n_elem_mat_id
291  integer(kind=kint),pointer :: elem_type_index(:)
292  integer(kind=kint),pointer :: elem_type_item(:)
293  integer(kind=kint),pointer :: elem_type(:)
294  integer(kind=kint),pointer :: section_id(:)
295  integer(kind=kint),pointer :: elem_mat_id_index(:)
296  integer(kind=kint),pointer :: elem_mat_id_item(:)
297  integer(kind=kint),pointer :: elem_node_index(:)
298  integer(kind=kint),pointer :: elem_node_item(:)
299  integer(kind=kint),pointer :: elem_id(:)
300  integer(kind=kint),pointer :: global_elem_id(:)
301  integer(kind=kint),pointer :: elem_internal_list(:)
302  integer(kind=kint),pointer :: elem_mat_int_index(:)
303  real(kind=kreal),pointer :: elem_mat_int_val(:)
304  integer(kind=kint),pointer :: elem_val_index(:)
305  real(kind=kreal),pointer :: elem_val_item(:)
306  !integer(kind=kint) :: is_33shell
307  !integer(kind=kint) :: is_33beam
308  !integer(kind=kint) :: is_heat
309  !C
310  !C-- COMMUNICATION
311  !C
312  integer(kind=kint) :: zero
313  integer(kind=kint) :: mpi_comm
314  integer(kind=kint) :: petot
315  integer(kind=kint) :: pesmptot
316  integer(kind=kint) :: my_rank
317  integer(kind=kint) :: errnof
318  integer(kind=kint) :: n_subdomain
319  integer(kind=kint) :: n_neighbor_pe
320  integer(kind=kint),pointer :: neighbor_pe(:)
321  integer(kind=kint),pointer :: import_index(:)
322  integer(kind=kint),pointer :: import_item(:)
323  integer(kind=kint),pointer :: export_index(:)
324  integer(kind=kint),pointer :: export_item(:)
325  integer(kind=kint),pointer :: shared_index(:)
326  integer(kind=kint),pointer :: shared_item(:)
327 
328  !C
329  !C-- ADAPTATION
330  !C
331  integer(kind=kint) :: coarse_grid_level
332  integer(kind=kint) :: n_adapt
333  integer(kind=kint),pointer :: when_i_was_refined_node(:)
334  integer(kind=kint),pointer :: when_i_was_refined_elem(:)
335  integer(kind=kint),pointer :: adapt_parent_type(:)
336  integer(kind=kint),pointer :: adapt_type (:)
337  integer(kind=kint),pointer :: adapt_level(:)
338  integer(kind=kint),pointer :: adapt_parent(:)
339  integer(kind=kint),pointer :: adapt_children_index(:)
340  integer(kind=kint),pointer :: adapt_children_item(:)
341 
342  integer(kind=kint) :: nn_array, ne_array, nx_array
343  integer(kind=kint) :: n_adapt_edge, n_adapt_edge_global
344  integer(kind=kint) :: n_adapt_act_node, n_adapt_act_edge
345  integer(kind=kint) :: n_adapt_act_elem, n_adapt_act_elem_cur
346  integer(kind=kint) :: n_adapt_elem_341, n_adapt_elem_351
347  integer(kind=kint) :: n_adapt_elem_341_cur, n_adapt_elem_351_cur
348  integer(kind=kint) :: n_adapt_act_elem_341, n_adapt_act_elem_351
349 
350  integer(kind=kint) :: n_adapt_node_cur, nn_adapt_internal_cur
351  integer(kind=kint) :: n_adapt_node_old, nn_adapt_internal_old
352  integer(kind=kint) :: n_adapt_elem_cur, n_adapt_elem_old
353 
354  integer(kind=kint), pointer :: adapt_edge_node(:), adapt_mid_edge (:)
355  integer(kind=kint), pointer :: adapt_iemb (:), adapt_edge_home(:)
356  integer(kind=kint), pointer :: adapt_act_edge (:)
357 
358  integer(kind=kint), pointer :: &
359  & adapt_import_edge_index(:), adapt_import_edge_item (:),&
360  & adapt_export_edge_index(:), adapt_export_edge_item (:),&
361  & adapt_import_elem_index(:), adapt_import_elem_item (:),&
362  & adapt_export_elem_index(:), adapt_export_elem_item (:),&
363  & adapt_import_new_index (:), adapt_import_new_item (:),&
364  & adapt_export_new_index (:), adapt_export_new_item (:)
365  integer(kind=kint), pointer :: rev_neighbor_pe(:)
366  integer(kind=kint), pointer :: adapt_act_elem_341(:)
367  integer(kind=kint), pointer :: adapt_act_elem_351(:)
368  integer(kind=kint), pointer :: adapt_oldtonew_node(:), adapt_newtoold_node(:)
369  integer(kind=kint), pointer :: adapt_oldtonew_elem(:), adapt_newtoold_elem(:)
370  integer(kind=kint), pointer :: adapt_iwk(:), adapt_children_local(:)
371 
372  !C
373  !C-- REFINEMENT
374  !C
375  integer(kind=kint) :: n_refine
376  integer(kind=kint),pointer :: node_old2new(:)
377  integer(kind=kint),pointer :: node_new2old(:)
378  integer(kind=kint),pointer :: elem_old2new(:)
379  integer(kind=kint),pointer :: elem_new2old(:)
380  integer(kind=kint),pointer :: n_node_refine_hist(:)
381 
382  !C
383  !C-- ETC.
384  !C
385  type (hecmwst_section) :: section
386  type (hecmwst_material) :: material
387  type (hecmwst_mpc) :: mpc
388  type (hecmwst_amplitude) :: amp
389  type (hecmwst_node_grp) :: node_group
390  type (hecmwst_elem_grp) :: elem_group
391  type (hecmwst_surf_grp) :: surf_group
392  type (hecmwst_contact_pair):: contact_pair
393  type (hecmwst_refine_origin):: refine_origin
394 
395  end type hecmwst_local_mesh
396 
397  !C for hecmwST_local_mesh%hecmw_flag_parttype
398  integer(kind=kint),parameter :: hecmw_flag_parttype_unknown = 0
399  integer(kind=kint),parameter :: hecmw_flag_parttype_nodebased = 1
400  integer(kind=kint),parameter :: hecmw_flag_parttype_elembased = 2
401 
402  !C for hecmwST_local_mesh%hecmw_flag_partcontact
403  integer(kind=kint),parameter :: hecmw_flag_partcontact_unknown = 0
404  integer(kind=kint),parameter :: hecmw_flag_partcontact_aggregate = 1
405  integer(kind=kint),parameter :: hecmw_flag_partcontact_distribute = 2
406  integer(kind=kint),parameter :: hecmw_flag_partcontact_simple = 3
407 
408  !C the mode above occupies bits 0-7, the ownership scheme bit 8. OWNER_MASTER must stay zero so that a
409  !C distributed mesh holding a bare mode value reads back as the master-owner scheme. Test with
410  !C hecmw_partcontact_get_mode()/_get_owner(), never for equality against the whole flag.
411  integer(kind=kint),parameter :: hecmw_flag_partcontact_mode_mask = 255
412  integer(kind=kint),parameter :: hecmw_flag_partcontact_owner_mask = 256
413  integer(kind=kint),parameter :: hecmw_flag_partcontact_owner_master = 0
414  integer(kind=kint),parameter :: hecmw_flag_partcontact_owner_slave = 256
415 
416  !C
417  !C +--------+
418  !C | MATRIX |
419  !C +--------+
420  !C===
422  integer(kind=kint) :: zero
423  integer(kind=kint) :: hecmw_comm
424  integer(kind=kint) :: petot
425  integer(kind=kint) :: pesmptot
426  integer(kind=kint) :: my_rank
427  integer(kind=kint) :: errnof
428  integer(kind=kint) :: n_subdomain
429  integer(kind=kint) :: n_neighbor_pe
430  integer(kind=kint), dimension(:), pointer :: neighbor_pe
431  integer(kind=kint), dimension(:), pointer :: import_index
432  integer(kind=kint), dimension(:), pointer :: import_item
433  integer(kind=kint), dimension(:), pointer :: export_index
434  integer(kind=kint), dimension(:), pointer :: export_item
435  integer(kind=kint), dimension(:), pointer :: shared_index
436  integer(kind=kint), dimension(:), pointer :: shared_item
437  end type hecmwst_matrix_comm
438 
440  integer(kind=kint) :: i
441  integer(kind=kint) :: j
442  real(kind=kreal), dimension(3,3) :: val
443  end type hecmwst_index_value_pair
444 
448  integer(kind=kint) :: num_lagrange = 0
449  integer(kind=kint) :: numl_lagrange = 0
450  integer(kind=kint) :: numu_lagrange = 0
451 
452  integer(kind=kint), pointer :: indexl_lagrange(:) => null()
453  integer(kind=kint), pointer :: indexu_lagrange(:) => null()
454 
455  integer(kind=kint), pointer :: iteml_lagrange(:) => null()
456  integer(kind=kint), pointer :: itemu_lagrange(:) => null()
457 
458  real(kind=kreal), pointer :: al_lagrange(:) => null()
459  real(kind=kreal), pointer :: au_lagrange(:) => null()
460  real(kind=kreal), pointer :: d_lagrange(:) => null()
461 
462  real(kind=kreal), pointer :: lagrange(:) => null()
463 
464  integer(kind=kint), pointer :: lag_node_table(:) => null()
465  end type hecmwst_matrix_lagrange
466 
468  integer(kind=kint) :: n, np, npl, npu, npa, ndof
469  real(kind=kreal), pointer :: d(:), b(:), x(:)
470  real(kind=kreal), pointer :: al(:), au(:)
471  real(kind=kreal), pointer :: a(:)
472  integer(kind=kint), pointer :: indexl(:), indexu(:)
473  integer(kind=kint), pointer :: indexa(:)
474  integer(kind=kint), pointer :: iteml(:), itemu(:)
475  integer(kind=kint), pointer :: itema(:)
476  integer(kind=kint ), dimension(100) :: iarray
477  real (kind=kreal), dimension(100) :: rarray
478  logical :: symmetric = .true.
479  end type hecmwst_matrix
480 contains
481 
482  !C
483  !C***
484  !C*** HECMW_PARTCONTACT_GET_MODE / HECMW_PARTCONTACT_GET_OWNER
485  !C***
486  !C
487  !C UNPACK hecmw_flag_partcontact, so that its bit layout stays internal to HEC-MW
488  !C
489  pure integer(kind=kint) function hecmw_partcontact_get_mode( flag_partcontact )
490  integer(kind=kint), intent(in) :: flag_partcontact
492  end function hecmw_partcontact_get_mode
493 
494  pure integer(kind=kint) function hecmw_partcontact_get_owner( flag_partcontact )
495  integer(kind=kint), intent(in) :: flag_partcontact
497  end function hecmw_partcontact_get_owner
498 
499  !C
500  !C***
501  !C*** HECMW_HAS_INTERNAL_NODE
502  !C***
503  !C
504  !C TEST WHETHER AN ELEMENT TOUCHES AN INTERNAL NODE OF THIS RANK
505  !C
506  !C Local node numbering places the internal nodes first, so a local node id
507  !C greater than nn_internal belongs to another rank.
508  !C
509  pure logical function hecmw_has_internal_node( hecMESH, nn, nodLOCAL )
510  type(hecmwst_local_mesh), intent(in) :: hecmesh
511  integer(kind=kint), intent(in) :: nn
512  integer(kind=kint), intent(in) :: nodlocal(:)
513  integer(kind=kint) :: j
514 
515  hecmw_has_internal_node = .true.
516  do j = 1, nn
517  if( nodlocal(j) <= hecmesh%nn_internal ) return
518  enddo
519  hecmw_has_internal_node = .false.
520  end function hecmw_has_internal_node
521 
522  !C
523  !C***
524  !C*** HECMW_INIT
525  !C***
526  !C
527  !C INIT. HECMW-FEM process's
528  !C
529  subroutine hecmw_init
530  character(len=HECMW_FILENAME_LEN):: ctrlfile = "hecmw_ctrl.dat"
531  call hecmw_init_ex(ctrlfile)
532  end subroutine hecmw_init
533 
534  subroutine hecmw_comm_init
535  integer(kind=kint) :: ierr
536 #ifndef HECMW_SERIAL
537  !call MPI_INIT (ierr)
538  call mpi_comm_size (mpi_comm_world, hecmw_petot, ierr)
539  call mpi_comm_rank (mpi_comm_world, hecmw_rank, ierr)
540  call mpi_comm_dup (mpi_comm_world, hecmw_comm, ierr)
541  call mpi_comm_group(mpi_comm_world, hecmw_group, ierr)
542 #else
543  hecmw_petot=1
544  hecmw_rank=0
545  hecmw_comm=0
546  hecmw_group=0
547  ierr=0
548 #endif
549  if(ierr /= 0) then
551  endif
552  end subroutine hecmw_comm_init
553 
554  subroutine hecmw_init_nocontrol()
555  call hecmw_comm_init()
556  call hecmw_comm_init_if(hecmw_comm, hecmw_petot, hecmw_rank, hecmw_group)
557  end subroutine
558 
559  !C
560  !C***
561  !C*** HECMW_INIT_EX
562  !C***
563  !C
564  !C INIT. HECMW-FEM process's
565  !C
566  subroutine hecmw_init_ex(ctrlfile)
567  character(len=HECMW_FILENAME_LEN):: ctrlfile
568  integer(kind=kint) :: ierr
569 
570  call hecmw_comm_init()
571  call hecmw_comm_init_if(hecmw_comm, hecmw_petot, hecmw_rank, hecmw_group)
572 
573  call hecmw_ctrl_init_ex_if(ctrlfile, ierr)
574  if(ierr /= 0) then
576  endif
577  ! call hecmw_couple_comm_init_if(ierr)
578  ! if(ierr /= 0) then
579  ! call hecmw_abort( hecmw_comm_get_comm( ) )
580  ! endif
581 
582  end subroutine hecmw_init_ex
583 
584 
585  !C
586  !C***
587  !C*** HECMW_FINALIZE
588  !C***
589  !C
590  !C FINALIZE. HECMW-FEM process's
591  !C
592  subroutine hecmw_finalize
593  integer(kind=kint) :: ierr
594 
596 
597 #ifndef HECMW_SERIAL
598  call mpi_finalize(ierr)
599 #endif
600 
601  end subroutine hecmw_finalize
602 
603 
604  !C******************** MPI WRAPPER SUBROUTINES ************************
605  !C
606  !C***
607  !C*** HECMW_ABORT
608  !C***
609  !C
610  subroutine hecmw_abort(comm, code)
611  integer(kind=kint) :: comm
612  integer(kind=kint), intent(in), optional :: code
613  integer(kind=kint) :: errorcode, ierror
614 
615  errorcode = hecmw_exit_internal
616  if( present(code) ) errorcode = code
617 
618  ! MPI_ABORT does not flush the Fortran unit buffers; do it here so that
619  ! the message written just before the abort survives.
620  flush(6)
621 
622 #ifndef HECMW_SERIAL
623  call mpi_abort(comm, errorcode, ierror)
624 #else
625  stop errorcode
626 #endif
627  end subroutine hecmw_abort
628 
629  !C
630  !C***
631  !C*** HECMW_WTIME
632  !C***
633  !C
634  function hecmw_wtime()
635  real(kind=kreal) hecmw_wtime
636  external hecmw_wtime_fi
637  real(kind=kreal) hecmw_wtime_fi
639  end function hecmw_wtime
640  !C
641  !C***
642  !C*** HECMW_WTICK
643  !C***
644  !C
645  function hecmw_wtick()
646  real(kind=kreal) hecmw_wtick
647  external hecmw_wtick_fi
648  real(kind=kreal) hecmw_wtick_fi
650  end function hecmw_wtick
651  !C
652  !C***
653  !C*** HECMW_COMM_GET_COMM
654  !C***
655  !C
656  function hecmw_comm_get_comm() result(comm)
657  integer(kind=kint) :: comm
658 
659  comm = hecmw_comm
660  end function hecmw_comm_get_comm
661 
662  !C
663  !C***
664  !C*** HECMW_COMM_GET_RANK
665  !C***
666  !C
667  function hecmw_comm_get_rank() result(rank)
668  integer(kind=kint) :: rank
669 
670  rank = hecmw_rank
671  end function hecmw_comm_get_rank
672 
673  !C
674  !C***
675  !C*** HECMW_COMM_GET_SIZE
676  !C***
677  !C
678  function hecmw_comm_get_size() result(comm_size)
679  integer(kind=kint) :: comm_size
680 
681  comm_size = hecmw_petot
682  end function hecmw_comm_get_size
683 
684 
685  !C*************** NULL POINTER SETTING UTILITY ****************
686 
687  subroutine hecmw_nullify_section( P )
688  type( hecmwst_section ) :: P
689  nullify( p%sect_type )
690  nullify( p%sect_opt )
691  nullify( p%sect_mat_ID_index )
692  nullify( p%sect_mat_ID_item )
693  nullify( p%sect_I_index )
694  nullify( p%sect_I_item )
695  nullify( p%sect_R_index )
696  nullify( p%sect_R_item )
697  end subroutine hecmw_nullify_section
698 
699  subroutine hecmw_nullify_material( P )
700  type( hecmwst_material ) :: P
701  nullify( p%mat_name )
702  nullify( p%mat_item_index )
703  nullify( p%mat_subitem_index )
704  nullify( p%mat_table_index )
705  nullify( p%mat_val )
706  nullify( p%mat_temp )
707  end subroutine hecmw_nullify_material
708 
709  subroutine hecmw_nullify_mpc( P )
710  type( hecmwst_mpc ) :: P
711  nullify( p%mpc_index )
712  nullify( p%mpc_item )
713  nullify( p%mpc_dof )
714  nullify( p%mpc_val )
715  nullify( p%mpc_const )
716  end subroutine hecmw_nullify_mpc
717 
718  subroutine hecmw_initialize_mpc( mpc, n_mpc, n_item )
719  type( hecmwst_mpc ), intent(inout) :: mpc
720  integer(kind=kint), intent(in) :: n_mpc
721  integer(kind=kint), intent(in) :: n_item
722 
723  mpc%n_mpc = n_mpc
724  allocate( mpc%mpc_index(0:n_mpc) )
725  allocate( mpc%mpc_item(n_item) )
726  allocate( mpc%mpc_dof(n_item) )
727  allocate( mpc%mpc_val(n_item) )
728  end subroutine
729 
730  subroutine hecmw_finalize_mpc( P )
731  type( hecmwst_mpc ) :: P
732  if( associated(p%mpc_index) ) deallocate( p%mpc_index )
733  if( associated(p%mpc_item) ) deallocate( p%mpc_item )
734  if( associated(p%mpc_dof) ) deallocate( p%mpc_dof )
735  if( associated(p%mpc_val) ) deallocate( p%mpc_val )
736  end subroutine hecmw_finalize_mpc
737 
738  subroutine hecmw_nullify_amplitude( P )
739  type( hecmwst_amplitude ) :: P
740  nullify( p%amp_name )
741  nullify( p%amp_type_definition )
742  nullify( p%amp_type_time )
743  nullify( p%amp_type_value )
744  nullify( p%amp_index )
745  nullify( p%amp_val )
746  nullify( p%amp_table )
747  end subroutine hecmw_nullify_amplitude
748 
749  subroutine hecmw_nullify_node_grp( P )
750  type( hecmwst_node_grp ) :: P
751  nullify( p%grp_name )
752  nullify( p%grp_index )
753  nullify( p%grp_item )
754  nullify( p%bc_grp_ID )
755  nullify( p%bc_grp_type )
756  nullify( p%bc_grp_index )
757  nullify( p%bc_grp_dof )
758  nullify( p%bc_grp_val )
759  end subroutine hecmw_nullify_node_grp
760 
761  subroutine hecmw_nullify_elem_grp( P )
762  type( hecmwst_elem_grp ) :: P
763  nullify( p%grp_name )
764  nullify( p%grp_index )
765  nullify( p%grp_item )
766  nullify( p%bc_grp_ID )
767  nullify( p%bc_grp_type )
768  nullify( p%bc_grp_index )
769  nullify( p%bc_grp_val )
770  end subroutine hecmw_nullify_elem_grp
771 
772  subroutine hecmw_nullify_surf_grp( P )
773  type( hecmwst_surf_grp ) :: P
774  nullify( p%grp_name )
775  nullify( p%grp_index )
776  nullify( p%grp_item )
777  nullify( p%bc_grp_ID )
778  nullify( p%bc_grp_type )
779  nullify( p%bc_grp_index )
780  nullify( p%bc_grp_val )
781  end subroutine hecmw_nullify_surf_grp
782 
784  type( hecmwst_contact_pair ) :: P
785  nullify( p%name )
786  nullify( p%type )
787  nullify( p%slave_grp_id )
788  nullify( p%slave_orisgrp_id )
789  nullify( p%master_grp_id )
790  end subroutine hecmw_nullify_contact_pair
791 
793  type( hecmwst_refine_origin ) :: P
794  nullify( p%index )
795  nullify( p%item_index )
796  nullify( p%item_item )
797  end subroutine hecmw_nullify_refine_origin
798 
799  subroutine hecmw_nullify_mesh( P )
800  type( hecmwst_local_mesh ) :: P
801  nullify( p%files )
802  nullify( p%node )
803  nullify( p%node_ID )
804  nullify( p%global_node_ID )
805  nullify( p%node_val_index )
806  nullify( p%node_val_item )
807  nullify( p%node_dof_index )
808  nullify( p%node_dof_item )
809  nullify( p%node_init_val_index )
810  nullify( p%node_init_val_item )
811  nullify( p%node_internal_list )
812  nullify( p%elem_type_index )
813  nullify( p%elem_type_item )
814  nullify( p%elem_type )
815  nullify( p%section_ID )
816  nullify( p%elem_mat_ID_index )
817  nullify( p%elem_mat_ID_item )
818  nullify( p%elem_node_index )
819  nullify( p%elem_node_item )
820  nullify( p%elem_ID )
821  nullify( p%global_elem_ID )
822  nullify( p%elem_internal_list )
823  nullify( p%elem_mat_int_index )
824  nullify( p%elem_mat_int_val )
825  nullify( p%elem_val_index )
826  nullify( p%elem_val_item )
827  nullify( p%neighbor_pe )
828  nullify( p%import_index )
829  nullify( p%import_item )
830  nullify( p%export_index )
831  nullify( p%export_item )
832  nullify( p%shared_index )
833  nullify( p%shared_item )
834  nullify( p%when_i_was_refined_node )
835  nullify( p%when_i_was_refined_elem )
836  nullify( p%adapt_parent_type )
837  nullify( p%adapt_type )
838  nullify( p%adapt_level )
839  nullify( p%adapt_parent )
840  nullify( p%adapt_children_index )
841  nullify( p%adapt_children_item )
842  nullify( p%adapt_edge_node )
843  nullify( p%adapt_mid_edge )
844  nullify( p%adapt_iemb )
845  nullify( p%adapt_edge_home )
846  nullify( p%adapt_act_edge )
847  nullify( p%adapt_import_edge_index )
848  nullify( p%adapt_import_edge_item )
849  nullify( p%adapt_export_edge_index )
850  nullify( p%adapt_export_edge_item )
851  nullify( p%adapt_import_elem_index )
852  nullify( p%adapt_import_elem_item )
853  nullify( p%adapt_export_elem_index )
854  nullify( p%adapt_export_elem_item )
855  nullify( p%adapt_import_new_index )
856  nullify( p%adapt_import_new_item )
857  nullify( p%adapt_export_new_index )
858  nullify( p%adapt_export_new_item )
859  nullify( p%rev_neighbor_pe )
860  nullify( p%adapt_act_elem_341 )
861  nullify( p%adapt_act_elem_351 )
862  nullify( p%adapt_OLDtoNEW_node )
863  nullify( p%adapt_NEWtoOLD_node )
864  nullify( p%adapt_OLDtoNEW_elem )
865  nullify( p%adapt_NEWtoOLD_elem )
866  nullify( p%adapt_IWK )
867  nullify( p%adapt_children_local )
868  nullify( p%node_old2new )
869  nullify( p%node_new2old )
870  nullify( p%elem_old2new )
871  nullify( p%elem_new2old )
872  nullify( p%n_node_refine_hist )
873 
874  call hecmw_nullify_section( p%section )
875  call hecmw_nullify_material( p%material )
876  call hecmw_nullify_mpc( p%mpc )
877  call hecmw_nullify_amplitude( p%amp )
878  call hecmw_nullify_node_grp( p%node_group )
879  call hecmw_nullify_elem_grp( p%elem_group )
880  call hecmw_nullify_surf_grp( p%surf_group )
881  call hecmw_nullify_contact_pair( p%contact_pair )
882  call hecmw_nullify_refine_origin( p%refine_origin )
883 
884  end subroutine hecmw_nullify_mesh
885 
886 
888  type( hecmwst_matrix_comm ) :: P
889  nullify( p%neighbor_pe )
890  nullify( p%import_index )
891  nullify( p%import_item )
892  nullify( p%export_index )
893  nullify( p%export_item )
894  nullify( p%shared_index )
895  nullify( p%shared_item )
896  end subroutine hecmw_nullify_matrix_comm
897 
898  subroutine hecmw_nullify_matrix( P )
899  type( hecmwst_matrix ) :: P
900  nullify( p%D )
901  nullify( p%B )
902  nullify( p%X )
903  nullify( p%AL )
904  nullify( p%AU )
905  nullify( p%A )
906  nullify( p%indexL )
907  nullify( p%indexU )
908  nullify( p%indexA )
909  nullify( p%itemL )
910  nullify( p%itemU )
911  nullify( p%itemA )
912  end subroutine hecmw_nullify_matrix
913 
914  subroutine hecmw_print_matrix( fname, P )
915  character(len=*), intent(in) :: fname
916  type( hecmwst_matrix ), intent(in) :: P
917 
918  integer :: i, nf, nBlock
919  integer :: io_stat
920  nf = 777
921  nblock = p%NDOF * p%NDOF
922  open( unit=nf, file=fname, iostat=io_stat)
923  if( io_stat /= 0 ) return
924  write( nf, * ) p%N,p%NP,p%NPL,p%NPU,p%NDOF
925  !---- index
926  do i=0, p%NP
927  write( nf,* ) p%indexL(i), p%indexU(i)
928  enddo
929  !---- itemL, AL
930  do i=1, p%NPL
931  write( nf,* ) p%itemL(i)
932  enddo
933  do i=1,nblock * p%NPL
934  write( nf,* ) p%AL(i)
935  enddo
936  !---- itemU, AU
937  do i=1,p%NPU
938  write( nf,* ) p%itemU(i)
939  enddo
940  do i=1,nblock * p%NPU
941  write( nf,* ) p%AU(i)
942  enddo
943  !---- D
944  do i=1,nblock * p%NP
945  write( nf, * ) p%D(i)
946  enddo
947  !---- B
948  do i=1,p%NDOF * p%NP
949  write( nf, * ) p%B(i)
950  enddo
951 
952  close( nf )
953  end subroutine
954 
955  subroutine hecmw_read_matrix( fname, P )
956  character(len=*), intent(in) :: fname
957  type( hecmwst_matrix ), intent(out) :: P
958 
959  integer :: i, nf, nBlock, istat
960  nf = 777
961  open( unit=nf, file=fname, status='old', iostat= istat)
962  if(istat /= 0) then
963  print *, "cannot open file ",fname
964  stop
965  endif
966  read( nf, * ) p%N,p%NP,p%NPL,p%NPU,p%NDOF
967  nblock = p%NDOF * p%NDOF
968 
969  !----It is supposing of array are not allocated yet
970  allocate( p%indexL(0:p%NP), p%indexU(0:p%NP) )
971  allocate( p%itemL(p%NPL), p%itemU(p%NPU) )
972  allocate( p%AL(p%NPL*nblock), p%AU(p%NPU*nblock) )
973  allocate( p%D(p%NP*nblock) )
974  allocate( p%B(p%NDOF*p%NP) )
975  !---- index
976  do i=0, p%NP
977  read( nf,* ) p%indexL(i), p%indexU(i)
978  enddo
979  !---- itemL, AL
980  do i=1, p%NPL
981  read( nf,* ) p%itemL(i)
982  enddo
983  do i=1,nblock * p%NPL
984  read( nf,* ) p%AL(i)
985  enddo
986  !---- itemU, AU
987  do i=1,p%NPU
988  read( nf,* ) p%itemU(i)
989  enddo
990  do i=1,nblock * p%NPU
991  read( nf,* ) p%AU(i)
992  enddo
993  !---- D
994  do i=1,nblock * p%NP
995  read( nf, * ) p%D(i)
996  enddo
997  !---- B
998  do i=1,p%NDOF * p%NP
999  read( nf, * ) p%B(i)
1000  enddo
1001 
1002  close( nf )
1003  end subroutine
1004 
1005  subroutine hecmw_clone_matrix(hecMATorig,hecMAT)
1006  type (hecmwST_matrix ) :: hecMATorig
1007  type (hecmwST_matrix ),pointer :: hecMAT
1008  allocate(hecmat)
1009  call hecmw_nullify_matrix( hecmat )
1010 
1011  hecmat%B => hecmatorig%B
1012  hecmat%X => hecmatorig%X
1013  hecmat%D => hecmatorig%D
1014  hecmat%AL => hecmatorig%AL
1015  hecmat%AU => hecmatorig%AU
1016  hecmat%indexL => hecmatorig%indexL
1017  hecmat%indexU => hecmatorig%indexU
1018  hecmat%itemL => hecmatorig%itemL
1019  hecmat%itemU => hecmatorig%itemU
1020  hecmat%N = hecmatorig%N
1021  hecmat%NP = hecmatorig%NP
1022  hecmat%NPL = hecmatorig%NPL
1023  hecmat%NPU = hecmatorig%NPU
1024  hecmat%NDOF = hecmatorig%NDOF
1025  hecmat%Iarray = hecmatorig%Iarray
1026  hecmat%Rarray = hecmatorig%Rarray
1027  end subroutine hecmw_clone_matrix
1028 
1029  subroutine hecmw_copy_matrix(hecMATorig,hecMAT)
1030  type (hecmwST_matrix ) :: hecMATorig
1031  type (hecmwST_matrix ),pointer :: hecMAT
1032  integer(kind=kint) NDOF,NDOF2,N,NP,NPL,NPU
1033 
1034  allocate(hecmat)
1035  call hecmw_nullify_matrix( hecmat )
1036  n = hecmatorig%N
1037  ndof = hecmatorig%NDOF
1038  ndof2 = ndof*ndof
1039  np = hecmatorig%NP
1040  npl = hecmatorig%NPL
1041  npu = hecmatorig%NPU
1042  hecmat%N = n
1043  hecmat%NP = np
1044  hecmat%NPL = npl
1045  hecmat%NPU = npu
1046  hecmat%NDOF = ndof
1047  allocate(hecmat%B(ndof*np))
1048  allocate(hecmat%X(ndof*np))
1049  allocate(hecmat%D(ndof2*np))
1050  allocate(hecmat%AU(ndof2*npu))
1051  allocate(hecmat%AL(ndof2*npl))
1052  allocate(hecmat%indexL(0:np), hecmat%indexU(0:np), hecmat%itemL(npl), hecmat%itemU(npu))
1053  hecmat%B = hecmatorig%B
1054  hecmat%X = hecmatorig%X
1055  hecmat%D = hecmatorig%D
1056  hecmat%AU = hecmatorig%AU
1057  hecmat%AL = hecmatorig%AL
1058  hecmat%indexL = hecmatorig%indexL
1059  hecmat%indexU = hecmatorig%indexU
1060  hecmat%itemL = hecmatorig%itemL
1061  hecmat%itemU = hecmatorig%itemU
1062  hecmat%Iarray = hecmatorig%Iarray
1063  hecmat%Rarray = hecmatorig%Rarray
1064  end subroutine hecmw_copy_matrix
1065 
1066  subroutine hecmw_blockmatrix_expand(hecMATorig,hecMAT,NDOF)
1067  type (hecmwST_matrix ) :: hecMATorig
1068  type (hecmwST_matrix ),pointer :: hecMAT
1069  integer(kind=kint) NDOF,NDOF2,oNDOF,oNDOF2,i,j,k
1070 
1071  ndof2 = ndof*ndof
1072  ondof = hecmatorig%NDOF
1073  ondof2 = ondof*ondof
1074  allocate(hecmat)
1075  call hecmw_nullify_matrix( hecmat )
1076 
1077  allocate(hecmat%B(ndof*hecmatorig%NP))
1078  allocate(hecmat%X(ndof*hecmatorig%NP))
1079  allocate(hecmat%D(ndof2*hecmatorig%NP))
1080  allocate(hecmat%AL(ndof2*hecmatorig%NPL))
1081  allocate(hecmat%AU(ndof2*hecmatorig%NPU))
1082  hecmat%indexL => hecmatorig%indexL
1083  hecmat%indexU => hecmatorig%indexU
1084  hecmat%itemL => hecmatorig%itemL
1085  hecmat%itemU => hecmatorig%itemU
1086  hecmat%N = hecmatorig%N
1087  hecmat%NP = hecmatorig%NP
1088  hecmat%NPL = hecmatorig%NPL
1089  hecmat%NPU = hecmatorig%NPU
1090  hecmat%NDOF = ndof
1091  hecmat%Iarray = hecmatorig%Iarray
1092  hecmat%Rarray = hecmatorig%Rarray
1093  hecmat%X = 0.0d0
1094  do i = 1, hecmatorig%NP
1095  do j = 1, ndof
1096  do k = 1, ndof
1097  if (j<=ondof .and. k<=ondof) then
1098  hecmat%D(ndof2*(i-1) + (j-1)*ndof + k) = hecmatorig%D(ondof2*(i-1) + (j-1)*ondof + k)
1099  else
1100  if(j==k) then
1101  hecmat%D(ndof2*(i-1) + (j-1)*ndof + k)=1
1102  else
1103  hecmat%D(ndof2*(i-1) + (j-1)*ndof + k)=0
1104  end if
1105  end if
1106  end do
1107  if (j<=ondof) then
1108  hecmat%B(ndof*(i-1) + j) = hecmatorig%B(ondof*(i-1) + j)
1109  else
1110  hecmat%B(ndof*(i-1) + j)=0
1111  end if
1112  end do
1113  end do
1114  do i = 1, hecmatorig%NPL
1115  do j = 1, ndof
1116  do k = 1, ndof
1117  if (j<=ondof .and. k<=ondof) then
1118  hecmat%AL(ndof2*(i-1) + (j-1)*ndof + k) = hecmatorig%AL(ondof2*(i-1) + (j-1)*ondof + k)
1119  else
1120  hecmat%AL(ndof2*(i-1) + (j-1)*ndof + k) = 0
1121  end if
1122  end do
1123  end do
1124  end do
1125  do i = 1, hecmatorig%NPU
1126  do j = 1, ndof
1127  do k = 1, ndof
1128  if (j<=ondof .and. k<=ondof) then
1129  hecmat%AU(ndof2*(i-1) + (j-1)*ndof + k) = hecmatorig%AU(ondof2*(i-1) + (j-1)*ondof + k)
1130  else
1131  hecmat%AU(ndof2*(i-1) + (j-1)*ndof + k) = 0
1132  end if
1133  end do
1134  end do
1135  end do
1136  end subroutine hecmw_blockmatrix_expand
1137  subroutine hecmw_vector_contract(hecMATorig,hecMAT,NDOF)
1138  type (hecmwST_matrix ) :: hecMATorig
1139  type (hecmwST_matrix ),pointer :: hecMAT
1140  integer(kind=kint) NDOF,NDOF2,oNDOF,i,j
1141  ndof2 = ndof*ndof
1142  ondof = hecmatorig%NDOF
1143  do i = 1, hecmatorig%NP
1144  do j = 1, ondof
1145  hecmatorig%X(ondof*(i-1) + j) = hecmat%X(ndof*(i-1) + j)
1146  end do
1147  end do
1148  hecmatorig%Iarray = hecmat%Iarray
1149  hecmatorig%Rarray = hecmat%Rarray
1150  deallocate(hecmat%B)
1151  deallocate(hecmat%D)
1152  deallocate(hecmat%X)
1153  deallocate(hecmat%AL)
1154  deallocate(hecmat%AU)
1155  deallocate(hecmat)
1156  end subroutine hecmw_vector_contract
1157 end module hecmw_util
void hecmw_comm_init_if(HECMW_Fint *comm, int *size, int *rank, HECMW_Fint *group)
Definition: hecmw_comm.c:793
void hecmw_ctrl_finalize_if(void)
void hecmw_ctrl_init_ex_if(char *ctrlfile, int *err, int len)
double hecmw_wtime_fi(void)
Definition: hecmw_time.c:41
double hecmw_wtick_fi(void)
Definition: hecmw_time.c:48
I/O and Utility.
Definition: hecmw_util_f.F90:7
integer(kind=kint), parameter hecmw_flag_partcontact_owner_slave
integer(kind=kint), parameter hecmw_sect_type_interface
pure integer(kind=kint) function hecmw_partcontact_get_mode(flag_partcontact)
integer(kind=kint), parameter hecmw_contact_type_node_surf
integer(kind=kint), parameter hecmw_land
integer(kind=kint), parameter hecmw_sect_opt_pstrain
integer(kind=kint), parameter hecmw_sum
integer(kind=kint), parameter hecmw_sect_type_beam
subroutine hecmw_print_matrix(fname, P)
integer(kind=kint), parameter hecmw_amp_typetime_total
integer(kind=kint), parameter hecmw_flag_partcontact_distribute
subroutine hecmw_init_nocontrol()
integer(kind=kint), parameter hecmw_integer
integer(kind=kint), parameter hecmw_contact_type_surf_surf
subroutine hecmw_abort(comm, code)
integer(kind=kint), parameter hecmw_flag_partcontact_aggregate
subroutine hecmw_comm_init
integer(kind=kint), parameter hecmw_exit_usage
subroutine hecmw_nullify_material(P)
subroutine hecmw_copy_matrix(hecMATorig, hecMAT)
integer(kind=kint), parameter hecmw_sect_opt_pstress_ri
integer(kind=kint) function hecmw_comm_get_size()
integer(kind=kint), parameter hecmw_exit_input
subroutine hecmw_nullify_matrix_comm(P)
integer(kind=kint), parameter hecmw_exit_model
subroutine hecmw_nullify_mpc(P)
integer(kind=kint), parameter hecmw_sect_type_shell
integer(kind=kint), parameter hecmw_prod
integer(kind=4), parameter kint
integer(kind=kint), parameter hecmw_exit_internal
subroutine hecmw_init_ex(ctrlfile)
integer(kind=kint) function hecmw_comm_get_comm()
subroutine hecmw_nullify_contact_pair(P)
integer(kind=kint), parameter hecmw_single_precision
integer(kind=kint), parameter hecmw_max
integer(kind=kint), parameter hecmw_contact_type_node_elem
integer(kind=4), parameter kreal
subroutine hecmw_nullify_surf_grp(P)
integer(kind=kint), parameter hecmw_bcgrptype_flux
integer(kind=kint), parameter hecmw_sect_opt_pstress
pure logical function hecmw_has_internal_node(hecMESH, nn, nodLOCAL)
integer(kind=kint), parameter hecmw_flag_partcontact_owner_master
integer(kind=kint), parameter hecmw_lor
integer(kind=kint), parameter hecmw_header_len
subroutine hecmw_nullify_node_grp(P)
subroutine hecmw_finalize
integer(kind=kint), parameter hecmw_flag_partcontact_mode_mask
integer(kind=kint), parameter hecmw_sect_opt_asymmetry
integer(kind=kint), parameter hecmw_status_size
integer(kind=kint) function hecmw_comm_get_rank()
integer(kind=kint), parameter hecmw_flag_parttype_nodebased
integer(kind=kint), parameter hecmw_min
integer(kind=kint), parameter hecmw_amp_typeval_relative
subroutine hecmw_nullify_refine_origin(P)
integer(kind=kint), parameter hecmw_bcgrptype_desplacement
real(kind=kreal) function hecmw_wtick()
integer(kind=kint), parameter hecmw_flag_parttype_elembased
integer(kind=kint), parameter hecmw_flag_parttype_unknown
integer(kind=kint), parameter hecmw_msg_len
integer(kind=kint), parameter hecmw_amp_typeval_absolute
pure integer(kind=kint) function hecmw_partcontact_get_owner(flag_partcontact)
integer(kind=kint), parameter hecmw_exit_success
exit status returned to the OS (keep the values below 256)
integer(kind=kint), parameter hecmw_amp_typetime_step
subroutine hecmw_nullify_elem_grp(P)
subroutine hecmw_nullify_matrix(P)
subroutine hecmw_blockmatrix_expand(hecMATorig, hecMAT, NDOF)
integer(kind=kint), parameter hecmw_sect_opt_pstrain_ri
subroutine hecmw_nullify_section(P)
subroutine hecmw_clone_matrix(hecMATorig, hecMAT)
subroutine hecmw_initialize_mpc(mpc, n_mpc, n_item)
subroutine hecmw_nullify_mesh(P)
integer(kind=kint), parameter hecmw_filename_len
integer(kind=kint), parameter hecmw_sect_opt_asymmetry_ri
integer(kind=kint), parameter hecmw_flag_partcontact_owner_mask
integer(kind=kint), parameter hecmw_name_len
integer(kind=kint), parameter hecmw_character
subroutine hecmw_finalize_mpc(P)
subroutine hecmw_nullify_amplitude(P)
subroutine hecmw_init
integer(kind=kint), parameter hecmw_exit_solver_setup
integer(kind=kint), parameter hecmw_flag_partcontact_unknown
real(kind=kreal) function hecmw_wtime()
integer(kind=kint), parameter hecmw_amp_typedef_tabular
subroutine hecmw_vector_contract(hecMATorig, hecMAT, NDOF)
integer(kind=kint), parameter hecmw_double_precision
subroutine hecmw_read_matrix(fname, P)
integer(kind=kint), parameter hecmw_sect_type_solid
integer(kind=kint), parameter hecmw_exit_noconv
integer(kind=kint), parameter hecmw_flag_partcontact_simple
Structure for Lagrange multiplier-related part of stiffness matrix (Lagrange multiplier-related matri...