# Trabajo Práctico II de Análisis Numérico I
# Este programa resuelve un sistema de ecuaciones diferenciales
# resultante de un problema físico de oscilación de líquidos.
# Copyright (C) 2002 Leandro Lucarella
#
# Este programa es Software Libre; usted puede redistribuirlo
# y/o modificarlo bajo los términos de la "GNU General Public
# License" como lo publica la "FSF Free Software Foundation",
# o (a su elección) de cualquier versión posterior.
#
# Este programa es distribuido con la esperanza de que le será
# útil, pero SIN NINGUNA GARANTIA; incluso sin la garantía
# implícita por el MERCADEO o EJERCICIO DE ALGUN PROPOSITO en
# particular. Vea la "GNU General Public License" para más
# detalles.
#
# Usted debe haber recibido una copia de la "GNU General Public
# License" junto con este programa, si no, escriba a la "FSF
# Free Software Foundation, Inc.", 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# $URL$
# $Date$
# $Rev$
# $Author$
#
#### VARIABLES ####
CPP_OPTS=-O3 -Wall
CPP_OPTS_DBG=-g3 -Wall
LIBS=-lm
#### GENERAL ####
all: tp informe
tp: c d e f
clean: clean-c clean-d clean-e clean-f clean-informe clean-77891
#### PROGRAMA ####
77891: 77891.cpp
c++ $(CPP_OPTS) $(LIBS) -o 77891 77891.cpp
77891dbg: 77891.cpp
c++ $(CPP_OPTS_DBG) $(LIBS) -o 77891dbg 77891.cpp
clean-77891:
rm -f *.o 77891 77891dbg
#### PUNTO C ####
c: c1 c2 c3
clean-c: clean-c1 clean-c2 clean-c3
# C.1
c1e_k0.44.txt: 77891
./77891 e n 2 440 1000 > c1e_k0.44.txt
c1e_k0.0044.txt: 77891
./77891 e n 2 440 100000 > c1e_k0.0044.txt
c1e.eps: c1e_k0.44.txt c1e_k0.0044.txt c1e.gnuplot
./c1e.gnuplot
c1r.txt: 77891
./77891 r n 2 440 1000 > c1r.txt
c1r.eps: c1r.txt c1r.gnuplot
./c1r.gnuplot
c1n.txt: 77891
./77891 n n 2 440 1000 > c1n.txt
c1n.eps: c1n.txt c1n.gnuplot
./c1n.gnuplot
c1: c1e.eps c1r.eps c1n.eps
clean-c1:
rm -f c1*.txt c1*.eps
# C.2
c2e.txt: 77891 calcula_periodo
./77891 e n 2 5000 100000 | ./calcula_periodo /dev/stdin > c2e.txt
c2r.txt: 77891 calcula_periodo
./77891 r n 2 5000 100000 | ./calcula_periodo /dev/stdin > c2r.txt
c2n.txt: 77891 calcula_periodo
./77891 n n 2 5000 100000 | ./calcula_periodo /dev/stdin > c2n.txt
c2.eps: c2e.txt c2r.txt c2n.txt periodo.gnuplot
sed "s/
/c/g" periodo.gnuplot | sed "s//sin/g" | \
sed "s//sin/g" | sed "s///g" | \
gnuplot
c2: c2.eps
clean-c2:
rm -f c2*.txt c2.eps
# C.3
c3c.eps: c3c.gnuplot
./c3c.gnuplot
c3o.eps: c3o.gnuplot
./c3o.gnuplot
c3: c3c.eps c3o.eps
clean-c3:
rm -f c3*.eps
#### PUNTO D ####
d: d1 d2 d3 d4
clean-d: clean-d1 clean-d2 clean-d3 clean-d4
# D.1
d1e.txt: 77891
./77891 e l 2 2500 1000000 > d1e.txt
d1e.eps: d1e.txt d1e.gnuplot
./d1e.gnuplot
d1r.txt: 77891
./77891 r l 2 2500 1000 > d1r.txt
d1r.eps: d1r.txt d1r.gnuplot
./d1r.gnuplot
d1n_k2.0.txt: 77891
./77891 n l 2 2500 1250 > d1n_k2.0.txt
d1n_k0.0625.txt: 77891
./77891 n l 2 2500 40000 > d1n_k0.0625.txt
d1n.eps: d1n_k2.0.txt d1n_k0.0625.txt d1n.gnuplot
./d1n.gnuplot
d1: d1e.eps d1r.eps d1n.eps
clean-d1:
rm -f d1*.txt d1*.eps
# D.2
d2e.txt: 77891 calcula_periodo
./77891 e l 2 5000 100000 | ./calcula_periodo /dev/stdin > d2e.txt
d2r.txt: 77891 calcula_periodo
./77891 r l 2 5000 100000 | ./calcula_periodo /dev/stdin > d2r.txt
d2n.txt: 77891 calcula_periodo
./77891 n l 2 5000 100000 | ./calcula_periodo /dev/stdin > d2n.txt
d2.eps: d2e.txt d2r.txt d2n.txt periodo.gnuplot
sed "s//d/g" periodo.gnuplot | sed "s//sin/g" | \
sed "s//con/g" | sed "s// laminar/g" | \
gnuplot
d2: d2.eps
clean-d2:
rm -f d2*.txt d2.eps
# D.3
d3e.txt: 77891
./77891 e l 2 405 100000 > d3e.txt
d3e.max.txt: d3e.txt calcula_maxmin
./calcula_maxmin max d3e.txt > d3e.max.txt
d3e.min.txt: d3e.txt calcula_maxmin
./calcula_maxmin min d3e.txt > d3e.min.txt
d3r.txt: 77891
./77891 r l 2 405 1000 > d3r.txt
d3r.max.txt: d3r.txt calcula_maxmin
./calcula_maxmin max d3r.txt > d3r.max.txt
d3r.min.txt: d3r.txt calcula_maxmin
./calcula_maxmin min d3r.txt > d3r.min.txt
d3n.txt: 77891
./77891 n l 2 405 190 > d3n.txt
d3n.max.txt: d3n.txt calcula_maxmin
./calcula_maxmin max d3n.txt > d3n.max.txt
d3n.min.txt: d3n.txt calcula_maxmin
./calcula_maxmin min d3n.txt > d3n.min.txt
d3: d3e.max.txt d3e.min.txt d3r.max.txt d3r.min.txt d3n.max.txt d3n.min.txt
clean-d3:
rm -f d3*.txt
# D.4
d4e.eps: d3e.max.txt d3e.min.txt d4e.gnuplot
./d4e.gnuplot
d4r.eps: d3r.max.txt d3r.min.txt d4r.gnuplot
./d4r.gnuplot
d4n.eps: d3n.max.txt d3n.min.txt d4n.gnuplot
./d4n.gnuplot
d4: d4e.eps d4r.eps d4n.eps
clean-d4:
rm -f d4*.eps fit.log
#### PUNTO E ####
e: e1 e2 e3 e4
clean-e: clean-e1 clean-e2 clean-e3 clean-e4
# E.1
e1e.txt: 77891
./77891 e t 2 1250 100000 > e1e.txt
e1e.eps: e1e.txt e1e.gnuplot
./e1e.gnuplot
e1r.txt: 77891
./77891 r t 2 1250 400 > e1r.txt
e1r.eps: e1r.txt e1r.gnuplot
./e1r.gnuplot
e1n.txt: 77891
./77891 n t 2 1250 625 > e1n.txt
e1n.eps: e1n.txt e1n.gnuplot
./e1n.gnuplot
e1: e1e.eps e1r.eps e1n.eps
clean-e1:
rm -f e1*.txt e1*.eps
# E.2
e2e.txt: 77891 calcula_periodo
./77891 e t 2 5000 100000 | ./calcula_periodo /dev/stdin > e2e.txt
e2r.txt: 77891 calcula_periodo
./77891 r t 2 5000 100000 | ./calcula_periodo /dev/stdin > e2r.txt
e2n.txt: 77891 calcula_periodo
./77891 n t 2 5000 100000 | ./calcula_periodo /dev/stdin > e2n.txt
e2.eps: e2e.txt e2r.txt e2n.txt periodo.gnuplot
sed "s//e/g" periodo.gnuplot | sed "s//sin/g" | \
sed "s//con/g" | sed "s// turbulenta/g" | \
gnuplot
e2: e2.eps
clean-e2:
rm -f e2*.txt e2.eps
# E.3
e3e.txt: 77891
./77891 e t 2 405 100000 > e3e.txt
e3e.max.txt: e3e.txt calcula_maxmin
./calcula_maxmin max e3e.txt > e3e.max.txt
e3e.min.txt: e3e.txt calcula_maxmin
./calcula_maxmin min e3e.txt > e3e.min.txt
e3r.txt: 77891
./77891 r t 2 405 1000 > e3r.txt
e3r.max.txt: e3r.txt calcula_maxmin
./calcula_maxmin max e3r.txt > e3r.max.txt
e3r.min.txt: e3r.txt calcula_maxmin
./calcula_maxmin min e3r.txt > e3r.min.txt
e3n.txt: 77891
./77891 n t 2 405 190 > e3n.txt
e3n.max.txt: e3n.txt calcula_maxmin
./calcula_maxmin max e3n.txt > e3n.max.txt
e3n.min.txt: e3n.txt calcula_maxmin
./calcula_maxmin min e3n.txt > e3n.min.txt
e3: e3e.max.txt e3e.min.txt e3r.max.txt e3r.min.txt e3n.max.txt e3n.min.txt
clean-e3:
rm -f e3*.txt
# E.4
e4r.txt: 77891
./77891 r t 2 50000 100000 > e4r.txt
e4r.max.txt: e4r.txt calcula_maxmin
./calcula_maxmin max e4r.txt > e4r.max.txt
e4r.min.txt: e4r.txt calcula_maxmin
./calcula_maxmin min e4r.txt > e4r.min.txt
e4r.eps: e4r.max.txt e4r.min.txt e4r.gnuplot
./e4r.gnuplot
e4n.txt: 77891
./77891 n t 2 50000 25000 > e4n.txt
e4n.max.txt: e4n.txt calcula_maxmin
./calcula_maxmin max e4n.txt > e4n.max.txt
e4n.min.txt: e4n.txt calcula_maxmin
./calcula_maxmin min e4n.txt > e4n.min.txt
e4n.eps: e4n.max.txt e4n.min.txt e4n.gnuplot
./e4n.gnuplot
e4: e4r.eps e4n.eps
clean-e4:
rm -f e4*.txt e4*.eps
#### PUNTO F ####
f: f1 f2 f3 f4
clean-f: clean-f1 clean-f2 clean-f3 clean-f4
# E.1
f1e.txt: 77891
./77891 e d 0.03 5000 100000 > f1e.txt
f1e.eps: f1e.txt f1e.gnuplot
./f1e.gnuplot
f1r.txt: 77891
./77891 r d 0.03 5000 1000 > f1r.txt
f1r.eps: f1r.txt f1r.gnuplot
./f1r.gnuplot
f1n.txt: 77891
./77891 n d 0.03 5000 2500 > f1n.txt
f1n.eps: f1n.txt f1n.gnuplot
./f1n.gnuplot
f1: f1e.eps f1r.eps f1n.eps
clean-f1:
rm -f f1*.txt f1*.eps
# E.2
f2e.txt: 77891 calcula_periodo
./77891 e d 0.03 40000 100000 | ./calcula_periodo /dev/stdin > f2e.txt
f2r.txt: 77891 calcula_periodo
./77891 r d 0.03 40000 100000 | ./calcula_periodo /dev/stdin > f2r.txt
f2n.txt: 77891 calcula_periodo
./77891 n d 0.03 40000 100000 | ./calcula_periodo /dev/stdin > f2n.txt
f2.eps: f2e.txt f2r.txt f2n.txt periodo.gnuplot
sed "s//f/g" periodo.gnuplot | sed "s//con/g" | \
sed "s//con/g" | sed "s// turbulenta/g" | \
gnuplot
f2: f2.eps
clean-f2:
rm -f f2*.txt f2.eps
# E.3
f3e.txt: 77891
./77891 e d 0.03 3400 340000 > f3e.txt
f3e.max.txt: f3e.txt calcula_maxmin
./calcula_maxmin max f3e.txt > f3e.max.txt
f3e.min.txt: f3e.txt calcula_maxmin
./calcula_maxmin min f3e.txt > f3e.min.txt
f3r.txt: 77891
./77891 r d 0.03 3400 3400 > f3r.txt
f3r.max.txt: f3r.txt calcula_maxmin
./calcula_maxmin max f3r.txt > f3r.max.txt
f3r.min.txt: f3r.txt calcula_maxmin
./calcula_maxmin min f3r.txt > f3r.min.txt
f3n.txt: 77891
./77891 n d 0.03 3400 1700 > f3n.txt
f3n.max.txt: f3n.txt calcula_maxmin
./calcula_maxmin max f3n.txt > f3n.max.txt
f3n.min.txt: f3n.txt calcula_maxmin
./calcula_maxmin min f3n.txt > f3n.min.txt
f3: f3e.max.txt f3e.min.txt f3r.max.txt f3r.min.txt f3n.max.txt f3n.min.txt
clean-f3:
rm -f f3*.txt
# E.4
f4r.txt: 77891
./77891 r d 0.03 350000 100000 > f4r.txt
f4r.max.txt: f4r.txt calcula_maxmin
./calcula_maxmin max f4r.txt > f4r.max.txt
f4r.min.txt: f4r.txt calcula_maxmin
./calcula_maxmin min f4r.txt > f4r.min.txt
f4r.eps: f4r.max.txt f4r.min.txt f4r.gnuplot
./f4r.gnuplot
f4n.txt: 77891
./77891 n d 0.03 350000 175000 > f4n.txt
f4n.max.txt: f4n.txt calcula_maxmin
./calcula_maxmin max f4n.txt > f4n.max.txt
f4n.min.txt: f4n.txt calcula_maxmin
./calcula_maxmin min f4n.txt > f4n.min.txt
f4n.eps: f4n.max.txt f4n.min.txt f4n.gnuplot
./f4n.gnuplot
f4: f4r.eps f4n.eps
clean-f4:
rm -f f4*.txt f4*.eps
#### Informe ####
informe.ps: informe.lyx c1 c2 c3 d1 d2 d4 e1 e2 e4 f1 f2 f4
lyx -e ps informe.lyx
informe.pdf: informe.lyx c1 c2 c3 d1 d2 d4 e1 e2 e4 f1 f2 f4
lyx -e pdf informe.lyx
informe.tex: informe.lyx c1 c2 c3 d1 d2 d4 e1 e2 e4 f1 f2 f4
lyx -e latex informe.lyx
informe: informe.ps informe.pdf informe.tex
clean-informe:
rm -f informe.ps informe.tex informe.pdf