<?xml version="1.0" encoding="UTF-8" ?>
<rss version="0.91">
  <channel>
    <title>すぐに忘れるからメモ</title>
    <description>PC使って便利なことをメモ</description>
    <link>https://sgws.blog.shinobi.jp/</link>
    <language>ja</language>
    <copyright>Copyright (C) NINJATOOLS ALL RIGHTS RESERVED.</copyright>

    <item>
      <title>DE積分　振動型積分　cos版</title>
      <description>\int_0^\infty f(x)\cos\omg x dx&lt;br /&gt;
f(x)=-exp(x)&lt;br /&gt;
&lt;br /&gt;
module exp_lib&lt;br /&gt;
  implicit none&lt;br /&gt;
  real(8) pi&lt;br /&gt;
&lt;br /&gt;
contains&lt;br /&gt;
&lt;br /&gt;
  subroutine calf(f,x)&lt;br /&gt;
    real(8),intent(in) :: x&lt;br /&gt;
    real(8),intent(out) :: f&lt;br /&gt;
    f=exp(-x)&lt;br /&gt;
  end subroutine calf&lt;br /&gt;
&lt;br /&gt;
  subroutine de2_int(sum,em,omg,n,calf)&lt;br /&gt;
    integer,intent(in) :: n&lt;br /&gt;
    real(8),intent(in) :: em,omg&lt;br /&gt;
    real(8),intent(out) :: sum&lt;br /&gt;
    real(8) h,t,e6,phi,dphi,x,f&lt;br /&gt;
    integer i&lt;br /&gt;
    h=pi/(em*omg)&lt;br /&gt;
    t=0.d0+h*0.5d0&lt;br /&gt;
!!$    e6=1.d0&lt;br /&gt;
!!$    phi=1.d0/6.d0&lt;br /&gt;
!!$    dphi=1.d0/2.d0&lt;br /&gt;
    e6=exp(-6.d0*sinh(t))&lt;br /&gt;
    phi=t/(1.d0-e6)&lt;br /&gt;
    dphi=(1.d0+(-6.d0*t*cosh(t)-1.d0)*e6)/(1.d0-e6)**2&lt;br /&gt;
    x=em*phi&lt;br /&gt;
    call calf(f,x)&lt;br /&gt;
    sum=sum+f*cos(omg*x)*dphi&lt;br /&gt;
    do i=1,n&lt;br /&gt;
       t=i*h+h*0.5d0&lt;br /&gt;
       e6=exp(-6.d0*sinh(t))&lt;br /&gt;
       phi=t/(1.d0-e6)&lt;br /&gt;
       dphi=(1.d0+(-6.d0*t*cosh(t)-1.d0)*e6)/(1.d0-e6)**2&lt;br /&gt;
       x=em*phi&lt;br /&gt;
       call calf(f,x)&lt;br /&gt;
       sum=sum+f*cos(omg*x)*dphi&lt;br /&gt;
       t=-t+h*0.5d0&lt;br /&gt;
       e6=exp(-6.d0*sinh(t))&lt;br /&gt;
       phi=t/(1.d0-e6)&lt;br /&gt;
       dphi=(1.d0+(-6.d0*t*cosh(t)-1.d0)*e6)/(1.d0-e6)**2&lt;br /&gt;
       x=em*phi&lt;br /&gt;
       call calf(f,x)&lt;br /&gt;
       sum=sum+f*cos(omg*x)*dphi&lt;br /&gt;
    end do&lt;br /&gt;
    sum=sum*em*h&lt;br /&gt;
  end subroutine de2_int&lt;br /&gt;
&lt;br /&gt;
end module exp_lib&lt;br /&gt;
&lt;br /&gt;
program exp&lt;br /&gt;
  use exp_lib&lt;br /&gt;
  implicit none&lt;br /&gt;
  external calf&lt;br /&gt;
  integer n&lt;br /&gt;
  real(8) em,omg,sum&lt;br /&gt;
  pi=acos(-1.d0)&lt;br /&gt;
  sum=0.d0&lt;br /&gt;
  em=100.d0&lt;br /&gt;
  omg=1.d0&lt;br /&gt;
  n=75&lt;br /&gt;
  call de2_int(sum,em,omg,n,calf)&lt;br /&gt;
  write(*,*) sum&lt;br /&gt;
