\hypertarget{namespaceae__module}{}\section{ae\+\_\+module Module Reference}
\label{namespaceae__module}\index{ae\+\_\+module@{ae\+\_\+module}}


1 次元周期境界\+: 実フーリエ変換  


\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine, public \hyperlink{namespaceae__module_a22cd0d2c74c2ddf99e3ededde22ff373}{ae\+\_\+initial} (i, k, xmin, xmax)
\begin{DoxyCompactList}\small\item\em スペクトル変換の格子点数, 波数, 領域の大きさを設定する. \end{DoxyCompactList}\item 
real(dp) function, dimension(size(ae, 1), 0\+:im-\/1), public \hyperlink{namespaceae__module_aa608f5e636b985d941beee7b193b296d}{ag\+\_\+ae} (ae)
\begin{DoxyCompactList}\small\item\em スペクトルデータから格子点データへ逆変換する(2 次元データ用) \end{DoxyCompactList}\item 
real(dp) function, dimension(0\+:im-\/1), public \hyperlink{namespaceae__module_af6ac1c9eaf6bd191607a83fb2104d19b}{g\+\_\+e} (e)
\begin{DoxyCompactList}\small\item\em スペクトルデータから格子点データへ逆変換する(1 次元データ用) \end{DoxyCompactList}\item 
real(dp) function, dimension(size(ag, 1),-\/km\+:km), public \hyperlink{namespaceae__module_aad2e28fa11da59980edab6814da4e8c1}{ae\+\_\+ag} (ag)
\begin{DoxyCompactList}\small\item\em 格子点データからスペクトルデータへ正変換する(2 次元データ用) \end{DoxyCompactList}\item 
real(dp) function, dimension(-\/km\+:km), public \hyperlink{namespaceae__module_ae911d8ef5ea4591945efb0abf89f7d69}{e\+\_\+g} (g)
\begin{DoxyCompactList}\small\item\em 格子点データからスペクトルデータへ正変換する(1 次元データ用) \end{DoxyCompactList}\item 
real(dp) function, dimension(size(ae, 1),-\/km\+:km), public \hyperlink{namespaceae__module_a364fd96fdcbe1eb523e8aa55f3b26cb2}{ae\+\_\+dx\+\_\+ae} (ae)
\begin{DoxyCompactList}\small\item\em 入力スペクトルデータに X 微分を作用する(2 次元データ). \end{DoxyCompactList}\item 
real(dp) function, dimension(-\/km\+:km), public \hyperlink{namespaceae__module_ab680d91e6d9b4516c765c6d1ade9845a}{e\+\_\+dx\+\_\+e} (e)
\begin{DoxyCompactList}\small\item\em 入力スペクトルデータに X 微分を作用する(1 次元データ). \end{DoxyCompactList}\item 
real(dp) function, dimension(size(ag, 1)), public \hyperlink{namespaceae__module_a4ab0f41d2d21a6c84b221be04e340fb0}{a\+\_\+int\+\_\+ag} (ag)
\begin{DoxyCompactList}\small\item\em 1 次元格子点データが並んだ 2 次元配列の積分 \end{DoxyCompactList}\item 
real(dp) function, public \hyperlink{namespaceae__module_a031c3822a9f04b1aac406c499c31f6c9}{int\+\_\+g} (g)
\begin{DoxyCompactList}\small\item\em 1 次元格子点データの積分 \end{DoxyCompactList}\item 
real(dp) function, dimension(size(ag, 1)), public \hyperlink{namespaceae__module_a124cd8243702b93c236dd0c1073eb7a4}{a\+\_\+avr\+\_\+ag} (ag)
\begin{DoxyCompactList}\small\item\em 1 次元格子点データが並んだ 2 次元配列の平均 \end{DoxyCompactList}\item 
real(dp) function, public \hyperlink{namespaceae__module_a8615721aa4b03e40a1747a3813732cab}{avr\+\_\+g} (g)
\begin{DoxyCompactList}\small\item\em 1 次元格子点データの平均 \end{DoxyCompactList}\item 
real(dp) function, public \hyperlink{namespaceae__module_a603a60271157a32efcac3798791b86e5}{interpolate\+\_\+e} (e\+\_\+data, xval)
\begin{DoxyCompactList}\small\item\em 補間計算(1次元) \end{DoxyCompactList}\item 
real(dp) function, dimension(size(ae\+\_\+data, 1)), public \hyperlink{namespaceae__module_add3a6d40d54fef16f93cb3065e9ade73}{a\+\_\+interpolate\+\_\+ae} (ae\+\_\+data, xval)
\begin{DoxyCompactList}\small\item\em 補間計算(2次元) \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
real(dp), dimension(\+:), allocatable, save, public \hyperlink{namespaceae__module_a3eb0921a2074c61a68f63315f974fa2e}{g\+\_\+x}
\begin{DoxyCompactList}\small\item\em 格子点座標(\+X)を格納した1次元配列. \end{DoxyCompactList}\item 
real(dp), dimension(\+:), allocatable, save, public \hyperlink{namespaceae__module_a415b7681bdd5824affa2e8d5d6c9643b}{g\+\_\+x\+\_\+weight}
\begin{DoxyCompactList}\small\item\em 重み座標を格納した 1 次元配列. X方向の格子点の間隔が格納してある. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
1 次元周期境界\+: 実フーリエ変換 

