21 type(hecmwst_local_mesh),
intent(inout) :: hecMESH
22 type(hecmwst_matrix),
intent(in) :: hecMAT
25 integer(kind=kint) :: i, cid
26 real(kind=kreal),
allocatable :: elem_vol(:), elem_asp(:)
27 type(hecmwst_result_data) :: fstrresult
33 do i = 1, hecmesh%section%n_sect
34 if(hecmesh%section%sect_type(i) == 4) cycle
35 cid = hecmesh%section%sect_mat_ID_item(i)
36 if(fstrsolid%materials(cid)%variables(m_density) == 0.0d0)
then
37 write(*,*)
"*** error: density is not assigned or set to zero"
38 call hecmw_abort(hecmw_comm_get_comm())
44 if(
myrank == 0)
write(*,*)
' **** Start Precheck ****'
47 allocate(elem_vol(hecmesh%n_elem))
48 allocate(elem_asp(hecmesh%n_elem))
62 call hecmw_visualize_init
63 call hecmw_visualize_by_addfname(hecmesh, fstrresult, 0,
'_precheck')
64 call hecmw_visualize_finalize
67 call hecmw_result_free(fstrresult)
72 if(
myrank == 0)
write(*,*)
' **** End Precheck ****'
84 type(hecmwst_local_mesh) :: hecMESH
85 integer(kind=kint) :: mid, ihead
86 real(kind=kreal) :: thick
88 ihead = hecmesh%section%sect_R_index(mid-1)
89 thick = hecmesh%section%sect_R_item(ihead+1)
99 integer(kind=kint) :: i, j, in, jS, jE, ftype, n, ndof, nnz, fio
100 real(kind=
kreal) :: rnum, dens, cond
101 character :: fileid*3
103 fio = 70 + hecmesh%my_rank
104 write(fileid,
"(i3.3)")hecmesh%my_rank
110 nnz = 9*n + 9*2*hecmat%indexL(n)
111 dens = 100*dble(nnz)/dble(9*n*n)
112 rnum = (7.21d0+0.01*dlog10(dble(hecmat%N)))*10.0d0/dble(hecmat%N)
115 open(fio,file=
'nonzero.dat.'//fileid, status=
'replace')
117 js= hecmat%indexL(i-1) + 1
118 je= hecmat%indexL(i )
119 write(fio,
"(i0,a,i0)")i,
" ",i
122 write(fio,
"(i0,a,i0)")i,
" ",in
123 write(fio,
"(i0,a,i0)")in,
" ",i
128 open(fio,file=
'nonzero.plt.'//fileid, status=
'replace')
130 write(fio,
"(a)")
'set terminal png size 1500,1500'
132 write(fio,
"(a)")
'set terminal postscript eps enhanced color solid "TimesNewRomanPSMT" 20'
135 write(fio,
"(a)")
'unset key'
136 write(fio,
"(a)")
'unset xtics'
137 write(fio,
"(a)")
'unset ytics'
138 write(fio,
"(a)")
'set size ratio 1.0'
139 write(fio,
"(a)")
'set border lw 1.0'
140 write(fio,
"(a,i0,a)")
'set xrange[0.5:',n,
'.5]'
141 write(fio,
"(a,i0,a)")
'set yrange[0.5:',n,
'.5] reverse '
144 write(fio,
"(a)")
'set out "image.'//fileid//
'.png"'
146 write(fio,
"(a)")
'set out "image.'//fileid//
'.eps"'
147 write(fio,
"(a)" )
'set label 1 "Name" at graph 1.1,0.9'
148 write(fio,
"(a)")
'set label 2 "N" at graph 1.1,0.85'
149 write(fio,
"(a)")
'set label 3 "Non-Zero Elem." at graph 1.1,0.8'
150 write(fio,
"(a)")
'set label 4 "Density [%]" at graph 1.1,0.75'
151 write(fio,
"(a)")
'set label 9 "Condition Num." at graph 1.1,0.7'
152 write(fio,
"(a)" )
'set label 5 ": matrix" at graph 1.4,0.9'
153 write(fio,
"(a,i0,a)")
'set label 6 ": ',ndof,
'" at graph 1.4,0.85'
154 write(fio,
"(a,i0,a)")
'set label 7 ": ',nnz,
'" at graph 1.4,0.8'
155 write(fio,
"(a,1pe9.2,a)")
'set label 8 ": ',dens,
'" at graph 1.4,0.75'
156 write(fio,
"(a,1pe9.2,a)")
'set label 10 ": ',cond,
'" at graph 1.4,0.7'
159 write(fio,
"(a,f12.5,a)")
'plot "nonzero.dat.'//fileid//
'" pointtype 5 pointsize ',rnum,
' linecolor rgb "#F96566"'
163 write(*,*)
' ### Command recommendation'
164 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)
Main entry point (called from fistr_main)
This module defines common data and basic structures for analysis.
integer(kind=kint), pointer iresult
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
type(fstr_param), target fstrpr
GLOBAL VARIABLE INITIALIZED IN FSTR_SETUP.
integer(kind=kint), parameter ksteigen
integer(kind=kint), pointer ivisual
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...