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_sub_s (sclsec)
 
type(dc_scaled_sec) function dcscaledsec_sub_ss (sclsec1, sclsec2)
 
type(dc_scaled_sec) function dcscaledsec_sub_si (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_sub_is (factor, sclsec)
 
type(dc_scaled_sec) function dcscaledsec_sub_sr (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_sub_rs (factor, sclsec)
 
type(dc_scaled_sec) function dcscaledsec_sub_sd (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_sub_ds (factor, sclsec)
 

Detailed Description

Definition at line 130 of file dc_scaledsec.f90.

Member Function/Subroutine Documentation

◆ dcscaledsec_sub_ds()

type(dc_scaled_sec) function dc_scaledsec::operator(-)::dcscaledsec_sub_ds ( real(dp), intent(in)  factor,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 1279 of file dc_scaledsec.f90.

1280 !
1281 ! 2 つの DC_SCALED_SEC 型変数の減算.
1282 !
1283 ! Subtraction of two "DC_SCALED_SEC" variables
1284 !
1285 implicit none
1286 real(DP), intent(in):: factor
1287 type(DC_SCALED_SEC), intent(in):: sclsec
1288 type(DC_SCALED_SEC):: factor_scl
1289 continue
1290 factor_scl = factor
1291 result = factor_scl - sclsec

◆ dcscaledsec_sub_is()

type(dc_scaled_sec) function dc_scaledsec::operator(-)::dcscaledsec_sub_is ( integer, intent(in)  factor,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 1211 of file dc_scaledsec.f90.

1212 !
1213 ! 2 つの DC_SCALED_SEC 型変数の減算.
1214 !
1215 ! Subtraction of two "DC_SCALED_SEC" variables
1216 !
1217 implicit none
1218 integer, intent(in):: factor
1219 type(DC_SCALED_SEC), intent(in):: sclsec
1220 type(DC_SCALED_SEC):: factor_scl
1221 continue
1222 factor_scl = factor
1223 result = factor_scl - sclsec

◆ dcscaledsec_sub_rs()

type(dc_scaled_sec) function dc_scaledsec::operator(-)::dcscaledsec_sub_rs ( real, intent(in)  factor,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 1245 of file dc_scaledsec.f90.

1246 !
1247 ! 2 つの DC_SCALED_SEC 型変数の減算.
1248 !
1249 ! Subtraction of two "DC_SCALED_SEC" variables
1250 !
1251 implicit none
1252 real, intent(in):: factor
1253 type(DC_SCALED_SEC), intent(in):: sclsec
1254 type(DC_SCALED_SEC):: factor_scl
1255 continue
1256 factor_scl = factor
1257 result = factor_scl - sclsec

◆ dcscaledsec_sub_s()

type(dc_scaled_sec) function dc_scaledsec::operator(-)::dcscaledsec_sub_s ( type(dc_scaled_sec), intent(in)  sclsec)

Definition at line 1100 of file dc_scaledsec.f90.

1101 !
1102 ! DC_SCALED_SEC 型変数の符号を逆にする.
1103 !
1104 ! Inverse sign of a "DC_SCALED_SEC" variable
1105 !
1106 implicit none
1107 type(DC_SCALED_SEC), intent(in):: sclsec
1108 continue
1109 result % flag_negative = .not. sclsec % flag_negative
1110 result % sec_ary = sclsec % sec_ary

◆ dcscaledsec_sub_sd()

type(dc_scaled_sec) function dc_scaledsec::operator(-)::dcscaledsec_sub_sd ( type(dc_scaled_sec), intent(in)  sclsec,
real(dp), intent(in)  factor 
)

Definition at line 1262 of file dc_scaledsec.f90.

1263 !
1264 ! 2 つの DC_SCALED_SEC 型変数の減算.
1265 !
1266 ! Subtraction of two "DC_SCALED_SEC" variables
1267 !
1268 implicit none
1269 type(DC_SCALED_SEC), intent(in):: sclsec
1270 real(DP), intent(in):: factor
1271 type(DC_SCALED_SEC):: factor_scl
1272 continue
1273 factor_scl = factor
1274 result = sclsec - factor_scl

◆ dcscaledsec_sub_si()

type(dc_scaled_sec) function dc_scaledsec::operator(-)::dcscaledsec_sub_si ( type(dc_scaled_sec), intent(in)  sclsec,
integer, intent(in)  factor 
)

Definition at line 1194 of file dc_scaledsec.f90.

1195 !
1196 ! 2 つの DC_SCALED_SEC 型変数の減算.
1197 !
1198 ! Subtraction of two "DC_SCALED_SEC" variables
1199 !
1200 implicit none
1201 type(DC_SCALED_SEC), intent(in):: sclsec
1202 integer, intent(in):: factor
1203 type(DC_SCALED_SEC):: factor_scl
1204 continue
1205 factor_scl = factor
1206 result = sclsec - factor_scl

◆ dcscaledsec_sub_sr()

type(dc_scaled_sec) function dc_scaledsec::operator(-)::dcscaledsec_sub_sr ( type(dc_scaled_sec), intent(in)  sclsec,
real, intent(in)  factor 
)

Definition at line 1228 of file dc_scaledsec.f90.

1229 !
1230 ! 2 つの DC_SCALED_SEC 型変数の減算.
1231 !
1232 ! Subtraction of two "DC_SCALED_SEC" variables
1233 !
1234 implicit none
1235 type(DC_SCALED_SEC), intent(in):: sclsec
1236 real, intent(in):: factor
1237 type(DC_SCALED_SEC):: factor_scl
1238 continue
1239 factor_scl = factor
1240 result = sclsec - factor_scl

◆ dcscaledsec_sub_ss()

type(dc_scaled_sec) function dc_scaledsec::operator(-)::dcscaledsec_sub_ss ( type(dc_scaled_sec), intent(in)  sclsec1,
type(dc_scaled_sec), intent(in)  sclsec2 
)

Definition at line 1115 of file dc_scaledsec.f90.

1116 !
1117 ! 2 つの DC_SCALED_SEC 型変数の減算.
1118 !
1119 ! Subtraction of two "DC_SCALED_SEC" variables
1120 !
1121 implicit none
1122 type(DC_SCALED_SEC), intent(in):: sclsec1, sclsec2
1123
1124 integer:: i, move_down
1125 logical:: both_negative, sclsec2_flag_negative
1126 type(DC_SCALED_SEC):: sclsec1_opsign, sclsec2_opsign
1127 type(DC_SCALED_SEC):: sclsec1_nosign, sclsec2_nosign
1128 type(DC_SCALED_SEC):: large, small
1129 continue
1130 both_negative = .false.
1131
1132 ! 負の値の処理
1133 ! Handle negative value
1134 !
1135 sclsec2_flag_negative = sclsec2 % flag_negative
1136 if ( sclsec1 % flag_negative ) then
1137 both_negative = .true.
1138 sclsec2_flag_negative = .not. sclsec2_flag_negative
1139 end if
1140 if ( sclsec2_flag_negative ) then
1141 sclsec1_opsign = sclsec1
1142 sclsec1_opsign % flag_negative = .false.
1143 sclsec2_opsign = sclsec2
1144 sclsec2_opsign % flag_negative = .false.
1145
1146 result = sclsec1_opsign + sclsec2_opsign
1147 if ( both_negative ) then
1148 result % flag_negative = .not. result % flag_negative
1149 end if
1150 return
1151 end if
1152
1153 ! 絶対値の比較
1154 ! Compare absolute values
1155 !
1156 sclsec1_nosign = sclsec1
1157 sclsec1_nosign % flag_negative = .false.
1158 sclsec2_nosign = sclsec2
1159 sclsec2_nosign % flag_negative = .false.
1160
1161 if ( sclsec1_nosign > sclsec2_nosign ) then
1162 result % flag_negative = .false.
1163 large = sclsec1_nosign
1164 small = sclsec2_nosign
1165 elseif ( sclsec1_nosign < sclsec2_nosign ) then
1166 result % flag_negative = .true.
1167 large = sclsec2_nosign
1168 small = sclsec1_nosign
1169 else
1170 result = 0
1171 return
1172 end if
1173
1174 move_down = 0
1175 do i = imin, imax
1176 result % sec_ary(i) = large % sec_ary(i) - small % sec_ary(i) + move_down
1177 if ( result % sec_ary(i) < 0 ) then
1178 move_down = ( result % sec_ary(i) / scale_factor_int ) - 1
1179 result % sec_ary(i) = &
1180 & mod( result % sec_ary(i), scale_factor_int ) + scale_factor_int
1181 else
1182 move_down = 0
1183 end if
1184 end do
1185
1186 if ( both_negative ) then
1187 result % flag_negative = .not. result % flag_negative
1188 end if
1189

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