LoginSignup
0
1

More than 1 year has passed since last update.

計算物理学 Rubin H. Landau docker内 script

Last updated at Posted at 2019-08-07

計算物理学 Rubin H. Landau 参考文献・docker登録
https://qiita.com/kaizen_nagoya/items/af924f5ac71ff5cc8c89

で作ったscriptの説明。

<この項は書きかけです。順次追記します。>

mkall.sh
#!/bin/bash
mkdir cp
cd cp
mkdir PythonCodes
mkdir HPCodes
mkdir Animations
cd PythonCodes
mkdir Complex
mkdir Fractals
mkdir MatPlotLibCodes
mkdir VisualCodes
mkdir Visualizations
mkdir VPythonCodes
cd ../Animations
mkdir Fractals
mkdir Utilities
mkdir Waves
cd ../..
cp url0.txt cp/PythonCodes/urllist.txt
cp url1.txt cp/HPCodes/urllist.txt
cp url2.txt cp/Animation/urllist.txt
cp url3.txt cp/PythonCodes/Complex/urllist.txt
cp url4.txt cp/PythonCodes/Fractals/urllist.txt
cp url5.txt cp/PythonCodes/Visualizations/urllist.txt
cp url6.txt cp/Animations/Fractals/urllist.txt
cp url7.txt cp/Animations/Utilitie/urllist.txt
cd  cp/PythonCodes
../../wgeturl.sh
cd  ../HPCodes
../../wgeturl.sh
cd  ../Animation
../../wgeturl.sh
cd ../PythonCodes/Complex
../../../wgeturl.sh
cd ..//Fractals
../../../wgeturl.sh
cd  ../Visualizations
../../../wgeturl.sh
cd  ../../Animations/Fractals
../../../wgeturl.sh
cd  ../Utilitie
../../../wgeturl.sh

手作り感満載。上記で使っているscriptは下記。

wgeturl.sh
#!/bin/bash
while read line
do
  wget https://physics.oregonstate.edu/~landaur/Books/CPbook/Codes/$line
done < ./urllist.txt

全部docker fileでやってもいいんですが、、、

