12 character(len=100) :: sname,vname
19 integer(kind=kint) :: ierr
22 call get_flags(mesh, ierr)
25 call get_etc(mesh, ierr)
28 call get_node(mesh, ierr)
31 call get_elem(mesh, ierr)
34 call get_comm(mesh, ierr)
37 call get_adapt(mesh, ierr)
40 call get_refine(mesh, ierr)
43 call get_sect(mesh%section, ierr)
46 call get_mat(mesh%material, ierr)
49 call get_mpc(mesh%mpc, ierr)
52 call get_amp(mesh%amp, ierr)
55 call get_ngrp(mesh%node_group, ierr)
58 call get_egrp(mesh%elem_group, ierr)
61 call get_sgrp(mesh%surf_group, ierr)
64 call get_contact_pair(mesh%contact_pair, ierr)
69 subroutine get_flags(mesh, ierr)
70 integer(kind=kint) :: ierr
73 sname =
'hecmwST_local_mesh'
75 vname =
'hecmw_flag_adapt'
79 vname =
'hecmw_flag_initcon'
83 vname =
'hecmw_flag_parttype'
87 vname =
'hecmw_flag_partdepth'
91 vname =
'hecmw_flag_version'
95 vname =
'hecmw_flag_partcontact'
98 end subroutine get_flags
101 subroutine get_etc(mesh, ierr)
102 integer(kind=kint) :: ierr
105 sname =
'hecmwST_local_mesh'
111 vname =
'hecmw_n_file'
115 if(mesh%hecmw_n_file > 0)
then
117 allocate(mesh%files(mesh%hecmw_n_file))
129 end subroutine get_etc
132 subroutine get_node(mesh, ierr)
133 integer(kind=kint) :: ierr,is_allocated
136 sname =
'hecmwST_local_mesh'
142 vname =
'n_node_gross'
150 vname =
'nn_internal'
154 if(mesh%nn_internal > 0)
then
155 vname =
'node_internal_list'
157 if(is_allocated == 1)
then
158 allocate(mesh%node_internal_list(mesh%nn_internal))
164 if(mesh%n_node_gross > 0)
then
166 allocate(mesh%node_ID(mesh%n_node_gross*2))
170 vname =
'global_node_ID'
171 allocate(mesh%global_node_ID(mesh%n_node_gross))
176 allocate(mesh%node(mesh%n_node_gross*3))
193 if(mesh%n_dof_grp > 0)
then
194 vname =
'node_dof_index'
195 allocate(mesh%node_dof_index(0:mesh%n_dof_grp))
199 vname =
'node_dof_item'
200 allocate(mesh%node_dof_item(mesh%n_dof_grp))
205 if(mesh%n_node_gross > 0)
then
206 vname =
'node_val_index'
208 if(is_allocated == 1)
then
209 allocate(mesh%node_val_index(0:mesh%n_node_gross))
214 vname =
'node_val_item'
216 if(is_allocated == 1)
then
217 if(mesh%node_val_index(mesh%n_node_gross) > 0)
then
218 allocate(mesh%node_val_item(mesh%node_val_index(mesh%n_node_gross)))
224 vname =
'node_init_val_index'
226 if(is_allocated == 1)
then
227 allocate(mesh%node_init_val_index(0:mesh%n_node_gross))
232 vname =
'node_init_val_item'
234 if(is_allocated == 1)
then
235 if(mesh%node_init_val_index(mesh%n_node_gross) > 0)
then
236 allocate(mesh%node_init_val_item(mesh%node_init_val_index(mesh%n_node_gross)))
242 end subroutine get_node
245 subroutine get_elem(mesh, ierr)
246 integer(kind=kint) :: ierr,is_allocated
249 sname =
'hecmwST_local_mesh'
255 vname =
'n_elem_gross'
259 vname =
'ne_internal'
263 if(mesh%ne_internal > 0)
then
264 vname =
'elem_internal_list'
266 if(is_allocated == 1)
then
267 allocate(mesh%elem_internal_list(mesh%ne_internal))
273 if(mesh%n_elem_gross > 0)
then
275 allocate(mesh%elem_ID(mesh%n_elem_gross*2))
279 vname =
'global_elem_ID'
280 allocate(mesh%global_elem_ID(mesh%n_elem_gross))
285 allocate(mesh%elem_type(mesh%n_elem_gross))
290 vname =
'n_elem_type'
294 if(mesh%n_elem_type > 0)
then
295 vname =
'elem_type_index'
296 allocate(mesh%elem_type_index(0:mesh%n_elem_type))
300 vname =
'elem_type_item'
301 allocate(mesh%elem_type_item(mesh%n_elem_type))
306 if(mesh%n_elem_gross > 0)
then
307 vname =
'elem_node_index'
308 allocate(mesh%elem_node_index(0:mesh%n_elem_gross))
312 vname =
'elem_node_item'
313 if(mesh%elem_node_index(mesh%n_elem_gross) > 0)
then
314 allocate(mesh%elem_node_item(mesh%elem_node_index(mesh%n_elem_gross)))
320 allocate(mesh%section_ID(mesh%n_elem_gross))
325 if(mesh%n_elem_gross > 0)
then
326 vname =
'elem_mat_ID_index'
327 allocate(mesh%elem_mat_ID_index(0:mesh%n_elem_gross))
331 if(mesh%elem_mat_ID_index(mesh%n_elem_gross) > 0)
then
332 vname =
'elem_mat_ID_item'
333 allocate(mesh%elem_mat_ID_item(mesh%elem_mat_ID_index(mesh%n_elem_gross)))
339 vname =
'n_elem_mat_ID'
343 if(mesh%n_elem_mat_ID > 0)
then
344 vname =
'elem_mat_int_index'
346 if(is_allocated == 1)
then
347 allocate(mesh%elem_mat_int_index(0:mesh%n_elem_gross))
352 vname =
'elem_mat_int_val'
354 if(is_allocated == 1)
then
355 if(mesh%elem_mat_int_index(mesh%n_elem_gross) > 0)
then
356 allocate(mesh%elem_mat_int_val(mesh%elem_mat_int_index(mesh%n_elem_mat_ID)))
363 if(mesh%n_elem_gross > 0)
then
364 vname =
'elem_val_index'
366 if(is_allocated == 1)
then
367 allocate(mesh%elem_val_index(0:mesh%n_elem_gross))
372 vname =
'elem_val_item'
374 if(is_allocated == 1)
then
375 if(mesh%elem_val_index(mesh%n_elem_gross) > 0)
then
376 allocate(mesh%elem_val_item(mesh%elem_val_index(mesh%n_elem_gross)))
382 end subroutine get_elem
385 subroutine get_comm(mesh, ierr)
386 integer(kind=kint) :: ierr
390 sname =
'hecmwST_local_mesh'
416 vname =
'n_subdomain'
420 vname =
'n_neighbor_pe'
424 if(mesh%n_neighbor_pe > 0)
then
425 vname =
'neighbor_pe'
426 allocate(mesh%neighbor_pe(mesh%n_neighbor_pe))
431 if(mesh%n_neighbor_pe > 0)
then
432 vname =
'import_index'
433 allocate(mesh%import_index(0:mesh%n_neighbor_pe))
437 if(mesh%import_index(mesh%n_neighbor_pe) > 0)
then
438 vname =
'import_item'
439 allocate(mesh%import_item(mesh%import_index(mesh%n_neighbor_pe)))
444 vname =
'export_index'
445 allocate(mesh%export_index(0:mesh%n_neighbor_pe))
449 if(mesh%export_index(mesh%n_neighbor_pe) > 0)
then
450 vname =
'export_item'
451 allocate(mesh%export_item(mesh%export_index(mesh%n_neighbor_pe)))
456 vname =
'shared_index'
457 allocate(mesh%shared_index(0:mesh%n_neighbor_pe))
461 if(mesh%shared_index(mesh%n_neighbor_pe) > 0)
then
462 vname =
'shared_item'
463 allocate(mesh%shared_item(mesh%shared_index(mesh%n_neighbor_pe)))
468 end subroutine get_comm
471 subroutine get_adapt(mesh, ierr)
472 integer(kind=kint) :: ierr,is_allocated
476 sname =
'hecmwST_local_mesh'
478 vname =
'coarse_grid_level'
486 if(mesh%n_node_gross > 0)
then
487 vname =
'when_i_was_refined_node'
489 if(is_allocated == 1)
then
490 allocate(mesh%when_i_was_refined_node(mesh%n_node_gross))
496 if(mesh%n_elem_gross > 0)
then
497 vname =
'when_i_was_refined_elem'
499 if(is_allocated == 1)
then
500 allocate(mesh%when_i_was_refined_elem(mesh%n_elem_gross))
505 vname =
'adapt_parent_type'
507 if(is_allocated == 1)
then
508 allocate(mesh%adapt_parent_type(mesh%n_elem_gross))
515 if(is_allocated == 1)
then
516 allocate(mesh%adapt_type(mesh%n_elem_gross))
522 vname =
'adapt_level'
524 if(is_allocated == 1)
then
525 allocate(mesh%adapt_level(mesh%n_elem_gross))
530 vname =
'adapt_parent'
532 if(is_allocated == 1)
then
533 allocate(mesh%adapt_parent(mesh%n_elem_gross*2))
538 vname =
'adapt_children_index'
540 if(is_allocated == 1)
then
541 allocate(mesh%adapt_children_index(0:mesh%n_elem_gross))
546 vname =
'adapt_children_item'
548 if(is_allocated == 1)
then
549 if(mesh%adapt_children_index(mesh%n_elem_gross) > 0)
then
550 allocate(mesh%adapt_children_item(mesh%adapt_children_index(mesh%n_elem_gross)*2))
556 end subroutine get_adapt
559 subroutine get_refine(mesh, ierr)
560 integer(kind=kint) :: ierr,is_allocated
564 sname =
'hecmwST_local_mesh'
570 if(mesh%n_node_gross > 0)
then
571 vname =
'node_old2new'
573 if(is_allocated == 1)
then
574 allocate(mesh%node_old2new(mesh%n_node_gross))
579 vname =
'node_new2old'
581 if(is_allocated == 1)
then
582 allocate(mesh%node_new2old(mesh%n_node_gross))
588 if(mesh%n_elem_gross > 0)
then
589 vname =
'elem_old2new'
591 if(is_allocated == 1)
then
592 allocate(mesh%elem_old2new(mesh%n_elem_gross))
597 vname =
'elem_new2old'
599 if(is_allocated == 1)
then
600 allocate(mesh%elem_new2old(mesh%n_elem_gross))
606 if(mesh%n_refine > 0)
then
607 vname =
'n_node_refine_hist'
609 if(is_allocated == 1)
then
610 allocate(mesh%n_node_refine_hist(mesh%n_refine))
616 if(mesh%n_refine > 0)
then
617 sname =
'hecmwST_refine_origin'
618 reforg => mesh%refine_origin
621 allocate(reforg%index(0:mesh%n_refine))
626 allocate(reforg%item_index(0:reforg%index(mesh%n_refine)))
631 allocate(reforg%item_item(reforg%item_index(reforg%index(mesh%n_refine))))
635 end subroutine get_refine
638 subroutine get_sect(sect, ierr)
639 integer(kind=kint) :: ierr
642 sname =
'hecmwST_section'
648 if(sect%n_sect > 0)
then
650 allocate(sect%sect_type(sect%n_sect))
655 allocate(sect%sect_opt(sect%n_sect))
659 vname =
'sect_mat_ID_index'
660 allocate(sect%sect_mat_ID_index(0:sect%n_sect))
664 if(sect%sect_mat_ID_index(sect%n_sect) > 0)
then
665 vname =
'sect_mat_ID_item'
666 allocate(sect%sect_mat_ID_item(sect%sect_mat_ID_index(sect%n_sect)))
671 vname =
'sect_I_index'
672 allocate(sect%sect_I_index(0:sect%n_sect))
676 if(sect%sect_I_index(sect%n_sect) > 0)
then
677 vname =
'sect_I_item'
678 allocate(sect%sect_I_item(sect%sect_I_index(sect%n_sect)))
683 vname =
'sect_R_index'
684 allocate(sect%sect_R_index(0:sect%n_sect))
688 if(sect%sect_R_index(sect%n_sect) > 0)
then
689 vname =
'sect_R_item'
690 allocate(sect%sect_R_item(sect%sect_R_index(sect%n_sect)))
695 allocate(sect%sect_orien_ID(sect%n_sect))
696 sect%sect_orien_ID(:) = -1
698 end subroutine get_sect
701 subroutine get_mat(mat, ierr)
702 integer(kind=kint) :: ierr
705 sname =
'hecmwST_material'
715 vname =
'n_mat_subitem'
719 vname =
'n_mat_table'
723 if(mat%n_mat > 0)
then
725 allocate(mat%mat_name(mat%n_mat))
730 if(mat%n_mat > 0)
then
731 vname =
'mat_item_index'
732 allocate(mat%mat_item_index(0:mat%n_mat))
737 if(mat%n_mat_item > 0)
then
738 vname =
'mat_subitem_index'
739 allocate(mat%mat_subitem_index(0:mat%n_mat_item))
744 if(mat%n_mat_subitem > 0)
then
745 vname =
'mat_table_index'
746 allocate(mat%mat_table_index(0:mat%n_mat_subitem))
751 if(mat%n_mat_table > 0)
then
753 allocate(mat%mat_val(mat%n_mat_table))
758 allocate(mat%mat_temp(mat%n_mat_table))
762 end subroutine get_mat
765 subroutine get_mpc(mpc, ierr)
766 integer(kind=kint) :: ierr
769 sname =
'hecmwST_mpc'
775 if(mpc%n_mpc > 0)
then
777 allocate(mpc%mpc_index(0:mpc%n_mpc))
781 if(mpc%mpc_index(mpc%n_mpc) > 0)
then
783 allocate(mpc%mpc_item(mpc%mpc_index(mpc%n_mpc)))
788 allocate(mpc%mpc_dof(mpc%mpc_index(mpc%n_mpc)))
793 allocate(mpc%mpc_val(mpc%mpc_index(mpc%n_mpc)))
798 allocate(mpc%mpc_const(mpc%n_mpc))
803 end subroutine get_mpc
806 subroutine get_amp(amp, ierr)
807 integer(kind=kint) :: ierr
810 sname =
'hecmwST_amplitude'
816 if(amp%n_amp > 0)
then
818 allocate(amp%amp_name(amp%n_amp))
822 vname =
'amp_type_definition'
823 allocate(amp%amp_type_definition(amp%n_amp))
827 vname =
'amp_type_time'
828 allocate(amp%amp_type_time(amp%n_amp))
832 vname =
'amp_type_value'
833 allocate(amp%amp_type_value(amp%n_amp))
838 allocate(amp%amp_index(0:amp%n_amp))
842 if(amp%amp_index(amp%n_amp) > 0)
then
844 allocate(amp%amp_val(amp%amp_index(amp%n_amp)))
849 allocate(amp%amp_table(amp%amp_index(amp%n_amp)))
854 end subroutine get_amp
857 subroutine get_ngrp(grp, ierr)
858 integer(kind=kint) :: ierr,is_allocated
861 sname =
'hecmwST_node_grp'
867 if(grp%n_grp > 0)
then
869 allocate(grp%grp_name(grp%n_grp))
874 allocate(grp%grp_index(0:grp%n_grp))
879 if(grp%grp_index(grp%n_grp) > 0)
then
880 allocate(grp%grp_item(grp%grp_index(grp%n_grp)))
890 if(grp%n_bc > 0)
then
893 if(is_allocated == 1)
then
894 allocate(grp%bc_grp_ID(grp%n_bc))
899 vname =
'bc_grp_type'
901 if(is_allocated == 1)
then
902 allocate(grp%bc_grp_type(grp%n_bc))
907 vname =
'bc_grp_index'
909 if(is_allocated == 1)
then
910 allocate(grp%bc_grp_index(grp%n_bc))
917 if(is_allocated == 1)
then
918 allocate(grp%bc_grp_dof(grp%n_bc))
925 if(is_allocated == 1)
then
926 allocate(grp%bc_grp_val(grp%n_bc))
931 end subroutine get_ngrp
934 subroutine get_egrp(grp, ierr)
935 integer(kind=kint) :: ierr,is_allocated
938 sname =
'hecmwST_elem_grp'
944 if(grp%n_grp > 0)
then
946 allocate(grp%grp_name(grp%n_grp))
951 allocate(grp%grp_index(0:grp%n_grp))
956 if(grp%grp_index(grp%n_grp) > 0)
then
957 allocate(grp%grp_item(grp%grp_index(grp%n_grp)))
967 if(grp%n_bc > 0)
then
970 if(is_allocated == 1)
then
971 allocate(grp%bc_grp_ID(grp%n_bc))
976 vname =
'bc_grp_type'
978 if(is_allocated == 1)
then
979 allocate(grp%bc_grp_type(grp%n_bc))
984 vname =
'bc_grp_index'
986 if(is_allocated == 1)
then
987 allocate(grp%bc_grp_index(grp%n_bc))
994 if(is_allocated == 1)
then
995 allocate(grp%bc_grp_val(grp%n_bc))
1000 end subroutine get_egrp
1003 subroutine get_sgrp(grp, ierr)
1004 integer(kind=kint) :: ierr,is_allocated
1007 sname =
'hecmwST_surf_grp'
1011 if(ierr /= 0)
return
1013 if(grp%n_grp > 0)
then
1015 allocate(grp%grp_name(grp%n_grp))
1017 if(ierr /= 0)
return
1020 allocate(grp%grp_index(0:grp%n_grp))
1022 if(ierr /= 0)
return
1025 if(grp%grp_index(grp%n_grp) > 0)
then
1026 allocate(grp%grp_item(grp%grp_index(grp%n_grp)*2))
1028 if(ierr /= 0)
return
1034 if(ierr /= 0)
return
1036 if(grp%n_bc > 0)
then
1039 if(is_allocated == 1)
then
1040 allocate(grp%bc_grp_ID(grp%n_bc))
1042 if(ierr /= 0)
return
1045 vname =
'bc_grp_type'
1047 if(is_allocated == 1)
then
1048 allocate(grp%bc_grp_type(grp%n_bc))
1050 if(ierr /= 0)
return
1053 vname =
'bc_grp_index'
1055 if(is_allocated == 1)
then
1056 allocate(grp%bc_grp_index(grp%n_bc))
1058 if(ierr /= 0)
return
1061 vname =
'bc_grp_val'
1063 if(is_allocated == 1)
then
1064 allocate(grp%bc_grp_val(grp%n_bc))
1066 if(ierr /= 0)
return
1069 end subroutine get_sgrp
1072 subroutine get_contact_pair(cpair, ierr)
1073 integer(kind=kint) :: ierr
1076 sname =
'hecmwST_contact_pair'
1080 if(ierr /= 0)
return
1082 if(cpair%n_pair > 0)
then
1084 allocate(cpair%name(cpair%n_pair))
1086 if(ierr /= 0)
return
1089 allocate(cpair%type(cpair%n_pair))
1091 if(ierr /= 0)
return
1093 vname =
'slave_grp_id'
1094 allocate(cpair%slave_grp_id(cpair%n_pair))
1096 if(ierr /= 0)
return
1098 vname =
'slave_orisgrp_id'
1099 allocate(cpair%slave_orisgrp_id(cpair%n_pair))
1101 if(ierr /= 0)
return
1103 vname =
'master_grp_id'
1104 allocate(cpair%master_grp_id(cpair%n_pair))
1106 if(ierr /= 0)
return
1108 end subroutine get_contact_pair