Loading...
Searching...
No Matches
Public Member Functions | List of all members
dc_scaledsec::operator(+) Interface Reference

Public Member Functions

type(dc_scaled_sec) function dcscaledsec_add_ss (sclsec1, sclsec2)
 
type(dc_scaled_sec) function dcscaledsec_add_si (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_add_is (factor, sclsec)
 
type(dc_scaled_sec) function dcscaledsec_add_sr (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_add_rs (factor, sclsec)
 
type(dc_scaled_sec) function dcscaledsec_add_sd (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_add_ds (factor, sclsec)
 

Detailed Description

Definition at line 120 of file dc_scaledsec.f90.

Member Function/Subroutine Documentation

◆ dcscaledsec_add_ds()

type(dc_scaled_sec) function dc_scaledsec::operator(+)::dcscaledsec_add_ds ( real(dp), intent(in)  factor,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 1083 of file dc_scaledsec.f90.

1084 !
1085 ! 2 つの DC_SCALED_SEC 型変数の加算.
1086 !
1087 ! Addition of two "DC_SCALED_SEC" variables
1088 !
1089 implicit none
1090 real(DP), intent(in):: factor
1091 type(DC_SCALED_SEC), intent(in):: sclsec
1092 type(DC_SCALED_SEC):: factor_scl
1093 continue
1094 factor_scl = factor
1095 result = sclsec + factor_scl

◆ dcscaledsec_add_is()

type(dc_scaled_sec) function dc_scaledsec::operator(+)::dcscaledsec_add_is ( integer, intent(in)  factor,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 1015 of file dc_scaledsec.f90.

1016 !
1017 ! 2 つの DC_SCALED_SEC 型変数の加算.
1018 !
1019 ! Addition of two "DC_SCALED_SEC" variables
1020 !
1021 implicit none
1022 integer, intent(in):: factor
1023 type(DC_SCALED_SEC), intent(in):: sclsec
1024 type(DC_SCALED_SEC):: factor_scl
1025 continue
1026 factor_scl = factor
1027 result = factor_scl + sclsec

◆ dcscaledsec_add_rs()

type(dc_scaled_sec) function dc_scaledsec::operator(+)::dcscaledsec_add_rs ( real, intent(in)  factor,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 1049 of file dc_scaledsec.f90.

1050 !
1051 ! 2 つの DC_SCALED_SEC 型変数の加算.
1052 !
1053 ! Addition of two "DC_SCALED_SEC" variables
1054 !
1055 implicit none
1056 real, intent(in):: factor
1057 type(DC_SCALED_SEC), intent(in):: sclsec
1058 type(DC_SCALED_SEC):: factor_scl
1059 continue
1060 factor_scl = factor
1061 result = sclsec + factor_scl

◆ dcscaledsec_add_sd()

type(dc_scaled_sec) function dc_scaledsec::operator(+)::dcscaledsec_add_sd ( type(dc_scaled_sec), intent(in)  sclsec,
real(dp), intent(in)  factor 
)

Definition at line 1066 of file dc_scaledsec.f90.

1067 !
1068 ! 2 つの DC_SCALED_SEC 型変数の加算.
1069 !
1070 ! Addition of two "DC_SCALED_SEC" variables
1071 !
1072 implicit none
1073 type(DC_SCALED_SEC), intent(in):: sclsec
1074 real(DP), intent(in):: factor
1075 type(DC_SCALED_SEC):: factor_scl
1076 continue
1077 factor_scl = factor
1078 result = sclsec + factor_scl

◆ dcscaledsec_add_si()

type(dc_scaled_sec) function dc_scaledsec::operator(+)::dcscaledsec_add_si ( type(dc_scaled_sec), intent(in)  sclsec,
integer, intent(in)  factor 
)

Definition at line 998 of file dc_scaledsec.f90.

999 !
1000 ! 2 つの DC_SCALED_SEC 型変数の加算.
1001 !
1002 ! Addition of two "DC_SCALED_SEC" variables
1003 !
1004 implicit none
1005 type(DC_SCALED_SEC), intent(in):: sclsec
1006 integer, intent(in):: factor
1007 type(DC_SCALED_SEC):: factor_scl
1008 continue
1009 factor_scl = factor
1010 result = sclsec + factor_scl

◆ dcscaledsec_add_sr()

type(dc_scaled_sec) function dc_scaledsec::operator(+)::dcscaledsec_add_sr ( type(dc_scaled_sec), intent(in)  sclsec,
real, intent(in)  factor 
)

Definition at line 1032 of file dc_scaledsec.f90.

1033 !
1034 ! 2 つの DC_SCALED_SEC 型変数の加算.
1035 !
1036 ! Addition of two "DC_SCALED_SEC" variables
1037 !
1038 implicit none
1039 type(DC_SCALED_SEC), intent(in):: sclsec
1040 real, intent(in):: factor
1041 type(DC_SCALED_SEC):: factor_scl
1042 continue
1043 factor_scl = factor
1044 result = sclsec + factor_scl

◆ dcscaledsec_add_ss()

type(dc_scaled_sec) function dc_scaledsec::operator(+)::dcscaledsec_add_ss ( type(dc_scaled_sec), intent(in)  sclsec1,
type(dc_scaled_sec), intent(in)  sclsec2 
)

Definition at line 934 of file dc_scaledsec.f90.

935 !
936 ! 2 つの DC_SCALED_SEC 型変数の加算.
937 !
938 ! Addition of two "DC_SCALED_SEC" variables
939 !
940 use dc_message, only: messagenotify
941 implicit none
942 type(DC_SCALED_SEC), intent(in):: sclsec1, sclsec2
943
944 integer:: i, move_up
945 logical:: both_negative, sclsec2_flag_negative
946 type(DC_SCALED_SEC):: sclsec1_opsign, sclsec2_opsign
947 continue
948 move_up = 0
949 both_negative = .false.
950
951 ! 負の値の処理
952 ! Handle negative value
953 !
954 sclsec2_flag_negative = sclsec2 % flag_negative
955 if ( sclsec1 % flag_negative ) then
956 both_negative = .true.
957 sclsec2_flag_negative = .not. sclsec2_flag_negative
958 end if
959 if ( sclsec2_flag_negative ) then
960 sclsec1_opsign = sclsec1
961 sclsec1_opsign % flag_negative = .false.
962 sclsec2_opsign = sclsec2
963 sclsec2_opsign % flag_negative = .false.
964 result = sclsec1_opsign - sclsec2_opsign
965 if ( both_negative ) then
966 result % flag_negative = .not. result % flag_negative
967 end if
968 return
969 end if
970
971 ! 加算
972 ! Addition
973 !
974 do i = imin, imax
975 result % sec_ary(i) = sclsec1 % sec_ary(i) + sclsec2 % sec_ary(i) + move_up
976 if ( .not. result % sec_ary(i) < scale_factor_int ) then
977 if ( i == imax ) then
978 call messagenotify( 'E', 'dc_scaledsec#operator(*)', &
979 & 'DC_SCALED_SEC must be smaller than 10^24' )
980 end if
981 move_up = result % sec_ary(i) / scale_factor_int
982 result % sec_ary(i) = mod( result % sec_ary(i), scale_factor_int )
983 else
984 move_up = 0
985 end if
986 end do
987
988 if ( both_negative ) then
989 result % flag_negative = .true.
990 else
991 result % flag_negative = .false.
992 end if
993

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