\hypertarget{interfacedc__scaledsec_1_1modulo}{}\section{dc\+\_\+scaledsec\+:\+:modulo Interface Reference}
\label{interfacedc__scaledsec_1_1modulo}\index{dc\+\_\+scaledsec\+::modulo@{dc\+\_\+scaledsec\+::modulo}}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
type(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\+\_\+scaled\+\_\+sec}) function \hyperlink{interfacedc__scaledsec_1_1modulo_a392a37cd80857b2bafcbbcff015128e4}{dcscaledsec\+\_\+modulo\+\_\+si} (sclsec, factor)
\item 
type(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\+\_\+scaled\+\_\+sec}) function \hyperlink{interfacedc__scaledsec_1_1modulo_af29c2072fd652c448011622c4ba229d3}{dcscaledsec\+\_\+modulo\+\_\+sr} (sclsec, factor)
\item 
type(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\+\_\+scaled\+\_\+sec}) function \hyperlink{interfacedc__scaledsec_1_1modulo_aec4122596d374b9f919c0006425b3935}{dcscaledsec\+\_\+modulo\+\_\+sd} (sclsec, factor)
\item 
type(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\+\_\+scaled\+\_\+sec}) function \hyperlink{interfacedc__scaledsec_1_1modulo_aab61ac189ef6985c94f724af1e65a2fc}{dcscaledsec\+\_\+modulo\+\_\+ss} (sclsec, factor)
\end{DoxyCompactItemize}


\subsection{Detailed Description}


Definition at line 165 of file dc\+\_\+scaledsec.\+f90.



\subsection{Member Function/\+Subroutine Documentation}
\mbox{\Hypertarget{interfacedc__scaledsec_1_1modulo_aec4122596d374b9f919c0006425b3935}\label{interfacedc__scaledsec_1_1modulo_aec4122596d374b9f919c0006425b3935}} 
\index{dc\+\_\+scaledsec\+::modulo@{dc\+\_\+scaledsec\+::modulo}!dcscaledsec\+\_\+modulo\+\_\+sd@{dcscaledsec\+\_\+modulo\+\_\+sd}}
\index{dcscaledsec\+\_\+modulo\+\_\+sd@{dcscaledsec\+\_\+modulo\+\_\+sd}!dc\+\_\+scaledsec\+::modulo@{dc\+\_\+scaledsec\+::modulo}}
\subsubsection{\texorpdfstring{dcscaledsec\+\_\+modulo\+\_\+sd()}{dcscaledsec\_modulo\_sd()}}
{\footnotesize\ttfamily type(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\+\_\+scaled\+\_\+sec}) function dc\+\_\+scaledsec\+::modulo\+::dcscaledsec\+\_\+modulo\+\_\+sd (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\+\_\+scaled\+\_\+sec}), intent(in)}]{sclsec,  }\item[{real(dp), intent(in)}]{factor }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1872 of file dc\+\_\+scaledsec.\+f90.


\begin{DoxyCode}
1872     \textcolor{comment}{!}
1873     \textcolor{comment}{! DC\_SCALED\_SEC 型変数を割った際の剰余を計算. }
1874     \textcolor{comment}{! }
1875     \textcolor{comment}{! Calculate of remainder by division of a "DC\_SCALED\_SEC" variable}
1876     \textcolor{comment}{!}
1877     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
1878     \textcolor{keywordtype}{implicit none}
1879     \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}), \textcolor{keywordtype}{intent(in)}:: sclsec
1880     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: factor
1881     \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}):: factor\_scl
1882 
1883   \textcolor{keywordflow}{continue}
1884     factor\_scl = factor
1885     result = \hyperlink{interfacedc__scaledsec_1_1modulo}{modulo}( sclsec, factor\_scl )
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__scaledsec_1_1modulo_a392a37cd80857b2bafcbbcff015128e4}\label{interfacedc__scaledsec_1_1modulo_a392a37cd80857b2bafcbbcff015128e4}} 
\index{dc\+\_\+scaledsec\+::modulo@{dc\+\_\+scaledsec\+::modulo}!dcscaledsec\+\_\+modulo\+\_\+si@{dcscaledsec\+\_\+modulo\+\_\+si}}
\index{dcscaledsec\+\_\+modulo\+\_\+si@{dcscaledsec\+\_\+modulo\+\_\+si}!dc\+\_\+scaledsec\+::modulo@{dc\+\_\+scaledsec\+::modulo}}
\subsubsection{\texorpdfstring{dcscaledsec\+\_\+modulo\+\_\+si()}{dcscaledsec\_modulo\_si()}}
{\footnotesize\ttfamily type(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\+\_\+scaled\+\_\+sec}) function dc\+\_\+scaledsec\+::modulo\+::dcscaledsec\+\_\+modulo\+\_\+si (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\+\_\+scaled\+\_\+sec}), intent(in)}]{sclsec,  }\item[{integer, intent(in)}]{factor }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1834 of file dc\+\_\+scaledsec.\+f90.


