\hypertarget{interfaceut__mpi__module_1_1ut__torboundaries}{}\doxysection{ut\+\_\+mpi\+\_\+module\+::ut\+\_\+torboundaries Interface Reference}
\label{interfaceut__mpi__module_1_1ut__torboundaries}\index{ut\_mpi\_module::ut\_torboundaries@{ut\_mpi\_module::ut\_torboundaries}}
\doxysubsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfaceut__mpi__module_1_1ut__torboundaries_a7ea6bdd16c5d5e4dc55ca1bb9c99456e}{ut\+\_\+torboundariestau}} (ut\+\_\+\+T\+O\+R\+P\+OT, values, cond, new)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


Definition at line 435 of file ut\+\_\+mpi\+\_\+module.\+f90.



\doxysubsection{Member Function/\+Subroutine Documentation}
\mbox{\Hypertarget{interfaceut__mpi__module_1_1ut__torboundaries_a7ea6bdd16c5d5e4dc55ca1bb9c99456e}\label{interfaceut__mpi__module_1_1ut__torboundaries_a7ea6bdd16c5d5e4dc55ca1bb9c99456e}} 
\index{ut\_mpi\_module::ut\_torboundaries@{ut\_mpi\_module::ut\_torboundaries}!ut\_torboundariestau@{ut\_torboundariestau}}
\index{ut\_torboundariestau@{ut\_torboundariestau}!ut\_mpi\_module::ut\_torboundaries@{ut\_mpi\_module::ut\_torboundaries}}
\doxysubsubsection{\texorpdfstring{ut\_torboundariestau()}{ut\_torboundariestau()}}
{\footnotesize\ttfamily subroutine ut\+\_\+mpi\+\_\+module\+::ut\+\_\+torboundaries\+::ut\+\_\+torboundariestau (\begin{DoxyParamCaption}\item[{real(dp), dimension(nmc,0\+:\mbox{\hyperlink{namespaceut__mpi__module_a24756c76cd950e046fe1188ccbf151d4}{lm}}), intent(inout)}]{ut\+\_\+\+T\+O\+R\+P\+OT,  }\item[{real(dp), dimension(nmc,2), intent(in), optional}]{values,  }\item[{character(len=2), intent(in), optional}]{cond,  }\item[{logical, intent(in), optional}]{new }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 2459 of file ut\+\_\+mpi\+\_\+module.\+f90.


\begin{DoxyCode}{0}
\DoxyCodeLine{2459       \textcolor{comment}{!}}
\DoxyCodeLine{2460       \textcolor{comment}{! 速度トロイダルポテンシャルに対して境界条件を適用する.}}
\DoxyCodeLine{2461       \textcolor{comment}{! Chebyshev 空間での境界条件適用.}}
\DoxyCodeLine{2462       \textcolor{comment}{!}}
\DoxyCodeLine{2463       \textcolor{comment}{! 速度トロイダルポテンシャルΨに対して与えられる境界条件は}}
\DoxyCodeLine{2464       \textcolor{comment}{!}}
\DoxyCodeLine{2465       \textcolor{comment}{!   * 粘着条件 : Ψ = Ψb(lon,lat). Ψb は境界球面での速度分布.}}
\DoxyCodeLine{2466       \textcolor{comment}{!                                   default は 0(静止状態).}}
\DoxyCodeLine{2467       \textcolor{comment}{!}}
\DoxyCodeLine{2468       \textcolor{comment}{!   * 応力なし条件 : ∂(Ψ/r)/∂r = 0.}}
\DoxyCodeLine{2469       \textcolor{comment}{!}}
\DoxyCodeLine{2470       \textcolor{comment}{! 最初に呼ばれるときはオプショナル引数 new に関係なく行列が設定される.}}
\DoxyCodeLine{2471       \textcolor{comment}{!}}
\DoxyCodeLine{2472 \textcolor{keywordtype}{      real}(DP), \textcolor{keywordtype}{dimension(nmc,0:lm)},\textcolor{keywordtype}{intent(inout)}      :: ut\_TORPOT}
\DoxyCodeLine{2473               \textcolor{comment}{!(inout) 境界条件を適用するデータ. 修正された値を返す.}}
\DoxyCodeLine{2474 }
\DoxyCodeLine{2475 \textcolor{keywordtype}{      real}(DP), \textcolor{keywordtype}{dimension(nmc,2)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional} :: values}
\DoxyCodeLine{2476               \textcolor{comment}{!(in) 両端境界でのトロイダルポテンシャル}}
\DoxyCodeLine{2477               \textcolor{comment}{!     粘着条件の時のみ有効}}
\DoxyCodeLine{2478 }
\DoxyCodeLine{2479       \textcolor{keywordtype}{character(len=2)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}  :: cond}
\DoxyCodeLine{2480               \textcolor{comment}{!(in) 境界条件スイッチ. 省略時は 'RR'}}
\DoxyCodeLine{2481               \textcolor{comment}{!     RR    : 両端粘着条件}}
\DoxyCodeLine{2482               \textcolor{comment}{!     RF    : 上端粘着, 下端応力なし条件}}
\DoxyCodeLine{2483               \textcolor{comment}{!     FR    : 上端応力なし, 下端粘着条件}}
\DoxyCodeLine{2484               \textcolor{comment}{!     FF    : 両端応力なし条件}}
\DoxyCodeLine{2485 }
\DoxyCodeLine{2486       \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(IN)}, \textcolor{keywordtype}{optional} :: new}
\DoxyCodeLine{2487               \textcolor{comment}{!(in) true だと境界条件計算用行列を強制的に新たに作る.}}
\DoxyCodeLine{2488               \textcolor{comment}{!     default は false.}}
\DoxyCodeLine{2489 }
\DoxyCodeLine{2490 \textcolor{keywordtype}{      real}(DP), \textcolor{keywordtype}{dimension(:,:)}, \textcolor{keywordtype}{allocatable}  :: alu}
\DoxyCodeLine{2491       \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{dimension(:)}, \textcolor{keywordtype}{allocatable}    :: kp}
\DoxyCodeLine{2492 \textcolor{keywordtype}{      real}(DP), \textcolor{keywordtype}{dimension(0:lm)}              :: t\_data}
\DoxyCodeLine{2493 \textcolor{keywordtype}{      real}(DP), \textcolor{keywordtype}{dimension(0:km)}              :: z\_data}
\DoxyCodeLine{2494       \textcolor{keywordtype}{logical}                               :: rigid1=.true.   \textcolor{comment}{! 境界条件}}
\DoxyCodeLine{2495       \textcolor{keywordtype}{logical}                               :: rigid2=.true.   \textcolor{comment}{! 境界条件}}
\DoxyCodeLine{2496 }
\DoxyCodeLine{2497       \textcolor{keywordtype}{logical} :: first = .true.}
\DoxyCodeLine{2498       \textcolor{keywordtype}{logical} :: new\_matrix = .false.}
\DoxyCodeLine{2499       \textcolor{keywordtype}{integer} :: l}
\DoxyCodeLine{2500       \textcolor{keywordtype}{save}    :: alu, kp, first}
\DoxyCodeLine{2501 }
\DoxyCodeLine{2502       \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{present}(cond)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{2503          rigid1=.true. ; rigid2=.true.}
\DoxyCodeLine{2504       \textcolor{keywordflow}{else}}
\DoxyCodeLine{2505          \textcolor{keywordflow}{select case} (cond)}
\DoxyCodeLine{2506          \textcolor{keywordflow}{case} (\textcolor{stringliteral}{'RR'})}
\DoxyCodeLine{2507             rigid1 = .true.  ; rigid2 = .true.}
\DoxyCodeLine{2508          \textcolor{keywordflow}{case} (\textcolor{stringliteral}{'RF'})}
\DoxyCodeLine{2509             rigid1 = .true.  ; rigid2 = .false.}
\DoxyCodeLine{2510          \textcolor{keywordflow}{case} (\textcolor{stringliteral}{'FR'})}
\DoxyCodeLine{2511             rigid1 = .false. ; rigid2 = .true.}
\DoxyCodeLine{2512          \textcolor{keywordflow}{case} (\textcolor{stringliteral}{'FF'})}
\DoxyCodeLine{2513             rigid1 = .false. ; rigid2 = .false.}
\DoxyCodeLine{2514 \textcolor{keywordflow}{         case default}}
\DoxyCodeLine{2515             \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'E'},\textcolor{stringliteral}{'ut\_TorBoundariesTau'},\textcolor{stringliteral}{'B.C. not supported'})}
\DoxyCodeLine{2516 \textcolor{keywordflow}{         end select}}
\DoxyCodeLine{2517 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{2518 }
\DoxyCodeLine{2519       \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{present}(new)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{2520          new\_matrix=.false.}
\DoxyCodeLine{2521       \textcolor{keywordflow}{else}}
\DoxyCodeLine{2522          new\_matrix=new}
\DoxyCodeLine{2523 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{2524 }
\DoxyCodeLine{2525       \textcolor{keywordflow}{if} ( first .OR. new\_matrix ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{2526          first = .false.}
\DoxyCodeLine{2527 }
\DoxyCodeLine{2528          \textcolor{keywordflow}{if} ( \textcolor{keyword}{allocated}(alu) ) \textcolor{keyword}{deallocate}(alu)}
\DoxyCodeLine{2529          \textcolor{keywordflow}{if} ( \textcolor{keyword}{allocated}(kp) ) \textcolor{keyword}{deallocate}(kp)}
\DoxyCodeLine{2530          \textcolor{keyword}{allocate}(alu(0:lm,0:lm),kp(0:lm))}
\DoxyCodeLine{2531 }
\DoxyCodeLine{2532          \textcolor{keywordflow}{do} l=0,lm}
\DoxyCodeLine{2533             t\_data = 0.0d0 ; t\_data(l) = 1.0d0}
\DoxyCodeLine{2534             alu(:,l) = t\_data}
\DoxyCodeLine{2535 }
\DoxyCodeLine{2536             \textcolor{comment}{! 力学的条件粘着条件}}
\DoxyCodeLine{2537             \textcolor{keywordflow}{if} ( rigid1 ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{2538                z\_data = z\_t(t\_data)}
\DoxyCodeLine{2539             \textcolor{keywordflow}{else}}
\DoxyCodeLine{2540                z\_data = z\_t(t\_dr\_t(t\_z(z\_t(t\_data)/z\_rad)))}
\DoxyCodeLine{2541 \textcolor{keywordflow}{            endif}}
\DoxyCodeLine{2542             alu(lm-\/1,l) = z\_data(0)       \textcolor{comment}{! 境界 k=0 での条件式代入}}
\DoxyCodeLine{2543 }
\DoxyCodeLine{2544             \textcolor{keywordflow}{if} ( rigid2 ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{2545                z\_data = z\_t(t\_data)}
\DoxyCodeLine{2546             \textcolor{keywordflow}{else}}
\DoxyCodeLine{2547                z\_data = z\_t(t\_dr\_t(t\_z(z\_t(t\_data)/z\_rad)))}
\DoxyCodeLine{2548 \textcolor{keywordflow}{            endif}}
\DoxyCodeLine{2549             alu(lm,l)   = z\_data(km)      \textcolor{comment}{! 境界 k=km での条件式代入}}
\DoxyCodeLine{2550 \textcolor{keywordflow}{         enddo}}
\DoxyCodeLine{2551 }
\DoxyCodeLine{2552          \textcolor{keyword}{call }ludecomp(alu,kp)}
\DoxyCodeLine{2553 }
\DoxyCodeLine{2554          \textcolor{keywordflow}{if} ( rigid1 .AND. \textcolor{keyword}{present}(values) ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{2555             \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'M'},\textcolor{stringliteral}{'ut\_TorBoundariesTau'},\&}
\DoxyCodeLine{2556                  \textcolor{stringliteral}{'Toroidal potential at k=0 was given by the optional variable.'})}
\DoxyCodeLine{2557          \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ( rigid1 .AND. (.NOT.\textcolor{keyword}{present}(values)) ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{2558             \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'M'},\textcolor{stringliteral}{'ut\_TorBoundariesTau'},\&}
\DoxyCodeLine{2559                  \textcolor{stringliteral}{'Toroidal potential at k=0 was set to zero.'})}
\DoxyCodeLine{2560          \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ( (.NOT. rigid1) .AND. \textcolor{keyword}{present}(values) ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{2561             \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'W'},\textcolor{stringliteral}{'ut\_TorBoundariesTau'},\&}
\DoxyCodeLine{2562                  \textcolor{stringliteral}{'Boundary value k=0 cannot be set under stress-\/free condition.'})}
\DoxyCodeLine{2563 \textcolor{keywordflow}{         endif}}
\DoxyCodeLine{2564 }
\DoxyCodeLine{2565          \textcolor{keywordflow}{if} ( rigid2 .AND. \textcolor{keyword}{present}(values) ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{2566             \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'M'},\textcolor{stringliteral}{'ut\_TorBoundariesTau'},\&}
\DoxyCodeLine{2567                  \textcolor{stringliteral}{'Toroidal potential at k=0 was given by the optional variable.'})}
\DoxyCodeLine{2568          \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ( rigid2 .AND. (.NOT.\textcolor{keyword}{present}(values)) ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{2569             \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'M'},\textcolor{stringliteral}{'ut\_TorBoundariesTau'},\&}
\DoxyCodeLine{2570                  \textcolor{stringliteral}{'Toroidal potential at k=0 was set to zero.'})}
\DoxyCodeLine{2571          \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ( (.NOT. rigid2) .AND. \textcolor{keyword}{present}(values) ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{2572             \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'W'},\textcolor{stringliteral}{'ut\_TorBoundariesTau'},\&}
\DoxyCodeLine{2573                  \textcolor{stringliteral}{'Boundary value k=0 cannot be set under stress-\/free condition.'})}
\DoxyCodeLine{2574 \textcolor{keywordflow}{         endif}}
\DoxyCodeLine{2575 }
\DoxyCodeLine{2576          \textcolor{keyword}{call }messagenotify(\textcolor{stringliteral}{'M'},\textcolor{stringliteral}{'ut\_TorBoundariesTau'},\&}
\DoxyCodeLine{2577                            \textcolor{stringliteral}{'Matrix to apply  b.c. newly produced.'})}
\DoxyCodeLine{2578 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{2579 }
\DoxyCodeLine{2580       \textcolor{keywordflow}{if} ( rigid1 .AND. \textcolor{keyword}{present}(values) ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{2581          ut\_torpot(:,lm-\/1) = values(:,1)}
\DoxyCodeLine{2582       \textcolor{keywordflow}{else}}
\DoxyCodeLine{2583          ut\_torpot(:,lm-\/1) = 0.0d0}
\DoxyCodeLine{2584 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{2585       \textcolor{keywordflow}{if} ( rigid2 .AND. \textcolor{keyword}{present}(values) ) \textcolor{keywordflow}{then}}
\DoxyCodeLine{2586          ut\_torpot(:,lm)   = values(:,2)}
\DoxyCodeLine{2587       \textcolor{keywordflow}{else}}
\DoxyCodeLine{2588          ut\_torpot(:,lm) = 0.0d0}
\DoxyCodeLine{2589 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{2590 }
\DoxyCodeLine{2591       ut\_torpot = lusolve(alu,kp,ut\_torpot)}
\DoxyCodeLine{2592 }

\end{DoxyCode}


The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
ut\+\_\+mpi\+\_\+module/\mbox{\hyperlink{ut__mpi__module_8f90}{ut\+\_\+mpi\+\_\+module.\+f90}}\end{DoxyCompactItemize}