end program exp</description> 
      <link>https://sgws.blog.shinobi.jp/programing/de%E7%A9%8D%E5%88%86%E3%80%80%E6%8C%AF%E5%8B%95%E5%9E%8B%E7%A9%8D%E5%88%86%E3%80%80cos%E7%89%88</link> 
    </item>
    <item>
      <title>DE積分　オイラーの定数</title>
      <description>Fortranを使って振動型の積分&lt;br /&gt;
\int_0^\infty f(x)\sim\omg x dx&lt;br /&gt;
hが刻み幅&lt;br /&gt;
nは打ち切る項数&lt;br /&gt;
omgは周期&lt;br /&gt;
Mはhとomgから決まる数&lt;br /&gt;
詳しくは数値解析、森正武、共立出版p214&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
module euler_lib&lt;br /&gt;
  implicit none&lt;br /&gt;
  real(8) pi&lt;br /&gt;
&lt;br /&gt;
contains&lt;br /&gt;
&lt;br /&gt;
  subroutine calf(f,x)&lt;br /&gt;
    real(8),intent(in) :: x&lt;br /&gt;
    real(8),intent(out) :: f&lt;br /&gt;
    if(x == 0.d0) then&lt;br /&gt;
       f=0.d0&lt;br /&gt;
    else&lt;br /&gt;
       f=log(x)&lt;br /&gt;
    end if&lt;br /&gt;
  end subroutine calf&lt;br /&gt;
&lt;br /&gt;
  subroutine de_int(sum,em,omg,n,calf)&lt;br /&gt;
    integer,intent(in) :: n&lt;br /&gt;
    real(8),intent(in) :: em,omg&lt;br /&gt;
    real(8),intent(out) :: sum&lt;br /&gt;
    real(8) h,t,e6,phi,dphi,x,f&lt;br /&gt;
    integer i&lt;br /&gt;
    h=pi/(em*omg)&lt;br /&gt;
    t=0.d0&lt;br /&gt;
    e6=1.d0&lt;br /&gt;
    phi=1.d0/6.d0&lt;br /&gt;
    dphi=1.d0/2.d0&lt;br /&gt;
    x=em*phi&lt;br /&gt;
    call calf(f,x)&lt;br /&gt;
    sum=sum+f*sin(omg*x)*dphi&lt;br /&gt;
    do i=1,n&lt;br /&gt;
       t=i*h&lt;br /&gt;
       e6=exp(-6.d0*sinh(t))&lt;br /&gt;
       phi=t/(1.d0-e6)&lt;br /&gt;
       dphi=(1.d0+(-6.d0*t*cosh(t)-1.d0)*e6)/(1.d0-e6)**2&lt;br /&gt;
       x=em*phi&lt;br /&gt;
       call calf(f,x)&lt;br /&gt;
       sum=sum+f*sin(omg*x)*dphi&lt;br /&gt;
       t=-t&lt;br /&gt;
       e6=exp(-6.d0*sinh(t))&lt;br /&gt;
       phi=t/(1.d0-e6)&lt;br /&gt;
       dphi=(1.d0+(-6.d0*t*cosh(t)-1.d0)*e6)/(1.d0-e6)**2&lt;br /&gt;
       x=em*phi&lt;br /&gt;
       call calf(f,x)&lt;br /&gt;
       sum=sum+f*sin(omg*x)*dphi&lt;br /&gt;
    end do&lt;br /&gt;
    sum=sum*em*h&lt;br /&gt;
  end subroutine de_int&lt;br /&gt;
&lt;br /&gt;
end module euler_lib&lt;br /&gt;
&lt;br /&gt;
program euler&lt;br /&gt;
  use euler_lib&lt;br /&gt;
  implicit none&lt;br /&gt;
  external calf&lt;br /&gt;
  integer n&lt;br /&gt;
  real(8) em,omg,sum&lt;br /&gt;
  pi=acos(-1.d0)&lt;br /&gt;
  sum=0.d0&lt;br /&gt;
  em=50.d0&lt;br /&gt;
  omg=1.d0&lt;br /&gt;
  n=75&lt;br /&gt;
  call de_int(sum,em,omg,n,calf)&lt;br /&gt;
  write(*,*) sum&lt;br /&gt;
