FrontISTR  5.9.0
Large-scale structural analysis program with finit element method
fstr_solve_eigen.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
2 ! Copyright (c) 2019 FrontISTR Commons
3 ! This software is released under the MIT License, see LICENSE.txt
4 !-------------------------------------------------------------------------------
7 contains
8 
10  subroutine fstr_solve_eigen( hecMESH, hecMAT, fstrEIG, fstrSOLID, &
11  & fstrRESULT, fstrPARAM, hecLagMAT)
12  use hecmw_util
13  use m_fstr
15  use m_fstr_addbc
19  use m_static_lib
21  use m_fstr_spring
22  use hecmw_ebc_defer
23 
24  implicit none
25 
26  type(hecmwst_local_mesh) :: hecMESH
27  type(hecmwst_matrix) :: hecMAT
28  type(fstr_solid) :: fstrSOLID
29  type(hecmwst_result_data) :: fstrRESULT
30  type(fstr_param) :: fstrPARAM
31  type(fstr_eigen) :: fstrEIG
32  type(hecmwst_matrix_lagrange) :: hecLagMAT
33 
34  type(hecmwst_local_mesh), pointer :: hecMESHmpc
35  type(hecmwst_matrix), pointer :: hecMATmpc
36  type(hecmwst_ebc) :: hecEBC
37  real(kind=kreal), pointer :: mass_orig(:)
38  real(kind=kreal) :: t1, t2
39 
40  t1 = hecmw_wtime()
41 
42  call hecmw_mpc_mat_init(hecmesh, hecmat, hecmeshmpc, hecmatmpc)
43 
44  fstrsolid%dunode = 0.0d0
45  call fstr_creatematrix_and_dampingforce(hecmesh, hecmat, fstrsolid, 0.0d0, 0.0d0)
46  call fstr_addspring(1, hecmesh, hecmat, fstrsolid, fstrparam)
47 
48  call hecmw_ebc_init(hecmat, hecebc)
49  call fstr_addbc(1, hecmesh, hecmat, fstrsolid, fstrparam, heclagmat, 2, hecebc)
50  call hecmw_mpc_mat_ass(hecmesh, hecmat, hecmeshmpc, hecmatmpc)
51  call hecmw_mpc_trans_rhs(hecmesh, hecmat, hecmatmpc)
52  call hecmw_ebc_apply(hecmeshmpc, hecmatmpc, hecebc)
53 
54  call setmass(fstrsolid, hecmesh, hecmat, fstreig)
55  mass_orig => fstreig%mass
56  allocate(fstreig%mass(size(mass_orig)))
57  fstreig%mass(:) = mass_orig(:)
58  call hecmw_mpc_trans_mass(hecmesh, hecmat, hecmatmpc, fstreig%mass)
59 
60  call fstr_solve_lanczos(hecmeshmpc, hecmatmpc, fstrsolid, fstreig, hecebc)
61  call hecmw_ebc_finalize(hecebc)
62  call fstr_eigen_residual(hecmeshmpc, hecmatmpc, fstreig)
63 
64  call hecmw_mpc_tback_eigvec(hecmesh, hecmat, fstreig%iter, fstreig%eigvec)
65  ! the eigenvectors are back in the original space, so is the mass used by the postprocessing
66  deallocate(fstreig%mass)
67  fstreig%mass => mass_orig
68 
69  call fstr_eigen_output(hecmesh, hecmat, fstreig)
70 
71  if( iresult.eq.1 ) then
72  call fstr_eigen_output_result(hecmesh, fstreig)
73  end if
74  if( ivisual.eq.1 ) then
75  call fstr_eigen_output_visual(hecmesh, fstreig, fstrresult)
76  end if
77 
78  call hecmw_mpc_mat_finalize(hecmesh, hecmat, hecmeshmpc, hecmatmpc)
79 
80  t2 = hecmw_wtime()
81 
82  if(myrank == 0)then
83  write(imsg,'("### FSTR_SOLVE_EIGEN FINISHED!")')
84  write(*,'("### FSTR_SOLVE_EIGEN FINISHED!")')
85  endif
86 
87  end subroutine fstr_solve_eigen
88 end module m_fstr_solve_eigen
Essential boundary conditions kept as per-DOF marks and values so that they can be imposed on the mat...
subroutine, public hecmw_ebc_init(hecMAT, hecEBC)
subroutine, public hecmw_ebc_apply(hecMESH, hecMAT, hecEBC, conMAT)
subroutine, public hecmw_ebc_finalize(hecEBC)
I/O and Utility.
Definition: hecmw_util_f.F90:7
integer(kind=4), parameter kreal
real(kind=kreal) function hecmw_wtime()
This module provides a function to deal with prescribed displacement.
Definition: fstr_AddBC.f90:7
subroutine fstr_addbc(cstep, hecMESH, hecMAT, fstrSOLID, fstrPARAM, hecLagMAT, iter, hecEBC, conMAT, RHSvector)
Add Essential Boundary Conditions.
Definition: fstr_AddBC.f90:14
This module assembles the tangent stiffness matrix and, in the implicit dynamic case,...
subroutine, public fstr_creatematrix_and_dampingforce(hecMESH, hecMAT, fstrSOLID, time, tincr, fstrDYNAMIC, coef)
Assemble the system matrix and, optionally, the dynamic damping force.
Lanczos iteration calculation.
subroutine fstr_solve_lanczos(hecMESH, hecMAT, fstrSOLID, fstrEIG, hecEBC)
SOLVE EIGENVALUE PROBLEM.
subroutine fstr_eigen_output(hecMESH, hecMAT, fstrEIG)
subroutine fstr_eigen_residual(hecMESH, hecMAT, fstrEIG)
residual of the eigenproblem as solved, i.e. in the reduced space of the MPC elimination
subroutine fstr_eigen_output_result(hecMESH, fstrEIG)
subroutine fstr_eigen_output_visual(hecMESH, fstrEIG, fstrRESULT)
Set up lumped mass matrix.
subroutine setmass(fstrSOLID, hecMESH, hecMAT, fstrEIG)
This module provides a function to control eigen analysis.
subroutine fstr_solve_eigen(hecMESH, hecMAT, fstrEIG, fstrSOLID, fstrRESULT, fstrPARAM, hecLagMAT)
solve eigenvalue probrem
This module provides functions to deal with spring force.
Definition: fstr_Spring.f90:7
subroutine fstr_addspring(cstep, hecMESH, hecMAT, fstrSOLID, fstrPARAM)
Definition: fstr_Spring.f90:13
This module defines common data and basic structures for analysis.
Definition: m_fstr.F90:15
integer(kind=kint), pointer iresult
Definition: m_fstr.F90:129
integer(kind=kint) myrank
PARALLEL EXECUTION.
Definition: m_fstr.F90:103
integer(kind=kint), parameter imsg
Definition: m_fstr.F90:117
integer(kind=kint), pointer ivisual
Definition: m_fstr.F90:130
HECMW to FSTR Mesh Data Converter. Converting Connectivity of Element Type 232, 342 and 352.
This modules just summarizes all modules used in static analysis.
Definition: static_LIB.f90:6
Structure for Lagrange multiplier-related part of stiffness matrix (Lagrange multiplier-related matri...
Package of data used by Lanczos eigenvalue solver.
Definition: m_fstr.F90:632
FSTR INNER CONTROL PARAMETERS (fstrPARAM)
Definition: m_fstr.F90:161