21 type(hecmwst_local_mesh),
intent(inout) :: hecMESH
22 type(hecmwst_matrix),
intent(in) :: hecMAT
26 integer(kind=kint) :: i, cid
27 real(kind=kreal),
allocatable :: elem_vol(:), elem_asp(:)
28 type(hecmwst_result_data) :: fstrresult
31 if(fstrparam%solution_type ==
ksteigen .or. &
34 do i = 1, hecmesh%section%n_sect
35 if(hecmesh%section%sect_type(i) == 4) cycle
36 cid = hecmesh%section%sect_mat_ID_item(i)
37 if(fstrsolid%materials(cid)%variables(m_density) == 0.0d0)
then
38 write(*,*)
"*** error: density is not assigned or set to zero"
39 call hecmw_abort(hecmw_comm_get_comm())
45 if(
myrank == 0)
write(*,*)
' **** Start Precheck ****'
48 allocate(elem_vol(hecmesh%n_elem))
49 allocate(elem_asp(hecmesh%n_elem))
55 if(fstrparam%fg_result == 1)
then
61 if(fstrparam%fg_visual == 1)
then
63 call hecmw_visualize_init
64 call hecmw_visualize_by_addfname(hecmesh, fstrresult, 0,
'_precheck')
65 call hecmw_visualize_finalize
68 call hecmw_result_free(fstrresult)
73 if(
myrank == 0)
write(*,*)
' **** End Precheck ****'
76 if(fstrparam%solution_type ==
kstnzprof)
then
85 type(hecmwst_local_mesh) :: hecMESH
86 integer(kind=kint) :: mid, ihead
87 real(kind=kreal) :: thick
89 ihead = hecmesh%section%sect_R_index(mid-1)
90 thick = hecmesh%section%sect_R_item(ihead+1)
100 integer(kind=kint) :: i, j, in, jS, jE, ftype, n, ndof, nnz, fio
101 real(kind=
kreal) :: rnum, dens, cond
102 character :: fileid*3
104 fio = 70 + hecmesh%my_rank
105 write(fileid,
"(i3.3)")hecmesh%my_rank
111 nnz = 9*n + 9*2*hecmat%indexL(n)
112 dens = 100*dble(nnz)/dble(9*n*n)
113 rnum = (7.21d0+0.01*dlog10(dble(hecmat%N)))*10.0d0/dble(hecmat%N)
116 open(fio,file=
'nonzero.dat.'//fileid, status=
'replace')
118 js= hecmat%indexL(i-1) + 1
119 je= hecmat%indexL(i )
120 write(fio,
"(i0,a,i0)")i,
" ",i
123 write(fio,
"(i0,a,i0)")i,
" ",in
124 write(fio,
"(i0,a,i0)")in,
" ",i
129 open(fio,file=
'nonzero.plt.'//fileid, status=
'replace')
131 write(fio,
"(a)")
'set terminal png size 1500,1500'
133 write(fio,
"(a)")
'set terminal postscript eps enhanced color solid "TimesNewRomanPSMT" 20'
136 write(fio,
"(a)")
'unset key'
137 write(fio,
"(a)")
'unset xtics'
138 write(fio,
"(a)")
'unset ytics'
139 write(fio,
"(a)")
'set size ratio 1.0'
140 write(fio,
"(a)")
'set border lw 1.0'
141 write(fio,
"(a,i0,a)")
'set xrange[0.5:',n,
'.5]'
142 write(fio,
"(a,i0,a)")
'set yrange[0.5:',n,
'.5] reverse '
145 write(fio,
"(a)")
'set out "image.'//fileid//
'.png"'
147 write(fio,
"(a)")
'set out "image.'//fileid//
'.eps"'
148 write(fio,
"(a)" )
'set label 1 "Name" at graph 1.1,0.9'
149 write(fio,
"(a)")
'set label 2 "N" at graph 1.1,0.85'
150 write(fio,
"(a)")
'set label 3 "Non-Zero Elem." at graph 1.1,0.8'
151 write(fio,
"(a)")
'set label 4 "Density [%]" at graph 1.1,0.75'
152 write(fio,
"(a)")
'set label 9 "Condition Num." at graph 1.1,0.7'
153 write(fio,
"(a)" )
'set label 5 ": matrix" at graph 1.4,0.9'
154 write(fio,
"(a,i0,a)")
'set label 6 ": ',ndof,
'" at graph 1.4,0.85'
155 write(fio,
"(a,i0,a)")
'set label 7 ": ',nnz,
'" at graph 1.4,0.8'
156 write(fio,
"(a,1pe9.2,a)")
'set label 8 ": ',dens,
'" at graph 1.4,0.75'
157 write(fio,
"(a,1pe9.2,a)")
'set label 10 ": ',cond,
'" at graph 1.4,0.7'
160 write(fio,
"(a,f12.5,a)")
'plot "nonzero.dat.'//fileid//
'" pointtype 5 pointsize ',rnum,
' linecolor rgb "#F96566"'
164 write(*,*)
' ### Command recommendation'
165 write(*,*)
' gnuplot -persist "nonzero.plt"'
integer(kind=4), parameter kreal
This module provides the entry point for ELEMCHECK (pre-analysis input validation)
subroutine hecmw_nonzero_profile(hecMESH, hecMAT)
Non-zero profile output for gnuplot visualization.
subroutine fstr_get_thickness(hecMESH, mid, thick)
subroutine fstr_input_precheck(hecMESH, hecMAT, fstrSOLID, fstrPARAM)
Main entry point (called from fistr_main)
This module defines common data and basic structures for analysis.
integer(kind=kint) myrank
PARALLEL EXECUTION.
integer(kind=kint), parameter kstdynamic
integer(kind=kint), parameter kstprecheck
solution type (st)
integer(kind=kint), parameter kststaticeigen
integer(kind=kint), parameter kstnzprof
integer(kind=kint), parameter ksteigen
HECMW to FSTR Mesh Data Converter. Converting Connectivity of Element Type 232, 342 and 352.
subroutine fstr2hecmw_mesh_conv(hecMESH)
subroutine hecmw2fstr_mesh_conv(hecMESH)
This module constructs result data for ELEMCHECK visualization/result output.
subroutine, public precheck_make_result(hecMESH, fstrRESULT, elem_vol, elem_asp)
Build hecmwST_result_data for visualization via hecmw_visualize.
subroutine, public precheck_write_result(hecMESH, elem_vol, elem_asp)
Write check results to result file via hecmw_result_add/write interface.
This module provides mesh quality check functions for ELEMCHECK.
subroutine, public precheck_mesh_quality(hecMESH, hecMAT, elem_vol, elem_asp)
Mesh quality check (element volume, aspect ratio) Returns per-element volume and aspect ratio in elem...
FSTR INNER CONTROL PARAMETERS (fstrPARAM)