\begin{DoxyAuthor}{Author}
Shin-\/ichi Takehiro, Youhei S\+A\+S\+A\+KI 
\end{DoxyAuthor}
\begin{DoxyCopyright}{Copyright}
Copyright (C) S\+P\+M\+O\+D\+EL Development Group, 2019. License is M\+I\+T/\+X11. see \hyperlink{COPYRIGHT}{C\+O\+P\+Y\+R\+I\+G\+HT} in detail
\end{DoxyCopyright}
1 次元周期境界条件の下での流体運動を 実フーリエ変換によるスペクトル法で数値計算するための Fortran90 関数を提供する. 2 次元データの 1 次元に関して同時にスペクトル計算を実行するための 関数も提供しており, 2, 3 次元領域での計算のベースも提供する.

このモジュールは内部で I\+S\+P\+A\+C\+K3/\+F\+X\+P\+A\+CK のサブルーチンを呼んでいる. スペクトルデータの格納方法については I\+S\+P\+A\+C\+K3/\+F\+X\+P\+A\+CK と異なっているので以下のコメントに注意されたい.

\paragraph*{命名法}


\begin{DoxyItemize}
\item 関数名の先頭 ({\ttfamily e\+\_\+}, {\ttfamily g\+\_\+}, {\ttfamily ae\+\_\+}, {\ttfamily ag\+\_\+}) は, 返す値の形を示している.
\begin{DoxyItemize}
\item {\ttfamily e\+\_\+} \+:\+: スペクトルデータ,
\item {\ttfamily g\+\_\+} \+:\+: 1 次元格子点データ,
\item {\ttfamily ae\+\_\+} \+:\+: 1 次元スペクトルデータが複数並んだ 2 次元データ,
\item {\ttfamily ag\+\_\+} \+:\+: 1 次元格子点データが複数並んだ 2 次元データ.
\end{DoxyItemize}
\item 関数名の間の文字列({\ttfamily Dx})は, その関数の作用を表している.
\item 関数名の最後 ({\ttfamily \+\_\+e}, {\ttfamily \+\_\+ae}, {\ttfamily \+\_\+g}, {\ttfamily \+\_\+ag}) は, 入力変数の形スペクトルデータおよび格子点データであることを示している.
\begin{DoxyItemize}
\item {\ttfamily \+\_\+e} \+:\+: スペクトルデータ
\item {\ttfamily \+\_\+g} \+:\+: 1 次元格子点データ
\item {\ttfamily \+\_\+ae} \+:\+: 1 次元スペクトルデータが複数並んだ 2 次元データ
\item {\ttfamily \+\_\+ag} \+:\+: 1 次元格子点データが複数並んだ 2 次元データ
\end{DoxyItemize}
\end{DoxyItemize}

\paragraph*{各データの種類の説明}


\begin{DoxyItemize}
\item 以下 {\ttfamily DP = kind(1.\+0D)} である
\item {\ttfamily g} \+: 1 次元格子点データ.
\begin{DoxyItemize}
\item 変数の種類と次元は {\ttfamily real(\+D\+P), dimension(0\+:im-\/1)}.
\item {\ttfamily im} は X 座標の格子点数であり, サブルーチン \hyperlink{namespaceae__module_a22cd0d2c74c2ddf99e3ededde22ff373}{ae\+\_\+initial()} にて あらかじめ設定しておく.
\end{DoxyItemize}
\item {\ttfamily e} \+: スペクトルデータ.
\begin{DoxyItemize}
\item 変数の種類と次元は {\ttfamily real(\+D\+P), dimension(-\/km\+:km)}.
\item {\ttfamily km} は X 方向の最大波数であり, サブルーチン \hyperlink{namespaceae__module_a22cd0d2c74c2ddf99e3ededde22ff373}{ae\+\_\+initial()} にて あらかじめ設定しておく.
\item スペクトルデータの格納のされ方は {\ttfamily 0\+:km} までが $\cos(kx)$ の係数, {\ttfamily -\/km\+:-\/1} が $sin(kx)$ の係数となっている.
\end{DoxyItemize}
\item {\ttfamily ag} \+: 1 次元(\+X)格子点データの並んだ 2 次元データ.
\begin{DoxyItemize}
\item 変数の種類と次元は {\ttfamily real(\+D\+P), dimension(\+:,0\+:im-\/1)}. 第 2 次元が X 方向を表す.
\end{DoxyItemize}
\item {\ttfamily ae} \+: 1 次元スペクトルデータの並んだ 2 次元データ.
\begin{DoxyItemize}
\item 変数の種類と次元は {\ttfamily real(\+D\+P), dimension(\+:,-\/km\+:km)}. 第 2 次元がスペクトルを表す.
\end{DoxyItemize}
\item {\ttfamily g\+\_\+} で始まる関数が返す値は 1 次元格子点データに同じ.
\item {\ttfamily e\+\_\+} で始まる関数が返す値はスペクトルデータに同じ.
\item {\ttfamily ag\+\_\+} で始まる関数が返す値は 1 次元格子点データの並んだ 2 次元データに同じ.
\item {\ttfamily ae\+\_\+} で始まる関数が返す値は 1 次元スペクトルデータの並んだ 2 次元データに同じ.
\item スペクトルデータに対する微分等の作用とは, 対応する格子点データに 微分などを作用させたデータをスペクトル変換したもののことである. 
\end{DoxyItemize}

