functions without side-effects are 'pure'
basically all 'getter' functions should be pure
This commit is contained in:
parent
95c64f7a0a
commit
de9183af4e
|
@ -168,17 +168,17 @@ submodule(phase) mechanical
|
||||||
integer, intent(in) :: ph,en
|
integer, intent(in) :: ph,en
|
||||||
end function plastic_dislotwin_homogenizedC
|
end function plastic_dislotwin_homogenizedC
|
||||||
|
|
||||||
module function elastic_C66(ph,en) result(C66)
|
pure module function elastic_C66(ph,en) result(C66)
|
||||||
real(pReal), dimension(6,6) :: C66
|
real(pReal), dimension(6,6) :: C66
|
||||||
integer, intent(in) :: ph, en
|
integer, intent(in) :: ph, en
|
||||||
end function elastic_C66
|
end function elastic_C66
|
||||||
|
|
||||||
module function elastic_mu(ph,en) result(mu)
|
pure module function elastic_mu(ph,en) result(mu)
|
||||||
real(pReal) :: mu
|
real(pReal) :: mu
|
||||||
integer, intent(in) :: ph, en
|
integer, intent(in) :: ph, en
|
||||||
end function elastic_mu
|
end function elastic_mu
|
||||||
|
|
||||||
module function elastic_nu(ph,en) result(nu)
|
pure module function elastic_nu(ph,en) result(nu)
|
||||||
real(pReal) :: nu
|
real(pReal) :: nu
|
||||||
integer, intent(in) :: ph, en
|
integer, intent(in) :: ph, en
|
||||||
end function elastic_nu
|
end function elastic_nu
|
||||||
|
|
|
@ -86,7 +86,7 @@ end subroutine elastic_init
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief return 6x6 elasticity tensor
|
!> @brief return 6x6 elasticity tensor
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module function elastic_C66(ph,en) result(C66)
|
pure module function elastic_C66(ph,en) result(C66)
|
||||||
|
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
ph, &
|
ph, &
|
||||||
|
@ -140,7 +140,7 @@ end function elastic_C66
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief return shear modulus
|
!> @brief return shear modulus
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module function elastic_mu(ph,en) result(mu)
|
pure module function elastic_mu(ph,en) result(mu)
|
||||||
|
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
ph, &
|
ph, &
|
||||||
|
@ -157,7 +157,7 @@ end function elastic_mu
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief return Poisson ratio
|
!> @brief return Poisson ratio
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module function elastic_nu(ph,en) result(nu)
|
pure module function elastic_nu(ph,en) result(nu)
|
||||||
|
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
ph, &
|
ph, &
|
||||||
|
|
Loading…
Reference in New Issue