end program euler</description> 
      <link>https://sgws.blog.shinobi.jp/programing/de%E7%A9%8D%E5%88%86%E3%80%80%E3%82%AA%E3%82%A4%E3%83%A9%E3%83%BC%E3%81%AE%E5%AE%9A%E6%95%B0</link> 
    </item>
    <item>
      <title>円孔1/4対称、四角形メッシュ</title>
      <description>&lt;a href=&quot;http://file.sgws.blog.shinobi.jp/a3.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://file.sgws.blog.shinobi.jp/Img/1225935931/&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
トンネルのようなモデル&lt;br /&gt;
赤はGUIで操作した部分&lt;br /&gt;
emacsで編集、GUIで編集を繰り返して作成&lt;br /&gt;
&lt;br /&gt;
l = 2 ;&lt;br /&gt;
&lt;br /&gt;
Point(10) = {0, 0, 0, l};&lt;br /&gt;
Point(20) = {1, 0,  0, l} ;&lt;br /&gt;
Point(30) = {0, 1, 0, l} ;&lt;br /&gt;
Point(40) = {2, 0, 0, l} ;&lt;br /&gt;
Point(50) = {0, 2, 0, l} ;&lt;br /&gt;
Point(60) = {Sin(Pi/4),Sin(Pi/4),0,l} ;&lt;br /&gt;
Point(70) = {2*Sin(Pi/4),2*Sin(Pi/4),0,l} ;&lt;br /&gt;
Point(100)={3, 0, 0, l} ;&lt;br /&gt;
Point(110)={3, 3, 0, l} ;&lt;br /&gt;
Point(120)={0, 3, 0, l} ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color:#FF0000&quot;&gt;Circle(1) = {20,10,60};&lt;br /&gt;
Circle(2) = {60,10,30};&lt;br /&gt;
Circle(3) = {40,10,70};&lt;br /&gt;
Circle(4) = {70,10,50};&lt;br /&gt;
Line(5) = {20,40};&lt;br /&gt;
Line(6) = {40,100};&lt;br /&gt;
Line(7) = {100,110};&lt;br /&gt;
Line(8) = {110,120};&lt;br /&gt;
Line(9) = {120,50};&lt;br /&gt;
Line(10) = {50,30};&lt;br /&gt;
Line(11) = {60,70};&lt;br /&gt;
Line(12) = {70,110};&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
Transfinite Line{1,3,2,4,8,7}=5+1;&lt;br /&gt;
Transfinite Line{5,11,10}=2+1;&lt;br /&gt;
Transfinite Line{6,12,9}=4+1;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color:#FF0000&quot;&gt;Line Loop(13) = {1,11,-3,-5};&lt;br /&gt;
Plane Surface(14) = {13};&lt;/span&gt;&lt;br /&gt;
Transfinite Surface{14}={20,40,70,60};&lt;br /&gt;
Recombine Surface{14};&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color:#FF0000&quot;&gt;Line Loop(15) = {2,-10,-4,-11};&lt;br /&gt;
Plane Surface(16) = {15};&lt;/span&gt;&lt;br /&gt;
Transfinite Surface{16}={60,70,50,30};&lt;br /&gt;
Recombine Surface{16};&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color:#FF0000&quot;&gt;Line Loop(17) = {12,8,9,-4};&lt;br /&gt;
Plane Surface(18) = {17};&lt;/span&gt;&lt;br /&gt;
Transfinite Surface{18}={70,50,120,110};&lt;br /&gt;
Recombine Surface{18};&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color:#FF0000&quot;&gt;Line Loop(19) = {7,-12,-3,6};&lt;br /&gt;
Plane Surface(20) = {19};&lt;/span&gt;&lt;br /&gt;
Transfinite Surface{20}={40,100,110,70};&lt;br /&gt;
Recombine Surface{20};&lt;br /&gt;
&lt;span style=&quot;color:#FF0000&quot;&gt;&lt;br /&gt;
Physical Surface(21) = {20,14,16,18};&lt;/span&gt;&lt;br /&gt;
</description> 
      <link>https://sgws.blog.shinobi.jp/gmsh/%E5%86%86%E5%AD%941-4%E5%AF%BE%E7%A7%B0%E3%80%81%E5%9B%9B%E8%A7%92%E5%BD%A2%E3%83%A1%E3%83%83%E3%82%B7%E3%83%A5</link> 
    </item>
    <item>
      <title>バームクーヘンを四角形要素で</title>
      <description>&lt;a href=&quot;http://file.sgws.blog.shinobi.jp/a2.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://file.sgws.blog.shinobi.jp/Img/1225976810/&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