\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespaceae__module_a124cd8243702b93c236dd0c1073eb7a4}\label{namespaceae__module_a124cd8243702b93c236dd0c1073eb7a4}} 
\index{ae\+\_\+module@{ae\+\_\+module}!a\+\_\+avr\+\_\+ag@{a\+\_\+avr\+\_\+ag}}
\index{a\+\_\+avr\+\_\+ag@{a\+\_\+avr\+\_\+ag}!ae\+\_\+module@{ae\+\_\+module}}
\subsubsection{\texorpdfstring{a\+\_\+avr\+\_\+ag()}{a\_avr\_ag()}}
{\footnotesize\ttfamily real(dp) function, dimension(size(ag,1)), public ae\+\_\+module\+::a\+\_\+avr\+\_\+ag (\begin{DoxyParamCaption}\item[{real(dp), dimension(\+:,0\+:), intent(in)}]{ag }\end{DoxyParamCaption})}



1 次元格子点データが並んだ 2 次元配列の平均 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em ag} & 格子点データ\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
平均結果 
\end{DoxyReturn}


Definition at line 388 of file ae\+\_\+module.\+f90.



References a\+\_\+int\+\_\+ag(), and g\+\_\+x\+\_\+weight.


\begin{DoxyCode}
388 
389     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(:,0:)}, \textcolor{keywordtype}{intent(in)}     :: ag
391     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(size(ag,1))}           :: a\_avr\_ag
392 
393     a\_avr\_ag = a\_int\_ag(ag)/sum(g\_x\_weight)
394 
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=333pt]{namespaceae__module_a124cd8243702b93c236dd0c1073eb7a4_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespaceae__module_a4ab0f41d2d21a6c84b221be04e340fb0}\label{namespaceae__module_a4ab0f41d2d21a6c84b221be04e340fb0}} 
\index{ae\+\_\+module@{ae\+\_\+module}!a\+\_\+int\+\_\+ag@{a\+\_\+int\+\_\+ag}}
\index{a\+\_\+int\+\_\+ag@{a\+\_\+int\+\_\+ag}!ae\+\_\+module@{ae\+\_\+module}}
\subsubsection{\texorpdfstring{a\+\_\+int\+\_\+ag()}{a\_int\_ag()}}
{\footnotesize\ttfamily real(dp) function, dimension(size(ag,1)), public ae\+\_\+module\+::a\+\_\+int\+\_\+ag (\begin{DoxyParamCaption}\item[{real(dp), dimension(\+:,0\+:), intent(in)}]{ag }\end{DoxyParamCaption})}



1 次元格子点データが並んだ 2 次元配列の積分 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em ag} & 格子点データ\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
積分結果 
\end{DoxyReturn}


Definition at line 352 of file ae\+\_\+module.\+f90.



References g\+\_\+x\+\_\+weight.


\begin{DoxyCode}
352 
353     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(:,0:)}, \textcolor{keywordtype}{intent(in)}     :: ag
355     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(size(ag,1))}           :: a\_int\_ag
356 
357     \textcolor{keywordtype}{integer(8)} :: i
358 
359     \textcolor{keywordflow}{if} ( \textcolor{keyword}{size}(ag,2) < im ) \textcolor{keywordflow}{then}
360        \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'E'},\textcolor{stringliteral}{'ae\_Int\_ag'}, &
361             \textcolor{stringliteral}{'The Grid points of input data too small.'})
362     \textcolor{keywordflow}{elseif} ( \textcolor{keyword}{size}(ag,2) > im ) \textcolor{keywordflow}{then}
363        \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'W'},\textcolor{stringliteral}{'ae\_Int\_ag'}, &
364             \textcolor{stringliteral}{'The Grid points of input data too large.'})
365 \textcolor{keywordflow}{    endif}
366 
367     a\_int\_ag = 0.0d0
368     \textcolor{keywordflow}{do} i=0,im-1
369        a\_int\_ag(:) = a\_int\_ag(:) + ag(:,i)*g\_x\_weight(i)
370 \textcolor{keywordflow}{    enddo}
\end{DoxyCode}
\mbox{\Hypertarget{namespaceae__module_add3a6d40d54fef16f93cb3065e9ade73}\label{namespaceae__module_add3a6d40d54fef16f93cb3065e9ade73}} 
\index{ae\+\_\+module@{ae\+\_\+module}!a\+\_\+interpolate\+\_\+ae@{a\+\_\+interpolate\+\_\+ae}}
\index{a\+\_\+interpolate\+\_\+ae@{a\+\_\+interpolate\+\_\+ae}!ae\+\_\+module@{ae\+\_\+module}}
\subsubsection{\texorpdfstring{a\+\_\+interpolate\+\_\+ae()}{a\_interpolate\_ae()}}
{\footnotesize\ttfamily real(dp) function, dimension(size(ae\+\_\+data,1)), public ae\+\_\+module\+::a\+\_\+interpolate\+\_\+ae (\begin{DoxyParamCaption}\item[{real(dp), dimension(\+:,-\/km\+:), intent(in)}]{ae\+\_\+data,  }\item[{real(dp), intent(in)}]{xval }\end{DoxyParamCaption})}



補間計算(2次元) 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em ae\+\_\+data} & 入力スペクトルデータ\\
\hline
\mbox{\tt in}  & {\em xval} & 補間する点の座標\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
補間した結果の値 
\end{DoxyReturn}


Definition at line 433 of file ae\+\_\+module.\+f90.


\begin{DoxyCode}
433 
434     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(:,-km:)}, \textcolor{keywordtype}{intent(IN)}   :: ae\_data
436     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}                      :: xval
438     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(size(ae\_data,1))}      :: a\_interpolate\_ae
439 
440     \textcolor{keywordtype}{integer(8)} :: k
441 
442     a\_interpolate\_ae = ae\_data(:,0)
443 
444     \textcolor{keywordflow}{do} k=1,km
445        a\_interpolate\_ae = a\_interpolate\_ae                          &
446             &  + 2.0d0 * (   ae\_data(:,k)  * cos(2*pi*k/xl*xval)    &
447             &              - ae\_data(:,-k) * sin(2*pi*k/xl*xval) )
448 \textcolor{keywordflow}{    end do}
449 
\end{DoxyCode}
\mbox{\Hypertarget{namespaceae__module_aad2e28fa11da59980edab6814da4e8c1}\label{namespaceae__module_aad2e28fa11da59980edab6814da4e8c1}} 
\index{ae\+\_\+module@{ae\+\_\+module}!ae\+\_\+ag@{ae\+\_\+ag}}
\index{ae\+\_\+ag@{ae\+\_\+ag}!ae\+\_\+module@{ae\+\_\+module}}
\subsubsection{\texorpdfstring{ae\+\_\+ag()}{ae\_ag()}}
{\footnotesize\ttfamily real(dp) function, dimension(size(ag,1),-\/km\+:km), public ae\+\_\+module\+::ae\+\_\+ag (\begin{DoxyParamCaption}\item[{real(dp), dimension(\+:,\+:), intent(in)}]{ag }\end{DoxyParamCaption})}



格子点データからスペクトルデータへ正変換する(2 次元データ用) 

スペクトル正変換の定義は以下のとおり\+:
\begin{DoxyItemize}
\item 格子点データ $g_j \, (j=-0,...,im-1)$
\item スペクトルデータ $e_k \, (k=-km,...,km)$ \begin{align*} e_0 & = (1/im)\sum_{j=0}^{im-1} g_j \\ e_k & = (1/im)\sum_{j=0}^{im-1} g_j \cos(2\pi jk/im) \quad (k=1,2,...,km) \\ e_{-k} & = - (1/im)\sum_{j=0}^{im-1} g_j \sin(2\pi jk/im) \quad (k=1,2,...,km) \end{align*}
\end{DoxyItemize}


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em ag} & 格子点データ\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
スペクトルデータ 
\end{DoxyReturn}


Definition at line 245 of file ae\+\_\+module.\+f90.


\begin{DoxyCode}
245 
246     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(:,:)}, \textcolor{keywordtype}{intent(in)}   :: ag
248     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(size(ag,1),-km:km)} :: ae\_ag
249 
250     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(size(ag,1),0:im-1)} :: ag\_work
251     \textcolor{keywordtype}{integer(8)} :: nm, k
252 
253     nm = \textcolor{keyword}{size}(ag,1)
254     \textcolor{keywordflow}{if} ( \textcolor{keyword}{size}(ag,2) < im ) \textcolor{keywordflow}{then}
255        \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'E'},\textcolor{stringliteral}{'ae\_ag'}, &
256             \textcolor{stringliteral}{'The Grid points of input data too small.'})
257     \textcolor{keywordflow}{elseif} ( \textcolor{keyword}{size}(ag,2) > im ) \textcolor{keywordflow}{then}
258        \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'W'},\textcolor{stringliteral}{'ae\_ag'}, &
259             \textcolor{stringliteral}{'The Grid points of input data too large.'})
260 \textcolor{keywordflow}{    endif}
261     ag\_work = ag
262 
263     \textcolor{keyword}{call }fxrtfa(nm,im,ag\_work,it,t)
264 
265     \textcolor{keywordflow}{do} k=1,min(km,im/2-1)
266        ae\_ag(:, k) = ag\_work(:,2*k)
267        ae\_ag(:,-k) = ag\_work(:,2*k+1)
268 \textcolor{keywordflow}{    enddo}
269     ae\_ag(:,0) = ag\_work(:,0)
270     \textcolor{keywordflow}{if} ( km == im/2 ) \textcolor{keywordflow}{then}
271       ae\_ag(:,km) = ag\_work(:,1)
272 \textcolor{keywordflow}{    end if}
273 
\end{DoxyCode}
\mbox{\Hypertarget{namespaceae__module_a364fd96fdcbe1eb523e8aa55f3b26cb2}\label{namespaceae__module_a364fd96fdcbe1eb523e8aa55f3b26cb2}} 
\index{ae\+\_\+module@{ae\+\_\+module}!ae\+\_\+dx\+\_\+ae@{ae\+\_\+dx\+\_\+ae}}
\index{ae\+\_\+dx\+\_\+ae@{ae\+\_\+dx\+\_\+ae}!ae\+\_\+module@{ae\+\_\+module}}
\subsubsection{\texorpdfstring{ae\+\_\+dx\+\_\+ae()}{ae\_dx\_ae()}}
{\footnotesize\ttfamily real(dp) function, dimension(size(ae,1),-\/km\+:km), public ae\+\_\+module\+::ae\+\_\+dx\+\_\+ae (\begin{DoxyParamCaption}\item[{real(dp), dimension(\+:,-\/km\+:), intent(in)}]{ae }\end{DoxyParamCaption})}



