17 character(len=256) :: msg
40 type(hecmwst_local_mesh),
pointer :: hecMESH
41 integer(kind=kint),
intent(in) :: sgrp_id
42 integer(kind=kint),
intent(out) :: ngrp_id
43 integer(kind=kint) :: is, ie, nnode, i, ic, isurf, ic_type, stype, nn, j0, j, ndup, new_nnode
44 integer(kind=kint) :: snode(20)
45 integer(kind=kint),
allocatable :: node(:)
46 character(len=HECMW_NAME_LEN) :: grp_name
47 is= hecmesh%surf_group%grp_index(sgrp_id-1) + 1
48 ie= hecmesh%surf_group%grp_index(sgrp_id )
52 ic = hecmesh%surf_group%grp_item(2*i-1)
53 isurf = hecmesh%surf_group%grp_item(2*i)
54 ic_type = hecmesh%elem_type(ic)
55 call getsubface( ic_type, isurf, stype, snode )
56 nnode = nnode + getnumberofnodes( stype )
59 allocate( node(nnode) )
62 ic = hecmesh%surf_group%grp_item(2*i-1)
63 isurf = hecmesh%surf_group%grp_item(2*i)
64 ic_type = hecmesh%elem_type(ic)
65 call getsubface( ic_type, isurf, stype, snode )
66 nn = getnumberofnodes( stype )
67 j0 = hecmesh%elem_node_index(ic-1)
69 node(nnode+j) = hecmesh%elem_node_item(j0+snode(j))
76 new_nnode = nnode - ndup
78 write( grp_name,
'(a,a)')
'FSTR_S2N_',trim(hecmesh%surf_group%grp_name(sgrp_id))
79 call append_new_group(hecmesh,
'node_grp', grp_name, new_nnode, node, ngrp_id)
87 type(hecmwst_local_mesh),
pointer :: hecMESH
88 integer(kind=kint),
intent(in) :: ngrp_id1, ngrp_id2
89 integer(kind=kint) :: nnode1, nnode2, nnode, is, i, nisect, ngrp_id
90 integer(kind=kint),
allocatable :: node(:), isect(:)
91 character(len=HECMW_NAME_LEN) :: grp_name
92 nnode1 = hecmesh%node_group%grp_index(ngrp_id1) - hecmesh%node_group%grp_index(ngrp_id1-1)
93 nnode2 = hecmesh%node_group%grp_index(ngrp_id2) - hecmesh%node_group%grp_index(ngrp_id2-1)
94 nnode = nnode1 + nnode2
95 allocate( node(nnode) )
96 is= hecmesh%node_group%grp_index(ngrp_id1-1)
98 node(i) = hecmesh%node_group%grp_item(is+i)
100 is= hecmesh%node_group%grp_index(ngrp_id2-1)
102 node(nnode1+i) = hecmesh%node_group%grp_item(is+i)
105 allocate( isect(nnode) )
108 if( node(i) == node(i+1) )
then
110 isect(nisect) = node(i)
113 write( grp_name,
'(a,a,a,a)') &
114 'FSTR_ISCT_',trim(hecmesh%node_group%grp_name(ngrp_id1)),
'_AND_',trim(hecmesh%node_group%grp_name(ngrp_id2))
115 call append_new_group(hecmesh,
'node_grp', grp_name, nisect, isect, ngrp_id)
134 type (hecmwst_local_mesh),
target :: hecmesh
135 character(len=*) :: type_name
136 character(len=*) :: name
137 integer(kind=kint) :: local_id
138 integer(kind=kint) :: i, n, no, fg
139 integer(kind=kint),
pointer :: global_item(:)
146 if( type_name ==
'node' )
then
149 global_item => hecmesh%global_node_ID
150 else if( type_name ==
'element' )
then
153 global_item => hecmesh%global_elem_ID
155 stop
'assert in get_local_member_index: unknown type_name'
159 if( no == global_item(i))
then
178 type (hecmwst_local_mesh),
target :: hecmesh
180 character(len=*) :: type_name
181 character(len=*) :: name
182 integer(kind=kint) :: local_id, idx
183 integer(kind=kint) :: n, no, fg
190 if( type_name ==
'node' )
then
192 n = hecmesh%nn_internal
199 stop
'assert in get_sorted_local_member_index: unknown type_name'
220 type (hecmwST_local_mesh),
target :: hecMESH
221 character(len=*) :: header_name
222 integer(kind=kint) :: n
223 character(len=HECMW_NAME_LEN) :: grp_id_name(:)
224 integer(kind=kint) :: grp_ID(:)
225 integer(kind=kint) :: grp_TYPE(:)
227 integer(kind=kint) :: i, id
228 integer(kind=kint) :: no, no_count, exist_n
229 integer(kind=kint),
pointer :: no_list(:)
230 character(HECMW_NAME_LEN) :: name
231 character(len=256) :: msg
233 allocate( no_list( n ))
237 no_count = no_count + 1
238 no_list(no_count) = no
239 grp_id(i) = hecmesh%node_group%n_grp + no_count
244 do id = 1, hecmesh%node_group%n_grp
245 if (
hecmw_streqr(hecmesh%node_group%grp_name(id), grp_id_name(i)))
then
252 if (grp_id(i) == -1)
then
253 do id = 1, hecmesh%surf_group%n_grp
254 if (
hecmw_streqr(hecmesh%surf_group%grp_name(id), grp_id_name(i)))
then
263 if( grp_id(i) == -1 )
then
264 write(msg,*)
'### Error: ', header_name,
' : Node group "',grp_id_name(i),
'" does not exist.'
269 if( no_count > 0 )
then
274 deallocate( no_list )
283 type (hecmwST_local_mesh),
target :: hecMESH
284 integer(kind=kint) :: n
285 integer(kind=kint),
save :: casha = 1, cashb = 1
286 character(HECMW_NAME_LEN) :: grp_id_name(:)
287 logical :: fg_surface(:)
288 integer(kind=kint) :: grp_ID(:)
289 integer(kind=kint) :: i, id
290 integer(kind=kint) :: no, no_count, exist_n
291 integer(kind=kint),
pointer :: no_list(:)
292 character(HECMW_NAME_LEN) :: name
293 character(len=256) :: msg
295 allocate( no_list( n ))
298 if( fg_surface(i) )
then
300 if(casha < hecmesh%surf_group%n_grp)
then
301 if(
hecmw_streqr(hecmesh%surf_group%grp_name(casha), grp_id_name(i)))
then
307 do id = 1, hecmesh%surf_group%n_grp
308 if(
hecmw_streqr(hecmesh%surf_group%grp_name(id), grp_id_name(i)))
then
314 if( grp_id(i) == -1 )
then
315 write(msg,*)
'### Error: !DLOAD : Surface group "',&
316 grp_id_name(i),
'" does not exist.'
321 no_count = no_count + 1
322 no_list(no_count) = no
323 grp_id(i) = hecmesh%elem_group%n_grp + no_count
326 if(cashb < hecmesh%surf_group%n_grp)
then
327 if(
hecmw_streqr(hecmesh%surf_group%grp_name(cashb), grp_id_name(i)))
then
333 do id = 1, hecmesh%elem_group%n_grp
334 if(
hecmw_streqr(hecmesh%elem_group%grp_name(id), grp_id_name(i)))
then
340 if( grp_id(i) == -1 )
then
341 write(msg,*)
'### Error: !DLOAD : Element group "',&
342 grp_id_name(i),
'" does not exist.'
349 if( no_count > 0 )
then
368 deallocate( no_list )
382 type( hecmwst_amplitude ),
intent(inout) :: amp
383 character(len=HECMW_NAME_LEN),
intent(in) :: name
384 integer(kind=kint),
intent(in) :: type_def
385 integer(kind=kint),
intent(in) :: type_time
386 integer(kind=kint),
intent(in) :: type_val
387 integer(kind=kint),
intent(in) :: np
388 real(kind=kreal),
intent(in) :: val(:)
389 real(kind=kreal),
intent(in) :: table(:)
392 integer(kind=kint) :: n_amp, new_size, old_size, i
396 write(*,*)
'Error: AMPLITUDE with NAME=',trim(name),
' already exists'
412 old_size = amp%amp_index( n_amp )
413 new_size = old_size+np
417 amp%amp_index(amp%n_amp) = amp%amp_index(amp%n_amp-1)+np
418 amp%amp_name(amp%n_amp) = name
419 amp%amp_type_definition(amp%n_amp) = type_def
420 amp%amp_type_time(amp%n_amp) = type_time
421 amp%amp_type_value(amp%n_amp) = type_val
423 amp%amp_val(old_size+i) = val(i)
424 amp%amp_table(old_size+i) = table(i)
431 type (hecmwST_local_mesh) :: hecMESH
432 character(len=*) :: header_name
433 character(len=HECMW_NAME_LEN)::aname
434 integer(kind=kint) :: id
435 character(len=256) :: msg
438 if( aname .eq.
' ' )
return
441 write(msg,*)
'### Error: ', header_name,
' : Amplitude group "',&
442 aname,
'" does not exist.'
453 type (hecmwST_local_mesh) :: hecMESH
454 character(len=HECMW_NAME_LEN)::aname
455 integer(kind=kint) :: id
457 integer(kind=kint) :: i
460 if( aname .eq.
' ' )
return
462 do i = 1, hecmesh%amp%n_amp
474 integer(kind=kint),
pointer :: array(:)
475 integer(kind=kint) :: n;
477 if(
associated( array ))
deallocate(array)
483 real(kind=kreal),
pointer :: array(:)
484 integer(kind=kint) :: n;
486 if(
associated( array ))
deallocate(array)
499 integer(kind=kint) :: ctrl
500 type (hecmwST_local_mesh) :: hecMESH
501 integer(kind=kint) :: rcode
502 character(HECMW_FILENAME_LEN) :: vis_filename =
'hecmw_vis.ini'
506 if(rcode == 0)
return
508 if(hecmesh%my_rank == 0)
then
512 call hecmw_barrier( hecmesh )
514 inquire(file = vis_filename, exist = is_exit)
516 if(.not. is_exit)
then
523 integer(kind=kint) :: ctrl
524 integer(kind=kint) :: rcode
525 integer(kind=kint) :: i, start_n, end_n
526 character(HECMW_FILENAME_LEN) :: vis_filename
527 integer(kind=kint),
parameter :: buffsize = 127
528 character( buffsize ) :: buff
529 character( buffsize ) :: head
530 character( buffsize ) :: msg
535 open (
ifvs, file = trim(vis_filename), status =
'replace', err = 1000)
538 if( rcode /= 0 )
exit
540 if( head ==
'!END')
exit
541 write(
ifvs,
'(a)') buff
547 1000
write(msg,*)
'Error: cannot create file:"', trim(vis_filename),
'" for visualization'
void fstr_ctrl_get_err_msg(char *f_buff, int *len)
int fstr_ctrl_get_line(int *ctrl, int *rec_no, char *buff, int *buff_size)
int fstr_ctrl_seek_header(int *ctrl, const char *header_name)
This module contains auxiliary functions in calculation setup.
subroutine fstr_ctrl_err_stop
subroutine dload_grp_name_to_id_ex(hecMESH, n, grp_id_name, fg_surface, grp_ID)
subroutine fstr_setup_visualize(ctrl, hecMESH)
subroutine nodesurf_grp_name_to_id_ex(hecMESH, header_name, n, grp_id_name, grp_ID, grp_TYPE)
subroutine fstr_setup_visualize_main(ctrl, vis_filename)
integer(kind=kint) function get_local_member_index(hecMESH, type_name, name, local_id)
subroutine amp_name_to_id(hecMESH, header_name, aname, id)
subroutine append_new_amplitude(amp, name, type_def, type_time, type_val, np, val, table)
Append new amplitude table at the end of existing amplitude tables.
subroutine append_node_grp_from_surf_grp(hecMESH, sgrp_id, ngrp_id)
subroutine fstr_setup_util_err_stop(msg)
subroutine reallocate_real(array, n)
subroutine append_intersection_node_grp(hecMESH, ngrp_id1, ngrp_id2)
subroutine reallocate_integer(array, n)
integer(kind=kint) function get_sorted_local_member_index(hecMESH, hecPARAM, type_name, name, local_id)
subroutine get_amp_id(hecMESH, aname, id)
subroutine, public hecmw_bsearch_int_array(array, istart, iend, val, idx)
recursive subroutine, public hecmw_qsort_int_array(array, istart, iend)
subroutine, public hecmw_uniq_int_array(array, istart, iend, ndup)
This module contains auxiliary functions in calculation setup.
integer(kind=kint) function append_single_group(hecMESH, grp_type_name, no_count, no_list)
logical function hecmw_str2index(s, x)
subroutine hecmw_expand_integer_array(array, old_size, new_size)
subroutine hecmw_expand_real_array(array, old_size, new_size)
subroutine append_new_group(hecMESH, grp_type_name, name, count, list, grp_id)
subroutine hecmw_expand_char_array(array, old_size, new_size)
logical function hecmw_streqr(s1, s2)
subroutine hecmw_expand_index_array(array, old_size, new_size)
This module defines common data and basic structures for analysis.
integer(kind=kint), parameter imsg
integer(kind=kint), parameter kfloadtype_surf
integer(kind=kint), parameter ifvs
subroutine fstr_abort(code)
Terminate the analysis with a classified exit status. MPI_ABORT does not perform the Fortran I/O fina...
integer(kind=kint), parameter kfloadtype_node
FSTR INNER CONTROL PARAMETERS (fstrPARAM)