1!-------------------------------------------------------------------------------
2! Copyright (c) 2019 FrontISTR Commons
3! This software is released under the MIT License, see LICENSE.txt
4!-------------------------------------------------------------------------------
5!>  \brief   This subroutine read in used-defined loading
6!>  tangent
7module mULoad
8  use hecmw
9  implicit none
10
11  !> Structure for user defines load. User may need to fill in it
12  !> according to specified loads
13  type tULoad
14    integer, pointer :: nodeID(:)=>null()    !< nodes' ID
15    integer, pointer :: dof(:)=>null()       !< dof to be loaded
16    ! == add futher defintiions here ==
17  end type
18
19  type(tULoad), pointer, save :: uloads(:)=>null()
20
21contains
22
23  !> This suborutine read in variables needs to define user-defined external loads
24  integer function ureadload( fname )
25    character(len=*), intent(in)    :: fname   !< input file name
26    ureadload = 0
27  end function
28
29  !> This subroutine take consider of user-defined external loading
30  subroutine uloading( cstep, factor, exForce )
31    integer, intent(in)             :: cstep      !< current step number
32    real(kind=kreal), intent(in)    :: factor     !< loading factor of current step
33    real(kind=kreal), intent(inout) :: exForce(:) !< external force
34
35  end subroutine
36
37  !> This subroutine take consider of user-defined external loading
38  subroutine uResidual( cstep, factor, residual )
39    integer, intent(in)             :: cstep        !< current step number
40    real(kind=kreal), intent(in)    :: factor       !< loading factor of current step
41    real(kind=kreal), intent(inout) :: residual(:)  !< residual
42
43  end subroutine
44
45end module
46
47