入力スペクトルデータに X 微分を作用する(2 次元データ). 

スペクトルデータの X 微分とは, 対応する格子点データに X 微分を 作用させたデータのスペクトル変換のことである.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em ae} & 入力スペクトルデータ\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
入力スペクトルデータの X 微分 
\end{DoxyReturn}


Definition at line 310 of file ae\+\_\+module.\+f90.


\begin{DoxyCode}
310 
311     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(:,-km:)}, \textcolor{keywordtype}{intent(in)}  :: ae
313     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(size(ae,1),-km:km)}   :: ae\_dx\_ae
314 
315     \textcolor{keywordtype}{integer(8)} ::  k
316 
317     \textcolor{keywordflow}{if} ( \textcolor{keyword}{size}(ae,2) < 2*km+1 ) \textcolor{keywordflow}{then}
318        \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'W'},\textcolor{stringliteral}{'ae\_Dx\_ae'}, &
319             \textcolor{stringliteral}{'The Fourier dimension of input data too small.'})
320     \textcolor{keywordflow}{elseif} ( \textcolor{keyword}{size}(ae,2) > 2*km+1 ) \textcolor{keywordflow}{then}
321        \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'W'},\textcolor{stringliteral}{'ae\_Dx\_ae'}, &
322             \textcolor{stringliteral}{'The Fourier dimension of input data too large.'})
323 \textcolor{keywordflow}{    endif}
324 
325     \textcolor{keywordflow}{do} k=-km,km
326        ae\_dx\_ae(:,k) = -(2*pi*k/xl)*ae(:,-k)
327 \textcolor{keywordflow}{    enddo}
\end{DoxyCode}
\mbox{\Hypertarget{namespaceae__module_a22cd0d2c74c2ddf99e3ededde22ff373}\label{namespaceae__module_a22cd0d2c74c2ddf99e3ededde22ff373}} 
\index{ae\+\_\+module@{ae\+\_\+module}!ae\+\_\+initial@{ae\+\_\+initial}}
\index{ae\+\_\+initial@{ae\+\_\+initial}!ae\+\_\+module@{ae\+\_\+module}}
\subsubsection{\texorpdfstring{ae\+\_\+initial()}{ae\_initial()}}
{\footnotesize\ttfamily subroutine, public ae\+\_\+module\+::ae\+\_\+initial (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{i,  }\item[{integer, intent(in)}]{k,  }\item[{real(dp), intent(in)}]{xmin,  }\item[{real(dp), intent(in)}]{xmax }\end{DoxyParamCaption})}



スペクトル変換の格子点数, 波数, 領域の大きさを設定する. 

他の関数や変数を呼ぶ前に, 最初にこのサブルーチンを呼んで 初期設定をしなければならない.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em i} & 格子点の数\\
\hline
\mbox{\tt in}  & {\em k} & 切断波数\\
\hline
\mbox{\tt in}  & {\em xmin} & X座標下端\\
\hline
\mbox{\tt in}  & {\em xmax} & X座標上端 \\
\hline
\end{DoxyParams}


Definition at line 122 of file ae\+\_\+module.\+f90.



References g\+\_\+x, and g\+\_\+x\+\_\+weight.


\begin{DoxyCode}
122 
123     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)} :: i
125     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)} :: k
127     \textcolor{keywordtype}{real(DP)},\textcolor{keywordtype}{intent(in)} :: xmin
129     \textcolor{keywordtype}{real(DP)},\textcolor{keywordtype}{intent(in)} :: xmax
130     \textcolor{keywordtype}{integer(8)}          :: ii
131 
132     im = i
133     km = k
134     xl = xmax - xmin
135 
136     \textcolor{keywordflow}{if} ( im <= 0 .or. km <= 0 ) \textcolor{keywordflow}{then}
137        \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'E'},\textcolor{stringliteral}{'ae\_Initial'}, &
138             \textcolor{stringliteral}{'Number of grid points and waves should be positive'})
139     \textcolor{keywordflow}{elseif} ( mod(im,2\_8) /= 0 ) \textcolor{keywordflow}{then}
140        \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'E'},\textcolor{stringliteral}{'ae\_Initial'}, &
141             \textcolor{stringliteral}{'Number of grid points should be even'})
142     \textcolor{keywordflow}{elseif} ( km > im/2 ) \textcolor{keywordflow}{then}
143        \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'E'},\textcolor{stringliteral}{'ae\_Initial'}, &
144             \textcolor{stringliteral}{'KM shoud be less equal to IM/2'})
145 \textcolor{keywordflow}{    endif}
146 
147     \textcolor{keyword}{allocate}(it(im/2),t(im*3/2))
148 
149     \textcolor{keyword}{call }fxrini(im,it,t)
150 
151     \textcolor{keyword}{allocate}(g\_x(0:im-1))
152     \textcolor{keywordflow}{do} ii=0,im-1
153        g\_x(ii) = xmin + (xl/im)*ii
154 \textcolor{keywordflow}{    enddo}
155 
156     \textcolor{keyword}{allocate}(g\_x\_weight(0:im-1))
157     g\_x\_weight = xl/im
158 
159     \textcolor{keyword}{call }messagenotify(&
160          \textcolor{stringliteral}{'M'},\textcolor{stringliteral}{'ae\_initial'},\textcolor{stringliteral}{'ae\_module (2019/09/17) is initialized'})
161 
\end{DoxyCode}
\mbox{\Hypertarget{namespaceae__module_aa608f5e636b985d941beee7b193b296d}\label{namespaceae__module_aa608f5e636b985d941beee7b193b296d}} 
\index{ae\+\_\+module@{ae\+\_\+module}!ag\+\_\+ae@{ag\+\_\+ae}}
\index{ag\+\_\+ae@{ag\+\_\+ae}!ae\+\_\+module@{ae\+\_\+module}}
\subsubsection{\texorpdfstring{ag\+\_\+ae()}{ag\_ae()}}
{\footnotesize\ttfamily real(dp) function, dimension(size(ae,1),0\+:im-\/1), public ae\+\_\+module\+::ag\+\_\+ae (\begin{DoxyParamCaption}\item[{real(dp), dimension(\+:,-\/km\+:), intent(in)}]{ae }\end{DoxyParamCaption})}



