common variable names

This commit is contained in:
Martin Diehl 2021-07-16 10:31:40 +02:00
parent 2f1fa8292b
commit 013c4c0a92
1 changed files with 13 additions and 14 deletions

View File

@ -646,9 +646,8 @@ pure function math_33to9(m33)
integer :: i integer :: i
do i = 1, 9
math_33to9(i) = m33(MAPPLAIN(1,i),MAPPLAIN(2,i)) math_33to9 = [(m33(MAPPLAIN(1,i),MAPPLAIN(2,i)),i=1,9)]
enddo
end function math_33to9 end function math_33to9
@ -663,6 +662,7 @@ pure function math_9to33(v9)
integer :: i integer :: i
do i = 1, 9 do i = 1, 9
math_9to33(MAPPLAIN(1,i),MAPPLAIN(2,i)) = v9(i) math_9to33(MAPPLAIN(1,i),MAPPLAIN(2,i)) = v9(i)
enddo enddo
@ -685,15 +685,14 @@ pure function math_sym33to6(m33,weighted)
real(pReal), dimension(6) :: w real(pReal), dimension(6) :: w
integer :: i integer :: i
if(present(weighted)) then if(present(weighted)) then
w = merge(NRMMANDEL,1.0_pReal,weighted) w = merge(NRMMANDEL,1.0_pReal,weighted)
else else
w = NRMMANDEL w = NRMMANDEL
endif endif
do i = 1, 6 math_sym33to6 = [(w(i)*m33(MAPNYE(1,i),MAPNYE(2,i)),i=1,6)]
math_sym33to6(i) = w(i)*m33(MAPNYE(1,i),MAPNYE(2,i))
enddo
end function math_sym33to6 end function math_sym33to6
@ -842,18 +841,18 @@ end function math_Voigt66to3333
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief draw a random sample from Gauss variable !> @brief draw a random sample from Gauss variable
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
real(pReal) function math_sampleGaussVar(meanvalue, stddev, width) real(pReal) function math_sampleGaussVar(mu, sigma, width)
real(pReal), intent(in) :: meanvalue, & !< meanvalue of gauss distribution real(pReal), intent(in) :: mu, & !< mean
stddev !< standard deviation of gauss distribution sigma !< standard deviation
real(pReal), intent(in), optional :: width !< width of considered values as multiples of standard deviation real(pReal), intent(in), optional :: width !< cut off as multiples of standard deviation
real(pReal), dimension(2) :: rnd ! random numbers real(pReal), dimension(2) :: rnd ! random numbers
real(pReal) :: scatter, & ! normalized scatter around meanvalue real(pReal) :: scatter, & ! normalized scatter around mean
width_ width_
if (abs(stddev) < tol_math_check) then if (abs(sigma) < tol_math_check) then
math_sampleGaussVar = meanvalue math_sampleGaussVar = mu
else else
if (present(width)) then if (present(width)) then
width_ = width width_ = width
@ -867,7 +866,7 @@ real(pReal) function math_sampleGaussVar(meanvalue, stddev, width)
if (rnd(2) <= exp(-0.5_pReal * scatter ** 2.0_pReal)) exit ! test if scattered value is drawn if (rnd(2) <= exp(-0.5_pReal * scatter ** 2.0_pReal)) exit ! test if scattered value is drawn
enddo enddo
math_sampleGaussVar = scatter * stddev math_sampleGaussVar = scatter * sigma
endif endif
end function math_sampleGaussVar end function math_sampleGaussVar