Loading...
Searching...
No Matches
dc_scaledsec::operator(/) Interface Reference

Public Member Functions

type(dc_scaled_sec) function dcscaledsec_div_si (sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_div_sr (sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_div_sd (sclsec, factor)
type(dc_scaled_sec) function dcscaledsec_div_ss (sclsec, factor)

Detailed Description

Definition at line 151 of file dc_scaledsec.f90.

Member Function/Subroutine Documentation

◆ dcscaledsec_div_sd()

type(dc_scaled_sec) function dc_scaledsec::operator(/)::dcscaledsec_div_sd ( type(dc_scaled_sec), intent(in) sclsec,
real(dp), intent(in) factor )

Definition at line 1549 of file dc_scaledsec.f90.

1550 !
1551 ! DC_SCALED_SEC 型変数の除算.
1552 !
1553 ! Division of a "DC_SCALED_SEC" variable
1554 !
1555 use dc_message, only: messagenotify
1556 implicit none
1557 type(DC_SCALED_SEC), intent(in):: sclsec
1558 real(DP), intent(in):: factor
1559 integer:: i
1560 real(DP):: factor_abs, move_down, sec_ary_mod(imin+imin:imax)
1561 !logical:: flag_approximate
1562 continue
1563 if ( sclsec % flag_negative ) then
1564 result % flag_negative = .not. factor < 0.0_dp
1565 else
1566 result % flag_negative = factor < 0.0_dp
1567 end if
1568 factor_abs = abs(factor) * scale_factor_xx(2)
1569
1570! flag_approximate = .false.
1571 move_down = 0.0_dp
1572 do i = imax, imin + imin, -1
1573 if ( i > imax + imin ) then
1574 sec_ary_mod(i) = sclsec % sec_ary(i)
1575 elseif ( i > imin - 1 ) then
1576 result % sec_ary(i-imin) = int( ( sclsec % sec_ary(i) + move_down ) / factor_abs )
1577 sec_ary_mod(i) = &
1578 & mod( ( sclsec % sec_ary(i) + move_down ), factor_abs )
1579 else
1580 result % sec_ary(i-imin) = int( move_down / factor_abs )
1581 sec_ary_mod(i) = mod( move_down, factor_abs )
1582 end if
1583
1584 if ( sec_ary_mod(i) /= 0.0_dp ) then
1585 !if ( i < imin ) flag_approximate = .true.
1586 move_down = sec_ary_mod(i) * scale_factor
1587 else
1588 move_down = 0.0_dp
1589 end if
1590 end do
1591
1592!!$ if ( flag_approximate ) then
1593!!$ call MessageNotify( 'W', 'dc_scaledsec#operator(/)', &
1594!!$ & 'result may be calculated approximately' )
1595!!$ end if
1596

◆ dcscaledsec_div_si()

type(dc_scaled_sec) function dc_scaledsec::operator(/)::dcscaledsec_div_si ( type(dc_scaled_sec), intent(in) sclsec,
integer, intent(in) factor )

Definition at line 1533 of file dc_scaledsec.f90.

1534 !
1535 ! DC_SCALED_SEC 型変数の除算.
1536 !
1537 ! Division of a "DC_SCALED_SEC" variable
1538 !
1539 use dc_message, only: messagenotify
1540 implicit none
1541 type(DC_SCALED_SEC), intent(in):: sclsec
1542 integer, intent(in):: factor
1543 continue
1544 result = sclsec / real( factor, dp )

◆ dcscaledsec_div_sr()

type(dc_scaled_sec) function dc_scaledsec::operator(/)::dcscaledsec_div_sr ( type(dc_scaled_sec), intent(in) sclsec,
real, intent(in) factor )

Definition at line 1601 of file dc_scaledsec.f90.

1602 !
1603 ! DC_SCALED_SEC 型変数の除算.
1604 !
1605 ! Division of a "DC_SCALED_SEC" variable
1606 !
1607 use dc_message, only: messagenotify
1608 implicit none
1609 type(DC_SCALED_SEC), intent(in):: sclsec
1610 real, intent(in):: factor
1611 continue
1612 result = sclsec / real( factor, dp )

◆ dcscaledsec_div_ss()

type(dc_scaled_sec) function dc_scaledsec::operator(/)::dcscaledsec_div_ss ( type(dc_scaled_sec), intent(in) sclsec,
type(dc_scaled_sec), intent(in) factor )

Definition at line 1504 of file dc_scaledsec.f90.

1505 !
1506 ! DC_SCALED_SEC 型変数の除算.
1507 !
1508 ! Division of a "DC_SCALED_SEC" variable
1509 !
1510 use dc_message, only: messagenotify
1511 implicit none
1512 type(DC_SCALED_SEC), intent(in):: sclsec, factor
1513 real(DP):: factor_abs
1514 continue
1515
1516 ! frt, ifort などでは, 1.0e+23 などの実数とすると,
1517 ! 9.9999e+22 などとなってしまうため,
1518 ! factor として指定するものは 10e+12 までとする. (うーむ, 汚い対応だな....)
1519 ! (morikawa 2008/09/01)
1520 !
1521 if ( .not. all( factor % sec_ary (imax-4:imax) == (/ 0, 0, 0, 0, 0 /) ) ) then
1522 call messagenotify( 'E', 'dc_scaledsec#mod', &
1523 & 'factor must be smaller than 10^12' )
1524 end if
1525
1526 factor_abs = factor
1527 result = sclsec / factor_abs
1528

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