\begin{DoxyCode}
1834     \textcolor{comment}{!}
1835     \textcolor{comment}{! DC\_SCALED\_SEC 型変数を割った際の剰余を計算. }
1836     \textcolor{comment}{! }
1837     \textcolor{comment}{! Calculate of remainder by division of a "DC\_SCALED\_SEC" variable}
1838     \textcolor{comment}{!}
1839     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
1840     \textcolor{keywordtype}{implicit none}
1841     \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}), \textcolor{keywordtype}{intent(in)}:: sclsec
1842     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: factor
1843     \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}):: factor\_scl
1844 
1845   \textcolor{keywordflow}{continue}
1846     factor\_scl = factor
1847     result = \hyperlink{interfacedc__scaledsec_1_1modulo}{modulo}( sclsec, factor\_scl )
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__scaledsec_1_1modulo_af29c2072fd652c448011622c4ba229d3}\label{interfacedc__scaledsec_1_1modulo_af29c2072fd652c448011622c4ba229d3}} 
\index{dc\+\_\+scaledsec\+::modulo@{dc\+\_\+scaledsec\+::modulo}!dcscaledsec\+\_\+modulo\+\_\+sr@{dcscaledsec\+\_\+modulo\+\_\+sr}}
\index{dcscaledsec\+\_\+modulo\+\_\+sr@{dcscaledsec\+\_\+modulo\+\_\+sr}!dc\+\_\+scaledsec\+::modulo@{dc\+\_\+scaledsec\+::modulo}}
\subsubsection{\texorpdfstring{dcscaledsec\+\_\+modulo\+\_\+sr()}{dcscaledsec\_modulo\_sr()}}
{\footnotesize\ttfamily type(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\+\_\+scaled\+\_\+sec}) function dc\+\_\+scaledsec\+::modulo\+::dcscaledsec\+\_\+modulo\+\_\+sr (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\+\_\+scaled\+\_\+sec}), intent(in)}]{sclsec,  }\item[{real, intent(in)}]{factor }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1853 of file dc\+\_\+scaledsec.\+f90.


\begin{DoxyCode}
1853     \textcolor{comment}{!}
1854     \textcolor{comment}{! DC\_SCALED\_SEC 型変数を割った際の剰余を計算. }
1855     \textcolor{comment}{! }
1856     \textcolor{comment}{! Calculate of remainder by division of a "DC\_SCALED\_SEC" variable}
1857     \textcolor{comment}{!}
1858     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
1859     \textcolor{keywordtype}{implicit none}
1860     \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}), \textcolor{keywordtype}{intent(in)}:: sclsec
1861     \textcolor{keywordtype}{real}, \textcolor{keywordtype}{intent(in)}:: factor
1862     \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}):: factor\_scl
1863 
1864   \textcolor{keywordflow}{continue}
1865     factor\_scl = factor
1866     result = \hyperlink{interfacedc__scaledsec_1_1modulo}{modulo}( sclsec, factor\_scl )
\end{DoxyCode}
\mbox{\Hypertarget{interfacedc__scaledsec_1_1modulo_aab61ac189ef6985c94f724af1e65a2fc}\label{interfacedc__scaledsec_1_1modulo_aab61ac189ef6985c94f724af1e65a2fc}} 
\index{dc\+\_\+scaledsec\+::modulo@{dc\+\_\+scaledsec\+::modulo}!dcscaledsec\+\_\+modulo\+\_\+ss@{dcscaledsec\+\_\+modulo\+\_\+ss}}
\index{dcscaledsec\+\_\+modulo\+\_\+ss@{dcscaledsec\+\_\+modulo\+\_\+ss}!dc\+\_\+scaledsec\+::modulo@{dc\+\_\+scaledsec\+::modulo}}
\subsubsection{\texorpdfstring{dcscaledsec\+\_\+modulo\+\_\+ss()}{dcscaledsec\_modulo\_ss()}}
{\footnotesize\ttfamily type(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\+\_\+scaled\+\_\+sec}) function dc\+\_\+scaledsec\+::modulo\+::dcscaledsec\+\_\+modulo\+\_\+ss (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\+\_\+scaled\+\_\+sec}), intent(in)}]{sclsec,  }\item[{type(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\+\_\+scaled\+\_\+sec}), intent(in)}]{factor }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 1747 of file dc\+\_\+scaledsec.\+f90.