スペクトルデータから格子点データへ逆変換する(2 次元データ用) 

スペクトル逆変換の定義は以下のとおり\+:
\begin{DoxyItemize}
\item スペクトルデータ\+: $e_k \, (k=-km,...,km)$
\item 格子点データ\+: $g_j \, (j=-0,...,im-1)$ \begin{align*} g_j = e_0 + 2\sum_{k=1}^{km}e_k\cos(2\pi jk/im) - e_{-k}\sin(2\pi jk/im)) \quad (j=0,1,...,im-1). \end{align*}
\end{DoxyItemize}


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em ae} & スペクトルデータ\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
格子点データ 
\end{DoxyReturn}


Definition at line 176 of file ae\+\_\+module.\+f90.


\begin{DoxyCode}
176 
177     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(:,-km:)}, \textcolor{keywordtype}{intent(in)}  :: ae
179     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(size(ae,1),0:im-1)}   :: ag\_ae
180 
181     \textcolor{keywordtype}{integer(8)} :: nm, k
182     nm=\textcolor{keyword}{size}(ae,1)
183 
184     \textcolor{keywordflow}{if} ( \textcolor{keyword}{size}(ae,2) < 2*km+1 ) \textcolor{keywordflow}{then}
185        \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'E'},\textcolor{stringliteral}{'ag\_ae'}, &
186             \textcolor{stringliteral}{'The Fourier dimension of input data too small.'})
187     \textcolor{keywordflow}{elseif} ( \textcolor{keyword}{size}(ae,2) > 2*km+1 ) \textcolor{keywordflow}{then}
188        \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'W'},\textcolor{stringliteral}{'ag\_ae'}, &
189             \textcolor{stringliteral}{'The Fourier dimension of input data too large.'})
190 \textcolor{keywordflow}{    endif}
191 
192     ag\_ae       = 0.0d0
193     ag\_ae(:,0)  = ae(:,0)
194     \textcolor{keywordflow}{do} k=1,min(km,im/2-1)
195        ag\_ae(:,2*k)   = ae(:,k)
196        ag\_ae(:,2*k+1) = ae(:,-k)
197 \textcolor{keywordflow}{    enddo}
198     \textcolor{keywordflow}{if} ( km == im/2 ) \textcolor{keywordflow}{then}
199       ag\_ae(:,1) = ae(:,km)
200 \textcolor{keywordflow}{    end if}
201 
202     \textcolor{keyword}{call }fxrtba(nm,im,ag\_ae,it,t)
203 
\end{DoxyCode}
\mbox{\Hypertarget{namespaceae__module_a8615721aa4b03e40a1747a3813732cab}\label{namespaceae__module_a8615721aa4b03e40a1747a3813732cab}} 
\index{ae\+\_\+module@{ae\+\_\+module}!avr\+\_\+g@{avr\+\_\+g}}
\index{avr\+\_\+g@{avr\+\_\+g}!ae\+\_\+module@{ae\+\_\+module}}
\subsubsection{\texorpdfstring{avr\+\_\+g()}{avr\_g()}}
{\footnotesize\ttfamily real(dp) function, public ae\+\_\+module\+::avr\+\_\+g (\begin{DoxyParamCaption}\item[{real(dp), dimension(0\+:im-\/1), intent(in)}]{g }\end{DoxyParamCaption})}



1 次元格子点データの平均 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em g} & 格子点データ\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
平均値 
\end{DoxyReturn}


Definition at line 400 of file ae\+\_\+module.\+f90.



References g\+\_\+x\+\_\+weight, and int\+\_\+g().


\begin{DoxyCode}
400 
401     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(0:im-1)}, \textcolor{keywordtype}{intent(in)}   :: g
403     \textcolor{keywordtype}{real(DP)}                                  :: avr\_g
404 
405     avr\_g = int\_g(g)/sum(g\_x\_weight)
406 
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=301pt]{namespaceae__module_a8615721aa4b03e40a1747a3813732cab_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespaceae__module_ab680d91e6d9b4516c765c6d1ade9845a}\label{namespaceae__module_ab680d91e6d9b4516c765c6d1ade9845a}} 
\index{ae\+\_\+module@{ae\+\_\+module}!e\+\_\+dx\+\_\+e@{e\+\_\+dx\+\_\+e}}
\index{e\+\_\+dx\+\_\+e@{e\+\_\+dx\+\_\+e}!ae\+\_\+module@{ae\+\_\+module}}
\subsubsection{\texorpdfstring{e\+\_\+dx\+\_\+e()}{e\_dx\_e()}}
{\footnotesize\ttfamily real(dp) function, dimension(-\/km\+:km), public ae\+\_\+module\+::e\+\_\+dx\+\_\+e (\begin{DoxyParamCaption}\item[{real(dp), dimension(-\/km\+:km), intent(in)}]{e }\end{DoxyParamCaption})}



