15 subroutine setmass(fstrSOLID, hecMESH, hecMAT, fstrEIG)
25 integer(kind=kint) :: i, iS, iE, ii, nn, j, jn, jS, k
26 integer(kind=kint) :: N, NP, NDOF
27 integer(kind=kint) :: icel, ic_type, itype, isect, ihead, sec_opt, cid
28 integer(kind=kint) :: nodLOCAL(20)
29 real(kind=
kreal) :: val, surf, chkmass
30 real(kind=
kreal) :: rho, thick, length
31 real(kind=
kreal) :: lumped(120), mass(20*6, 20*6), ecoord(3,20)
34 write(
imsg,*)
"* mass matrix generation"
41 allocate(fstreig%mass(np*ndof))
45 do itype = 1, hecmesh%n_elem_type
46 is = hecmesh%elem_type_index(itype-1) + 1
47 ie = hecmesh%elem_type_index(itype )
48 ic_type = hecmesh%elem_type_item(itype)
49 nn = hecmw_get_max_node(ic_type)
51 if(hecmw_is_etype_link(ic_type)) cycle
52 if(hecmw_is_etype_patch(ic_type)) cycle
53 if(ic_type == 3414) cycle
54 if(ic_type == 881 .or. ic_type == 891) cycle
57 js = hecmesh%elem_node_index(icel-1)
59 nodlocal(j) = hecmesh%elem_node_item(js+j)
61 ecoord(i,j) = hecmesh%node(3*(nodlocal(j)-1)+i)
65 isect = hecmesh%section_ID(icel)
66 ihead = hecmesh%section%sect_R_index(isect-1)
67 cid = hecmesh%section%sect_mat_ID_item(isect)
68 sec_opt = hecmesh%section%sect_opt(isect)
69 rho = fstrsolid%materials(cid)%variables(
m_density)
70 thick = fstrsolid%materials(cid)%variables(
m_thick)
73 if(ic_type == 231 .or. ic_type == 232 .or. ic_type == 241 .or. ic_type == 242)
then
74 call mass_c2(ic_type, nn, ecoord(1:2,1:nn), fstrsolid%elements(icel)%gausses, sec_opt, thick, mass, lumped)
76 elseif(ic_type == 341 .or. ic_type == 342 .or. ic_type == 351 .or. ic_type == 352 .or. &
77 & ic_type == 361 .or. ic_type == 362 )
then
78 call mass_c3(ic_type, nn, ecoord(1:3,1:nn), fstrsolid%elements(icel)%gausses, mass, lumped)
80 elseif(ic_type==731 .or. ic_type==741 .or. ic_type==743)
then
81 rho = fstrsolid%materials(cid)%variables(
m_density)
82 thick = fstrsolid%materials(cid)%variables(
m_thick)
83 call mass_shell(ic_type, nn, ecoord(1:3,1:nn), rho, thick, fstrsolid%elements(icel)%gausses, mass, lumped)
85 elseif(ic_type == 761)
then
87 rho = fstrsolid%materials(cid)%variables(
m_density)
88 thick = fstrsolid%materials(cid)%variables(
m_thick)
89 val = surf*thick*rho/3.0d0
91 elseif(ic_type == 781)
then
93 rho = fstrsolid%materials(cid)%variables(
m_density)
94 thick = fstrsolid%materials(cid)%variables(
m_thick)
95 val = surf*thick*rho/4.0d0
97 elseif(ic_type == 611 .or. ic_type == 641)
then
98 surf = hecmesh%section%sect_R_item(ihead+4)
100 rho = fstrsolid%materials(cid)%variables(
m_density)
101 val = 0.5d0*surf*length*rho
103 elseif(ic_type == 301)
then
104 surf = hecmesh%section%sect_R_item(ihead+1)
106 rho = fstrsolid%materials(cid)%variables(
m_density)
107 val = 0.5d0*surf*length*rho
109 elseif( ic_type/100 == 5 )
then
111 write(*,*)
"** error setMASS"
118 if(ic_type == 611)
then
119 fstreig%mass(js+1) = fstreig%mass(js+1) + val
120 fstreig%mass(js+2) = fstreig%mass(js+2) + val
121 fstreig%mass(js+3) = fstreig%mass(js+3) + val
122 fstreig%mass(js+4) = fstreig%mass(js+4) + 0.0d0
123 fstreig%mass(js+5) = fstreig%mass(js+5) + 0.0d0
124 fstreig%mass(js+6) = fstreig%mass(js+6) + 0.0d0
126 elseif(ic_type == 641)
then
127 if(j == 1 .or. j == 2)
then
128 fstreig%mass(js+1) = fstreig%mass(js+1) + val
129 fstreig%mass(js+2) = fstreig%mass(js+2) + val
130 fstreig%mass(js+3) = fstreig%mass(js+3) + val
131 elseif(j == 3 .or. j == 4)
then
132 fstreig%mass(js+1) = fstreig%mass(js+1) + 0.0d0
133 fstreig%mass(js+2) = fstreig%mass(js+2) + 0.0d0
134 fstreig%mass(js+3) = fstreig%mass(js+3) + 0.0d0
137 elseif(ic_type == 761)
then
138 if(j == 1 .or. j == 2 .or. j == 3)
then
139 fstreig%mass(js+1) = fstreig%mass(js+1) + val
140 fstreig%mass(js+2) = fstreig%mass(js+2) + val
141 fstreig%mass(js+3) = fstreig%mass(js+3) + val
142 elseif(j == 4 .or. j == 5 .or. j == 6)
then
143 fstreig%mass(js+1) = fstreig%mass(js+1) + 0.0d0
144 fstreig%mass(js+2) = fstreig%mass(js+2) + 0.0d0
145 fstreig%mass(js+3) = fstreig%mass(js+3) + 0.0d0
148 else if( ic_type == 781 )
then
149 if(j == 1 .or. j == 2 .or. j == 3 .or. j == 4)
then
150 fstreig%mass(js+1) = fstreig%mass(js+1) + val
151 fstreig%mass(js+2) = fstreig%mass(js+2) + val
152 fstreig%mass(js+3) = fstreig%mass(js+3) + val
153 elseif(j == 5 .or. j == 6 .or. j == 7 .or. j == 8)
then
154 fstreig%mass(js+1) = fstreig%mass(js+1) + 0.0d0
155 fstreig%mass(js+2) = fstreig%mass(js+2) + 0.0d0
156 fstreig%mass(js+3) = fstreig%mass(js+3) + 0.0d0
159 elseif(ic_type == 301)
then
160 fstreig%mass(js+1) = fstreig%mass(js+1) + val
161 fstreig%mass(js+2) = fstreig%mass(js+2) + val
162 fstreig%mass(js+3) = fstreig%mass(js+3) + val
166 fstreig%mass(js+k) = fstreig%mass(js+k) + lumped(ndof*(j-1)+k)
173 call hecmw_update_r(hecmesh, fstreig%mass, np, ndof)
178 chkmass = chkmass + fstreig%mass(ii)
180 call hecmw_allreduce_r1(hecmesh, chkmass,
hecmw_sum)
181 fstreig%totalmass = chkmass
184 write(
imsg,
"(a,1pe12.5)")
"** Total mass: ", chkmass
integer(kind=kint), parameter hecmw_sum
integer(kind=4), parameter kreal
This module contains subroutines used in 3d eigen analysis for.
real(kind=kreal) function get_length(ecoord)
subroutine mass_c2(etype, nn, ecoord, gausses, sec_opt, thick, mass, lumped, temperature)
real(kind=kreal) function get_face4(ecoord)
real(kind=kreal) function get_face3(ecoord)
subroutine mass_c3(etype, nn, ecoord, gausses, mass, lumped, temperature)
This modules just summarizes all modules used in eigen analysis.
Set up lumped mass matrix.
subroutine setmass(fstrSOLID, hecMESH, hecMAT, fstrEIG)
This module defines common data and basic structures for analysis.
integer(kind=kint) myrank
PARALLEL EXECUTION.
integer(kind=kint), parameter imsg
This module provides a function to fetch material properties from hecmw.
subroutine mass_shell(etype, nn, elem, rho, thick, gausses, mass, lumped)
This module summarizes all information of material properties.
integer(kind=kint), parameter m_density
integer(kind=kint), parameter m_thick
Package of data used by Lanczos eigenvalue solver.