\begin{DoxyCode}
1747     \textcolor{comment}{!}
1748     \textcolor{comment}{! DC\_SCALED\_SEC 型変数を割った際の剰余を計算. }
1749     \textcolor{comment}{! }
1750     \textcolor{comment}{! Calculate of remainder by division of a "DC\_SCALED\_SEC" variable}
1751     \textcolor{comment}{!}
1752     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
1753     \textcolor{keywordtype}{implicit none}
1754     \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}), \textcolor{keywordtype}{intent(in)}:: sclsec, factor
1755 
1756     \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}):: factor\_scl
1757     \textcolor{keywordtype}{real(DP)}:: sec\_ary\_mod(imin+imin:imax)
1758     \textcolor{keywordtype}{integer}:: i, move\_down\_index
1759     \textcolor{keywordtype}{real(DP)}:: move\_down
1760     \textcolor{keywordtype}{real(DP)}:: factor\_dp
1761     \textcolor{keywordtype}{type}(\hyperlink{structdc__scaledsec_1_1dc__scaled__sec}{dc\_scaled\_sec}):: zero\_sec
1762   \textcolor{keywordflow}{continue}
1763   
1764     \textcolor{comment}{! frt, ifort などでは, 1.0e+23 などの実数とすると, }
1765     \textcolor{comment}{! 9.9999e+22 などとなってしまうため, }
1766     \textcolor{comment}{! factor として指定するものは 10e+12 までとする. (うーむ, 汚い対応だな....)}
1767     \textcolor{comment}{! (morikawa 2008/09/01) }
1768     \textcolor{comment}{!}
1769     \textcolor{keywordflow}{if} ( .not. all( factor % sec\_ary (imax-4:imax) == (/ 0, 0, 0, 0, 0 /) ) ) \textcolor{keywordflow}{then}
1770       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}( \textcolor{stringliteral}{'E'}, \textcolor{stringliteral}{'dc\_scaledsec#modulo'}, &
1771         & \textcolor{stringliteral}{'factor must be smaller than 10^12'} )
1772 \textcolor{keywordflow}{    end if}
1773 
1774     \textcolor{keywordflow}{if} ( sclsec == factor ) \textcolor{keywordflow}{then}
1775       result = zero\_sec
1776       \textcolor{keywordflow}{return}
1777 \textcolor{keywordflow}{    end if}
1778 
1779     factor\_scl % sec\_ary(imin:-1) = 0
1780     factor\_scl % sec\_ary(imin-imin:imax) = factor % sec\_ary(imin:imax+imin)
1781     factor\_scl % flag\_negative = factor % flag\_negative
1782 
1783     factor\_dp = factor\_scl
1784 
1785     move\_down = 0.0\_dp
1786     \textcolor{keywordflow}{do} i = imax, imin + imin, -1
1787       move\_down\_index = i
1788       \textcolor{keywordflow}{if} ( move\_down /= 0.0\_dp ) \textcolor{keywordflow}{then}
1789         \textcolor{keywordflow}{if} ( \hyperlink{interfacedc__scaledsec_1_1abs}{abs}(factor\_dp) > ( move\_down + scale\_factor ) * scale\_factor\_xx( i - imin ) ) \textcolor{keywordflow}{exit}
1790 \textcolor{keywordflow}{      end if}
1791 
1792       \textcolor{keywordflow}{if} ( i > imin - 1 ) \textcolor{keywordflow}{then}
1793         sec\_ary\_mod(i) = &
1794           & \hyperlink{interfacedc__scaledsec_1_1mod}{mod}( ( sclsec % sec\_ary(i) + move\_down ), factor\_dp )
1795       \textcolor{keywordflow}{else}
1796         sec\_ary\_mod(i) = \hyperlink{interfacedc__scaledsec_1_1mod}{mod}( move\_down, factor\_dp )
1797 \textcolor{keywordflow}{      end if}
1798 
1799       \textcolor{keywordflow}{if} ( sec\_ary\_mod(i) /= 0.0\_dp ) \textcolor{keywordflow}{then}
1800         move\_down = sec\_ary\_mod(i) * scale\_factor
1801       \textcolor{keywordflow}{else}
1802         move\_down = 0.0\_dp
1803 \textcolor{keywordflow}{      end if}
1804 
1805 \textcolor{keywordflow}{    end do}
1806 
1807     result = move\_down * scale\_factor\_xx(move\_down\_index)
1808     \textcolor{keywordflow}{if} ( move\_down\_index > imin - 1 ) \textcolor{keywordflow}{then}
1809       result % sec\_ary(imin:move\_down\_index) = sclsec % sec\_ary(imin:move\_down\_index)
1810 \textcolor{keywordflow}{    end if}
1811     
1812     result % flag\_negative = .false.
1813 
1814     \textcolor{keywordflow}{if} ( .not. result == zero\_sec ) \textcolor{keywordflow}{then}
1815       \textcolor{keywordflow}{if} ( .not. sclsec % flag\_negative .and. factor % flag\_negative ) \textcolor{keywordflow}{then}
1816         result = - factor - result
1817         result % flag\_negative = .not. sclsec % flag\_negative
1818         
1819       \textcolor{keywordflow}{elseif} ( sclsec % flag\_negative .and. .not. factor % flag\_negative ) \textcolor{keywordflow}{then}
1820         result = factor - result
1821         result % flag\_negative = .not. sclsec % flag\_negative
1822 
1823       \textcolor{keywordflow}{else}
1824         result % flag\_negative = sclsec % flag\_negative
1825         
1826 \textcolor{keywordflow}{      end if}
1827 \textcolor{keywordflow}{    end if}
1828 
\end{DoxyCode}


The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
dc\+\_\+utils/\hyperlink{dc__scaledsec_8f90}{dc\+\_\+scaledsec.\+f90}\end{DoxyCompactItemize}
