21 allocate( hecmesh%node_group%grp_index(0:0) )
22 hecmesh%node_group%grp_index(0) = 0
23 allocate( hecmesh%surf_group%grp_index(0:0) )
24 hecmesh%surf_group%grp_index(0) = 0
25 allocate( hecmesh%elem_group%grp_index(0:0) )
26 hecmesh%elem_group%grp_index(0) = 0
35 type(c_ptr),
value :: mesh
37 call c_f_pointer(cptr=mesh, fptr=hecmesh)
47 type(c_ptr),
value :: mesh
48 integer(c_int),
value,
intent(in) :: nnode
49 real(c_double),
intent(in) :: node(3*nnode)
53 call c_f_pointer(cptr=mesh, fptr=hecmesh)
55 hecmesh%n_node = nnode
56 hecmesh%n_node_gross = nnode
57 hecmesh%nn_middle = nnode
58 hecmesh%nn_internal = nnode
59 allocate(hecmesh%node(3*nnode))
60 allocate(hecmesh%node_ID(2*nnode))
61 allocate(hecmesh%node_internal_list(nnode))
62 allocate(hecmesh%global_node_ID(nnode))
65 hecmesh%node_internal_list(i) = i
66 hecmesh%node_ID(2*i-1) = i
67 hecmesh%node_ID(2*i) = 0
68 hecmesh%global_node_ID(i) = i
69 hecmesh%node(3*i-2) = node(3*i-2)
70 hecmesh%node(3*i-1) = node(3*i-1)
71 hecmesh%node(3*i-0) = node(3*i-0)
81 type(c_ptr),
value :: mesh
84 call c_f_pointer(cptr=mesh, fptr=hecmesh)
94 type(c_ptr),
value :: mesh
97 call c_f_pointer(cptr=mesh, fptr=hecmesh)
106 type(c_ptr),
value :: mesh
107 integer(c_int),
value,
intent(in) :: ndof
109 call c_f_pointer(cptr=mesh, fptr=hecmesh)
118 type(c_ptr),
value :: mesh
121 call c_f_pointer(cptr=mesh, fptr=hecmesh)
134 type(c_ptr),
value :: mesh
135 integer(c_int),
value,
intent(in) :: nelem
136 integer(c_int),
intent(in) :: element(*)
137 integer(c_int),
intent(in) :: elemtype(nelem)
138 integer(c_int),
intent(in) :: sectionID(nelem)
141 integer :: i, j, ncon, n, ii, jj, off
142 integer,
parameter :: etypes(35) = [ &
144 231, 232, 2322, 241, 242, &
145 301, 341, 3414, 342, 3422, 351, 352, 361, 362, 363, &
148 732, 733, 731, 741, 742, 743, 761, 781, &
150 1031, 1032, 1041, 1042 &
152 integer :: etype_counter(35)
154 call c_f_pointer(cptr=mesh, fptr=hecmesh)
156 hecmesh%n_elem = nelem
157 hecmesh%n_elem_gross = nelem
158 hecmesh%ne_internal = nelem
159 allocate(hecmesh%elem_internal_list(nelem))
160 allocate(hecmesh%elem_ID(2*nelem))
161 allocate(hecmesh%global_elem_ID(nelem))
162 allocate(hecmesh%elem_node_index(0:nelem))
163 allocate(hecmesh%elem_type(nelem))
164 allocate(hecmesh%section_ID(nelem))
170 if (elemtype(i) == etypes(j))
then
171 etype_counter(j) = etype_counter(j) + 1
178 if (etype_counter(j) > 0)
then
183 hecmesh%n_elem_type = n
184 allocate(hecmesh%elem_type_index(0:n))
185 allocate(hecmesh%elem_type_item(n))
190 hecmesh%elem_type_index(0) = n
192 if (etype_counter(j) > 0)
then
193 n = n + etype_counter(j)
194 hecmesh%elem_type_item(i) = etypes(j)
195 hecmesh%elem_type_index(i) = n
206 allocate(hecmesh%elem_node_item(ncon))
210 hecmesh%elem_node_index(0) = ncon
213 if (etype_counter(j) == 0)
continue
217 if (elemtype(i)==etypes(j))
then
218 hecmesh%elem_node_item(ncon+1:ncon+n) = element(off+1:off+n)
221 hecmesh%elem_node_index(ii) = ncon
222 hecmesh%elem_ID(2*ii-1) = i
223 hecmesh%elem_ID(2*ii) = 0
224 hecmesh%global_elem_ID(ii) = i
225 hecmesh%elem_internal_list(ii) = i
226 hecmesh%elem_type(ii) = elemtype(i)
227 hecmesh%section_ID(ii) = sectionid(i)
234 hecmesh%section%n_sect = 0
236 if (hecmesh%section%n_sect < hecmesh%section_ID(i))
then
237 hecmesh%section%n_sect = hecmesh%section_ID(i)
248 type(c_ptr),
value :: mesh
251 call c_f_pointer(cptr=mesh, fptr=hecmesh)
260 type(c_ptr),
value :: mesh
263 call c_f_pointer(cptr=mesh, fptr=hecmesh)
272 type(c_ptr),
value :: mesh
275 call c_f_pointer(cptr=mesh, fptr=hecmesh)
284 type(c_ptr),
value :: mesh
287 call c_f_pointer(cptr=mesh, fptr=hecmesh)
296 type(c_ptr),
value :: mesh
299 call c_f_pointer(cptr=mesh, fptr=hecmesh)
309 type(c_ptr),
value :: mesh
312 call c_f_pointer(cptr=mesh, fptr=hecmesh)
324 use hecmw,
only: kint
327 type(c_ptr),
value,
intent(in) :: mesh
328 type(c_ptr),
value,
intent(in) :: grp_name
329 integer(c_int),
value,
intent(in) :: count
330 integer(c_int),
intent(in) :: list(count)
332 character(kind=c_char),
pointer :: char_array(:) => null()
333 character(len=HECMW_NAME_LEN) :: grp_name_f
334 integer(kind=kint) :: grp_id
336 call c_f_pointer(cptr=mesh, fptr=hecmesh)
350 type(c_ptr),
value :: mesh
352 integer(c_int),
value,
intent(in) :: i
353 character(kind=c_char),
intent(inout) :: buf(*)
354 integer(c_int),
value,
intent(in) :: buflen
355 call c_f_pointer(cptr=mesh, fptr=hecmesh)
356 call f_c_str_copy(hecmesh%node_group%grp_name(i),buf,buflen)
366 type(c_ptr),
value :: mesh
367 integer(c_int),
value,
intent(in) :: i
368 type(c_ptr),
intent(out) :: array
369 integer(c_int),
intent(out) :: count
373 call c_f_pointer(cptr=mesh, fptr=hecmesh)
374 is = hecmesh%node_group%grp_index(i-1)+1
375 ie = hecmesh%node_group%grp_index(i)
376 array = c_loc(hecmesh%node_group%grp_item(is))
385 type(c_ptr),
value :: mesh
388 call c_f_pointer(cptr=mesh, fptr=hecmesh)
400 use hecmw,
only: kint
403 type(c_ptr),
value,
intent(in) :: mesh
404 type(c_ptr),
value,
intent(in) :: grp_name
405 integer(c_int),
value,
intent(in) :: count
406 integer(c_int),
intent(in) :: list(count)
408 character(kind=c_char),
pointer :: char_array(:) => null()
409 character(len=HECMW_NAME_LEN) :: grp_name_f
410 integer(kind=kint) :: grp_id
412 call c_f_pointer(cptr=mesh, fptr=hecmesh)
427 type(c_ptr),
value :: mesh
429 integer(c_int),
value,
intent(in) :: i
430 character(kind=c_char),
intent(inout) :: buf(*)
431 integer(c_int),
value,
intent(in) :: buflen
432 call c_f_pointer(cptr=mesh, fptr=hecmesh)
433 call c_f_pointer(cptr=mesh, fptr=hecmesh)
434 call f_c_str_copy(hecmesh%surf_group%grp_name(i),buf,buflen)
444 type(c_ptr),
value :: mesh
445 integer(c_int),
value,
intent(in) :: i
446 type(c_ptr),
intent(out) :: array
447 integer(c_int),
intent(out) :: count
451 call c_f_pointer(cptr=mesh, fptr=hecmesh)
452 is = hecmesh%surf_group%grp_index(i-1)+1
453 ie = hecmesh%surf_group%grp_index(i)
454 array = c_loc(hecmesh%surf_group%grp_item(is))
464 type(c_ptr),
value :: mesh
467 call c_f_pointer(cptr=mesh, fptr=hecmesh)
479 use hecmw,
only: kint
482 type(c_ptr),
value,
intent(in) :: mesh
483 type(c_ptr),
value,
intent(in) :: grp_name
484 integer(c_int),
value,
intent(in) :: count
485 integer(c_int),
intent(in) :: list(count)
487 character(kind=c_char),
pointer :: char_array(:) => null()
488 character(len=HECMW_NAME_LEN) :: grp_name_f
489 integer(kind=kint) :: grp_id
491 call c_f_pointer(cptr=mesh, fptr=hecmesh)
506 type(c_ptr),
value :: mesh
508 integer(c_int),
value,
intent(in) :: i
509 character(kind=c_char),
intent(inout) :: buf(*)
510 integer(c_int),
value,
intent(in) :: buflen
511 call c_f_pointer(cptr=mesh, fptr=hecmesh)
512 call f_c_str_copy(hecmesh%elem_group%grp_name(i),buf,buflen)
522 type(c_ptr),
value :: mesh
523 integer(c_int),
value,
intent(in) :: i
524 type(c_ptr),
intent(out) :: array
525 integer(c_int),
intent(out) :: count
529 call c_f_pointer(cptr=mesh, fptr=hecmesh)
530 is = hecmesh%elem_group%grp_index(i-1)+1
531 ie = hecmesh%elem_group%grp_index(i)
532 array = c_loc(hecmesh%elem_group%grp_item(is))
subroutine f_c_str_copy(f_str, c_str, c_len)
subroutine c_f_str_copy(c_str, f_str, f_len)
subroutine hecmw_api_mesh_append_ngrp(mesh, grp_name, count, list)
節点グループを追加
subroutine hecmw_api_mesh_append_egrp(mesh, grp_name, count, list)
要素グループを追加
integer(c_int) function hecmw_api_mesh_n_sgrp(mesh)
面グループのグループ数
subroutine hecmw_api_mesh_append_sgrp(mesh, grp_name, count, list)
面グループを追加
subroutine hecmw_api_mesh_get_ngrp(mesh, i, array, count)
節点グループの節点番号の配列
subroutine hecmw_api_mesh_get_egrp_name(mesh, i, buf, buflen)
要素グループの名前
type(c_ptr) function hecmw_api_mesh_get_elem_type(mesh)
要素型の取得
subroutine hecmw_api_mesh_get_sgrp(mesh, i, array, count)
面グループの要素番号、面番号の配列
subroutine hecmw_api_mesh_get_ngrp_name(mesh, i, buf, buflen)
節点グループの名前
subroutine hecmw_api_mesh_set_n_dof(mesh, ndof)
節点自由度の設定
type(c_ptr) function hecmw_api_mesh_get_section_id(mesh)
セクション番号配列の取得
subroutine hecmw_api_mesh_get_egrp(mesh, i, array, count)
要素グループの要素番号の配列
type(c_ptr) function hecmw_api_mesh_get_elem_node_item(mesh)
節点テーブルの取得
integer(c_int) function hecmw_api_mesh_n_node(mesh)
節点数の取得
integer(c_int) function hecmw_api_mesh_n_elem(mesh)
要素数の取得
subroutine hecmw_api_mesh_set_element(mesh, nelem, elemtype, element, sectionID)
要素の設定
integer(c_int) function hecmw_api_mesh_n_egrp(mesh)
要素グループのグループ数
subroutine hecmw_api_mesh_delete(mesh)
メッシュハンドラの破棄
type(c_ptr) function hecmw_api_mesh_get_node(mesh)
節点座標配列の取得
integer(c_int) function hecmw_api_mesh_n_elem_node_item(mesh)
要素節点配列の大きさの取得
integer(c_int) function hecmw_api_mesh_get_n_dof(mesh)
節点自由度の取得
integer(c_int) function hecmw_api_mesh_n_ngrp(mesh)
節点グループのグループ数
type(c_ptr) function hecmw_api_mesh_new()
メッシュハンドラの生成
subroutine hecmw_api_mesh_set_node(mesh, nnode, node)
節点配列の設定
subroutine hecmw_api_mesh_get_sgrp_name(mesh, i, buf, buflen)
面グループの名前
subroutine, public hecmw_dist_free(mesh)
integer(kind=kint) function hecmw_get_max_node(etype)
This module contains auxiliary functions in calculation setup.
subroutine append_new_group(hecMESH, grp_type_name, name, count, list, grp_id)
subroutine hecmw_nullify_mesh(P)
integer(kind=kint), parameter hecmw_name_len