l = 2 ;&lt;br /&gt;
&lt;br /&gt;
Point(1) = {0, 0, 0, l};&lt;br /&gt;
Point(2) = {1, 0,  0, l} ;&lt;br /&gt;
Point(3) = {0, 1, 0, l} ;&lt;br /&gt;
Point(4) = {2, 0, 0, l} ;&lt;br /&gt;
Point(5) = {0, 2, 0, l} ;&lt;br /&gt;
&lt;br /&gt;
Circle(1001)={2,1,3};&lt;br /&gt;
Circle(1002)={5,1,4};&lt;br /&gt;
Line(1003)={4,2};&lt;br /&gt;
Line(1004)={3,5};&lt;br /&gt;
&lt;br /&gt;
Line Loop(1101)={1001,1004,1002,1003};&lt;br /&gt;
Plane Surface(2001)={1101};&lt;br /&gt;
&lt;br /&gt;
Transfinite Line{1001,1002}=11;&lt;br /&gt;
Transfinite Line{1003,1004}=3;&lt;br /&gt;
Transfinite Surface{2001}={2,3,5,4};&lt;br /&gt;
Recombine Surface {2001};&lt;br /&gt;
&lt;br /&gt;
MySurface = 100;&lt;br /&gt;
Physical Surface(MySurface) = {3001} ;&lt;br /&gt;
</description> 
      <link>https://sgws.blog.shinobi.jp/gmsh/%E3%83%90%E3%83%BC%E3%83%A0%E3%82%AF%E3%83%BC%E3%83%98%E3%83%B3%E3%82%92%E5%9B%9B%E8%A7%92%E5%BD%A2%E8%A6%81%E7%B4%A0%E3%81%A7</link> 
    </item>
    <item>
      <title>正方形を四角形要素で分割</title>
      <description>&lt;a href=&quot;http://file.sgws.blog.shinobi.jp/a1.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://file.sgws.blog.shinobi.jp/Img/1225930887/&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
l = 2 ;&lt;br /&gt;
&lt;br /&gt;
Point(1) = {0, 0, 0, l};&lt;br /&gt;
Point(2) = {1, 0,  0, l} ;&lt;br /&gt;
Point(3) = {1, 1, 0, l} ;&lt;br /&gt;
Point(4) = {0, 1, 0, l} ;&lt;br /&gt;
&lt;br /&gt;
Line(11) = {1,2} ;&lt;br /&gt;
Line(12) = {2,3} ;&lt;br /&gt;
Line(13) = {3,4} ;&lt;br /&gt;
Line(14) = {4,1} ;&lt;br /&gt;
&lt;br /&gt;
Line Loop(5) = {11,12,13,14} ;&lt;br /&gt;
&lt;br /&gt;
Plane Surface(6) = {-5} ;&lt;br /&gt;
Transfinite Line{11,12,13,14}=10;&lt;br /&gt;
Transfinite Surface{6}={1,2,3,4};&lt;br /&gt;
Recombine Surface {6};&lt;br /&gt;
&lt;br /&gt;
// Consequently, two punctual elements will be saved in the output&lt;br /&gt;
// files, both with the region number 1. The mechanism is identical&lt;br /&gt;
// for line or surface elements:&lt;br /&gt;
&lt;br /&gt;
// Physical Line(10) = {1,2,4} ;&lt;br /&gt;
&lt;br /&gt;
MySurface = 100;&lt;br /&gt;
Physical Surface(MySurface) = {6} ;&lt;br /&gt;
&lt;br /&gt;
</description> 
      <link>https://sgws.blog.shinobi.jp/gmsh/%E6%AD%A3%E6%96%B9%E5%BD%A2%E3%82%92%E5%9B%9B%E8%A7%92%E5%BD%A2%E8%A6%81%E7%B4%A0%E3%81%A7%E5%88%86%E5%89%B2</link> 
    </item>
    <item>
      <title>vineでdvipdfmxのエラー</title>
      <description>dvipdfmx wakate.tex&lt;br /&gt;