入力スペクトルデータに X 微分を作用する(1 次元データ). 

スペクトルデータの X 微分とは, 対応する格子点データに X 微分を 作用させたデータのスペクトル変換のことである.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em e} & 入力スペクトルデータ\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
入力スペクトルデータの X 微分 
\end{DoxyReturn}


Definition at line 336 of file ae\+\_\+module.\+f90.



References ae\+\_\+dx\+\_\+ae().


\begin{DoxyCode}
336 
337     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(-km:km)}, \textcolor{keywordtype}{intent(in)}     :: e
339     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(-km:km)}                 :: e\_dx\_e
340 
341     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(1,-km:km)}               :: ae\_work
342 
343     ae\_work(1,:) = e
344     ae\_work = ae\_dx\_ae(ae\_work)
345     e\_dx\_e = ae\_work(1,:)
346 
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=329pt]{namespaceae__module_ab680d91e6d9b4516c765c6d1ade9845a_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespaceae__module_ae911d8ef5ea4591945efb0abf89f7d69}\label{namespaceae__module_ae911d8ef5ea4591945efb0abf89f7d69}} 
\index{ae\+\_\+module@{ae\+\_\+module}!e\+\_\+g@{e\+\_\+g}}
\index{e\+\_\+g@{e\+\_\+g}!ae\+\_\+module@{ae\+\_\+module}}
\subsubsection{\texorpdfstring{e\+\_\+g()}{e\_g()}}
{\footnotesize\ttfamily real(dp) function, dimension(-\/km\+:km), public ae\+\_\+module\+::e\+\_\+g (\begin{DoxyParamCaption}\item[{real(dp), dimension(0\+:im-\/1), intent(in)}]{g }\end{DoxyParamCaption})}



格子点データからスペクトルデータへ正変換する(1 次元データ用) 

スペクトル正変換の定義は以下のとおり\+:
\begin{DoxyItemize}
\item 格子点データ\+: $g_j \, (j=-0,...,im-1)$
\item スペクトルデータ\+: $e_k \, (k=-km,...,km)$ \begin{align*} e_0 & = (1/im)\sum_{j=0}^{im-1} g_j \\ e_k & = (1/im)\sum_{j=0}^{im-1} g_j \cos(2\pi jk/im) \quad (k=1,2,...,km) \\ e_{-k} & = - (1/im)\sum_{j=0}^{im-1} g_j \sin(2\pi jk/im) \quad (k=1,2,...,km) \end{align*}
\end{DoxyItemize}


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em g} & 格子点データ\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
スペクトルデータ 
\end{DoxyReturn}


Definition at line 290 of file ae\+\_\+module.\+f90.



References ae\+\_\+ag().


\begin{DoxyCode}
290 
291     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(0:im-1)}, \textcolor{keywordtype}{intent(in)}  :: g
293     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(-km:km)}              :: e\_g
294 
295     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(1,size(g))}        :: ag\_work
296     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(1,-km:km)}         :: ae\_work
297 
298     ag\_work(1,:) = g
299     ae\_work = ae\_ag(ag\_work)
300     e\_g = ae\_work(1,:)
301 
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=298pt]{namespaceae__module_ae911d8ef5ea4591945efb0abf89f7d69_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespaceae__module_af6ac1c9eaf6bd191607a83fb2104d19b}\label{namespaceae__module_af6ac1c9eaf6bd191607a83fb2104d19b}} 
\index{ae\+\_\+module@{ae\+\_\+module}!g\+\_\+e@{g\+\_\+e}}
\index{g\+\_\+e@{g\+\_\+e}!ae\+\_\+module@{ae\+\_\+module}}
\subsubsection{\texorpdfstring{g\+\_\+e()}{g\_e()}}
{\footnotesize\ttfamily real(dp) function, dimension(0\+:im-\/1), public ae\+\_\+module\+::g\+\_\+e (\begin{DoxyParamCaption}\item[{real(dp), dimension(-\/km\+:km), intent(in)}]{e }\end{DoxyParamCaption})}



スペクトルデータから格子点データへ逆変換する(1 次元データ用) 


\begin{DoxyItemize}
\item スペクトルデータ\+: $e_k \, (k=-km,...,km)$
\item 格子点データ\+: $g_j \, (j=-0,...,im-1)$ \begin{align*} g_j = e_0 + 2\sum_{k=1}^{km}(e_k\cos(2\pi jk/im) - e_{-k}\sin(2\pi jk/im)) \quad (j=0,1,...,im-1). \end{align*}
\end{DoxyItemize}


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em e} & スペクトルデータ\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
格子点データ 
\end{DoxyReturn}


Definition at line 217 of file ae\+\_\+module.\+f90.



References ag\+\_\+ae().