url0.txt
PythonCodes/A.dat
PythonCodes/ABM.py
PythonCodes/Accm2D.dat
PythonCodes/Accm2D.py
PythonCodes/AdvecLax.py
PythonCodes/Area.py
PythonCodes/aREADME.txt
PythonCodes/AreaFormatted.py
PythonCodes/AreaFormattedP2.py
PythonCodes/AreaFormattedP3.py
PythonCodes/AreaScanner.py
PythonCodes/Beam.py
PythonCodes/BeamContour.py
PythonCodes/Bessel.py
PythonCodes/Bessel_version2.py
PythonCodes/Bisection.py
PythonCodes/Bound.py
PythonCodes/Bugs.py
PythonCodes/CircPolarztn.py
PythonCodes/Clean.bat
PythonCodes/CommandLineArgs.py
PythonCodes/CWT.py
PythonCodes/decaimiento.py
PythonCodes/Decay.py
PythonCodes/DecaySound.py
PythonCodes/DFTassesment.py
PythonCodes/DFTcomplex.py
PythonCodes/DFTreal.py
PythonCodes/Directives.py
PythonCodes/Directives_version2.py
PythonCodes/DWT.py
PythonCodes/Eigen.py
PythonCodes/Eigen31jan14.py
PythonCodes/Entropy.py
PythonCodes/EqHeat.py
PythonCodes/EqHeatAnimate.py
PythonCodes/EqHeat_Mayavi.py
PythonCodes/EqStringAnimate.py
PythonCodes/EqStringAnimateMatPlot.py
PythonCodes/FDTD.py
PythonCodes/FFT.py
PythonCodes/FFTappl.py
PythonCodes/FileCatchThrow.py
PythonCodes/Fit.py
PythonCodes/Fit_.py
PythonCodes/FourierMatplot.py
PythonCodes/GameOfLife.py
PythonCodes/gauss.pyc
PythonCodes/HarmosAnimate.py
PythonCodes/HeatCNTridiag.py
PythonCodes/index.html
PythonCodes/index.php
PythonCodes/IntegGauss.py
PythonCodes/Ising.py
PythonCodes/IsingViz.py
PythonCodes/Lagrange.py
PythonCodes/LaplaceFEM.py
PythonCodes/LaplaceFEM_1D.py
PythonCodes/LaplaceFEM_1Dold.py
PythonCodes/LaplaceFEM_2D.py
PythonCodes/LaplaceLine.py
PythonCodes/Limits.py
PythonCodes/LyapLog.py
PythonCodes/Matrix.py
PythonCodes/MD1D.py
PythonCodes/MD2D.py
PythonCodes/Name.dat
PythonCodes/NewtonCD.py
PythonCodes/NewtonNDanimate.py
PythonCodes/NoiseSincFilter.py
PythonCodes/outfile2.dat
PythonCodes/PondMatPlot.py
PythonCodes/PredatorPrey.py
PythonCodes/ProjectileAir.py
PythonCodes/QMC.py
PythonCodes/QMCbouncer.py
PythonCodes/QuantumEigen.py
PythonCodes/QuantumNumerov.py
PythonCodes/Redirection.py
PythonCodes/rk4.py
PythonCodes/rk45.py
PythonCodes/Scatt.py
PythonCodes/Sierpin.py
PythonCodes/Soliton.py
PythonCodes/SolitonAnimate.py
PythonCodes/Spline.py
PythonCodes/SplineInteract.py
PythonCodes/ThrowCatch.dat
PythonCodes/Trap.py
PythonCodes/TrapMethods.py
PythonCodes/Tune.py
PythonCodes/Tune4.py
PythonCodes/TwoDsol.py
PythonCodes/Um2D.dat
PythonCodes/unimot1D.dat
PythonCodes/VCWTzd.py
PythonCodes/vonNeuman.py
PythonCodes/Walk.py
PythonCodes/Walk3D.py
PythonCodes/WangLandau.py
PythonCodes/Wave2D.py
PythonCodes/Waves2D.py
PythonCodes/Waves2Danal.py
PythonCodes/Waves2DanalMultiFram.py
PythonCodes/WavlD4Tr.py
url1.txt
HPCodes/index.php
HPCodes/laplace.c
HPCodes/laplace.f
HPCodes/MPIpi.c
HPCodes/MPIpiTrap.c
HPCodes/pi.c
HPCodes/poisson_1d.c
HPCodes/poisson_parallel_1d.c
HPCodes/pond.c
HPCodes/SumArraysCuda.py
HPCodes/SumArraysCuda2.py
HPCodes/tune.f90
HPCodes/Tune.java
HPCodes/Tune.py
HPCodes/tune1.f
HPCodes/tune2.f
HPCodes/tune3.f95
HPCodes/tune4.f95
HPCodes/Tune4.java
HPCodes/Tune4.py
HPCodes/TuneNumpy.py
url2.txt
Animations/VEqString_Animate_20Sept08.py
Animations/VHarmos_Animate_02Feb09.py
Animations/VHarmos_Animate_09Nov08.py
url3.txt
PythonCodes/Complex/ComplexDummy.py
PythonCodes/Complex/ComplexOverload.py
PythonCodes/Complex/ComplexSelf.py
PythonCodes/Complex/index.php
PythonCodes/Complex/KomplexPolar.py
PythonCodes/Complex/KomplexPolar.pyc
PythonCodes/Complex/KomplexPolarTest.py
url4.txt
PythonCodes/Fractals/Coastline.py
PythonCodes/Fractals/Column.py
PythonCodes/Fractals/Dla.py
PythonCodes/Fractals/Entropy.py
PythonCodes/Fractals/Fern.py
PythonCodes/Fractals/Fern3D.py
PythonCodes/Fractals/Gameoflife.py
PythonCodes/Fractals/index.php
PythonCodes/Fractals/LyapLog.py
PythonCodes/Fractals/Sierpin.py
PythonCodes/Fractals/Tree.py
PythonCodes/Fractals/tree2.py
url5.txt
PythonCodes/Visualizations/3Danimate.py
PythonCodes/Visualizations/3Dshapes.py
PythonCodes/Visualizations/3GraphVisual.py
PythonCodes/Visualizations/3GraphVisualMod.py
PythonCodes/Visualizations/EasyMatPlot.py
PythonCodes/Visualizations/EasyPlot.py
PythonCodes/Visualizations/EasyVisual.py
PythonCodes/Visualizations/EqHeatAnimate.py
PythonCodes/Visualizations/EqHeatAnimateMatPlot.py
PythonCodes/Visualizations/EqStringAnimateMatPlot.py
PythonCodes/Visualizations/FancyGraphs.py
PythonCodes/Visualizations/FourierMatplot.py
PythonCodes/Visualizations/FullGraph.py
PythonCodes/Visualizations/GnuplotDemo.py
PythonCodes/Visualizations/Grades.py
PythonCodes/Visualizations/GradesMatPlot.py
PythonCodes/Visualizations/HarmosAnimate.py
PythonCodes/Visualizations/HarmosAnimateMatPlot.py
PythonCodes/Visualizations/index.php
PythonCodes/Visualizations/MatPlot2figs.py
PythonCodes/Visualizations/MayaLines.py
PythonCodes/Visualizations/MayaYlm.py
PythonCodes/Visualizations/Points3D.py
PythonCodes/Visualizations/Scatter3dPlot.py
PythonCodes/Visualizations/Simple3Dplot.py
PythonCodes/Visualizations/SurfacePlot.py
PythonCodes/Visualizations/SurfacePlotMayavi.py
url6.txt
Animations/Fractals/FractalGrowth.mp4
Animations/Fractals/FractalGrowth.mpg
Animations/Fractals/index.php
Animations/Fractals/Islands.pov
Animations/Fractals/Islandssp.pov
Animations/Fractals/Thumbs.db
url7.txt
Animations/Utilitie/index.php
Animations/Utilitie/MakeGifs.script

課題

docker/ubuntu
# ./mkall.sh

...

--2019-08-08 06:57:04--  https://physics.oregonstate.edu/~landaur/Books/CPbook/Codes/PythonCodes/VisualCodes/SurfacePlotMayavi.py
Resolving physics.oregonstate.edu (physics.oregonstate.edu)... 128.193.206.171
Connecting to physics.oregonstate.edu (physics.oregonstate.edu)|128.193.206.171|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-08-08 06:57:04 ERROR 404: Not Found.

./mkall.sh: line 41: cd: ../Utilitie: No such file or directory

VisualCodes -> Visualizationsの誤植。
上記は修正済み

参考資料(reference)

【シェルスクリプト】ファイルの中身を一行ずつ読み込む方法
https://www.server-memo.net/shellscript/read-file.html

<この記事は個人の過去の経験に基づく個人の感想です。現在所属する組織、業務とは関係がありません。>

文献履歴(document history)

ver. 0.01 初稿 20190807
ver. 0.02 誤植訂正 20190808

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1