Loading...
Searching...
No Matches
dc_scaledsec::mod Interface Reference

Public Member Functions

type(dc_scaled_sec) function dcscaledsec_mod_si (sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_mod_sr (sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_mod_sd (sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_mod_ss (sclsec, factor)

Detailed Description

Definition at line 158 of file dc_scaledsec.f90.

Member Function/Subroutine Documentation

◆ dcscaledsec_mod_sd()

type(dc_scaled_sec) function dc_scaledsec::mod::dcscaledsec_mod_sd ( type(dc_scaled_sec), intent(in) sclsec,
real(dp), intent(in) factor )

Definition at line 1727 of file dc_scaledsec.f90.

1728 !
1729 ! DC_SCALED_SEC 型変数を割った際の余りを計算.
1730 !
1731 ! Calculate of remainder by division of a "DC_SCALED_SEC" variable
1732 !
1733 use dc_message, only: messagenotify
1734 implicit none
1735 type(DC_SCALED_SEC), intent(in):: sclsec
1736 real(DP), intent(in):: factor
1737 type(DC_SCALED_SEC):: factor_scl
1738
1739 continue
1740 factor_scl = factor
1741 result = mod( sclsec, factor_scl )

◆ dcscaledsec_mod_si()

type(dc_scaled_sec) function dc_scaledsec::mod::dcscaledsec_mod_si ( type(dc_scaled_sec), intent(in) sclsec,
integer, intent(in) factor )

Definition at line 1689 of file dc_scaledsec.f90.

1690 !
1691 ! DC_SCALED_SEC 型変数を割った際の余りを計算.
1692 !
1693 ! Calculate of remainder by division of a "DC_SCALED_SEC" variable
1694 !
1695 use dc_message, only: messagenotify
1696 implicit none
1697 type(DC_SCALED_SEC), intent(in):: sclsec
1698 integer, intent(in):: factor
1699 type(DC_SCALED_SEC):: factor_scl
1700
1701 continue
1702 factor_scl = factor
1703 result = mod( sclsec, factor_scl )

◆ dcscaledsec_mod_sr()

type(dc_scaled_sec) function dc_scaledsec::mod::dcscaledsec_mod_sr ( type(dc_scaled_sec), intent(in) sclsec,
real, intent(in) factor )

Definition at line 1708 of file dc_scaledsec.f90.

1709 !
1710 ! DC_SCALED_SEC 型変数を割った際の余りを計算.
1711 !
1712 ! Calculate of remainder by division of a "DC_SCALED_SEC" variable
1713 !
1714 use dc_message, only: messagenotify
1715 implicit none
1716 type(DC_SCALED_SEC), intent(in):: sclsec
1717 real, intent(in):: factor
1718 type(DC_SCALED_SEC):: factor_scl
1719
1720 continue
1721 factor_scl = factor
1722 result = mod( sclsec, factor_scl )

◆ dcscaledsec_mod_ss()

type(dc_scaled_sec) function dc_scaledsec::mod::dcscaledsec_mod_ss ( type(dc_scaled_sec), intent(in) sclsec,
type(dc_scaled_sec), intent(in) factor )

Definition at line 1617 of file dc_scaledsec.f90.

1618 !
1619 ! DC_SCALED_SEC 型変数を割った際の余りを計算.
1620 !
1621 ! Calculate of remainder by division of a "DC_SCALED_SEC" variable
1622 !
1623 use dc_message, only: messagenotify
1624 implicit none
1625 type(DC_SCALED_SEC), intent(in):: sclsec, factor
1626
1627 type(DC_SCALED_SEC):: factor_scl
1628 real(DP):: sec_ary_mod(imin+imin:imax)
1629 integer:: i, move_down_index
1630 real(DP):: move_down
1631 real(DP):: factor_dp
1632 type(DC_SCALED_SEC):: zero_sec
1633 continue
1634
1635 ! frt, ifort などでは, 1.0e+23 などの実数とすると,
1636 ! 9.9999e+22 などとなってしまうため,
1637 ! factor として指定するものは 10e+12 までとする. (うーむ, 汚い対応だな....)
1638 ! (morikawa 2008/09/01)
1639 !
1640 if ( .not. all( factor % sec_ary (imax-4:imax) == (/ 0, 0, 0, 0, 0 /) ) ) then
1641 call messagenotify( 'E', 'dc_scaledsec#mod', &
1642 & 'factor must be smaller than 10^12' )
1643 end if
1644
1645 if ( sclsec == factor ) then
1646 result = zero_sec
1647 return
1648 end if
1649
1650 factor_scl % sec_ary(imin:-1) = 0
1651 factor_scl % sec_ary(imin-imin:imax) = factor % sec_ary(imin:imax+imin)
1652 factor_scl % flag_negative = factor % flag_negative
1653
1654 factor_dp = factor_scl
1655
1656 move_down = 0.0_dp
1657 do i = imax, imin + imin, -1
1658 move_down_index = i
1659 if ( move_down /= 0.0_dp ) then
1660 if ( abs(factor_dp) > ( move_down + scale_factor ) * scale_factor_xx( i - imin ) ) exit
1661 end if
1662
1663 if ( i > imin - 1 ) then
1664 sec_ary_mod(i) = &
1665 & mod( ( sclsec % sec_ary(i) + move_down ), factor_dp )
1666 else
1667 sec_ary_mod(i) = mod( move_down, factor_dp )
1668 end if
1669
1670 if ( sec_ary_mod(i) /= 0.0_dp ) then
1671 move_down = sec_ary_mod(i) * scale_factor
1672 else
1673 move_down = 0.0_dp
1674 end if
1675
1676 end do
1677
1678 result = move_down * scale_factor_xx(move_down_index)
1679 if ( move_down_index > imin - 1 ) then
1680 result % sec_ary(imin:move_down_index) = sclsec % sec_ary(imin:move_down_index)
1681 end if
1682
1683 result % flag_negative = sclsec % flag_negative
1684

The documentation for this interface was generated from the following file: