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_mul_ss (sclsec1, sclsec2)
 
type(dc_scaled_sec) function dcscaledsec_mul_si (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_mul_is (factor, sclsec)
 
type(dc_scaled_sec) function dcscaledsec_mul_sd (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_mul_ds (factor, sclsec)
 
type(dc_scaled_sec) function dcscaledsec_mul_sr (sclsec, factor)
 
type(dc_scaled_sec) function dcscaledsec_mul_rs (factor, sclsec)
 

Detailed Description

Definition at line 141 of file dc_scaledsec.f90.

Member Function/Subroutine Documentation

◆ dcscaledsec_mul_ds()

type(dc_scaled_sec) function dc_scaledsec::operator(*)::dcscaledsec_mul_ds ( real(dp), intent(in)  factor,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 1454 of file dc_scaledsec.f90.

1455 !
1456 ! DC_SCALED_SEC 型変数の乗算.
1457 !
1458 ! Multiplication of a "DC_SCALED_SEC" variable
1459 !
1460 use dc_message, only: messagenotify
1461 implicit none
1462 real(DP), intent(in):: factor
1463 type(DC_SCALED_SEC), intent(in):: sclsec
1464 continue
1465 result = sclsec * factor

◆ dcscaledsec_mul_is()

type(dc_scaled_sec) function dc_scaledsec::operator(*)::dcscaledsec_mul_is ( integer, intent(in)  factor,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 1421 of file dc_scaledsec.f90.

1422 !
1423 ! DC_SCALED_SEC 型変数の乗算.
1424 !
1425 ! Multiplication of a "DC_SCALED_SEC" variable
1426 !
1427 implicit none
1428 integer, intent(in):: factor
1429 type(DC_SCALED_SEC), intent(in):: sclsec
1430 continue
1431 result = sclsec * factor

◆ dcscaledsec_mul_rs()

type(dc_scaled_sec) function dc_scaledsec::operator(*)::dcscaledsec_mul_rs ( real, intent(in)  factor,
type(dc_scaled_sec), intent(in)  sclsec 
)

Definition at line 1488 of file dc_scaledsec.f90.

1489 !
1490 ! DC_SCALED_SEC 型変数の乗算.
1491 !
1492 ! Multiplication of a "DC_SCALED_SEC" variable
1493 !
1494 use dc_message, only: messagenotify
1495 implicit none
1496 real, intent(in):: factor
1497 type(DC_SCALED_SEC), intent(in):: sclsec
1498 continue
1499 result = sclsec * factor

◆ dcscaledsec_mul_sd()

type(dc_scaled_sec) function dc_scaledsec::operator(*)::dcscaledsec_mul_sd ( type(dc_scaled_sec), intent(in)  sclsec,
real(dp), intent(in)  factor 
)

Definition at line 1436 of file dc_scaledsec.f90.

1437 !
1438 ! DC_SCALED_SEC 型変数の乗算.
1439 !
1440 ! Multiplication of a "DC_SCALED_SEC" variable
1441 !
1442 use dc_message, only: messagenotify
1443 implicit none
1444 type(DC_SCALED_SEC), intent(in):: sclsec
1445 real(DP), intent(in):: factor
1446 type(DC_SCALED_SEC):: factor_scl
1447 continue
1448 factor_scl = factor
1449 result = sclsec * factor_scl

◆ dcscaledsec_mul_si()

type(dc_scaled_sec) function dc_scaledsec::operator(*)::dcscaledsec_mul_si ( type(dc_scaled_sec), intent(in)  sclsec,
integer, intent(in)  factor 
)

Definition at line 1367 of file dc_scaledsec.f90.

1368 !
1369 ! DC_SCALED_SEC 型変数の乗算.
1370 !
1371 ! Multiplication of a "DC_SCALED_SEC" variable
1372 !
1373 !--
1374 ! 高速化のため, mul_ss を使用しない.
1375 !++
1376 use dc_message, only: messagenotify
1377 implicit none
1378 type(DC_SCALED_SEC), intent(in):: sclsec
1379 integer, intent(in):: factor
1380 integer:: factor_abs
1381 type(DC_SCALED_SEC):: zero_sec
1382 real(DP):: sec_ary_dp(imin:imax)
1383 integer:: i, move_up
1384 continue
1385 if ( sclsec == zero_sec .or. factor == 0 ) then
1386 result = zero_sec
1387 return
1388 end if
1389
1390 if ( sclsec % flag_negative ) then
1391 result % flag_negative = .not. factor < 0
1392 else
1393 result % flag_negative = factor < 0
1394 end if
1395 factor_abs = abs(factor)
1396
1397 move_up = 0
1398 sec_ary_dp(:) = 0.0_dp
1399 do i = imin, imax
1400 sec_ary_dp(i) = sclsec % sec_ary(i) * factor_abs + move_up
1401
1402 if ( .not. sec_ary_dp(i) < scale_factor ) then
1403 move_up = int( sec_ary_dp(i) / scale_factor )
1404 sec_ary_dp(i) = sec_ary_dp(i) - move_up * scale_factor
1405 else
1406 move_up = 0
1407 end if
1408 end do
1409
1410 if ( move_up /= 0 ) then
1411 call messagenotify( 'E', 'dc_scaledsec#operator(*)', &
1412 & 'DC_SCALED_SEC must be smaller than 10^24' )
1413 end if
1414
1415 result % sec_ary(imin:imax) = sec_ary_dp(imin:imax)
1416

◆ dcscaledsec_mul_sr()

type(dc_scaled_sec) function dc_scaledsec::operator(*)::dcscaledsec_mul_sr ( type(dc_scaled_sec), intent(in)  sclsec,
real, intent(in)  factor 
)

Definition at line 1470 of file dc_scaledsec.f90.

1471 !
1472 ! DC_SCALED_SEC 型変数の乗算.
1473 !
1474 ! Multiplication of a "DC_SCALED_SEC" variable
1475 !
1476 use dc_message, only: messagenotify
1477 implicit none
1478 type(DC_SCALED_SEC), intent(in):: sclsec
1479 real, intent(in):: factor
1480 type(DC_SCALED_SEC):: factor_scl
1481 continue
1482 factor_scl = factor
1483 result = sclsec * factor_scl

◆ dcscaledsec_mul_ss()

type(dc_scaled_sec) function dc_scaledsec::operator(*)::dcscaledsec_mul_ss ( type(dc_scaled_sec), intent(in), target  sclsec1,
type(dc_scaled_sec), intent(in), target  sclsec2 
)

Definition at line 1296 of file dc_scaledsec.f90.

1297 !
1298 ! DC_SCALED_SEC 型変数の乗算.
1299 !
1300 ! Multiplication of a "DC_SCALED_SEC" variable
1301 !
1302 use dc_message, only: messagenotify
1303 implicit none
1304 type(DC_SCALED_SEC), intent(in), target:: sclsec1, sclsec2
1305 integer:: sec_ary_int(imin:imax,imin:imax)
1306! real(DP):: sec_ary_int(imin:imax,imin:imax)
1307 integer:: i, j, move_up
1308 type(DC_SCALED_SEC):: zero_sec
1309 continue
1310 if ( sclsec1 == zero_sec .or. sclsec2 == zero_sec ) then
1311 result = zero_sec
1312 return
1313 end if
1314
1315 if ( sclsec1 % flag_negative ) then
1316 result % flag_negative = .not. sclsec2 % flag_negative
1317 else
1318 result % flag_negative = sclsec2 % flag_negative
1319 end if
1320
1321 move_up = 0
1322 sec_ary_int(:,:) = 0
1323 do i = imin, imax
1324 do j = imin, imax
1325 sec_ary_int(i,j) = &
1326 & sclsec1 % sec_ary(j) * sclsec2 % sec_ary(i) + move_up
1327 if ( i + j > imax .and. sec_ary_int(i,j) /= 0 ) then
1328 call messagenotify( 'E', 'dc_scaledsec#operator(*)', &
1329 & 'DC_SCALED_SEC must be smaller than 10^24' )
1330 end if
1331 if ( .not. sec_ary_int(i,j) < scale_factor ) then
1332 move_up = int( sec_ary_int(i,j) / scale_factor_int )
1333 sec_ary_int(i,j) = sec_ary_int(i,j) - move_up * scale_factor_int
1334 else
1335 move_up = 0
1336 end if
1337 end do
1338 end do
1339
1340 result % sec_ary = 0
1341 do i = imin, imax
1342 do j = imin, imax
1343 if ( i + j < imin ) cycle
1344 if ( i + j > imax ) cycle
1345 result % sec_ary(i+j) = result % sec_ary(i+j) + sec_ary_int(i,j)
1346 end do
1347 end do
1348
1349 move_up = 0
1350 do i = imin, imax
1351 result % sec_ary(i) = result % sec_ary(i) + move_up
1352 move_up = 0
1353 do while ( .not. result % sec_ary(i) < scale_factor_int )
1354 if ( i == imax ) then
1355 call messagenotify( 'E', 'dc_scaledsec#operator(*)', &
1356 & 'DC_SCALED_SEC must be smaller than 10^24' )
1357 end if
1358 result % sec_ary(i) = result % sec_ary(i) - scale_factor_int
1359 move_up = move_up + 1
1360 end do
1361 end do
1362

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