wakate.tex.dvi -&gt; wakate.tex.pdf&lt;br /&gt;
&lt;br /&gt;
** ERROR ** Could not open specified DVI file: wakate.tex.dvi&lt;br /&gt;
&lt;br /&gt;
Output file removed.&lt;br /&gt;
localhost% dvipdfmx wakate&lt;br /&gt;
wakate.dvi -&gt; wakate.pdf&lt;br /&gt;
[1kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 uzdr&lt;br /&gt;
mktexpk: don't know how to create bitmap font for uzdr.&lt;br /&gt;
kpathsea: Appending font creation commands to missfont.log.&lt;br /&gt;
&lt;br /&gt;
** WARNING ** Could not locate a virtual/physical font for TFM &quot;pzdr&quot;.&lt;br /&gt;
** WARNING ** &gt;&gt; This font is mapped to a physical font &quot;uzdr&quot;.&lt;br /&gt;
** WARNING ** &gt;&gt; Please check if kpathsea library can find this font: uzdr&lt;br /&gt;
** ERROR ** Cannot proceed without .vf or &quot;physical&quot; font for PDF output...&lt;br /&gt;
&lt;br /&gt;
Output file removed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
apt-get install task-tetex&lt;br /&gt;
で解決</description> 
      <link>https://sgws.blog.shinobi.jp/latex/vine%E3%81%A7dvipdfmx%E3%81%AE%E3%82%A8%E3%83%A9%E3%83%BC</link> 
    </item>
    <item>
      <title>nautilus デスクトップの変更無しモード</title>
      <description>nautilus --no-desktop&lt;br /&gt;
でOK。&lt;br /&gt;
Fluxboxなんか使ってて、そのままnatuilus使うと壁紙が変わってまいます。&lt;br /&gt;
ちなみに読みはノーティラスらしい</description> 
      <link>https://sgws.blog.shinobi.jp/linux/nautilus%20%E3%83%87%E3%82%B9%E3%82%AF%E3%83%88%E3%83%83%E3%83%97%E3%81%AE%E5%A4%89%E6%9B%B4%E7%84%A1%E3%81%97%E3%83%A2%E3%83%BC%E3%83%89</link> 
    </item>
    <item>
      <title>ホームディレクトリの下にスタイルファイル</title>
      <description>.zshrcにTEXINPUTSという環境変数を設定する。&lt;br /&gt;
&lt;br /&gt;
export TEXINPUTS=.:~/mytexfile:&lt;br /&gt;
&lt;br /&gt;
これで、mytexfileの下にあるファイルにも目を通してくれる。&lt;br /&gt;
</description> 
      <link>https://sgws.blog.shinobi.jp/latex/%E3%83%9B%E3%83%BC%E3%83%A0%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AE%E4%B8%8B%E3%81%AB%E3%82%B9%E3%82%BF%E3%82%A4%E3%83%AB%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB</link> 
    </item>
    <item>
      <title>NTEmacs</title>
      <description>http://ntemacsjp.sourceforge.jp/matsuan/IndexJp.html&lt;br /&gt;
からntemacsをダウンロード。&lt;br /&gt;
環境変数HOMEをC:\homeに設定。&lt;br /&gt;
&lt;br /&gt;
ホームディレクトリに.emacsなるものをつくり、&lt;br /&gt;
http://homepage3.nifty.com/y3tk/emacs.html&lt;br /&gt;
にある設定ファイルをコピー＆ペースト。</description> 
      <link>https://sgws.blog.shinobi.jp/windows/ntemacs</link> 
    </item>
    <item>
      <title>maximaのインストール</title>
      <description>普通はパッケージがあると思うので、apt-get からでOK.&lt;br /&gt;
&lt;br /&gt;
最新版をインストールしたいときは&lt;br /&gt;
http://maxima.sourceforge.net/&lt;br /&gt;
からダウンロード。&lt;br /&gt;
私のVineには&lt;br /&gt;
maxima-5.16.3-1.centos4.i386.rpm  &lt;br /&gt;
maxima-exec-clisp-5.16.3-1.centos4.i386.rpm&lt;br /&gt;
maxima-xmaxima-5.16.3-1.centos4.i386.rpm &lt;br /&gt;
をインストール。&lt;br /&gt;
&lt;br /&gt;
sudo mkdir maxima&lt;br /&gt;
ダウンロード&lt;br /&gt;
sudo rpm -ihv maxima-*-rpm</description> 
      <link>https://sgws.blog.shinobi.jp/linux/maxima%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB</link> 
    </item>

  </channel>
</rss>