functions without side-effects are 'pure'
basically all 'getter' functions should be pure
This commit is contained in:
parent
2f74e0d070
commit
b34655b7fc
|
@ -168,17 +168,17 @@ submodule(phase) mechanical
|
|||
integer, intent(in) :: ph,en
|
||||
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
|
||||
integer, intent(in) :: ph, en
|
||||
end function elastic_C66
|
||||
|
||||
module function elastic_mu(ph,en) result(mu)
|
||||
pure module function elastic_mu(ph,en) result(mu)
|
||||
real(pReal) :: mu
|
||||
integer, intent(in) :: ph, en
|
||||
end function elastic_mu
|
||||
|
||||
module function elastic_nu(ph,en) result(nu)
|
||||
pure module function elastic_nu(ph,en) result(nu)
|
||||
real(pReal) :: nu
|
||||
integer, intent(in) :: ph, en
|
||||
end function elastic_nu
|
||||
|
|
|
@ -86,7 +86,7 @@ end subroutine elastic_init
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @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) :: &
|
||||
ph, &
|
||||
|
@ -140,7 +140,7 @@ end function elastic_C66
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief return shear modulus
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
module function elastic_mu(ph,en) result(mu)
|
||||
pure module function elastic_mu(ph,en) result(mu)
|
||||
|
||||
integer, intent(in) :: &
|
||||
ph, &
|
||||
|
@ -157,7 +157,7 @@ end function elastic_mu
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief return Poisson ratio
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
module function elastic_nu(ph,en) result(nu)
|
||||
pure module function elastic_nu(ph,en) result(nu)
|
||||
|
||||
integer, intent(in) :: &
|
||||
ph, &
|
||||
|
|
Loading…
Reference in New Issue