FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
solve_LINEQ_direct_serial_lag.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 !-------------------------------------------------------------------------------
6 
7  use hecmw_util
13 
14 contains
15 
16  subroutine solve_lineq_serial_lag_hecmw_init(hecMAT,hecLagMAT,is_sym)
17  implicit none
18  type (hecmwST_matrix) :: hecMAT
19  type (hecmwST_matrix_lagrange) :: hecLagMAT
20  logical :: is_sym
21 
22  call set_pointersandindices_directsolver(hecmat,heclagmat,is_sym)
23 
25 
26 
27  subroutine solve_lineq_serial_lag_hecmw(hecMESH,hecMAT,hecLagMAT)
28  implicit none
29  type (hecmwST_local_mesh) :: hecMESH
30  type (hecmwST_matrix) :: hecMAT
31  type (hecmwST_matrix_lagrange) :: hecLagMAT
32  integer (kind=4) :: ntdf, ilag_sta
33  integer (kind=4) :: numNon0
34  integer (kind=4) :: ierr, nprocs, myrank
35 
36  real(kind=8), allocatable :: b(:)
37  integer(kind=kint) :: mpc_method
38 
39  mpc_method = hecmw_mat_get_mpc_method(hecmat)
40  if (mpc_method < 1 .or. 3 < mpc_method) then
41  mpc_method = 1
42  call hecmw_mat_set_mpc_method(hecmat,mpc_method)
43  endif
44  if (mpc_method /= 1) then
45  write(*,*) 'ERROR: MPCMETHOD other than penalty is not available for DIRECT solver', &
46  ' in contact analysis without elimination'
47  stop
48  endif
49  call hecmw_mat_ass_equation(hecmesh, hecmat)
50  call hecmw_mat_ass_equation_rhs(hecmesh, hecmat)
51 
52  call hecmw_mat_dump(hecmat, hecmesh)
53 
54  call set_values_directsolver(hecmat,heclagmat)
55 
56  ntdf = hecmat%NP*hecmat%NDOF + heclagmat%num_lagrange
57  ilag_sta = hecmat%NP*hecmat%NDOF + 1
58  numnon0 = hecmat%NPU*hecmat%NDOF**2+hecmat%NP*hecmat%NDOF*(ntdf+1)/2 &
59  + (heclagmat%numU_lagrange)*hecmat%NDOF+heclagmat%num_lagrange
60 
61  allocate(b(size(hecmat%B)))
62  b = hecmat%B
63 
64  call hecmw_solve_direct_serial_lag(ntdf, ilag_sta, numnon0, pointers, indices, values, b)
65 
66  hecmat%X = b
67 
68  deallocate(b)
69 
70  call hecmw_mat_dump_solution(hecmat)
71 
72  end subroutine solve_lineq_serial_lag_hecmw
73 
74 
hecmw_matrix_dump::hecmw_mat_dump_solution
subroutine, public hecmw_mat_dump_solution(hecMAT)
Definition: hecmw_matrix_dump.f90:340
m_set_arrays_directsolver_contact::indices
integer(kind=kint), dimension(:), allocatable indices
ja
Definition: set_arrays_DirectSolver.f90:15
m_set_arrays_directsolver_contact::set_values_directsolver
subroutine set_values_directsolver(hecMAT, hecLagMAT)
This subroutine sets the array for direct sparse solver that contains \the non-zero items(elements)of...
Definition: set_arrays_DirectSolver.f90:122
m_set_arrays_directsolver_contact::pointers
integer(kind=kint), dimension(:), allocatable pointers
ia
Definition: set_arrays_DirectSolver.f90:14
hecmw_matrix_misc::hecmw_mat_set_mpc_method
subroutine, public hecmw_mat_set_mpc_method(hecMAT, mpc_method)
Definition: hecmw_matrix_misc.f90:429
m_solve_lineq_direct_serial_lag
Definition: solve_LINEQ_direct_serial_lag.f90:5
hecmw_util
I/O and Utility.
Definition: hecmw_util_f.F90:7
m_solve_lineq_direct_serial_lag::solve_lineq_serial_lag_hecmw_init
subroutine solve_lineq_serial_lag_hecmw_init(hecMAT, hecLagMAT, is_sym)
Definition: solve_LINEQ_direct_serial_lag.f90:17
m_solve_lineq_direct_serial_lag::solve_lineq_serial_lag_hecmw
subroutine solve_lineq_serial_lag_hecmw(hecMESH, hecMAT, hecLagMAT)
Definition: solve_LINEQ_direct_serial_lag.f90:28
hecmw_solver_direct_serial_lag::hecmw_solve_direct_serial_lag
subroutine, public hecmw_solve_direct_serial_lag(nrows, ilag_sta, nttbr, pointers, indices, values, b)
Definition: hecmw_solver_direct_serial_lag.f90:57
hecmw_matrix_ass
Definition: hecmw_mat_ass.f90:6
hecmw_matrix_misc
Definition: hecmw_matrix_misc.f90:6
m_set_arrays_directsolver_contact::set_pointersandindices_directsolver
subroutine set_pointersandindices_directsolver(hecMAT, hecLagMAT, is_sym)
This subroutine sets index arrays for direct sparse solver from those stored \in the matrix structure...
Definition: set_arrays_DirectSolver.f90:26
hecmw_matrix_dump
Definition: hecmw_matrix_dump.f90:6
hecmw_matrix_misc::hecmw_mat_get_mpc_method
integer(kind=kint) function, public hecmw_mat_get_mpc_method(hecMAT)
Definition: hecmw_matrix_misc.f90:436
hecmw_matrix_dump::hecmw_mat_dump
subroutine, public hecmw_mat_dump(hecMAT, hecMESH)
Definition: hecmw_matrix_dump.f90:32
hecmw_matrix_ass::hecmw_mat_ass_equation
subroutine, public hecmw_mat_ass_equation(hecMESH, hecMAT)
Definition: hecmw_mat_ass.f90:176
m_set_arrays_directsolver_contact
This module provides functions to set arrays for direct sparse solver \in the case of using standard ...
Definition: set_arrays_DirectSolver.f90:8
m_set_arrays_directsolver_contact::values
real(kind=kreal), dimension(:), allocatable values
a
Definition: set_arrays_DirectSolver.f90:16
hecmw_matrix_ass::hecmw_mat_ass_equation_rhs
subroutine, public hecmw_mat_ass_equation_rhs(hecMESH, hecMAT)
Definition: hecmw_mat_ass.f90:234
hecmw_solver_direct_serial_lag
Definition: hecmw_solver_direct_serial_lag.f90:6