\begin{DoxyCode}
217 
218     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(-km:km)}, \textcolor{keywordtype}{intent(in)} :: e
220     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(0:im-1)}             :: g\_e
221 
222     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(1,size(e))}  :: ae\_work
223     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(1,0:im-1)}   :: ag\_work
224 
225     ae\_work(1,:) = e
226     ag\_work = ag\_ae(ae\_work)
227     g\_e = ag\_work(1,:)
228 
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=298pt]{namespaceae__module_af6ac1c9eaf6bd191607a83fb2104d19b_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespaceae__module_a031c3822a9f04b1aac406c499c31f6c9}\label{namespaceae__module_a031c3822a9f04b1aac406c499c31f6c9}} 
\index{ae\+\_\+module@{ae\+\_\+module}!int\+\_\+g@{int\+\_\+g}}
\index{int\+\_\+g@{int\+\_\+g}!ae\+\_\+module@{ae\+\_\+module}}
\subsubsection{\texorpdfstring{int\+\_\+g()}{int\_g()}}
{\footnotesize\ttfamily real(dp) function, public ae\+\_\+module\+::int\+\_\+g (\begin{DoxyParamCaption}\item[{real(dp), dimension(0\+:im-\/1), intent(in)}]{g }\end{DoxyParamCaption})}



1 次元格子点データの積分 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em g} & 格子点データ\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
積分結果 
\end{DoxyReturn}


Definition at line 376 of file ae\+\_\+module.\+f90.



References g\+\_\+x\+\_\+weight.


\begin{DoxyCode}
376 
377     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(0:im-1)}, \textcolor{keywordtype}{intent(in)}   :: g
379     \textcolor{keywordtype}{real(DP)}                                  :: int\_g
380 
381     int\_g = sum(g*g\_x\_weight)
382 
\end{DoxyCode}
\mbox{\Hypertarget{namespaceae__module_a603a60271157a32efcac3798791b86e5}\label{namespaceae__module_a603a60271157a32efcac3798791b86e5}} 
\index{ae\+\_\+module@{ae\+\_\+module}!interpolate\+\_\+e@{interpolate\+\_\+e}}
\index{interpolate\+\_\+e@{interpolate\+\_\+e}!ae\+\_\+module@{ae\+\_\+module}}
\subsubsection{\texorpdfstring{interpolate\+\_\+e()}{interpolate\_e()}}
{\footnotesize\ttfamily real(dp) function, public ae\+\_\+module\+::interpolate\+\_\+e (\begin{DoxyParamCaption}\item[{real(dp), dimension(-\/km\+:km), intent(in)}]{e\+\_\+data,  }\item[{real(dp), intent(in)}]{xval }\end{DoxyParamCaption})}



補間計算(1次元) 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em e\+\_\+data} & 入力スペクトルデータ\\
\hline
\mbox{\tt in}  & {\em xval} & 補間する点の座標\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
補間した結果の値 
\end{DoxyReturn}


Definition at line 412 of file ae\+\_\+module.\+f90.


\begin{DoxyCode}
412 
413     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{dimension(-km:km)}, \textcolor{keywordtype}{intent(IN)} :: e\_data
415     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}                    :: xval
417     \textcolor{keywordtype}{real(DP)}                                :: interpolate\_e
418 
419     \textcolor{keywordtype}{integer(8)} :: k
420 
421     interpolate\_e = e\_data(0)
422     \textcolor{keywordflow}{do} k=1,km
423        interpolate\_e = interpolate\_e                             &
424             &  + 2.0d0 * (   e\_data(k)  * cos(2*pi*k/xl*xval)    &
425             &              - e\_data(-k) * sin(2*pi*k/xl*xval) )
426 \textcolor{keywordflow}{    end do}
427 
\end{DoxyCode}


\subsection{Variable Documentation}
\mbox{\Hypertarget{namespaceae__module_a3eb0921a2074c61a68f63315f974fa2e}\label{namespaceae__module_a3eb0921a2074c61a68f63315f974fa2e}} 
\index{ae\+\_\+module@{ae\+\_\+module}!g\+\_\+x@{g\+\_\+x}}
\index{g\+\_\+x@{g\+\_\+x}!ae\+\_\+module@{ae\+\_\+module}}
\subsubsection{\texorpdfstring{g\+\_\+x}{g\_x}}
{\footnotesize\ttfamily real(dp), dimension(\+:), allocatable, save, public ae\+\_\+module\+::g\+\_\+x}



格子点座標(\+X)を格納した1次元配列. 



Definition at line 102 of file ae\+\_\+module.\+f90.


\begin{DoxyCode}
102   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{allocatable}    :: g\_x(:)
\end{DoxyCode}
\mbox{\Hypertarget{namespaceae__module_a415b7681bdd5824affa2e8d5d6c9643b}\label{namespaceae__module_a415b7681bdd5824affa2e8d5d6c9643b}} 
\index{ae\+\_\+module@{ae\+\_\+module}!g\+\_\+x\+\_\+weight@{g\+\_\+x\+\_\+weight}}
\index{g\+\_\+x\+\_\+weight@{g\+\_\+x\+\_\+weight}!ae\+\_\+module@{ae\+\_\+module}}
\subsubsection{\texorpdfstring{g\+\_\+x\+\_\+weight}{g\_x\_weight}}
{\footnotesize\ttfamily real(dp), dimension(\+:), allocatable, save, public ae\+\_\+module\+::g\+\_\+x\+\_\+weight}



重み座標を格納した 1 次元配列. X方向の格子点の間隔が格納してある. 



Definition at line 104 of file ae\+\_\+module.\+f90.


\begin{DoxyCode}
104   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{allocatable}    :: g\_x\_weight(:)
\end{DoxyCode}
