13.11.2014 Views

Abrir - RDU

Abrir - RDU

Abrir - RDU

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Apéndices 296<br />

path=/dos/munari/”<br />

fname=path//’LAMBDA R13.DAT’<br />

open(1,file=fname,status=. o ld”)<br />

np1=1<br />

do<br />

read(1,*,end=200) lam13(np1)<br />

np1=np1+1<br />

enddo<br />

200close(1)<br />

call resample(desde,hasta,spec1,spec2,ndesder13,nhastar13)<br />

if (vrad.eq.9999.) then<br />

call velrad(desde,hasta,spec1,vrestim,spec5)<br />

vrad=vrestim<br />

frad=( (-vrad/299800.)+1)**-1<br />

desde=desde*frad<br />

hasta=hasta*frad<br />

do i=1,2e5<br />

spec1(i,1)=spec1(i,1)*frad<br />

enddo<br />

call resample(desde,hasta,spec1,spec2,ndesder13,nhastar13)<br />

endif<br />

!4to vertice<br />

p3(1)=p0(1)<br />

p3(2)=p0(2)<br />

p3(3)=p0(3)+0.2<br />

p3(4)=p0(4)<br />

!5to vertice<br />

p4(1)=p0(1)<br />

p4(2)=p0(2)<br />

p4(3)=p0(3)<br />

p4(4)=p0(4)!+1.0<br />

!escribimos ahora la matriz p usando los 5 vertices<br />

p(1,1)=p0(1)<br />

p(1,2)=p0(2)<br />

p(1,3)=p0(3)<br />

p(1,4)=p0(4)<br />

p(2,1)=p1(1)<br />

p(2,2)=p1(2)<br />

p(2,3)=p1(3)<br />

p(2,4)=p1(4)<br />

!call force1(teff0,logg0,feh0,xita0)<br />

if (logg0.ge.5.0) then<br />

logg0=4.5<br />

endif<br />

write(*,*)<br />

write(*,*) ”Initial guess of 4d points: Teff logg [Fe/H] Xita<br />

”<br />

write(52,*)<br />

write(52,*) ”Initial guess of 4d points: Teff logg [Fe/H]<br />

Xita ”<br />

+,teff0,logg0,feh0,xita0<br />

!ajusta el valor inicial de los datos downhill<br />

!comenzamos por los 5 vertices del simplex inicial<br />

!1er vertice<br />

p0(1)=teff0<br />

p0(2)=logg0<br />

p0(3)=feh0<br />

p0(4)=xita0<br />

!2do vertice<br />

p1(1)=p0(1)+100.<br />

p1(2)=p0(2)<br />

p1(3)=p0(3)<br />

p1(4)=p0(4)<br />

!3er vertice<br />

p2(1)=p0(1)<br />

p2(2)=p0(2)+0.2<br />

p2(3)=p0(3)<br />

p2(4)=p0(4)<br />

p(3,1)=p2(1)<br />

p(3,2)=p2(2)<br />

p(3,3)=p2(3)<br />

p(3,4)=p2(4)<br />

p(4,1)=p3(1)<br />

p(4,2)=p3(2)<br />

p(4,3)=p3(3)<br />

p(4,4)=p3(4)<br />

p(5,1)=p4(1)<br />

p(5,2)=p4(2)<br />

p(5,3)=p4(3)<br />

p(5,4)=p4(4)<br />

write(*,*) ”Initial matrix p”<br />

write(52,*) ”Initial matrix p”<br />

!obtener el valor de la funcion, valuada en los 5 vertices<br />

del simplex<br />

!write(*,*)<br />

write(*,*) . O btaining chicuad values for 5 Simplex vertices...”<br />

write(52,*) . O btaining chicuad values for 5 Simplex vertices...”<br />

do i=1,4<br />

zx(i)=p0(i)<br />

enddo<br />

y(1)=funk(zx)<br />

do i=1,4<br />

zx(i)=p1(i)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!