├── .gitignore ├── CMakeLists.txt ├── INSTALL ├── Jenkinsfile ├── LICENSE ├── Makefile.am ├── NEWS ├── README ├── Solar_compositions ├── A09_Przybilla_ESTER_abund_input.txt ├── AG89_ESTER_abund_input.txt ├── AGS05_ESTER_abund_input.txt ├── AGSS09_ESTER_abund_input.txt ├── GN93_ESTER_abund_input.txt ├── GS98_ESTER_abund_input.txt ├── L03_ESTER_abund_input.txt ├── L09_ESTER_abund_input.txt ├── abund_input_filename.txt └── lodders03_data_w_mass_excess.txt ├── bootstrap ├── config ├── 1d_default.par ├── 2d_default.par └── star.cfg ├── configure.ac ├── doc ├── code_examples │ ├── mapping │ │ ├── Makefile │ │ └── example1.cpp │ └── numdiff │ │ ├── Makefile │ │ ├── example1.cpp │ │ └── example2.cpp ├── doxygen.conf ├── help │ ├── 1d │ ├── 2d │ ├── evol │ ├── help │ ├── info │ └── output └── tex │ ├── MR.sty │ ├── Makefile │ ├── authordate1.bst │ ├── definitions.tex │ ├── ester.bib │ ├── ester.tex │ ├── fig │ ├── ester_logo.eps │ ├── mapping.eps │ ├── mapping.ps │ ├── mat │ ├── matrix_pedago.eps │ ├── matrix_pedago.pro │ ├── spectrum1d.eps │ ├── spectrum2d.eps │ └── vectors.eps │ ├── installation.tex │ ├── mapping.tex │ ├── matrix.tex │ ├── numdiff.tex │ ├── program.tex │ ├── structure.tex │ ├── three_dim.tex │ └── titlepage.tex ├── hdf5-samples ├── read-hdf5.F90 ├── read-hdf5.pro ├── read-hdf5.py └── star.hdf5 ├── lib-example ├── Makefile.am └── src │ ├── poly.h │ ├── polytrope.cpp │ ├── polytrope1d.cpp │ ├── polytrope2d.cpp │ └── polytrope2d_final.cpp ├── m4 ├── ax_lib_hdf5.m4 └── ax_pkg_swig.m4 ├── mainpage.dox ├── overview.dox ├── postprocessing ├── BV.py ├── HR.py ├── HR1d2d.py ├── Int_vol.py ├── Lz_dist.py ├── Lz_dist_evol.py ├── Lz_dist_evol_rel.py ├── Lz_specif_dist_evol.py ├── M_circul.py ├── P_rot.py ├── Roche.py ├── SED.py ├── Surface.py ├── Volume.py ├── app_lum_incl.py ├── cheb1d.py ├── eps_J2.py ├── film.py ├── make_the_film ├── omega.py ├── orbit_film.py ├── plot.py ├── plot1d_profiles.py ├── primitive.py ├── spectrum2d.py ├── time_scales.py ├── viewstar.py └── visualize.py ├── python ├── CMakeLists.txt ├── Makefile.am ├── cesam.in ├── ester.i ├── ester.in ├── ester_visu.in ├── ester_wrap.cxx ├── ester_wrap.py ├── num.in └── star.py ├── references └── M5-omega0.8.h5 ├── src ├── Makefile.am ├── dummy.cpp ├── global │ └── global.cpp ├── graphics │ ├── matplotlib.cpp │ └── matplotlib.h ├── include │ ├── constants.h │ ├── debug.h │ ├── ester.h │ ├── graphics.h │ ├── lapack.h │ ├── mapping.h │ ├── matrix.h │ ├── numdiff.h │ ├── parser.h │ ├── physics.h │ ├── read_config.h │ ├── solver.h │ ├── stack.h │ ├── star.h │ ├── symbolic.h │ └── utils.h ├── main │ ├── cesam_to_ester.in │ ├── ester-info.cpp │ ├── ester.in │ ├── gen_output.cpp │ ├── polytrope1d.cpp │ ├── polytrope2d.cpp │ ├── read_config.cpp │ ├── star1d.cpp │ ├── star2d.cpp │ ├── star_evol.cpp │ ├── version.cpp │ └── vtk.cpp ├── mapping │ ├── mapping.cpp │ └── remapper.cpp ├── matrix │ ├── mat_math.cpp │ ├── mat_spec.cpp │ ├── matrix.cpp │ ├── matrix_block_diag.cpp │ └── matrix_map.cpp ├── numdiff │ ├── diff_gl.cpp │ └── diff_leg.cpp ├── physics │ ├── EOS5_xtrin.F │ ├── Makefile.am │ ├── ZFS_interp_EOS5.F │ ├── atm_onelayer.cpp │ ├── composition.cpp │ ├── cubic_interpolator.f90 │ ├── eos_freeeos.cpp │ ├── eos_ideal.cpp │ ├── eos_idealrad.cpp │ ├── eos_opal.cpp │ ├── mesa_opacity_modules.F90 │ ├── nuc_cesam.cpp │ ├── nuc_cesam_for.F │ ├── nuc_simple.cpp │ ├── opa_cesam.cpp │ ├── opa_cesam_for.F90 │ ├── opa_houdek.cpp │ ├── opa_kramer.cpp │ ├── opa_opal.cpp │ ├── opa_opmesa.F90 │ ├── opa_opmesa.cpp │ ├── physics.cpp │ ├── read_hdf5_data.cpp │ └── xztrin21.F ├── solver │ ├── RKF_solver.cpp │ ├── SDIRK_solver.cpp │ ├── solver.cpp │ └── solver_full.cpp ├── star │ ├── convection.cpp │ ├── polytrope.cpp │ ├── star1d_class.cpp │ ├── star1d_extra.cpp │ ├── star1d_solvers.cpp │ ├── star2d_class.cpp │ ├── star2d_extra.cpp │ ├── star2d_solvers.cpp │ ├── star_evol.cpp │ ├── star_map.cpp │ └── star_phys.cpp ├── symbolic │ ├── rational.cpp │ ├── sym.cpp │ ├── sym_expr.cpp │ ├── sym_tens.cpp │ ├── sym_vec.cpp │ └── symbolic.cpp └── utils │ ├── debug.cpp │ ├── iofile.cpp │ ├── parser.cpp │ └── stack.cpp ├── tables ├── CMakeLists.txt ├── Makefile.am ├── cesam │ ├── Makefile.am │ ├── chim_gram.f │ ├── ini_ctes.f │ ├── inter.f │ ├── journal.f │ ├── lit_nl.f │ ├── mod_donnees.f │ ├── mod_kind.f │ ├── mod_nuc.f │ ├── mod_numerique.f │ ├── mod_opa.f │ ├── mod_variables.f │ ├── nuc │ │ ├── abon_ini.f │ │ ├── iben.f │ │ ├── nuc.f │ │ ├── pp1.f │ │ ├── pp3.f │ │ ├── ppcno10.f │ │ ├── ppcno10BeBFe.f │ │ ├── ppcno10Fe.f │ │ ├── ppcno10K.f │ │ ├── ppcno11.f │ │ ├── ppcno12.f │ │ ├── ppcno12Be.f │ │ ├── ppcno12BeBFe.f │ │ ├── ppcno12Li.f │ │ ├── ppcno3a12Ne.f │ │ ├── ppcno3a9.f │ │ ├── ppcno3aco.f │ │ ├── ppcno9.f │ │ ├── ppcno9Fe.f │ │ ├── rq_reac.f │ │ ├── tabul_nuc.f │ │ └── taux_nuc.f │ ├── numeric │ │ ├── arb_rom.f │ │ ├── boite.f │ │ ├── box.f │ │ ├── bsp1ddn.f │ │ ├── bsp1dn.f │ │ ├── bsp_dis.f │ │ ├── bsp_gal.f │ │ ├── bval0.f │ │ ├── bval1.f │ │ ├── bvald.f │ │ ├── coll.f │ │ ├── colpnt.f │ │ ├── delete_doubles.f │ │ ├── difdiv.f │ │ ├── fermi_dirac.f │ │ ├── gauss_band.f │ │ ├── horner.f │ │ ├── intgauss.f │ │ ├── left_right.f │ │ ├── linf.f │ │ ├── matinv.f │ │ ├── max_local.f │ │ ├── min_max.f │ │ ├── neville.f │ │ ├── newspl.f │ │ ├── newspl_gal.f │ │ ├── newton.f │ │ ├── noedif.f │ │ ├── noein.f │ │ ├── noeu_dis.f │ │ ├── noeud.f │ │ ├── pause.f │ │ ├── polyder.f │ │ ├── schu58_n.f │ │ ├── shell.f │ │ ├── sum_n.f │ │ └── zoning.f │ ├── opa │ │ ├── kappa_cond.f │ │ ├── opa.f │ │ ├── opa_compton.f │ │ ├── opa_gong.f │ │ ├── opa_int_zsx.f │ │ ├── opa_opal2.f │ │ ├── opa_opalCO.f │ │ ├── opa_yveline.data │ │ ├── opa_yveline.f │ │ └── opa_yveline_lisse.f │ ├── print_ctes.f │ ├── sortie.f │ ├── test_opa.f │ └── z14xcotrin21.f ├── cesam_nuc │ ├── Makefile.am │ ├── arb_rom.f │ ├── bsp1ddn.f │ ├── bsp1dn.f │ ├── bsp_dis.f │ ├── bsp_gal.f │ ├── bval0.f │ ├── bval1.f │ ├── bvald.f │ ├── chim_gram.f │ ├── coll.f │ ├── colpnt.f │ ├── delete_doubles.f │ ├── difdiv.f │ ├── fermi_dirac.f │ ├── gauss_band.f │ ├── horner.f │ ├── ini_ctes.f │ ├── inter.f │ ├── intgauss.f │ ├── journal.f │ ├── left_right.f │ ├── linf.f │ ├── lit_nl.f │ ├── matinv.f │ ├── max_local.f │ ├── min_max.f │ ├── mod_donnees.f │ ├── mod_kind.f │ ├── mod_nuc.f │ ├── mod_numerique.f │ ├── mod_variables.f │ ├── neville.f │ ├── newspl.f │ ├── newspl_gal.f │ ├── newton.f │ ├── noedif.f │ ├── noein.f │ ├── noeu_dis.f │ ├── noeud.f │ ├── pause.f │ ├── polyder.f │ ├── print_ctes.f │ ├── schu58_n.f │ ├── shell.f │ ├── sortie.f │ ├── sum_n.f │ ├── test.don │ └── zoning.f ├── freeeos │ ├── Makefile.am │ ├── aux_scale.h │ ├── aux_to_traditional.f │ ├── bfgs.f │ ├── bfgs.h │ ├── constants.h │ ├── coulomb.f │ ├── coulomb_adjust.f │ ├── deriv_product.f │ ├── deriv_ratio.f │ ├── diagnostics.h │ ├── eff_fit.h │ ├── effective_radius.f │ ├── effsum_calc.f │ ├── eos_bfgs.f │ ├── eos_calc.f │ ├── eos_cold_start.f │ ├── eos_free_calc.f │ ├── eos_free_calc_argument.h │ ├── eos_jacobian.f │ ├── eos_sum_calc.f │ ├── eos_tqft.f │ ├── eos_tqsum_calc.f │ ├── eos_warm_step.f │ ├── exchange_coeff.f │ ├── exchange_gcpf.f │ ├── excitation_block.h │ ├── excitation_pi.f │ ├── excitation_pi_end.f │ ├── excitation_sum.f │ ├── exct_calc.f │ ├── f_psi.f │ ├── fermi_dirac.f │ ├── fermi_dirac_coeff.f │ ├── fermi_dirac_ct.f │ ├── fermi_dirac_direct.f │ ├── fermi_dirac_exchange.f │ ├── fermi_dirac_minusnr_coeff.f │ ├── fermi_dirac_original_coeff.f │ ├── fermi_dirac_recursion.f │ ├── fjs_pi.f │ ├── fp12_calc.f │ ├── free_eos.f │ ├── free_eos_detailed.f │ ├── free_eos_interpolated.f │ ├── free_non_ideal_calc.f │ ├── helium1.h │ ├── ionization.h │ ├── ionize.f │ ├── lnblnk.f │ ├── lnx_calc.f │ ├── master_coulomb.f │ ├── mdh_pi.f │ ├── molecular_hydrogen.f │ ├── nuvar.h │ ├── pi_fit.h │ ├── pl_prepare.f │ ├── plsum.f │ ├── plsum_approx.f │ ├── poly_sum.f │ ├── pteh_pi.f │ ├── pteh_theta.f │ ├── qmhd_calc.f │ ├── qryd_approx.f │ ├── qryd_calc.f │ ├── qstar_calc.f │ ├── quad4b.f │ ├── quad4block.h │ ├── round_ln.f │ ├── statistical_weights.h │ ├── tau_calc.f │ └── version.f ├── houdek │ └── v9 │ │ ├── .make.state │ │ ├── .nse_depinfo │ │ ├── .sbinit │ │ ├── Makefile.am │ │ ├── OPINTPATH_92 │ │ ├── OPINTPATH_95 │ │ ├── README │ │ ├── Release_history │ │ ├── a2b95.f │ │ ├── alex94 │ │ ├── alex94.bin │ │ ├── alex_x00_g93.tab │ │ ├── alex_x01_g93.tab │ │ ├── alex_x02_g93.tab │ │ ├── alex_x035_g93.tab │ │ ├── alex_x05_g93.tab │ │ ├── alex_x07_g93.tab │ │ └── alex_x08_g93.tab │ │ ├── alex94bext.f │ │ ├── da2b.f │ │ ├── dexak2.f │ │ ├── doc │ │ ├── notes.dvi │ │ └── notes.ps │ │ ├── dopdalex94.f │ │ ├── dopdof.f │ │ ├── dopdos.f │ │ ├── doptesf.f │ │ ├── dopxext_s.f │ │ ├── dopxext_s_95.f │ │ ├── exakop95.f │ │ ├── exop95.f │ │ ├── idl │ │ ├── opdo.pro.gz │ │ └── read_opdo.pro.gz │ │ ├── kur2l2g.f │ │ ├── kur2l2g_95.f │ │ ├── kurset.f │ │ ├── kuru91 │ │ ├── KURTABS │ │ ├── OPINTPATH_92 │ │ ├── OPINTPATH_92X │ │ ├── OPINTPATH_95 │ │ ├── OPINTPATH_95X │ │ ├── kurkapm0.1 │ │ ├── kurkapm0.2 │ │ ├── kurkapm0.3 │ │ ├── kurkapm0.5 │ │ ├── kurkapm1.0 │ │ ├── kurkapm1.5 │ │ ├── kurkapm2.0 │ │ ├── kurkapm2.5 │ │ ├── kurkapm3.0 │ │ ├── kurkapm3.5 │ │ ├── kurkapm4.0 │ │ ├── kurkapm4.5 │ │ ├── kurkapm5.0 │ │ ├── kurkapp0.0 │ │ ├── kurkapp0.1 │ │ ├── kurkapp0.2 │ │ ├── kurkapp0.3 │ │ ├── kurkapp0.5 │ │ ├── kurkapp1.0 │ │ ├── kuru91X92.bin │ │ ├── kuru91X95.bin │ │ ├── kuru91_95.bin │ │ ├── kurucz.pro.gz │ │ └── kurucz_NOHe.gz │ │ ├── lib │ │ ├── .make.state │ │ ├── Makefile.am │ │ ├── condux_ad.f │ │ ├── condux_cf.f │ │ ├── dadjac.f │ │ ├── dcspline.f │ │ ├── dctang.f │ │ ├── dextrp.f │ │ ├── dhunt.f │ │ ├── dintrp.f │ │ ├── dintrpi.f │ │ ├── dmaceps.f │ │ ├── dmasub.f │ │ ├── dmasube.f │ │ ├── dmasubi.f │ │ ├── dmaxmn.f │ │ ├── dopinit.f │ │ ├── dopintc.f │ │ ├── dopintf.f │ │ ├── dopints.f │ │ ├── dordgr.f │ │ ├── dordgri.f │ │ ├── dpderix.f │ │ ├── dpderiy.f │ │ ├── dpdmin.f │ │ ├── dpdste.f │ │ ├── dreade.f │ │ ├── dreadi.f │ │ ├── dreadk.f │ │ ├── dreadkx.f │ │ ├── dshep.f │ │ ├── duvip3d.f │ │ ├── duvip3p.f │ │ ├── gi.f │ │ ├── gid.f │ │ ├── inttwo.f │ │ ├── itoh_coeff_cf.f │ │ ├── itoh_ec_ad.f │ │ ├── itoh_ec_cf.f │ │ ├── itoh_init_ad.f │ │ ├── itoh_init_cf.f │ │ ├── rat2d.f │ │ ├── ratmat.f │ │ ├── rbival.f │ │ ├── rbivpd.f │ │ ├── rde95.f │ │ ├── rdi95.f │ │ ├── readal.f │ │ ├── rtperm.f │ │ ├── sbilin.f │ │ ├── sfa_ad.f │ │ ├── sfa_cf.f │ │ ├── trdisa.f │ │ └── trdisb.f │ │ ├── opal92 │ │ ├── OPINTPATH_92 │ │ ├── OPINTPATH_92X │ │ ├── OPINTPATH_95 │ │ ├── OPINTPATH_95X │ │ ├── da2b+ascii.f │ │ ├── da2b.f │ │ ├── dexak2.f │ │ ├── dexak3.f │ │ ├── ival92.dat │ │ ├── opal92.bin │ │ ├── opal92e-pd.bin │ │ ├── opal92e.bin │ │ ├── z0000.tab.gz │ │ ├── z0001.tab.gz │ │ ├── z0003.tab.gz │ │ ├── z0010.tab.gz │ │ ├── z0020.tab.gz │ │ ├── z0040.tab.gz │ │ ├── z0100.tab.gz │ │ ├── z0200.tab.gz │ │ ├── z0300.tab.gz │ │ └── z0400.tab.gz │ │ ├── opal95 │ │ ├── OPINTPATH_92 │ │ ├── OPINTPATH_92X │ │ ├── OPINTPATH_95 │ │ ├── OPINTPATH_95X │ │ ├── ival95.dat │ │ ├── opal95.bin │ │ ├── opal95.tab │ │ ├── opal95e+alex94-pd.bin │ │ ├── opal95e+kuru91-pd.bin │ │ ├── opal95e.bin │ │ └── readme_dplasma.llnl.gov.gz │ │ └── rksuite │ │ ├── .make.state │ │ ├── README.gz │ │ ├── chkfl.f │ │ ├── const.f │ │ ├── ct.f │ │ ├── dotprd.f │ │ ├── envirn.f │ │ ├── evali.f │ │ ├── formi.f │ │ ├── glberr.f │ │ ├── intpo.f │ │ ├── mconst.f │ │ ├── reset.f │ │ ├── rkmsg.f │ │ ├── rksit.f │ │ ├── setup.f │ │ ├── softfl.f │ │ ├── stat.f │ │ ├── step.f │ │ ├── stepa.f │ │ ├── stepb.f │ │ ├── stiff.f │ │ ├── stiffa.f │ │ ├── stiffb.f │ │ ├── stiffc.f │ │ ├── stiffd.f │ │ ├── truerr.f │ │ └── ut.f ├── op_mono │ └── convert_txt_to_binary_hybrid.F90 └── opal │ ├── GN93hz │ ├── Makefile.am │ └── eos_tables.tar.gz ├── test └── models │ ├── 1d.par │ ├── 2d.par │ ├── Makefile.am │ ├── out1 │ ├── out2 │ ├── out3 │ ├── out4 │ ├── star.out │ ├── template_1d │ ├── template_2d │ └── test_models.in ├── utils ├── Makefile.am ├── app_luminosity.cpp └── starR │ ├── Makefile │ ├── readme.txt │ ├── star1dR_class.cpp │ ├── star2dR_class.cpp │ └── starR.h └── version.m4 /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | 30 | # doc 31 | doc/ester.pdf 32 | doc/tex/*.aux 33 | doc/tex/*.bbl 34 | doc/tex/*.blg 35 | doc/tex/*.dvi 36 | doc/tex/*.log 37 | doc/tex/*.toc 38 | doc/tex/*.fcn 39 | 40 | # Makefile.in 41 | Makefile.in 42 | 43 | # autoconf stuff 44 | autoconf/ar-lib 45 | autoconf/compile 46 | autoconf/config.guess 47 | autoconf/config.sub 48 | autoconf/depcomp 49 | autoconf/install-sh 50 | autoconf/ltmain.sh 51 | autoconf/missing 52 | autom4te.cache 53 | m4/libtool.m4 54 | m4/ltoptions.m4 55 | aclocal.m4 56 | configure 57 | config.h.in 58 | config.h.in~ 59 | 60 | # tags 61 | tags 62 | TAGS 63 | 64 | # swap files 65 | .*.swp 66 | 67 | # build and install folder 68 | build/* 69 | local/* 70 | 71 | #binary files 72 | tables/op_mono/*bin 73 | tables/op_mono/convert 74 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | $ git clone https://github.com/ester-project/ester.git 2 | 3 | This will create a directory named ester that contains the source code of ESTER. Go to this directory, and create a build directory: 4 | 5 | $ cd ester 6 | mkdir build 7 | 8 | Configure and check all dependencies are installed 9 | 10 | Ensure you are in the build directory and run: 11 | 12 | cd build 13 | cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/local 14 | 15 | Old installation: 16 | 17 | ESTER is available under the GPL Version 3 license. It is hosted either on 18 | on github (https://github.com/ester-project/ester). 19 | 20 | To use the last version of the code, you can directly clone the last 21 | development version form Git: 22 | 23 | shell$ git clone https://github.com/ester-project/ester.git 24 | shell$ cd ester 25 | shell$ ./bootstrap 26 | 27 | Installation of the ESTER binaries and library use the common GNU-based 28 | process: 29 | shell$ ./configure --prefix=... 30 | shell$ make 31 | shell$ make install 32 | 33 | You can pass flags to the configure script to tune you installation: 34 | - You can select the libs to use using LIBS: 35 | For instance if you want to use atlas libraries for blas, cblas and lapack 36 | libraries, you can use: 37 | 38 | shell$ ./configure LIBS="-L$HOME/local/lib -ltatlas" 39 | (provided that ATLAS is installed in $HOME/local/lib). 40 | 41 | - You can select you Fortran compiler with FC and you c++ compiler with CXX. 42 | - And you can use specific compiler flags with FCFLAGS and CXXFLAGS. 43 | 44 | The default prefix is $HOME/local, thus adding $HOME/local/bin to your PATH 45 | environment variable will allow you to run ESTER without specifying the full 46 | path to the binary. 47 | -------------------------------------------------------------------------------- /Jenkinsfile: -------------------------------------------------------------------------------- 1 | #!groovy 2 | 3 | pipeline { 4 | agent any 5 | 6 | triggers { 7 | pollSCM('H/15 * * * *') 8 | } 9 | 10 | stages { 11 | 12 | stage('Build with GNU') { 13 | steps { 14 | sh 'mkdir -p cmake-build-gnu' 15 | dir('cmake-build-gnu') { 16 | sh "cmake -DCMAKE_INSTALL_PREFIX=\$PWD .." 17 | sh "make -j4 && make install" 18 | sh "./bin/ester 1d -noplot -o M5-1d.h5" 19 | sh "./bin/ester 2d -noplot -i M5-1d.h5 -o M5-omega0.8.h5 -Omega_bk 0.8" 20 | } 21 | } 22 | } 23 | 24 | stage('Build with Clang') { 25 | steps { 26 | sh 'mkdir -p cmake-build-clang' 27 | dir('build-clang') { 28 | sh "cmake -DCMAKE_INSTALL_PREFIX=\$PWD -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang .." 29 | sh "make -j4 && make install" 30 | sh "./bin/ester 1d -noplot -o M5-1d.h5" 31 | sh "./bin/ester 2d -noplot -i M5-1d.h5 -o M5-omega0.8.h5 -Omega_bk 0.8" 32 | } 33 | } 34 | } 35 | 36 | stage('Read reference') { 37 | steps { 38 | dir('cmake-build-gnu') { 39 | sh "./bin/ester info ../references/M5-omega0.8.h5" 40 | sh "./bin/ester vtk ../references/M5-omega0.8.h5 -o M5-omega0.8.vtk" 41 | } 42 | } 43 | } 44 | 45 | } 46 | 47 | post { 48 | always { 49 | dir('cmake-build-clang') { 50 | deleteDir() 51 | } 52 | dir('cmake-build-clang') { 53 | deleteDir() 54 | } 55 | } 56 | failure { 57 | mail to: 'ester-dev@irap.omp.eu', 58 | subject: "Jenkins build failed: ${currentBuild.fullDisplayName}", 59 | body: "Something is wrong with ${env.BUILD_URL}" 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | SUBDIRS = . tables src test/models lib-example python utils 4 | 5 | all-local: ester-config.h 6 | clean-local: 7 | rm -f ester-config.h star.cfg 8 | 9 | bin_SCRIPTS = ester_visu.py 10 | CLEANFILES = $(bin_SCRIPTS) 11 | 12 | do_subst = sed -e 's,[@]datadir[@],$(datadir),g' \ 13 | -e 's,[@]extension[@],$(extension),g' \ 14 | -e 's,[@]prefix[@],$(prefix),g' \ 15 | -e 's,[@]PYTHON[@],$(PYTHON),g' \ 16 | -e 's,[@]PYTHON_VERSION[@],$(PYTHON_VERSION),g' 17 | 18 | ester_visu.py: python/ester_visu.in Makefile 19 | $(do_subst) < $< > $@ 20 | 21 | ester-config.h: config.h Makefile 22 | $(do_subst) < $< > $@ 23 | 24 | star.cfg: config/star.cfg.in Makefile 25 | $(do_subst) < $< > $@ 26 | 27 | defaultconfigdir = $(datadir)/ester 28 | defaultconfig_DATA = $(top_srcdir)/config/1d_default.par \ 29 | $(top_srcdir)/config/2d_default.par \ 30 | star.cfg 31 | 32 | helpdir = @datadir@/ester/doc/help/ 33 | 34 | help_DATA = doc/help/1d \ 35 | doc/help/2d \ 36 | doc/help/evol \ 37 | doc/help/help \ 38 | doc/help/info \ 39 | doc/help/output 40 | 41 | EXTRA_DIST = $(top_srcdir)/README \ 42 | $(top_srcdir)/NEWS \ 43 | $(top_srcdir)/INSTALL \ 44 | $(top_srcdir)/LICENSE \ 45 | $(top_srcdir)/python/ester_visu.in \ 46 | $(top_srcdir)/config/star.cfg.in \ 47 | $(top_srcdir)/config/1d_default.par \ 48 | $(top_srcdir)/config/2d_default.par \ 49 | $(top_srcdir)/doc/help/1d \ 50 | $(top_srcdir)/doc/help/2d \ 51 | $(top_srcdir)/doc/help/evol \ 52 | $(top_srcdir)/doc/help/help \ 53 | $(top_srcdir)/doc/help/info \ 54 | $(top_srcdir)/doc/help/output \ 55 | $(top_srcdir)/doc/doxygen.conf \ 56 | $(top_srcdir)/m4 \ 57 | $(top_srcdir)/version.m4 58 | 59 | doxygen: 60 | cd $(top_srcdir) && doxygen doc/doxygen.conf 61 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | Version 1.1.0 2 | ------------- 3 | * First official release 4 | * Add HDF5 support 5 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | ESTER is available under the GPL Version 3 license. 2 | 3 | The ambition of this project is to set out a two-dimensional stellar evolution 4 | code, which fully takes into account the effects of rotation, at any rate and in 5 | a self-consistent way. The difficult, but important point is that rotating stars 6 | are spheroidal and are never in hydrostatic equilibrium. They are pervaded by 7 | flows everywhere, even in the stably stratified radiative regions. These flows 8 | are essentially convective flows in thermally unstable regions (convection 9 | zones) and baroclinic flows in the radiative regions. These latter flows are 10 | grosso modo a differential rotation and a meridional circulation, with likely 11 | some small-scale turbulence. Radiative regions of non-rotating stars experience 12 | very little mixing (only due to microscopic phenomena). Rotation induces flows 13 | and therefore some mixing, well-known as "rotational mixing". This is a key 14 | feature of the evolution of rotating stars. Besides, these stars also oscillate, 15 | and astronomers would like to get from the oscillation frequencies some good 16 | constraints on the structure of these stars. The foregoing reasons and many 17 | others motivated us to construct a two-dimensional model of rotating stars that 18 | is kind enough to enlight us on the numerous questions we are wondering about... 19 | Please send any question or comment to: ester-dev@irap.omp.eu. 20 | 21 | Michel Rieutord 22 | 23 | http://ester-project.github.io/ester/ 24 | -------------------------------------------------------------------------------- /Solar_compositions/A09_Przybilla_ESTER_abund_input.txt: -------------------------------------------------------------------------------- 1 | ### header ### 2 | 3 | from MESA 4 | ! provided by Ehsan Moravveji, Oct 12, 2013. 5 | ! The mass fraction is taken from Asplund et al. (2009), and modified by the 6 | ! B-star measurement of Nieva & Przybilla 2012, A&A, 539, 143 and 7 | ! Przybilla et al. (2013), EAS proceeding to be published 8 | ! The modified elements are: he, c, n, o, ne, mg, al, si, s, ar, fe 9 | 10 | Column names: 11 | 12 | element_name,Log_abund (photosphere unless otherwise noted) 13 | 14 | ### end of header ### 15 | H, 12.00 16 | He, 10.99 17 | Li, 3.26 18 | Be, 1.38 19 | B , 2.70 20 | C , 8.33 21 | N , 7.79 22 | O , 8.76 23 | F , 4.56 24 | Ne, 8.09 25 | Na, 6.24 26 | Mg, 7.56 27 | Al, 6.30 28 | Si, 7.50 29 | P , 5.41 30 | S , 7.14 31 | Cl, 5.50 32 | Ar, 6.50 33 | K , 5.03 34 | Ca, 6.34 35 | Sc, 3.15 36 | Ti, 4.95 37 | V , 3.93 38 | Cr, 5.64 39 | Mn, 5.43 40 | Fe, 7.52 41 | Co, 4.99 42 | Ni, 6.22 43 | Cu, 4.19 44 | Zn, 4.56 45 | Ga, 3.04 46 | Ge, 3.65 47 | As, 2.30 48 | Se, 3.34 49 | Br, 2.54 50 | Kr, 3.25 51 | Rb, 2.52 52 | Sr, 2.87 53 | Y , 2.21 54 | Zr, 2.58 55 | Nb, 1.46 56 | Mo, 1.88 57 | Ru, 1.75 58 | Rh, 0.91 59 | Pd, 1.57 60 | Ag, 0.94 61 | Cd, 1.71 62 | In, 0.80 63 | Sn, 2.04 64 | Sb, 1.01 65 | Te, 2.18 66 | I , 1.55 67 | Xe, 2.24 68 | Cs, 1.08 69 | Ba, 2.18 70 | La, 1.10 71 | Ce, 1.58 72 | Pr, 0.72 73 | Nd, 1.42 74 | Sm, 0.96 75 | Eu, 0.52 76 | Gd, 1.07 77 | Tb, 0.30 78 | Dy, 1.10 79 | Ho, 0.48 80 | Er, 0.92 81 | Tm, 0.10 82 | Yb, 0.84 83 | Lu, 0.10 84 | Hf, 0.85 85 | Ta, -0.12 86 | W , 0.85 87 | Re, 0.26 88 | Os, 1.40 89 | Ir, 1.38 90 | Pt, 1.62 91 | Au, 0.92 92 | Hg, 1.17 93 | Tl, 0.90 94 | Pb, 1.75 95 | Bi, 0.65 96 | Th, 0.02 97 | U, -0.54 98 | -------------------------------------------------------------------------------- /Solar_compositions/AG89_ESTER_abund_input.txt: -------------------------------------------------------------------------------- 1 | ### header ### 2 | 3 | from anders & grevesse 1989 4 | 5 | Column names: 6 | 7 | element_name,Log_abund (photosphere unless otherwise noted) 8 | 9 | ### end of header ### 10 | H,12 11 | He,10.99 12 | Li,3.31 13 | Be,1.42 14 | B ,2.88 15 | C ,8.56 16 | N ,8.05 17 | O ,8.93 18 | F ,4.56 19 | Ne,8.09 20 | Na,6.33 21 | Mg,7.58 22 | Al,6.47 23 | Si,7.55 24 | P ,5.45 25 | S ,7.21 26 | Cl,5.5 27 | Ar,6.56 28 | K ,5.12 29 | Ca,6.36 30 | Sc,3.1 31 | Ti,4.99 32 | V ,4 33 | Cr,5.67 34 | Mn,5.39 35 | Fe,7.67 36 | Co,4.92 37 | Ni,6.25 38 | Cu,4.21 39 | Zn,4.6 40 | Ga,2.88 41 | Ge,3.41 42 | As,2.37 !meteor 43 | Se,3.35 !meteor 44 | Br,2.63 !meteor 45 | Kr,3.23 !meteor 46 | Rb,2.6 47 | Sr,2.9 48 | Y ,2.24 49 | Zr,2.6 50 | Nb,1.42 51 | Mo,1.92 52 | Ru,1.84 53 | Rh,1.12 54 | Pd,1.69 55 | Ag,0.94 56 | Cd,1.86 57 | In,1.66 58 | Sn,2 59 | Sb,1 60 | Te,2.24 !meteor 61 | I ,1.51 !meteor 62 | Xe,2.23 !meteor 63 | Cs,1.12 !meteor 64 | Ba,2.13 65 | La,1.22 66 | Ce,1.55 67 | Pr,0.71 68 | Nd,1.5 69 | Sm,1 70 | Eu,0.51 71 | Gd,1.12 72 | Tb,-0.1 73 | Dy,1.1 74 | Ho,0.26 75 | Er,0.93 76 | Tm,0 77 | Yb,1.08 78 | Lu,0.76 79 | Hf,0.88 80 | Ta,0.13 !meteor 81 | W ,1.11 82 | Re,0.27 !meteor 83 | Os,1.45 84 | Ir,1.35 85 | Pt,1.8 86 | Au,1.01 87 | Hg,1.09 !meteor 88 | Tl,0.9 89 | Pb,1.85 90 | Bi,0.71 91 | Th,0.12 92 | U,-0.47 !Upper limit 93 | -------------------------------------------------------------------------------- /Solar_compositions/AGS05_ESTER_abund_input.txt: -------------------------------------------------------------------------------- 1 | ### header ### 2 | 3 | from MESA 4 | 5 | Asplund, Grevesse and Sauval 2005 6 | 7 | Column names: 8 | 9 | element_name,Log_abund (photosphere unless otherwise noted) 10 | 11 | ### end of header ### 12 | H, 12 13 | He, 10.93 !indirect 14 | Li, 3.25 !meteor 15 | Be, 1.38 16 | B, 2.70 17 | C, 8.39 18 | N, 7.78 19 | O, 8.66 20 | F, 4.56 21 | Ne, 7.84 !indirect 22 | Na, 6.17 23 | Mg, 7.53 24 | Al, 6.37 25 | Si, 7.51 26 | P, 5.36 27 | S, 7.14 28 | Cl, 5.50 29 | Ar, 6.18 !indirect 30 | K, 5.08 31 | Ca, 6.31 32 | Sc, 3.05 33 | Ti, 4.90 34 | V, 4.00 35 | Cr, 5.64 36 | Mn, 5.39 37 | Fe, 7.45 38 | Co, 4.92 39 | Ni, 6.23 40 | Cu, 4.21 41 | Zn, 4.60 42 | Ga, 2.88 43 | Ge, 3.58 44 | As, 2.29 !meteor 45 | Se, 3.33 !meteor 46 | Br, 2.56 !meteor 47 | Kr, 3.28 !indirect 48 | Rb, 2.60 49 | Sr, 2.92 50 | Y, 2.21 51 | Zr, 2.59 52 | Nb, 1.42 53 | Mo, 1.92 54 | Ru, 1.84 55 | Rh, 1.12 56 | Pd, 1.69 57 | Ag, 0.94 58 | Cd, 1.77 59 | In, 1.60 60 | Sn, 2.00 61 | Sb, 1.00 62 | Te, 2.19 !meteor 63 | I, 1.51 !meteor 64 | Xe, 2.27 !indirect 65 | Cs, 1.07 !meteor 66 | Ba, 2.17 67 | La, 1.13 68 | Ce, 1.58 69 | Pr, 0.71 70 | Nd, 1.45 71 | Sm, 1.01 72 | Eu, 0.52 73 | Gd, 1.12 74 | Tb, 0.28 75 | Dy, 1.14 76 | Ho, 0.51 77 | Er, 0.93 78 | Tm, 0.00 79 | Yb, 1.08 80 | Lu, 0.06 81 | Hf, 0.88 82 | Ta, -0.17 !meteor 83 | W, 1.11 84 | Re, 0.23 !meteor 85 | Os, 1.45 86 | Ir, 1.38 87 | Pt, 1.64 !meteor 88 | Au, 1.01 89 | Hg, 1.13 !meteor 90 | Tl, 0.90 91 | Pb, 2.00 92 | Bi, 0.65 !meteor 93 | Th, 0.06 !meteor 94 | U, -0.52 95 | -------------------------------------------------------------------------------- /Solar_compositions/AGSS09_ESTER_abund_input.txt: -------------------------------------------------------------------------------- 1 | ### header ### 2 | 3 | from MESA 4 | 5 | Asplund, Grevesse, Sauval, and Scott 2009 abundances 6 | Annu. Rev. Astron. Astrophys. 2009. 47:481–522 7 | 8 | Column names: 9 | 10 | element_name,Log_abund (photosphere unless otherwise noted) 11 | 12 | ### end of header ### 13 | H, 12 14 | He, 10.93 !indirect 15 | Li, 3.26 16 | Be, 1.38 17 | B, 2.70 18 | C, 8.43 19 | N, 7.83 20 | O, 8.69 21 | F, 4.56 22 | Ne, 7.93 23 | Na, 6.24 24 | Mg, 7.60 25 | Al, 6.45 26 | Si, 7.51 27 | P, 5.41 28 | S, 7.12 29 | Cl, 5.50 30 | Ar, 6.40 31 | K, 5.03 32 | Ca, 6.34 33 | Sc, 3.15 34 | Ti, 4.95 35 | V, 3.93 36 | Cr, 5.64 37 | Mn, 5.43 38 | Fe, 7.50 39 | Co, 4.99 40 | Ni, 6.22 41 | Cu, 4.19 42 | Zn, 4.56 43 | Ga, 3.04 44 | Ge, 3.65 45 | As, 2.30 !meteor 46 | Se, 3.34 !meteor 47 | Br, 2.54 !meteor 48 | Kr, 3.25 !indirect 49 | Rb, 2.52 50 | Sr, 2.87 51 | Y, 2.21 52 | Zr, 2.58 53 | Nb, 1.46 54 | Mo, 1.88 55 | Ru, 1.75 56 | Rh, 0.91 57 | Pd, 1.57 58 | Ag, 0.94 59 | Cd, 1.71 60 | In, 0.80 61 | Sn, 2.04 62 | Sb, 1.01 63 | Te, 2.18 64 | I, 1.55 65 | Xe, 2.24 66 | Cs, 1.08 67 | Ba, 2.18 68 | La, 1.10 69 | Ce, 1.58 70 | Pr, 0.72 71 | Nd, 1.42 72 | Sm, 0.96 73 | Eu, 0.52 74 | Gd, 1.07 75 | Tb, 0.30 76 | Dy, 1.10 77 | Ho, 0.48 78 | Er, 0.92 79 | Tm, 0.10 80 | Yb, 0.84 81 | Lu, 0.10 82 | Hf, 0.85 83 | Ta, -0.12 84 | W, 0.85 85 | Re, 0.26 86 | Os, 1.40 87 | Ir, 1.38 88 | Pt, 1.62 89 | Au, 0.92 90 | Hg, 1.17 91 | Tl, 0.90 92 | Pb, 1.75 93 | Bi, 0.65 94 | Th, 0.02 95 | U, -0.54 96 | 97 | -------------------------------------------------------------------------------- /Solar_compositions/GN93_ESTER_abund_input.txt: -------------------------------------------------------------------------------- 1 | ### header ### 2 | 3 | from MESA 4 | 5 | Grevesse and Noels 1993 6 | 7 | Column names: 8 | 9 | element_name,Log_abund (photosphere unless otherwise noted) 10 | 11 | ### end of header ### 12 | H,12 13 | He,10.99 14 | Li,3.31 # meteor value 15 | Be,1.42 # meteor value 16 | B ,2.79 # meteor value 17 | C ,8.55 18 | N ,7.97 19 | O ,8.87 20 | F ,4.48 21 | Ne,8.08 22 | Na,6.33 23 | Mg,7.58 24 | Al,6.47 25 | Si,7.55 26 | P ,5.45 27 | S ,7.2 28 | Cl,5.28 29 | Ar,6.52 30 | K ,5.12 31 | Ca,6.36 32 | Sc,3.17 33 | Ti,5.02 34 | V ,4 35 | Cr,5.67 36 | Mn,5.39 37 | Fe,7.5 38 | Co,4.92 39 | Ni,6.25 40 | Cu,4.21 41 | Zn,4.6 42 | Ga,3.13 43 | Ge,3.41 44 | As,2.37 45 | Se,3.38 46 | Br,2.63 47 | Kr,3.23 48 | Rb,2.41 49 | Sr,2.97 50 | Y ,2.24 51 | Zr,2.6 52 | Nb,1.42 53 | Mo,1.92 54 | Ru,1.84 55 | Rh,1.12 56 | Pd,1.69 57 | Ag,1.24 58 | Cd,1.77 59 | In,0.82 60 | Sn,2.14 61 | Sb,1.03 62 | Te,2.24 63 | I ,1.51 64 | Xe,2.23 65 | Cs,1.13 66 | Ba,2.13 67 | La,1.17 68 | Ce,1.58 69 | Pr,0.71 70 | Nd,1.5 71 | Sm,1.01 72 | Eu,0.51 73 | Gd,1.12 74 | Tb,0.35 75 | Dy,1.14 76 | Ho,0.51 77 | Er,0.93 78 | Tm,0.15 79 | Yb,1.08 80 | Lu,0.13 81 | Hf,0.88 82 | Ta,-0.13 83 | W ,0.69 84 | Re,0.28 85 | Os,1.45 86 | Ir,1.37 87 | Pt,1.69 88 | Au,0.87 89 | Hg,1.17 90 | Tl,0.83 91 | Pb,2.06 92 | Bi,0.71 93 | Th,0.09 94 | U,-0.5 95 | -------------------------------------------------------------------------------- /Solar_compositions/GS98_ESTER_abund_input.txt: -------------------------------------------------------------------------------- 1 | ### header ### 2 | 3 | from MESA 4 | 5 | Grevesse and Sauval 1998, Table 1 6 | 7 | Column names: 8 | 9 | element_name,Log_abund (photosphere unless otherwise noted) 10 | 11 | ### end of header ### 12 | H,12.00 13 | He,10.93 14 | Li,3.3 # meteor value 15 | Be,1.42 # meteor value 16 | B,2.79 # meteor value 17 | C,8.52 18 | N,7.92 19 | O,8.83 20 | F,4.48 21 | Ne,8.08 22 | Na,6.32 23 | Mg,7.58 24 | Al,6.49 25 | Si,7.56 26 | P,5.56 27 | S,7.20 28 | Cl,5.28 29 | Ar,6.40 30 | K,5.13 31 | Ca,6.35 32 | Sc,3.10 33 | Ti,4.94 34 | V,4.02 35 | Cr,5.69 36 | Mn,5.53 37 | Fe,7.50 38 | Co,4.91 39 | Ni,6.25 40 | Cu,4.29 41 | Zn,4.67 42 | Ga,3.13 43 | Ge,3.63 44 | As,2.37 45 | Se,3.41 46 | Br,2.63 47 | Kr,3.31 48 | Rb,2.41 49 | Sr,2.92 50 | Y,2.23 51 | Zr,2.61 52 | Nb,1.40 53 | Mo,1.97 54 | Ru,1.83 55 | Rh,1.10 56 | Pd,1.70 57 | Ag,1.24 58 | Cd,1.76 59 | In,0.82 60 | Sn,2.14 61 | Sb,1.03 62 | Te,2.24 63 | I,1.51 64 | Xe,2.17 65 | Cs,1.13 66 | Ba,2.22 67 | La,1.22 68 | Ce,1.63 69 | Pr,0.80 70 | Nd,1.49 71 | Sm,0.98 72 | Eu,0.55 73 | Gd,1.09 74 | Tb,0.35 75 | Dy,1.17 76 | Ho,0.51 77 | Er,0.97 78 | Tm,0.15 79 | Yb,0.96 80 | Lu,0.13 81 | Hf,0.75 82 | Ta,-0.13 83 | W,0.69 84 | Re,0.28 85 | Os,1.39 86 | Ir,1.37 87 | Pt,1.69 88 | Au,0.85 89 | Hg,1.13 90 | Tl,0.83 91 | Pb,2.06 92 | Bi,0.71 93 | Th,0.09 94 | U,-0.50 95 | -------------------------------------------------------------------------------- /Solar_compositions/L03_ESTER_abund_input.txt: -------------------------------------------------------------------------------- 1 | ### header ### 2 | 3 | from MESA 4 | 5 | Lodders 2003, ApJ, Table 1 recommended abundance 6 | 7 | Column names: 8 | 9 | element_name,Log_abund (photosphere unless otherwise noted) 10 | 11 | ### end of header ### 12 | H,12 13 | He,10.89 14 | Li,3.28 15 | Be,1.41 16 | B,2.78 17 | C,8.39 18 | N,7.83 19 | O,8.69 20 | F,4.46 21 | Ne,7.87 22 | Na,6.3 23 | Mg,7.55 24 | Al,6.46 25 | Si,7.54 26 | P,5.46 27 | S,7.19 28 | Cl,5.26 29 | Ar,6.55 30 | K,5.11 31 | Ca,6.34 32 | Sc,3.07 33 | Ti,4.92 34 | V,4 35 | Cr,5.65 36 | Mn,5.5 37 | Fe,7.47 38 | Co,4.91 39 | Ni,6.22 40 | Cu,4.26 41 | Zn,4.63 42 | Ga,3.1 43 | Ge,3.62 44 | As,2.32 45 | Se,3.36 46 | Br,2.59 47 | Kr,3.28 48 | Rb,2.36 49 | Sr,2.91 50 | Y,2.2 51 | Zr,2.6 52 | Nb,1.42 53 | Mo,1.96 54 | Ru,1.82 55 | Rh,1.11 56 | Pd,1.7 57 | Ag,1.23 58 | Cd,1.74 59 | In,0.8 60 | Sn,2.11 61 | Sb,1.06 62 | Te,2.22 63 | I,1.54 64 | Xe,2.27 65 | Cs,1.1 66 | Ba,2.18 67 | La,1.18 68 | Ce,1.61 69 | Pr,0.78 70 | Nd,1.46 71 | Sm,0.95 72 | Eu,0.52 73 | Gd,1.06 74 | Tb,0.31 75 | Dy,1.13 76 | Ho,0.49 77 | Er,0.95 78 | Tm,0.11 79 | Yb,0.94 80 | Lu,0.09 81 | Hf,0.77 82 | Ta,-0.14 83 | W,0.65 84 | Re,0.26 85 | Os,1.37 86 | Ir,1.35 87 | Pt,1.67 88 | Au,0.83 89 | Hg,1.16 90 | Tl,0.81 91 | Pb,2.05 92 | Bi,0.68 93 | Th,0.09 94 | U,-0.49 95 | -------------------------------------------------------------------------------- /Solar_compositions/L09_ESTER_abund_input.txt: -------------------------------------------------------------------------------- 1 | ### header ### 2 | 3 | from Lodders et al 2009 (pre-print last revised 2011) 4 | 5 | Column names: 6 | 7 | element_name,Log_abund (photosphere unless otherwise noted) 8 | 9 | ### end of header ### 10 | H,12 11 | He,10.925 12 | Li,1.1 13 | Be,1.38 14 | B ,2.7 15 | C ,8.39 16 | N ,7.86 17 | O ,8.73 18 | F ,4.56 19 | Ne,8.05 20 | Na,6.3 21 | Mg,7.54 22 | Al,6.47 23 | Si,7.52 24 | P ,5.46 25 | S ,7.14 26 | Cl,5.5 27 | Ar,6.5 28 | K ,5.12 29 | Ca,6.33 30 | Sc,3.1 31 | Ti,4.9 32 | V ,4 33 | Cr,5.64 34 | Mn,5.37 35 | Fe,7.45 36 | Co,4.92 37 | Ni,6.23 38 | Cu,4.21 39 | Zn,4.62 40 | Ga,2.88 41 | Ge,3.58 42 | As,2.32 !meteor 43 | Se,3.36 !meteor 44 | Br,2.56 !meteor 45 | Kr,3.28 46 | Rb,2.6 47 | Sr,2.92 48 | Y ,2.21 49 | Zr,2.58 50 | Nb,1.42 51 | Mo,1.92 52 | Ru,1.84 53 | Rh,1.12 54 | Pd,1.66 55 | Ag,0.94 56 | Cd,1.77 57 | In,1.5 58 | Sn,2 59 | Sb,1 60 | Te,2.2 !meteor 61 | I ,1.57 !meteor 62 | Xe,2.27 63 | Cs,1.1 64 | Ba,2.17 65 | La,1.14 66 | Ce,1.61 67 | Pr,0.76 68 | Nd,1.45 69 | Sm,1 70 | Eu,0.52 71 | Gd,1.11 72 | Tb,0.28 73 | Dy,1.13 74 | Ho,0.51 75 | Er,0.96 76 | Tm,0.14 77 | Yb,0.86 78 | Lu,0.12 79 | Hf,0.88 80 | Ta,-0.14 !meteor 81 | W ,1.11 82 | Re,0.28 !meteor 83 | Os,1.45 84 | Ir,1.38 85 | Pt,1.74 86 | Au,1.01 87 | Hg,1.19 !meteor 88 | Tl,0.95 89 | Pb,2 90 | Bi,0.67 !meteor 91 | Th,0.08 !Upper limit 92 | U,-0.47 !Upper limit 93 | -------------------------------------------------------------------------------- /Solar_compositions/abund_input_filename.txt: -------------------------------------------------------------------------------- 1 | GS98 2 | -------------------------------------------------------------------------------- /bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if ! test -d m4; then 3 | mkdir m4 4 | fi 5 | autoreconf ${autoreconf_args:-"-ivf"} 6 | -------------------------------------------------------------------------------- /config/1d_default.par: -------------------------------------------------------------------------------- 1 | #Default parameters for star1d 2 | 3 | ndomains=12 4 | npts=30 5 | 6 | mixture=GN93 7 | M=5 8 | X=0.7 9 | Z=0 10 | 11 | Xc=1 12 | surff=1 13 | 14 | Tc=3e7 15 | pc=3e16 16 | 17 | opa=opal 18 | eos=opal 19 | nuc=simple 20 | atm=simple 21 | 22 | core_convec=1 # Deactivate core convection with core_convec=0 23 | min_core_size=0.01 # Minimum size of convective core (in fraction of polar radius) 24 | env_convec=0 25 | 26 | init_poly=0 27 | -------------------------------------------------------------------------------- /config/2d_default.par: -------------------------------------------------------------------------------- 1 | #Default parameters for star2d 2 | 3 | ndomains=12 4 | npts=30 5 | nth=12 6 | nex=30 7 | 8 | mixture=GN93 9 | M=5 10 | X=0.7 11 | Z=0 12 | 13 | Xc=1 14 | stratified_comp=1 15 | surff=1 16 | 17 | Tc=3e7 18 | pc=5e16 19 | 20 | 21 | opa=opal 22 | eos=opal 23 | nuc=simple 24 | atm=simple 25 | 26 | Omega_bk=0 27 | 28 | Ekman=1 29 | reynolds_v=1e9 30 | reynolds_h=1e7 31 | visc_v=1e7 # cm^2/s 32 | visc_h=1e7 # cm^2/s 33 | diffusion_v=1e4 # cm^2/s 34 | diffusion_h=1e4 # cm^2/s 35 | 36 | core_convec=1 # Deactivate core convection with core_convec=0 37 | min_core_size=0.03 # Minimum size of convective core (in fraction of polar radius) 38 | env_convec=0 39 | 40 | init_poly=0 41 | -------------------------------------------------------------------------------- /config/star.cfg: -------------------------------------------------------------------------------- 1 | # Star1d/2d configuration file 2 | 3 | maxit=200 # Maximum number of iterations 4 | minit=1 # Minimum number of iterations 5 | tol=1e-8 # Relative tolerance 6 | newton_dmax=0.5 # Maximum relative change per iteration allowed 7 | 8 | output_file=star.h5 9 | verbose=1 # Posible values 0,1,2,3 10 | plot_device=/XSERVE # Examples: /NULL,/XWINDOW,/XSERVE,/PS (see pgplot manual for details) 11 | plot_interval=10 # Minimum interval in seconds for graphic output 12 | 13 | -------------------------------------------------------------------------------- /doc/code_examples/mapping/Makefile: -------------------------------------------------------------------------------- 1 | ESTER_BUILD=../../../bin/ester_build 2 | 3 | %: %.cpp 4 | $(ESTER_BUILD) $< -o $@ 5 | -------------------------------------------------------------------------------- /doc/code_examples/numdiff/Makefile: -------------------------------------------------------------------------------- 1 | ESTER_BUILD=../../../bin/ester_build 2 | 3 | %: %.cpp 4 | $(ESTER_BUILD) $< -o $@ 5 | -------------------------------------------------------------------------------- /doc/code_examples/numdiff/example1.cpp: -------------------------------------------------------------------------------- 1 | // The following example solves the differential equation 2 | // x^2*y'' + x*y' - y = x^2 3 | // with boundary conditions y(0)=0 and y(1)=0 4 | // whose exact solution is 5 | // y = x*(x-1)/3 6 | 7 | #include 8 | #include"numdiff.h" 9 | 10 | int main() { 11 | 12 | //Initialize a diff_gl object with 1 domain 13 | 14 | int n=20; // Number of points. 15 | //In fact, this example can be solved using only 3 points. 16 | diff_gl gl(1); 17 | 18 | gl.set_npts(n); 19 | gl.set_xif(0.,1.); 20 | gl.init(); 21 | 22 | // We will work with only 1 domain, so we create a reference to the 23 | // first (and only) block of gl.D 24 | 25 | matrix &D=gl.D.block(0); 26 | matrix &x=gl.x; 27 | 28 | // Set up the operator matrix and the right hand side 29 | 30 | matrix op,rhs; 31 | 32 | op=x*x*(D,D)+x*D-eye(n); 33 | rhs=x*x; 34 | 35 | // Introduce boundary conditions 36 | 37 | op.setrow(0,zeros(1,n));op(0,0)=1; 38 | rhs(0)=0; 39 | op.setrow(-1,zeros(1,n));op(-1,-1)=1; 40 | rhs(-1)=0; 41 | 42 | // Solve the system 43 | 44 | matrix y; 45 | 46 | y=op.solve(rhs); 47 | 48 | // Interpolate the solution into a finer grid 49 | 50 | matrix x_fine,y_fine; 51 | 52 | x_fine=vector_t(0,1,100); 53 | y_fine=gl.eval(y,x_fine); 54 | 55 | // Compare with the exact solution 56 | 57 | matrix y_exact; 58 | 59 | y_exact=x_fine*(x_fine-1)/3; 60 | 61 | printf("Solved using %d points\n",gl.N); 62 | printf("Max. error=%e\n",max(abs(y_fine-y_exact))); 63 | 64 | return 0; 65 | 66 | } 67 | -------------------------------------------------------------------------------- /doc/code_examples/numdiff/example2.cpp: -------------------------------------------------------------------------------- 1 | /* The following example illustrates the use of the numerical differentiation 2 | library in 2D in spherical coordinates */ 3 | 4 | #include 5 | #include"numdiff.h" 6 | #include"constants.h" //For the defintion of PI 7 | 8 | //Function prototypes 9 | double laplacian(matrix y,double r0,double th0); 10 | double integral(matrix y); 11 | 12 | // Define diff_gl and diff_leg objects as global variables 13 | diff_gl gl; 14 | diff_leg leg; 15 | // Create references for spherical coordinates 16 | matrix &r=gl.x,&th=leg.th; 17 | 18 | int main() { 19 | 20 | //Initialize gl. In the example we will use 2 domains 21 | gl.set_ndomains(2); 22 | gl.set_xif(1e-3,0.2,1.); // Use 1e-3 as the interior limit (instead of 0) 23 | // to avoid a division by zero in the 24 | // calculation of the laplacian 25 | gl.set_npts(100,100); 26 | gl.init(); 27 | //Initialize leg 28 | leg.npts=50; 29 | leg.init(); 30 | 31 | matrix y; 32 | 33 | //Define the function y 34 | y=r*r*r*(1+sin(th)*sin(th)); 35 | 36 | double lap_y,int_y; 37 | double r0=0.3,th0=PI/3; 38 | 39 | lap_y=laplacian(y,r0,th0); 40 | int_y=integral(y); 41 | 42 | printf("The value of the laplacian at (%f,%f) is %e\n",r0,th0,lap_y); 43 | printf("The volume integral is %e\n",int_y); 44 | 45 | return 0; 46 | 47 | } 48 | 49 | // Function for calculating the laplacian of y at (r0,th0) 50 | double laplacian(matrix y,double r0,double th0) { 51 | 52 | matrix lap_y; 53 | 54 | lap_y=(gl.D,r*r*gl.D,y)/r/r+(y,leg.lap_00)/r/r; 55 | 56 | //Interpolate in the direction of r 57 | lap_y=gl.eval(lap_y,r0); // Now lap_y is (1,nth) 58 | //Interpolate in the direction of theta 59 | lap_y=leg.eval_00(lap_y,th0); // Now lap_y is (1,1) 60 | 61 | return lap_y(0); 62 | // lap_y has only 1 element, but we must include (0) 63 | // at the end to return a double 64 | } 65 | // Function for calculating the volume integral of y 66 | double integral(matrix y) { 67 | 68 | return 2*PI*(gl.I,r*r*y,leg.I_00)(0); 69 | 70 | } 71 | 72 | -------------------------------------------------------------------------------- /doc/help/evol: -------------------------------------------------------------------------------- 1 | 2 | Calculate a pseudo-evolution. 3 | 4 | At this moment this evolution is calculated just varying Xc while maintaining 5 | constant M and Lz. This behaviour is provisional and will change in future 6 | versions. 7 | 8 | To use it we must specify an input model (using -i or -input_file) calculated 9 | using ester 1d or ester 2d: 10 | 11 | ester evol -i input_model 12 | 13 | Other valid parameters are: 14 | 15 | -dXc : decrement in Xc (default: 0.05) 16 | 17 | -Xcmin : minimum value of Xc (default: 0.05) 18 | 19 | -o outfile : The default is outfile=input_file 20 | 21 | and other parameters inherited from ester 2d (-verbose, ...). 22 | However, it is not possible to change model parameters with ester evol (as mass, 23 | resolution, etc.). 24 | The output is a series of files output_XXXX, where XXXX is an index number, 25 | containing the models at different stages. 26 | 27 | -------------------------------------------------------------------------------- /doc/help/help: -------------------------------------------------------------------------------- 1 | 2 | usage: ester [options] 3 | 4 | AVAILABLE COMMANDS: 5 | 6 | 1d Calculate model of a 1D non-rotating star 7 | 2d Calculate model of a 2D rotating star 8 | info Get information about a model 9 | output Generate custom output from a model 10 | version Show version number 11 | help Show this help 12 | 13 | Type 'ester help ' for help on a specific command 14 | 15 | -------------------------------------------------------------------------------- /doc/help/info: -------------------------------------------------------------------------------- 1 | 2 | Get information about a model 3 | 4 | usage: ester info FILE 5 | 6 | -------------------------------------------------------------------------------- /doc/help/output: -------------------------------------------------------------------------------- 1 | 2 | Generates custom output from a model 3 | 4 | usage: ester output FILE 5 | 6 | Description: 7 | Reads the model contained in FILE and generates output based 8 | on a template read from stdin. 9 | A typical call could be 10 | 11 | ester output FILE < template_file > output_file 12 | 13 | Read the user guide in (ESTER_DIR)/doc/ester.pdf for instructions 14 | on creating a template file. 15 | 16 | -------------------------------------------------------------------------------- /doc/tex/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | latex -shell-escape ester.tex 3 | bibtex ester.aux 4 | latex -shell-escape ester.tex 5 | latex -shell-escape ester.tex # To set the correct page numbers in ToC 6 | dvipdfm -o ../ester.pdf ester.dvi 7 | fast: 8 | latex -shell-escape ester.tex 9 | dvipdfm -o ../ester.pdf ester.dvi 10 | clean: 11 | rm -f *.aux 12 | rm -f *.log 13 | rm -f *.out 14 | rm -f *.toc 15 | rm -f *.fcn 16 | rm -f *.dvi 17 | -------------------------------------------------------------------------------- /doc/tex/ester.tex: -------------------------------------------------------------------------------- 1 | \documentclass{report} 2 | 3 | \usepackage[a4paper]{geometry} 4 | \usepackage{minted} 5 | \usepackage[dvipdfm,bookmarks=true,colorlinks=true,linkcolor=blue]{hyperref} 6 | \usepackage{longtable} 7 | \usepackage[Bjornstrup]{fncychap} 8 | \usepackage{titlesec} 9 | \usepackage{multirow} 10 | \usepackage{multicol} 11 | \usepackage{amssymb} 12 | \usepackage[dvips]{graphicx} 13 | \usepackage{float} 14 | \usepackage{natbib} 15 | \usepackage{amsmath} 16 | \usepackage{anyfontsize} 17 | \usepackage{MR} % a list of newcommands.... 18 | \usepackage{listings} 19 | \usepackage{xspace} 20 | 21 | \DefineVerbatimEnvironment{shell}{Verbatim}{commentchar=!,gobble=3} 22 | % \newenvironment{shellcmd}[1][]{% 23 | % % \renewcommand{\thelstnumber}{\$ } 24 | % \begin{lstlisting} 25 | % % \lstset{numbers=left,basicstyle=\ttfamily,#1}% 26 | % }{% 27 | % \end{lstlisting} 28 | % } 29 | 30 | \titleformat{\section} 31 | {\vspace{.8ex}% 32 | \Large\scshape} 33 | {\thesection.}{.5em}{} 34 | 35 | \titleformat{\subsection} 36 | {\vspace{.8ex}% 37 | \large\scshape} 38 | {\thesubsection.}{.5em}{} 39 | 40 | \titleformat{\subsubsection} 41 | {\vspace{.8ex}% 42 | \large\scshape} 43 | {}{.5em}{} 44 | 45 | 46 | \usemintedstyle{colorful} 47 | \fvset{tabsize=4} 48 | 49 | \hypersetup{ 50 | colorlinks, 51 | citecolor=blue, 52 | linkcolor=blue 53 | } 54 | 55 | \newcommand{\git}{\texttt{git}\xspace} 56 | \newcommand{\eg}{\textit{e.g.,}\xspace} 57 | 58 | \begin{document} 59 | \include{definitions} 60 | \include{titlepage} 61 | 62 | \tableofcontents 63 | 64 | \include{installation} 65 | \include{program} 66 | \include{structure} 67 | \include{matrix} 68 | \include{numdiff} 69 | \include{mapping} 70 | \include{three_dim} 71 | 72 | \bibliography{ester} 73 | \bibliographystyle{authordate1.bst} 74 | \end{document} 75 | -------------------------------------------------------------------------------- /doc/tex/titlepage.tex: -------------------------------------------------------------------------------- 1 | \begin{titlepage} 2 | 3 | \ 4 | 5 | \vspace{2cm} 6 | 7 | \definecolor{darkred}{rgb}{0.5,0,0} 8 | 9 | %{\fontsize{78}{78}\selectfont \textsf{ESTER}} 10 | \hspace*{-3.5cm} 11 | \includegraphics[width=0.90\linewidth,angle=0]{fig/ester_logo.eps} 12 | 13 | \vspace{0.2cm} 14 | 15 | \hspace{2pt} {\LARGE \textsf{E}volution \textsf{STE}llaire en \textsf{R}otation} 16 | 17 | {\color{darkred} \rule{\textwidth}{2pt}} 18 | 19 | \vspace{2cm} 20 | 21 | \begin{center} 22 | {\fontsize{42}{42}\selectfont \textsc{User's Guide}} 23 | \end{center} 24 | 25 | \vfill 26 | 27 | \hfill{\Large\today} 28 | 29 | \end{titlepage} 30 | 31 | -------------------------------------------------------------------------------- /hdf5-samples/read-hdf5.F90: -------------------------------------------------------------------------------- 1 | program read_hdf5 2 | use hdf5 3 | implicit none 4 | 5 | character*100 :: file_name = "star.hdf5" 6 | integer status, error 7 | integer(hsize_t) :: dims(2) 8 | integer :: nr, nth 9 | integer(HID_T) :: fid, gid, aid, did 10 | double precision, allocatable :: T(:,:) 11 | 12 | ! init interface 13 | call h5open_f(status) 14 | 15 | ! open the HDF5 file 16 | call h5fopen_f(file_name, H5F_ACC_RDWR_F, fid, status) 17 | 18 | ! open the `star' group 19 | call h5gopen_f(fid, "star", gid, error) 20 | 21 | ! open the `nr' attribute 22 | call h5aopen_f(gid, "nr", aid, error) 23 | 24 | ! read the attribute 25 | dims(1) = 1 26 | dims(2) = 0 27 | call h5aread_f(aid, H5T_NATIVE_INTEGER, nr, dims, error) 28 | 29 | ! close the attribute 30 | call h5aclose_f(aid, error) 31 | 32 | ! open the `nth' attribute 33 | call h5aopen_f(gid, "nth", aid, error) 34 | 35 | ! read the attribute 36 | dims(1) = 1 37 | dims(2) = 0 38 | call h5aread_f(aid, H5T_NATIVE_INTEGER, nth, dims, error) 39 | 40 | ! close the attribute 41 | call h5aclose_f(aid, error) 42 | 43 | print *, "nr: ", nr 44 | print *, "nth:", nth 45 | 46 | 47 | ! allocate memory for the temperature field 48 | allocate(T(nr, nth)) 49 | 50 | ! open the `T' dataset 51 | call h5dopen_f(gid, "T", did, error) 52 | 53 | ! read the field 54 | dims(1) = nr 55 | dims(2) = nth 56 | call h5dread_f(did, H5T_NATIVE_DOUBLE, T, dims, error) 57 | 58 | print *, "T at the center: ", T(1, 1) 59 | print *, "T at the equator:", T(nr, 1) 60 | 61 | deallocate(T) 62 | 63 | ! close dataset, group and file 64 | call h5dclose_f(did, error) 65 | call h5gclose_f(gid, error) 66 | call h5fclose_f(fid, error) 67 | end program 68 | -------------------------------------------------------------------------------- /hdf5-samples/read-hdf5.pro: -------------------------------------------------------------------------------- 1 | file = 'star.hdf5' 2 | fid = h5f_open(file) 3 | did = h5d_open(fid, '/star/T') 4 | T = h5d_read(did) 5 | 6 | print, 'Temperature at the center: ', T[0, 0] 7 | 8 | h5d_close, did 9 | h5f_close, fid 10 | -------------------------------------------------------------------------------- /hdf5-samples/read-hdf5.py: -------------------------------------------------------------------------------- 1 | import h5py 2 | 3 | f = h5py.File('star.hdf5', 'r') # open the file 'star.hdf5' ('r' = read only) 4 | T = f['/star/T'][:] # read the temperature field 5 | n = f['/star'].attrs['ndomains'] # read the number of domains 6 | 7 | print "T (center): " + str(T[0][0]) 8 | print "T (equator): " + str(T[0][-1]) 9 | -------------------------------------------------------------------------------- /hdf5-samples/star.hdf5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/hdf5-samples/star.hdf5 -------------------------------------------------------------------------------- /lib-example/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = src/poly.h 2 | 3 | AM_CXXFLAGS=-I$(top_srcdir)/src/include -I$(top_srcdir)/src/graphics 4 | 5 | AM_LIBS = -lm 6 | 7 | noinst_bindir = $(abs_builddir)/bin 8 | noinst_bin_PROGRAMS = polytrope1d polytrope2d polytrope2d_final 9 | polytrope1d_SOURCES = src/polytrope1d.cpp src/polytrope.cpp 10 | polytrope1d_LDADD = $(top_builddir)/src/libester.la 11 | 12 | polytrope2d_SOURCES = src/polytrope2d.cpp src/polytrope.cpp 13 | polytrope2d_LDADD = $(top_builddir)/src/libester.la 14 | 15 | polytrope2d_final_SOURCES = src/polytrope2d_final.cpp src/polytrope.cpp 16 | polytrope2d_final_LDADD = $(top_builddir)/src/libester.la 17 | -------------------------------------------------------------------------------- /lib-example/src/poly.h: -------------------------------------------------------------------------------- 1 | #ifndef POLY_H 2 | #define POLY_H 3 | 4 | class solution { 5 | public: 6 | matrix *phi; 7 | matrix *phi_ex; 8 | double lambda; 9 | matrix *Rs; 10 | inline solution(matrix *phi, matrix *phi_ex, matrix *Rs, double lambda) { 11 | this->phi = phi; 12 | this->phi_ex = phi_ex; 13 | this->Rs = Rs; 14 | this->lambda = lambda; 15 | } 16 | }; 17 | 18 | solution *solve_poly1d(double n, double tol, int nr); 19 | solution *solve_poly2d(double n, double tol, int nr, int nt, int nex, double omega, 20 | solution *init_guess = NULL); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /lib-example/src/polytrope1d.cpp: -------------------------------------------------------------------------------- 1 | #include "ester.h" 2 | #include "poly.h" 3 | #include 4 | 5 | int main(int argc, char *argv[]) { 6 | 7 | double n = 1.5; // Polytropic index 8 | double tol = 1e-12; // Required tolerance 9 | int nr = 50; // # of points 10 | 11 | solve_poly1d(n, tol, nr); 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /lib-example/src/polytrope2d.cpp: -------------------------------------------------------------------------------- 1 | #include "ester.h" 2 | #include "poly.h" 3 | #include 4 | 5 | int main(int argc, char *argv[]) { 6 | 7 | double n = atof(argv[1]); // Polytropic index (first command-line argument) 8 | double tol = 1e-12; // Required tolerance 9 | int nr = atof(argv[3]); // # of radial points 10 | int nt = atof(argv[4]); // # of points in theta 11 | int nex = 25; // # of points in external domain 12 | double omega = atof(argv[2]); // Angular velocity (second command-line argument) 13 | 14 | solve_poly2d(n, tol, nr, nt, nex, omega); 15 | 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /lib-example/src/polytrope2d_final.cpp: -------------------------------------------------------------------------------- 1 | #include "ester.h" 2 | #include "poly.h" 3 | #include 4 | 5 | /* Solve the rotating polytrope in 2d. 6 | * 7 | * Usage: 8 | * polytrope2d_final polytropic_index omega nr nt 9 | * 10 | * 11 | */ 12 | 13 | int main(int argc, char *argv[]) { 14 | 15 | double n = atof(argv[1]); // Polytropic index (first command-line argument) 16 | double tol = 1e-12; // Required tolerance 17 | int nr = atof(argv[3]); // # of radial points 18 | int nt = atof(argv[4]); // # of points in theta 19 | int nex = 25; // # of points in external domain 20 | double omega = atof(argv[2]); // Angular velocity (second command-line argument) 21 | 22 | 23 | printf("Solving 1D Polytropic problem:\n"); 24 | solution *sol_1d = solve_poly1d(n, tol, nr); 25 | 26 | // Build initial solution for 2d 27 | matrix *guess = new matrix(nr, nt); 28 | for (int it=0; itsetcol(it, *sol_1d->phi); 30 | } 31 | sol_1d->phi = guess; 32 | 33 | printf("\n\nSolving 2D Polytropic problem with guess:\n"); 34 | if (omega <= 0.4) solve_poly2d(n, tol, nr, nt, nex, omega, sol_1d); 35 | if (omega > 0.4) { 36 | solution *sol_2d = solve_poly2d(n, tol, nr, nt, nex, 0.4, sol_1d); 37 | printf("\n\nSolving 2D Polytropic problem with (2D) guess:\n"); 38 | solve_poly2d(n, tol, nr, nt, nex, omega, sol_2d); 39 | } 40 | 41 | delete(sol_1d); 42 | delete(guess); 43 | 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /mainpage.dox: -------------------------------------------------------------------------------- 1 | /// \mainpage 2 | /// 3 | /// For an overview of ESTER, see \ref overview. 4 | /// Back to project mainpage 5 | /// 6 | /// ESTER is divided into several pieces of software: 7 | /// 8 | /// \section matrix_sec Matrix library 9 | /// The matrix library provides classes to facilitate the work with matrices. 10 | /// \see 11 | /// - matrix 12 | /// 13 | /// \section numdiff_sec Numerical differentiation library 14 | /// The numdiff library provides helper classes to ease manipulation of 15 | /// function's derivatives. 16 | /// \see 17 | /// - diff_gl 18 | /// - diff_leg 19 | /// 20 | /// \section sol_sec Solver library 21 | /// \see 22 | /// - solver 23 | /// 24 | /// \section star_sec Star classes 25 | /// ESTER provides two classes to manipulate star objects, star1d and star2d for 26 | /// respectively 1 dimensional stars and 2 dimensional stars. 27 | /// \see 28 | /// - star1d 29 | /// - star2d 30 | /// 31 | -------------------------------------------------------------------------------- /postprocessing/Lz_dist.py: -------------------------------------------------------------------------------- 1 | # visualize the distribution of angular momentum among the domains 2 | 3 | import sys 4 | from ester import * 5 | import matplotlib.pyplot as plt 6 | from numpy import * 7 | import os 8 | 9 | path0=os.path.expanduser( '~/Ester/') 10 | 11 | filename=path0+'build/runs/M12_O5_evol.h5_0014' 12 | 13 | a=star2d(filename) 14 | jfirst=zeros(a.ndomains,dtype=int) 15 | for i in arange(a.ndomains-1)+1: 16 | jfirst[i]=jfirst[i-1]+a.npts[i-1] 17 | 18 | Omega_scale=sqrt(a.pc/a.rhoc)/a.Rp 19 | 20 | Lz=(a.r*sin(a.th))**2*a.w*a.R**5*Omega_scale*a.rho*a.rhoc*a.rz*a.r**2 21 | # Integrateur radial: I(1,nr) 22 | Icheb=a.I.ravel() # 2D array with 1 column ==> 1D array 23 | 24 | # We first integrate over theta on every radial grid point 25 | dlz=[] 26 | for i in range(a.nr): 27 | dlz.append(dot(a.It,Lz[i,:])) 28 | 29 | dlza=2*pi*array(dlz) 30 | # Then we integrate over 'r' on the first ncore grid points 31 | Lz_tot1=dot(dlza,Icheb) 32 | print('Lz total = %6.3e'%Lz_tot1) 33 | 34 | # examen Lz par domaine 35 | Lz_dom=[] 36 | r_dom=[] 37 | for i in range(a.ndomains): 38 | # print(jfirst[i],jfirst[i]+a.npts[i]) 39 | i1=jfirst[i] 40 | i2=jfirst[i]+a.npts[i] 41 | dlz=[] 42 | for j in range(i1,i2): 43 | dlz.append(dot(a.It,Lz[j,:])) 44 | dlza=2*pi*array(dlz) 45 | 46 | Icheb_dom=Icheb[i1:i2] 47 | Lz_dom.append(dot(dlza,Icheb_dom)) 48 | r_dom.append((a.r[i1,0]+a.r[i2-1,0])/2) 49 | 50 | Lz_tot2=sum(Lz_dom) 51 | print('Lz total bis = %6.3e'%Lz_tot2) 52 | 53 | plt.plot(r_dom,Lz_dom) 54 | plt.yscale('log') 55 | 56 | plt.savefig('Lz_dom.png', bbox_inches=0) 57 | 58 | plt.show() 59 | -------------------------------------------------------------------------------- /postprocessing/M_circul.py: -------------------------------------------------------------------------------- 1 | # visualize streamline of the meridional circulation in (r,theta) 2 | # include the path of the python tools in your environment 3 | # variable something like 4 | # setenv PYTHONPATH $HOME/Ester/local/lib/python2.7/site-packages/ester 5 | 6 | import sys 7 | from ester import * 8 | from numpy import * 9 | import matplotlib.pyplot as plt 10 | 11 | filename='M20O3nth40.h5' 12 | a=star2d(filename) 13 | 14 | 15 | nth=a.nth 16 | Req=a.Re/R_SUN 17 | Rpol=a.Rp/R_SUN 18 | print('check Req = %6.3f'%Req,'and Rpol = %6.3f'%Rpol,'in Rsun') 19 | Omega_scale=sqrt(a.pc/a.rhoc)/a.Rp 20 | omega=Omega_scale*a.w 21 | print('omega pole = %6.5e'%omega[-1,nth+1]) 22 | print('omega equator = %6.5e'%omega[-1,0]) 23 | 24 | # the cartesian grid 25 | x=a.r*sin(a.th) 26 | y=a.r*cos(a.th) 27 | # the stellar surface 28 | xb=x[-1,:] 29 | yb=y[-1,:] 30 | x=c_[x,-x[:,-2::-1],-x[:,1:],x[:,-2::-1]] 31 | y=c_[y,y[:,-2::-1],-y[:,1:],-y[:,-2::-1]] 32 | z=c_[a.G,a.G[:,-2::-1],a.G[:,1:],a.G[:,-2::-1]] 33 | # G is not the true stream function but R*sin(theta)*G is a true 34 | # meridional stream function so 35 | Psi=x*z 36 | 37 | M=a.M/M_SUN 38 | param='M = %4.1f'%M+' omega = %4.2f'%a.Omega_bk 39 | plt.figure(1,figsize=(7,7)) 40 | plt.contour(x,y,Psi,30,colors='r') 41 | plt.title('meridional streamlines '+param) 42 | plt.plot(xb,yb,'-',color='k') 43 | plt.plot(xb,-yb,'-',color='k') 44 | plt.plot(-xb,yb,'-',color='k') 45 | plt.plot(-xb,-yb,'-',color='k') 46 | 47 | plt.axis([-5.5,5.5,-5.5,5.5]) 48 | plt.axis('scaled') 49 | plt.savefig(filename+'_Psi.png', bbox_inches=0) 50 | 51 | plt.show() 52 | -------------------------------------------------------------------------------- /postprocessing/P_rot.py: -------------------------------------------------------------------------------- 1 | # visualize Rotation Period(r,theta) 2 | # include the path of the python tools in your environment 3 | # variable something like 4 | # setenv PYTHONPATH $HOME/Ester/local/lib/python2.7/site-packages/ester 5 | 6 | import sys 7 | from ester import * 8 | import matplotlib.pyplot as plt 9 | import numpy as np 10 | import math 11 | 12 | filename='M5_O95' 13 | a=star2d(filename) 14 | 15 | nth=a.nth 16 | Req=a.Re/R_SUN 17 | Rpol=a.Rp/R_SUN 18 | print('check Req and Rpol',Req,Rpol,'in Rsun') 19 | Omega_scale=np.sqrt(a.pc/a.rhoc)/a.Rp 20 | omega=Omega_scale*a.w 21 | print('omega pole',omega[-1,nth+1]) 22 | print('omega equator',omega[-1,0]) 23 | 24 | x=a.r*np.sin(a.th)/R_SUN 25 | y=a.r*np.cos(a.th)/R_SUN 26 | x=np.c_[x,-x[:,-2::-1],-x[:,1:],x[:,-2::-1]] 27 | y=np.c_[y,y[:,-2::-1],-y[:,1:],-y[:,-2::-1]] 28 | pi=math.acos(-1)/3600. 29 | z=2*pi/np.c_[omega,omega[:,-2::-1],omega[:,1:],omega[:,-2::-1]] 30 | plt.figure(1,figsize=(7,7)) 31 | plt.contourf(x,y,z,60,cmap=plt.cm.RdBu) 32 | plt.title('Rotation Period (hours)') 33 | 34 | plt.colorbar() 35 | plt.axis([-5.5,5.5,-5.5,5.5]) 36 | plt.axis('scaled') 37 | plt.savefig(filename+'_P_rot.png', bbox_inches=0) 38 | 39 | plt.show() 40 | -------------------------------------------------------------------------------- /postprocessing/Roche.py: -------------------------------------------------------------------------------- 1 | # We calculate the flatness with the Roche model 2 | # calculate omk knowing omc and vice-versa 3 | 4 | from numpy import * 5 | from scipy.optimize import root 6 | 7 | 8 | # we have to solve a cubic equation a-J2*a**3=1+J2+0.5*omk**2 9 | 10 | def eps(omk): 11 | return omk**2/(2+omk**2) 12 | 13 | def om_k(omc): 14 | khi=arcsin(omc) 15 | return sqrt(6*sin(khi/3)/omc-2) 16 | 17 | omc=0.88 18 | print('omc=',omc,' omk=',om_k(omc)) 19 | -------------------------------------------------------------------------------- /postprocessing/Surface.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | # computes the non-dimensional surface of the star. For spherical star S=4*pi 3 | # The star is axisymmetric 4 | 5 | from ester import * 6 | from numpy import * 7 | 8 | file_of_star_model='Master/M3_O1.h5' 9 | a=star2d(file_of_star_model) 10 | 11 | # We first define fields without equator and poles 12 | r=a.r[-1,1:-1] 13 | rt=a.rt[-1,1:-1] 14 | weights=a.It[1:-1] # actually we eliminate 0 introduced at pole and equator 15 | # dS is the surface element 16 | 17 | dS=2*pi*r**2*sqrt(1+rt**2/r**2) 18 | Surf=dot(weights,dS) 19 | 20 | print('The non-dimensional Rpol=1 is %6.3f'%Surf,' S/S_sphere = %6.3f'%(Surf/4/pi)) 21 | -------------------------------------------------------------------------------- /postprocessing/Volume.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | # Compute the volume and the mass of a model 3 | 4 | from ester import * 5 | from numpy import * 6 | 7 | a=star2d('M3O5.h5') 8 | dv = a.r**2 * a.rz 9 | dm = a.rho*a.r**2 * a.rz 10 | 11 | Icheb=a.I.ravel() 12 | 13 | # We first integrate over theta on every radial grid point 14 | # remove pole and equator added by ester 15 | Vrad=[] 16 | Mrad=[] 17 | for i in range(a.nr): 18 | Vrad.append(dot(a.It[1:-1],dv[i,1:-1])) 19 | Mrad.append(dot(a.It[1:-1],dm[i,1:-1])) 20 | 21 | V = 2*pi*dot(Vrad, Icheb)*a.R**3 22 | Mass=2*pi*dot(Mrad, Icheb)*a.rhoc*a.R**3/M_SUN 23 | 24 | print('Mass %6.3f'%Mass+' Msun') 25 | print('Vol %6.3e'%V+' cm^3') 26 | 27 | 28 | -------------------------------------------------------------------------------- /postprocessing/app_lum_incl.py: -------------------------------------------------------------------------------- 1 | # Script that plots the apparent luminosity of a rotating star as a 2 | # function of the inclination of the line-of-sight with respect to the 3 | # rotation axis. Units are incl. angle in degree, apparent luminosity in 4 | # solar units. 5 | # Note: app_lum=4*pi*d^2*flux_received_at distance 'd' along the 6 | # line-of-sight characterized by the angle i, limb darkening is not 7 | # taken into account. Details in star2d_extra.cpp 8 | # Author : M. Rieutord (9/3/2016) 9 | 10 | from ester import * 11 | import matplotlib.pyplot as plt 12 | 13 | np=20 14 | lum_app=[0.0 for i in range(np)] 15 | angle=[float(i)/float(np-1)*90 for i in range(np)] 16 | a=star2d('M3_O3.h5') 17 | print('Luminosity of the star (solar unit) =',a.L/L_SUN) 18 | print(' ') 19 | 20 | k=0 21 | for i in angle: 22 | app_l= a.apparent_luminosity(i) 23 | print(i, 'angle in degrees, app lum =',app_l) 24 | lum_app[k]=app_l 25 | k=k+1 26 | 27 | 28 | plt.plot(angle,lum_app,'b-') 29 | 30 | plt.xlabel(r'Line of sight angle (degree)') #labeling the plot 31 | plt.ylabel(r'Apparent luminosity (Lsun)') 32 | 33 | plt.show() 34 | -------------------------------------------------------------------------------- /postprocessing/cheb1d.py: -------------------------------------------------------------------------------- 1 | # Compute the 1D Chebyshev spectrum of the density 2 | 3 | from ester import * 4 | import matplotlib.pyplot as plt 5 | import numpy as np 6 | 7 | 8 | a=star1d('M3.h5') # open a 1D solution 9 | 10 | print('Compute the Chebyshev spectrum of the density') 11 | 12 | # a.P is the projection matrix of the Gauss-Lobatto grid 13 | 14 | x=a.r**2 15 | sp1d=abs(np.dot(a.P,a.rho)) 16 | jfirst=np.zeros(a.ndomains,dtype=np.int) 17 | 18 | for i in np.arange(a.ndomains-1)+1: 19 | jfirst[i]=jfirst[i-1]+a.npts[i] 20 | 21 | for i in range(a.ndomains): 22 | sp0=sp1d[jfirst[i]] # normalization by the first coefficient 23 | sp1d[jfirst[i]:jfirst[i]+a.npts[i],0]=sp1d[jfirst[i]:jfirst[i]+a.npts[i],0]/sp0 24 | plt.plot(np.arange(a.npts[i])+jfirst[i],sp1d[jfirst[i]:jfirst[i]+a.npts[i]]) 25 | 26 | ym=min(sp1d) 27 | vertical=np.array([1e-20,1e1]) 28 | hori=np.array([0,0]) 29 | for i in range(a.ndomains): 30 | plt.plot(hori+jfirst[i],vertical,'k--') 31 | 32 | plt.xlim(xmin=0,xmax=a.nr) 33 | plt.ylim(ymin=ym,ymax=1) 34 | plt.yscale('log') 35 | plt.xlabel(r'grid point of the n$^{\rm th}$ domain + n') 36 | plt.ylabel(r'|a$_n$|') 37 | plt.title('1D Chebyshev spectra') 38 | 39 | plt.show() 40 | -------------------------------------------------------------------------------- /postprocessing/eps_J2.py: -------------------------------------------------------------------------------- 1 | # We calculate the flatness with the Roche model taking into account 2 | # the quadrupolar moment of the gravitational potential 3 | 4 | from numpy import * 5 | from scipy.optimize import root 6 | 7 | 8 | # we have to solve a cubic equation a-J2*a**3=1+J2+0.5*omk**2 9 | 10 | def a(x,J2,omk): 11 | return x-J2*x**3-1.-J2-0.5*omk**2 12 | 13 | J2=0.002108 14 | omk=0.8366 15 | print(a(0.9,J2,omk)) 16 | rt= root(a, 1., args=(J2,omk )).x[0] 17 | rt0= root(a, 1., args=(0.,omk )).x[0] 18 | 19 | eps=1.-1./rt 20 | eps0=1.-1./rt0 21 | print('eps = ',eps,'eps (J2=0) = ',eps0) 22 | print('J2 effect',(eps-eps0)/eps0) 23 | -------------------------------------------------------------------------------- /postprocessing/film.py: -------------------------------------------------------------------------------- 1 | # Make a series of .png files viewing (here) the differential rotation 2 | # (a.w field) from a series of ester models 3 | # files written in "film/" directory 4 | # preliminary step to make a film with other tools 5 | # the script make_the_film, which uses mencoder, is a possible solution 6 | 7 | import sys 8 | from ester import * 9 | import matplotlib.pyplot as plt 10 | import math 11 | import commands 12 | import string 13 | import numpy as np 14 | 15 | Lsun=3.8396e33; 16 | sigma=5.67e-5; # Stefan constant, cgs 17 | R_SUN=6.95508e10; 18 | 19 | liste=commands.getoutput('ls $HOME/uqbar/ESTER/Z0.014/M5_film/M5Xc1sol6565_film_0*') 20 | 21 | lis=liste.split() 22 | print('nb of images ',len(lis)) 23 | 24 | te=[0.0 for i in range(len(lis))] 25 | 26 | i=0 27 | for filename in lis: 28 | print(filename) 29 | a=star2d(filename) 30 | print('Xc',i,a.Xc) 31 | Req=a.Re/R_SUN 32 | Rpol=a.Rp/R_SUN 33 | print(Req,Rpol) 34 | 35 | x=a.r*np.sin(a.th)/R_SUN # en km 36 | y=a.r*np.cos(a.th)/R_SUN # en km 37 | x=np.c_[x,-x[:,-2::-1],-x[:,1:],x[:,-2::-1]] 38 | y=np.c_[y,y[:,-2::-1],-y[:,1:],-y[:,-2::-1]] 39 | pi=math.acos(-1)/3600. 40 | z=2*pi/np.c_[a.w,a.w[:,-2::-1],a.w[:,1:],a.w[:,-2::-1]] 41 | plt.figure(1,figsize=(7,7)) 42 | plt.contourf(x,y,z,60,cmap=plt.cm.RdBu) 43 | plt.axis([-5.5,5.5,-5.5,5.5]) 44 | srtnum='{0:03}'.format(i) 45 | plt.savefig('film/anim_M5_'+srtnum+'.png', bbox_inches=0) 46 | plt.close() 47 | i=i+1 48 | -------------------------------------------------------------------------------- /postprocessing/make_the_film: -------------------------------------------------------------------------------- 1 | mencoder "mf://*.png" -mf w=800:h=600:fps=25:type=png -ovc x264 -x264encopts bitrate=5000 -oac copy -o film.avi 2 | -------------------------------------------------------------------------------- /postprocessing/omega.py: -------------------------------------------------------------------------------- 1 | # visualize omega(r,theta) 2 | 3 | import sys 4 | from ester import * 5 | import matplotlib.pyplot as plt 6 | import numpy as np 7 | import os 8 | 9 | path0=os.path.expanduser( '~/Ester/') 10 | 11 | 12 | grav = 6.67384e-8; 13 | 14 | filename=path0+'local/runs/Master/Z=0/M20O3nth40.h5' 15 | 16 | a=star2d(filename) 17 | 18 | 19 | nth=a.nth 20 | Req=a.Re/R_SUN 21 | Rpol=a.Rp/R_SUN 22 | print('check Req and Rpol',Req,Rpol,'in Rsun') 23 | Omega_scale=np.sqrt(a.pc/a.rhoc)/a.Rp 24 | omega=Omega_scale*a.w 25 | print('omega pole',omega[-1,nth+1]) 26 | print('omega equator',omega[-1,0]) 27 | 28 | x=a.r*np.sin(a.th) 29 | y=a.r*np.cos(a.th) 30 | x=np.c_[x,-x[:,-2::-1],-x[:,1:],x[:,-2::-1]] 31 | y=np.c_[y,y[:,-2::-1],-y[:,1:],-y[:,-2::-1]] 32 | z=np.c_[omega,omega[:,-2::-1],omega[:,1:],omega[:,-2::-1]] 33 | plt.figure(1,figsize=(7,7)) 34 | plt.contourf(x,y,z,60,cmap=plt.cm.RdBu) 35 | plt.title('Rotation rate (rad/s)') 36 | plt.colorbar() 37 | plt.axis([-5.5,5.5,-5.5,5.5]) 38 | plt.axis('scaled') 39 | fichier=filename.split('/')[-1].split('.')[-2] 40 | plt.savefig(fichier+'_w.png', bbox_inches=0) 41 | 42 | plt.show() 43 | -------------------------------------------------------------------------------- /postprocessing/plot.py: -------------------------------------------------------------------------------- 1 | # visualize a chosen quantity for each co-latitudes theta 2 | # pass model file name and quantity as parameters 3 | 4 | from ester import * 5 | import matplotlib.pyplot as plt 6 | import numpy as np 7 | import argparse 8 | 9 | parser = argparse.ArgumentParser() 10 | parser.add_argument( 11 | "model", 12 | type=str, 13 | help="the path to the folder containing ESTER model", 14 | ) 15 | parser.add_argument( 16 | "--plot", 17 | default="rho", 18 | type=str, 19 | help=f"which parameter to plot" 20 | ) 21 | ARGS = parser.parse_args() 22 | 23 | a=star2d(ARGS.model) 24 | plt.plot(a.r[:],np.log10(getattr(a, ARGS.plot)[:])) 25 | plt.xlabel("r") 26 | plt.ylabel(ARGS.plot) 27 | plt.show() 28 | -------------------------------------------------------------------------------- /postprocessing/plot1d_profiles.py: -------------------------------------------------------------------------------- 1 | # Script giving an example for plotting profiles of physical quantities 2 | # from 1d models 3 | 4 | from ester import * 5 | import matplotlib.pyplot as plt 6 | import numpy as np 7 | from pathlib import Path 8 | import os 9 | 10 | path=os.path.expanduser( '~/Ester/runs/Master/') 11 | a=star1d(path+'M5.h5') # open a 1D solution 12 | 13 | Rayon=a.R/R_SUN 14 | print(Rayon) # print the radius 15 | 16 | lnrho=np.log(a.rho) # ln(rho) 17 | dlnrho=np.dot(a.D,lnrho) # radial derivative of ln(rho) 18 | 19 | lnp=np.log(a.p) 20 | dlnp=np.dot(a.D,lnp) 21 | Pr_rad=a.cp*a.T/5/C_LIGHT**2 22 | 23 | phi=a.phi # gravitational potential 24 | dphi=np.dot(a.D,phi) # gravity 25 | 26 | plt.plot(a.r/a.R,dphi,'ro') # plot red dots 27 | #plt.yscale('log') # if log scale needed 28 | #plt.xscale('log') 29 | 30 | 31 | plt.show() 32 | -------------------------------------------------------------------------------- /postprocessing/primitive.py: -------------------------------------------------------------------------------- 1 | # radial integrator : compute the primitive that vanishes at the origin 2 | 3 | import numpy as np 4 | 5 | def integre(f,a): 6 | 7 | # computes the jfirst grid points 8 | jfirst=np.zeros(a.ndomains,dtype=np.int) 9 | 10 | for i in np.arange(a.ndomains-1)+1: 11 | jfirst[i]=jfirst[i-1]+a.npts[i-1] 12 | 13 | # fill the matrix with the derivation-matrix 14 | A=a.D 15 | # Impose the continuity of the primitive at each domain junction 16 | for idom in np.arange(a.ndomains-1)+1: 17 | if idom >= 1: 18 | A[jfirst[idom],:]=0.0 19 | A[jfirst[idom],jfirst[idom]-1]=-1.0 20 | A[jfirst[idom],jfirst[idom]]=1.0 21 | f[jfirst[idom]]=0.0 22 | 23 | # Impose that the primitive vanishes at the origin 24 | A[0,:]=0. 25 | A[0,0]=1. 26 | f[0]=0. 27 | 28 | # Solve for the RHS 29 | x = np.linalg.solve(A, f) 30 | 31 | return x 32 | 33 | # and get the primitive on all the Gauss-Lobatto grid(s) 34 | -------------------------------------------------------------------------------- /postprocessing/spectrum2d.py: -------------------------------------------------------------------------------- 1 | # Compute the 2D Chebyshev Spherical Harmonic spectrum of the density 2 | 3 | from ester import * 4 | import matplotlib.pyplot as plt 5 | import numpy as np 6 | from matplotlib import cm 7 | 8 | filename='M5_O95_nth30' 9 | a=star2d(filename) # open a 2D solution 10 | 11 | print('Compute the 2D spectrum of the density') 12 | 13 | # a.P is the projection matrix of the Gauss-Lobatto grid 14 | # a.P_00 is the projection matrix of the Gauss-Legendre grid for a field 15 | # symmetric with respect to equator 16 | 17 | 18 | sp_leg=np.zeros((a.nr,a.nth)) 19 | print('check the shape',sp_leg.shape) 20 | 21 | # Gauss Legendre spectrum 22 | # we eliminate the pole/equator points that are respectively at a.nth+1 23 | # and 0 24 | 25 | for i in range(a.nr): 26 | sp_leg[i,:]=np.dot(a.P_00,a.rho[i,1:a.nth+1]) 27 | 28 | for k in range(a.nth): 29 | sp_leg[:,k]=abs(np.dot(a.P,sp_leg[:,k])) 30 | 31 | # Normalisation by the coefficient (0,0) in each domain 32 | jfirst=np.zeros(a.ndomains,dtype=np.int) 33 | 34 | for i in np.arange(a.ndomains-1)+1: 35 | jfirst[i]=jfirst[i-1]+a.npts[i] 36 | 37 | for i in range(a.ndomains): 38 | sp0=sp_leg[jfirst[i],0] # normalization by the (n=0,l=0) coefficient 39 | sp_leg[jfirst[i]:jfirst[i]+a.npts[i],:]=sp_leg[jfirst[i]:jfirst[i]+a.npts[i],:]/sp0 40 | 41 | x=np.arange(a.nth) 42 | y=np.arange(a.nr) 43 | 44 | rap=float(a.nth)/a.nr 45 | cax = plt.matshow(np.log10(abs(sp_leg)),origin='lower',aspect=rap) 46 | cbar = plt.colorbar(cax,fraction=0.05,pad=0.1) 47 | # fraction = 5 % and pad = white padding between bar and plot in inches! 48 | 49 | #plt.grid(True) 50 | #plt.xlabel('2D spectrum') 51 | plt.title('Index of spherical harmonic') 52 | plt.ylabel(r'Chebyshev index + domain rank') 53 | 54 | li=[str(2*x[i]) for i in range(a.nth)] 55 | plt.xticks(x,li) 56 | plt.yticks(jfirst) 57 | 58 | 59 | fig = plt.gcf() 60 | fig.set_size_inches(12., 10.,forward=True) 61 | plt.savefig(filename+'_sp2D.png',dpi=100, bbox_inches=0) 62 | 63 | plt.show() 64 | -------------------------------------------------------------------------------- /postprocessing/viewstar.py: -------------------------------------------------------------------------------- 1 | # Show an image of the star as viewed with a given line-of-sight angle 2 | # (with respect to rotation axis). Note that limb darkening is not taken 3 | # into account (only gravity darkening). 4 | 5 | from mpl_toolkits.mplot3d import Axes3D 6 | from matplotlib import cm 7 | from matplotlib.colors import LogNorm 8 | import matplotlib.pyplot as plt 9 | import matplotlib.colors as pltc 10 | import numpy as np 11 | import string 12 | from ester import * 13 | 14 | a=star2d('Achernar2d') 15 | 16 | nth=a.nth+2 # we take care that the plotted fields as read by "a" have 17 | # nth+2 points in latitude 18 | u = np.linspace(0, 2 * np.pi, 100) # generate angle phi grid 19 | v = a.th[-1,:] # angle theta 20 | w=v+np.pi/2 21 | v=np.concatenate([w[0:nth-1],v]) # angle theta pi (South pole) to 0 22 | 23 | r_sud=a.r[-1,:] 24 | r_nord=a.r[-1,nth:0:-1] 25 | r=np.concatenate([r_nord,r_sud]) 26 | 27 | teff_rsh=np.reshape(a.Teff,nth) 28 | teff_ext=np.concatenate([teff_rsh[nth:0:-1],teff_rsh]) 29 | 30 | 31 | x = np.outer(np.cos(u), r*np.sin(v)) 32 | y = np.outer(np.sin(u), r*np.sin(v)) 33 | z = np.outer(np.ones(np.size(u)), r*np.cos(v)) 34 | Teff = np.outer(np.ones(np.size(u)), teff_ext) 35 | 36 | N=1-(Teff/Teff.max())**4 # so that white of "Blues" shows the max of Teff 37 | m=cm.ScalarMappable(cmap=cm.Blues, norm = pltc.Normalize(vmin=0,vmax=1.,clip=False)) 38 | 39 | m.set_array(N) 40 | 41 | 42 | i=112. 43 | 44 | print('inclination angle i = ',i) 45 | fig = plt.figure() 46 | ax = fig.add_subplot(111, projection='3d') 47 | ax.plot_surface(x, y, z, rstride=1, cstride=1, facecolors=m.to_rgba(N),linewidth=0, antialiased=True, shade=True, alpha=0.9) # alpha = opacity of the surface 48 | ax.set_xlim(-1,1) 49 | ax.set_ylim(-1,1) 50 | ax.set_zlim(-1,1) 51 | ax._axis3don=False 52 | ax.patch.set_facecolor('black') 53 | ax.auto_scale_xyz([-1,1],[-1,1],[-1,1]) # true axis ratio 54 | incl=90-i 55 | ax.view_init(elev=incl,azim=60) # view angle, here azim is arbitrary 56 | # the star is axisymmetric! 57 | plt.axis('image') 58 | plt.show() 59 | -------------------------------------------------------------------------------- /python/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_definitions(-DWITH_CMAKE) 2 | add_definitions(-DENABLE_PLT) 3 | include_directories(${HDF5_INCLUDE_DIRS}) 4 | 5 | add_custom_target(__init__.py ALL 6 | COMMAND sed -e 's,[@]PYTHON[@],${PYTHON_EXECUTABLE},g' ${CMAKE_SOURCE_DIR}/python/ester.in > __init__.py) 7 | 8 | add_custom_target(cesam.py ALL 9 | COMMAND sed -e 's,[@]PYTHON[@],${PYTHON_EXECUTABLE},g' ${CMAKE_SOURCE_DIR}/python/cesam.in > cesam.py) 10 | 11 | execute_process( 12 | COMMAND "${PYTHON_EXECUTABLE}" -c "if True: 13 | from distutils import sysconfig as sc 14 | print(sc.get_python_lib(prefix='', plat_specific=True))" 15 | OUTPUT_VARIABLE PYTHON_SITE 16 | OUTPUT_STRIP_TRAILING_WHITESPACE) 17 | 18 | include(${SWIG_USE_FILE}) 19 | 20 | set(CMAKE_SWIG_FLAGS "-I${CMAKE_SOURCE_DIR}/src/include;-I${CMAKE_SOURCE_DIR}/src/graphics;") 21 | include_directories(${PYTHON_INCLUDE_DIRS}) 22 | include_directories(${CMAKE_SOURCE_DIR}/src/include) 23 | include_directories(${CMAKE_SOURCE_DIR}/src/graphics) 24 | 25 | set_property(SOURCE ester.i PROPERTY CPLUSPLUS ON) 26 | if(${CMAKE_VERSION} VERSION_LESS "3.8") 27 | swig_add_module(ester_wrap python ester.i) 28 | else() 29 | swig_add_library(ester_wrap LANGUAGE python SOURCES ester.i) 30 | endif() 31 | target_link_libraries(${SWIG_MODULE_ester_wrap_REAL_NAME} ester cesam ${HDF5_CXX_LIBRARIES}) 32 | 33 | install(TARGETS ${SWIG_MODULE_ester_wrap_REAL_NAME} 34 | DESTINATION ${PYTHON_SITE}/ester) 35 | 36 | install(FILES 37 | ${CMAKE_CURRENT_BINARY_DIR}/__init__.py 38 | ${CMAKE_CURRENT_BINARY_DIR}/ester_wrap.py 39 | ${CMAKE_CURRENT_BINARY_DIR}/cesam.py 40 | DESTINATION ${PYTHON_SITE}/ester) 41 | -------------------------------------------------------------------------------- /python/Makefile.am: -------------------------------------------------------------------------------- 1 | do_subst = sed -e 's,[@]PYTHON[@],$(PYTHON),g' 2 | 3 | if BUILD_ESTER_PY 4 | EXTRA_DIST = ester.in ester_wrap.py ester_wrap.cxx ester.i num.in cesam.in 5 | 6 | BUILT_SOURCES = __init__.py cesam.py num.py 7 | 8 | if HAVE_SWIG 9 | SWIG_SRC = $(srcdir)/ester.i 10 | BUILT_SOURCES += ester_wrap.cpp 11 | endif 12 | 13 | pkgpython_PYTHON = __init__.py ester_wrap.py num.py cesam.py 14 | pkgpyexec_LTLIBRARIES = _ester_wrap.la 15 | 16 | _ester_wrap_la_SOURCES = ester_wrap.cpp 17 | _ester_wrap_la_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/graphics 18 | _ester_wrap_la_LDFLAGS = -module 19 | _ester_wrap_la_LIBADD = $(top_builddir)/src/libester.la 20 | 21 | if HAVE_SWIG 22 | ester_wrap.cpp: $(SWIG_SRC) 23 | $(SWIG) -c++ -python $(SWIG_PYTHON_OPT) -I$(top_srcdir)/src/include -I$(top_srcdir)/src/graphics -o $@ $< 24 | else 25 | ester_wrap.cpp: $(srcdir)/ester_wrap.cxx 26 | cp $< $@ 27 | ester_wrap.py: $(srcdir)/ester_wrap.py 28 | cp $< $@ 29 | endif 30 | 31 | __init__.py: $(srcdir)/ester.in Makefile 32 | $(do_subst) < $< > $@ 33 | 34 | num.py: $(srcdir)/num.in Makefile 35 | $(do_subst) < $< > $@ 36 | 37 | cesam.py: $(srcdir)/cesam.in Makefile 38 | $(do_subst) < $< > $@ 39 | 40 | CLEANFILES = $(BUILT_SOURCES) 41 | endif 42 | 43 | install-exec-hook: 44 | @echo 45 | @echo 46 | @echo 47 | @echo "----------------------------------------------------------------------" 48 | @echo "Binaries are installed in:" 49 | @echo " $(prefix)/bin" 50 | @echo " (add it to your PATH)" 51 | @echo 52 | @echo "Libraries are installed in:" 53 | @echo " $(libdir)" 54 | @echo 55 | if BUILD_ESTER_PY 56 | @echo "Python modules are in:" 57 | @echo " $(pkgpythondir)" 58 | @echo " $(pkgpyexecdir)" 59 | else 60 | @echo "Python modules were not built" 61 | endif 62 | @echo 63 | @echo "Examples have been built in:" 64 | @echo " $(abs_top_builddir)/lib-example/bin" 65 | @echo "----------------------------------------------------------------------" 66 | @echo 67 | @echo 68 | @echo 69 | -------------------------------------------------------------------------------- /python/ester.i: -------------------------------------------------------------------------------- 1 | %module ester_wrap 2 | 3 | #pragma SWIG nowarn=362 4 | 5 | %ignore mapping::ext_map; 6 | %ignore double_map; 7 | %ignore create_double_map; 8 | %ignore matrix_map_elem; 9 | 10 | %ignore operator*; 11 | %ignore operator+; 12 | %ignore operator-; 13 | %ignore operator/; 14 | %ignore operator,; 15 | %ignore operator=; 16 | %ignore operator*=; 17 | %ignore operator+=; 18 | %ignore operator&&; 19 | %ignore operator||; 20 | %ignore operator[]; 21 | %ignore operator(); 22 | %ignore operator==; 23 | %ignore operator!=; 24 | %ignore operator>=; 25 | %ignore operator<=; 26 | %ignore operator>; 27 | %ignore operator<; 28 | %ignore operator matrix_map; 29 | %ignore operator double_map; 30 | %ignore operator matrix; 31 | %ignore star2d::version_struct; 32 | %ignore star2d::units_struct; 33 | %ignore star2d::config_struct; 34 | 35 | %{ 36 | #include "matrix.h" 37 | #include "star.h" 38 | #include "physics.h" 39 | #include "mapping.h" 40 | #include "numdiff.h" 41 | #include "matplotlib.h" 42 | %} 43 | 44 | %include "carrays.i" 45 | %array_class(double, doubleArray); 46 | %array_class(int, intArray); 47 | 48 | %include "matrix.h" 49 | %include "physics.h" 50 | %include "mapping.h" 51 | %include "numdiff.h" 52 | %include "star.h" 53 | %include "matplotlib.h" 54 | -------------------------------------------------------------------------------- /python/num.in: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | def polint(xa, ya, n, x): 4 | dif=abs(x-xa[0]) 5 | c = np.zeros(n+1) 6 | d = np.zeros(n+1) 7 | ns = 1 8 | for i in range(1, n+1): 9 | dift = abs(x-xa[i-1]) 10 | if dift < dif: 11 | ns = i 12 | dif = dift 13 | c[i-1] = ya[i-1] 14 | d[i-1] = ya[i-1] 15 | 16 | y = ya[ns-1] 17 | ns = ns - 1 18 | for m in range(1, n): 19 | for i in range(1, n-m+1): 20 | ho = xa[i-1] - x 21 | hp = xa[i+m-1] - x 22 | w = c[i] - d[i-1] 23 | den = ho - hp 24 | if den == .0: 25 | print('x: %s' % str(xa)) 26 | raise Exception('Error in polint') 27 | den = w/den 28 | d[i-1] = hp*den 29 | c[i-1] = ho*den 30 | if 2*ns < n-m: 31 | dy = c[ns] 32 | else: 33 | dy = d[ns-1] 34 | ns = ns-1 35 | y = y + dy 36 | return y 37 | -------------------------------------------------------------------------------- /references/M5-omega0.8.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/references/M5-omega0.8.h5 -------------------------------------------------------------------------------- /src/dummy.cpp: -------------------------------------------------------------------------------- 1 | int ester_dummy_symbol; 2 | -------------------------------------------------------------------------------- /src/global/global.cpp: -------------------------------------------------------------------------------- 1 | #ifndef WITH_CMAKE 2 | #include "ester-config.h" 3 | #endif 4 | #include "matrix.h" 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | extern const double PI=acos(-1); 11 | extern const double SIG_SB=5.670400e-5; 12 | extern const double K_BOL=1.3806503e-16; 13 | extern const double HYDROGEN_MASS=1.67353249e-24; 14 | extern const double A_RAD=7.565767e-15; 15 | extern const double GRAV=6.67384e-8; 16 | extern const double C_LIGHT=2.99792458e10; 17 | 18 | extern const double M_SUN=1.9891e33; 19 | extern const double R_SUN=6.95508e10; 20 | extern const double L_SUN=3.8396e33; 21 | 22 | #include "matrix.h" 23 | 24 | extern "C" 25 | const char *ester_version() { 26 | return VERSION; 27 | } 28 | 29 | double_map AMASS = create_double_map 30 | ("n",1.008665) 31 | ("p",1.00727647) 32 | ("H",1.007825) 33 | ("H2",2.0141018) 34 | ("He3",3.0160293) 35 | ("He4",4.0026033) 36 | ("Li6",6.015121) 37 | ("Li7",7.0160040) 38 | ("Be7",7.0169292) 39 | ("Be9",9.0121821) 40 | ("B11",11.0093055) 41 | ("C12",12.) 42 | ("C13",13.0033548) 43 | ("N13",13.0057386) 44 | ("N14",14.003074) 45 | ("N15",15.001089) 46 | ("O16",15.9949146) 47 | ("O17",16.9991315) 48 | ("O18",17.9991604) 49 | ("F18",18.0009377) 50 | ("F19",18.9984032) 51 | ("Ne20",19.9924402) 52 | ("Ne21",20.9938467) 53 | ("Ne22",21.9913855) 54 | ("Na23",22.9897697) 55 | ("Mg23",22.9941249) 56 | ("Mg24",23.9850419) 57 | ("Mg25",24.985837) 58 | ("Mg26",25.982593) 59 | ("Si28",28.0855) 60 | ("Al27",26.9854) 61 | ("S32",31.972070) 62 | ("P31",30.973762) 63 | ("Fe56",55.847); 64 | -------------------------------------------------------------------------------- /src/include/constants.h: -------------------------------------------------------------------------------- 1 | #ifndef _CONSTANTS_H 2 | #define _CONSTANTS_H 3 | 4 | #include "matrix.h" 5 | 6 | extern const double PI; 7 | extern const double SIG_SB; 8 | extern const double K_BOL; 9 | extern const double HYDROGEN_MASS; 10 | extern const double A_RAD; 11 | extern const double GRAV; 12 | extern const double C_LIGHT; 13 | 14 | extern const double M_SUN; 15 | extern const double R_SUN; 16 | extern const double L_SUN; 17 | 18 | extern double_map AMASS; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /src/include/debug.h: -------------------------------------------------------------------------------- 1 | #ifndef DEBUG_H 2 | #define DEBUG_H 3 | 4 | #include "utils.h" 5 | #include "matrix.h" 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | 13 | void sigfpe_handler(int); 14 | void enable_sigfpe(); 15 | void disable_sigfpe(); 16 | 17 | class runtime_exception : public std::exception { 18 | }; 19 | 20 | class star1d; 21 | 22 | class repl { 23 | public: 24 | repl(const std::string& name); 25 | std::string read(); 26 | void print(); 27 | virtual int eval(const std::string&) = 0; 28 | 29 | static std::vector get_args(const std::string&); 30 | }; 31 | 32 | class debugger : public repl { 33 | private: 34 | star1d& star; 35 | void help(); 36 | matrix get_var(const std::string& var); 37 | 38 | public: 39 | debugger(int argc, char *argv[], star1d&); 40 | virtual int eval(const std::string& cmd); 41 | int exec(); 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/include/ester.h: -------------------------------------------------------------------------------- 1 | #ifndef _ESTER_H 2 | #define _ESTER_H 3 | 4 | #include "constants.h" 5 | #include "mapping.h" 6 | #include "matrix.h" 7 | #include "numdiff.h" 8 | #include "parser.h" 9 | #include "physics.h" 10 | #include "solver.h" 11 | #include "star.h" 12 | #include "symbolic.h" 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /src/include/graphics.h: -------------------------------------------------------------------------------- 1 | #ifndef _GRAPHICS_H 2 | #define _GRAPHICS_H 3 | 4 | #include "matrix.h" 5 | 6 | class figure { 7 | int id; 8 | char dev[32]; 9 | int hold_state; 10 | int axis_set,caxis_set; 11 | double x0,x1,y0,y1,z0,z1; 12 | int xlog,ylog; 13 | int just; 14 | int draw_state; 15 | int draw_colorbar; 16 | public: 17 | explicit figure(const char *device="/NULL"); 18 | ~figure(); 19 | void plot(const matrix &x,const matrix &y,const char *line=""); 20 | void plot(const matrix &y,const char *line=""); 21 | void axis(double sx0,double sx1,double sy0,double sy1,int sjust=0); 22 | void caxis(double sz0,double sz1); 23 | void hold(int state); 24 | void draw(int state); 25 | void subplot(int nr,int nc); 26 | void next(); 27 | void clear(); 28 | void semilogx(const matrix &x,const matrix &y,const char *line=""); 29 | void semilogx(const matrix &y,const char *line=""); 30 | void semilogy(const matrix &x,const matrix &y,const char *line=""); 31 | void semilogy(const matrix &y,const char *line=""); 32 | void loglog(const matrix &x,const matrix &y,const char *line=""); 33 | void loglog(const matrix &y,const char *line=""); 34 | void label(const char *xlabel,const char *ylabel,const char *title); 35 | void pcolor(const matrix &z); 36 | void pcolor(const matrix &x,const matrix &y,const matrix &z); 37 | void colorbar(int set=1); 38 | void contour(const matrix &x,const matrix &y,const matrix &z,int ncontours,const char *line=""); 39 | void contour(const matrix &z,int ncontours,const char *line=""); 40 | void contour(const matrix &x,const matrix &y,const matrix &z,const matrix &contours,const char *line=""); 41 | void contour(const matrix &z,const matrix &contours,const char *line=""); 42 | void contour(const matrix &x,const matrix &y,const matrix &z,const char *line=""); 43 | void contour(const matrix &z,const char *line=""); 44 | }; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/include/lapack.h: -------------------------------------------------------------------------------- 1 | #ifndef _LAPACK_H_ 2 | #define _LAPACK_H_ 3 | 4 | extern "C" { 5 | void dgetrf_( int* m, int* n, double* a, int* lda, int* ipiv, int* info ); 6 | void dgetrs_( char* trans, int* n, int* nrhs, double* a, int* lda, int* ipiv, double* b, int* ldb, int* info ); 7 | void dgetri_( int* n, double* a, int* lda, int* ipiv, double* work, int* lwork, int* info ); 8 | void dsterf_( int* n, double* d, double* e, int* info ); 9 | void dgeequ_( int* m, int* n, double* a, int* lda, double* r, double* c, double* rowcnd, double* colcnd, double* amax, int* info ); 10 | void dgecon_( char* norm, int* n, double* a, int* lda, double* anorm, double* rcond, double* work, int* iwork, int* info ); 11 | double dlange_( char* norm, int* m, int* n, double* a, int* lda, double* work ); 12 | void dgels_( char* trans, int* m, int* n, int* nrhs, double* a, int* lda, double* b, int* ldb, double* work, int* lwork, int* info ); 13 | 14 | void sgetrf_( int* m, int* n, float* a, int* lda, int* ipiv, int* info ); 15 | void sgetrs_( char* trans, int* n, int* nrhs, float* a, int* lda, int* ipiv, float* b, int* ldb, int* info ); 16 | void sgetri_( int* n, float* a, int* lda, int* ipiv, float* work, int* lwork, int* info ); 17 | void ssterf_( int* n, float* d, float* e, int* info ); 18 | void sgeequ_( int* m, int* n, float* a, int* lda, float* r, float* c, float* rowcnd, float* colcnd, float* amax, int* info ); 19 | void sgecon_( char* norm, int* n, float* a, int* lda, float* anorm, float* rcond, float* work, int* iwork, int* info ); 20 | float slange_( char* norm, int* m, int* n, float* a, int* lda, float* work ); 21 | void sgels_( char* trans, int* m, int* n, int* nrhs, float* a, int* lda, float* b, int* ldb, float* work, int* lwork, int* info ); 22 | 23 | } 24 | #endif 25 | -------------------------------------------------------------------------------- /src/include/parser.h: -------------------------------------------------------------------------------- 1 | #ifndef _PARSER_H 2 | #define _PARSER_H 3 | 4 | #include 5 | #include "matrix.h" 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | inline void force_locale() { 14 | setlocale(LC_NUMERIC, "C"); 15 | } 16 | 17 | class cmdline_parser { 18 | int argc,i; 19 | char **argv; 20 | public: 21 | cmdline_parser() { force_locale(); } 22 | void open(int argc_in,char *argv_in[]); 23 | int get(char *&arg,char *&val); 24 | void ack(char *arg,char *val); 25 | void close(); 26 | }; 27 | 28 | class file_parser { 29 | FILE *fp; 30 | int iline; 31 | char line[1024]; 32 | public: 33 | file_parser() { force_locale(); } 34 | int open(const char *file); 35 | int get(char *&arg,char *&val); 36 | void close(); 37 | }; 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /src/include/read_config.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | class configuration { 6 | public: 7 | int minit,maxit; 8 | double tol,newton_dmax; 9 | int verbose; 10 | char plot_device[64]; 11 | double plot_interval; 12 | char input_file[256]; 13 | char param_file[256]; 14 | char output_file[256]; 15 | configuration(int argc,char *argv[]); 16 | ~configuration(){}; 17 | void missing_argument(const char *arg); 18 | int check_arg(const char *arg,const char *val); 19 | bool noplot; 20 | }; 21 | 22 | -------------------------------------------------------------------------------- /src/include/stack.h: -------------------------------------------------------------------------------- 1 | #ifndef STACK_H 2 | 3 | #define STACK_SIZE 20 4 | 5 | #include 6 | #include 7 | 8 | void print_stack(); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /src/include/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef ESTER_UTILS_H 2 | #define ESTER_UTILS_H 3 | 4 | #include "stack.h" 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #ifdef DEBUG 12 | #include "debug.h" 13 | #endif 14 | 15 | #ifdef __GNUG__ 16 | #define _print_stack() { \ 17 | print_stack(); \ 18 | } 19 | #else 20 | #define _print_stack() { } 21 | #endif 22 | 23 | #ifdef DEBUG 24 | #define ester_err(...) do { \ 25 | LOGE("Error at %s:%d: ", __FILE__, __LINE__); \ 26 | LOGE(__VA_ARGS__); \ 27 | LOGE("\n"); \ 28 | print_stack(); \ 29 | throw runtime_exception(); \ 30 | } while(0) 31 | #else 32 | #define ester_err(...) do { \ 33 | LOGE("Error: "); \ 34 | LOGE(__VA_ARGS__); \ 35 | LOGE("\n"); \ 36 | print_stack(); \ 37 | exit(EXIT_FAILURE); \ 38 | } while(0) 39 | #endif 40 | 41 | #ifdef DEBUG 42 | #define ester_warn(...) do { \ 43 | LOGW("Warning at %s:%d: ", __FILE__, __LINE__); \ 44 | LOGW(__VA_ARGS__); \ 45 | LOGW("\n"); \ 46 | } while(0) 47 | #else 48 | #define ester_warn(...) do { \ 49 | LOGW("Warning: "); \ 50 | LOGW(__VA_ARGS__); \ 51 | LOGW("\n"); \ 52 | } while(0) 53 | #endif 54 | 55 | #ifdef DEBUG 56 | #define ester_debug(...) do { \ 57 | fprintf(stderr, __VA_ARGS__); \ 58 | } while (0) 59 | #else 60 | #define ester_debug(...) do {} while (0) 61 | #endif 62 | 63 | bool isHDF5Name(const char *fileName); 64 | 65 | #define RED "\033[0;31m" 66 | #define GREEN "\033[0;32m" 67 | #define YELLOW "\033[0;33m" 68 | #define RESET "\033[0;0m" 69 | 70 | #define LOGI(...) { printf(GREEN); printf(__VA_ARGS__); printf(RESET); fflush(stdout); } 71 | #define LOGW(...) { fprintf(stderr, YELLOW); fprintf(stderr, __VA_ARGS__); fprintf(stderr, RESET); } 72 | #define LOGE(...) { fprintf(stderr, RED); fprintf(stderr, __VA_ARGS__); fprintf(stderr, RESET); } 73 | 74 | #endif // ESTER_UTILS_H 75 | -------------------------------------------------------------------------------- /src/main/cesam_to_ester.in: -------------------------------------------------------------------------------- 1 | #!@PYTHON@ 2 | 3 | import sys 4 | from ester.cesam import cesam_to_ester 5 | 6 | if __name__ == '__main__': 7 | if len(sys.argv) != 2: 8 | print('Usage: %s ' % sys.argv[0]) 9 | sys.exit(1) 10 | cesam_model = sys.argv[1] 11 | output = cesam_model.replace('.osc', '.h5') 12 | print('Converting `%s\' to `%s\'' % (cesam_model, output)) 13 | cesam_to_ester(cesam_model, output, True) 14 | -------------------------------------------------------------------------------- /src/main/ester-info.cpp: -------------------------------------------------------------------------------- 1 | #ifndef WITH_CMAKE 2 | #include "ester-config.h" 3 | #endif 4 | #include "debug.h" 5 | #include "utils.h" 6 | #include "ester.h" 7 | #include 8 | 9 | int main(int argc,char *argv[]) { 10 | 11 | star2d A2d; 12 | if(A2d.read(argv[1]) == 0) { 13 | A2d.dump_info(); 14 | return 0; 15 | } 16 | 17 | star1d A1d; 18 | if(A1d.read(argv[1]) == 0) { 19 | A1d.dump_info(); 20 | return 0; 21 | } 22 | 23 | ester_err("Unknown file format"); 24 | return 1; 25 | } 26 | -------------------------------------------------------------------------------- /src/main/polytrope1d.cpp: -------------------------------------------------------------------------------- 1 | #ifndef WITH_CMAKE 2 | #include "ester-config.h" 3 | #endif 4 | #include "utils.h" 5 | #include "matplotlib.h" 6 | #include "star.h" 7 | #include "read_config.h" 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | int killed=0; 16 | 17 | void sig_handler(int sig) { 18 | char yn; 19 | if (sig == SIGINT) { 20 | printf("\nFinish iteration and save model ([y]/n)?"); 21 | if (scanf(" %c",&yn) == 1) { 22 | if (yn=='y') { 23 | killed = 1; 24 | return; 25 | } 26 | } 27 | else { 28 | killed = 1; 29 | } 30 | } 31 | exit(sig); 32 | } 33 | 34 | int main(int argc,char *argv[]) { 35 | 36 | int nit,last_it; 37 | tiempo t; 38 | 39 | configuration config(argc, argv); 40 | 41 | signal(SIGINT, sig_handler); 42 | 43 | t.start(); 44 | 45 | 46 | double n = 3.0; 47 | int nr=71; 48 | matrix h = solve_poly1d(n, 1e-10, nr, 1e-10); 49 | 50 | printf("solve_poly1d finished\n"); 51 | mapping map; 52 | map.set_ndomains(1); 53 | map.set_npts(nr); 54 | map.gl.set_xif(0., 1.); 55 | map.set_nt(1); 56 | map.init(); 57 | h = map.gl.eval(h, map.r); 58 | 59 | matrix p = pow(h, n+1); 60 | matrix rho = pow(h, n); 61 | matrix T = p/rho; 62 | 63 | FILE *ficflux = fopen("polytrope.txt", "w"); 64 | fprintf(ficflux, "index = %e\n", n); 65 | for(int k=0;k 5 | #include"physics.h" 6 | 7 | int nuc_simple(const composition_map &comp,const matrix &T,const matrix &rho,nuc_struct &nuc) { 8 | 9 | matrix T9; 10 | double C,N,XCNO; 11 | double Z=comp.Z()(-1); 12 | matrix X(comp.X()); 13 | 14 | T9=T/1e9; 15 | C=0.173285; 16 | N=0.053152; 17 | // O=0.482273; 18 | XCNO=Z*(C+N); 19 | 20 | // nuc.pp from the CESAM code (cited in Espinosa Lara Rieutord 2007) 21 | // Actually used in routine pp1.f of CESAM code citing GONG 22 | 23 | nuc.pp=8.2398e4*X*X*pow(T9,-2./3.)*exp(-3.6*pow(T9,-1./3.)); 24 | 25 | // nuc.cno from Kippenhahn & Weigert (1991) 26 | nuc.cno=8.67e25*XCNO*X*pow(T9,-2./3.)*exp(-15.228*pow(T9,-1./3.)) 27 | *(1+0.027*pow(T9,1./3.)-0.778*pow(T9,2./3.)-0.149*T9); 28 | 29 | nuc.pp*=rho; 30 | nuc.cno*=rho; 31 | nuc.eps=nuc.pp+nuc.cno; 32 | nuc.dlneps_lnrho=ones(T.nrows(),T.ncols()); 33 | nuc.dlneps_lnT=nuc.pp/nuc.eps*(-2./3.+1.2*pow(T9,-1./3.))+ 34 | nuc.cno/nuc.eps*(-2./3.+15.228/3.*pow(T9,-1./3.)+ 35 | (0.027/3.*pow(T9,1./3.)-2.*0.778/3.*pow(T9,2./3.)-0.149*T9)/(1+0.027*pow(T9,1./3.)-0.778*pow(T9,2./3.)-0.149*T9)); 36 | 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /src/physics/opa_cesam.cpp: -------------------------------------------------------------------------------- 1 | #ifndef WITH_CMAKE 2 | #include "ester-config.h" 3 | #endif 4 | #include 5 | #include 6 | #include "matrix.h" 7 | #include "constants.h" 8 | #include "physics.h" 9 | 10 | extern"C" { 11 | int init_cesam_opa_(); 12 | void opa_cesam_(double *, double *, 13 | double *, double *, double *, double *, double *); 14 | } 15 | 16 | int opa_cesam(const matrix& X, double Z, const matrix& T, const matrix& rho, 17 | opa_struct& opa) { 18 | 19 | int error = 0; 20 | static bool init = false; 21 | 22 | opa.k.dim(T.nrows(), T.ncols()); 23 | opa.xi.dim(T.nrows(), T.ncols()); 24 | opa.dlnxi_lnrho.dim(T.nrows(), T.ncols()); 25 | opa.dlnxi_lnT.dim(T.nrows(), T.ncols()); 26 | 27 | if (!init) { 28 | init_cesam_opa_(); 29 | } 30 | 31 | for (int i=0; i 5 | #include 6 | #include "matrix.h" 7 | #include "constants.h" 8 | #include "physics.h" 9 | 10 | extern"C" { 11 | void maceps_(double *eps); 12 | void opinit_(double *eps,int *iorder,char *tabnam,int *imode,int tabnamlen); 13 | void opints_(double *x,double *z,double *tlg,double *rlg,double *opalg, 14 | double *opr,double *opt,double *opx,double *opz,int *iexp,int *ier); 15 | } 16 | 17 | double opa_houdek_i(double X,double Z,double T,double rho,double &dlogkt,double &dlogkr) { 18 | 19 | double logT,t6,logR,logk,dlogkx,dlogkz; 20 | int iexp,ier; 21 | 22 | logT=log10(T); 23 | t6=T*1e-6; 24 | logR=log10(rho/t6/t6/t6); 25 | 26 | opints_(&X,&Z,&logT,&logR,&logk,&dlogkr,&dlogkt,&dlogkx,&dlogkz,&iexp,&ier); 27 | 28 | return logk; 29 | } 30 | 31 | int opa_houdek(const matrix &X,double Z,const matrix &T,const matrix &rho, 32 | opa_struct &opa) { 33 | 34 | int i,N,error=0; 35 | matrix dlnkT,dlnkrho; 36 | static int init=0; 37 | char tabnam[80]; 38 | int iorder,imode; 39 | double eps; 40 | 41 | if(!init) { 42 | iorder=4; 43 | imode=2; 44 | maceps_(&eps); 45 | sprintf(tabnam, "%s/ester/tables/houdek/v9/OPINTPATH_AX", ESTER_DATADIR); 46 | for(i=strlen(tabnam);i<80;i++) tabnam[i]=' '; 47 | opinit_(&eps,&iorder,tabnam,&imode,80); 48 | init=1; 49 | } 50 | 51 | opa.k.dim(T.nrows(),T.ncols()); 52 | dlnkT.dim(T.nrows(),T.ncols()); 53 | dlnkrho.dim(T.nrows(),T.ncols()); 54 | N=T.nrows()*T.ncols(); 55 | double dlogkt,dlogkr; 56 | 57 | for(i=0;i 9 | 10 | int opa_kramer(const matrix &T,const matrix &rho,opa_struct &opa) { 11 | 12 | matrix ke,ki,dlnk_lnrho,dlnk_lnT; 13 | ki=7.1548412e13*pow(rho,0.138316)*pow(T,-1.97541); 14 | ke=1.6236784e-33*pow(rho,0.407895)*pow(T,9.28289); 15 | opa.k=1/(1/ki+0/ke); 16 | dlnk_lnrho=opa.k/ki*0.138316+0*opa.k/ke*0.407895; 17 | dlnk_lnT=-opa.k/ki*1.97541+0*opa.k/ke*9.28289; 18 | 19 | opa.xi=16*SIG_SB*pow(T,3)/(3*opa.k*rho); 20 | opa.dlnxi_lnrho=-1-dlnk_lnrho; 21 | opa.dlnxi_lnT=3-dlnk_lnT; 22 | 23 | return 0; 24 | } 25 | 26 | -------------------------------------------------------------------------------- /src/physics/opa_opal.cpp: -------------------------------------------------------------------------------- 1 | #ifndef WITH_CMAKE 2 | #include "ester-config.h" 3 | #endif 4 | #include "utils.h" 5 | #include "matrix.h" 6 | #include "constants.h" 7 | #include "physics.h" 8 | #include 9 | 10 | extern"C" { 11 | void opac_(int *izi,int *mzin,double *X,double *t6,double *r); 12 | void opacgn93_(double *Z,double *X,double *t6,double *r); 13 | extern struct{ 14 | double opact,dopact,dopacr,dopactd; 15 | } e_; 16 | } 17 | 18 | double opa_opal_i(double X,double Z,double T,double rho,double &dlogkt,double &dlogkr) { 19 | 20 | double t6,r; 21 | 22 | t6=T*1e-6; 23 | r=rho/t6/t6/t6; 24 | 25 | opacgn93_(&Z,&X,&t6,&r); 26 | dlogkt=e_.dopact; 27 | dlogkr=e_.dopacr; 28 | 29 | return e_.opact; 30 | } 31 | 32 | int opa_opal(const matrix &X,double Z,const matrix &T,const matrix &rho, 33 | opa_struct &opa) { 34 | 35 | int i,N,error=0; 36 | matrix dlnkT,dlnkrho; 37 | 38 | opa.k.dim(T.nrows(),T.ncols()); 39 | dlnkT.dim(T.nrows(),T.ncols()); 40 | dlnkrho.dim(T.nrows(),T.ncols()); 41 | N=T.nrows()*T.ncols(); 42 | double dlogkt,dlogkr; 43 | 44 | for(i=0;iaxis(1,nr,-16,0,0); 13 | x.dim(2,1); 14 | ys.dim(2,1);ys(0)=1e-16;ys(1)=1; 15 | j=1; 16 | for(i=0;isemilogy(x,ys,"r:"); 21 | pfig->hold(1); 22 | } 23 | x(0)=1;x(1)=nr; 24 | //ys(0)=param.tol;ys(1)=param.tol; 25 | //pfig->semilogy(x,ys,"r:"); 26 | ys=(map.gl.P,y); 27 | j=0; 28 | for(i=0;isemilogy(x,abs(ys.block(j,j+map.gl.npts[i]-1,0,0)/ys(j)),line); 31 | j+=map.gl.npts[i]; 32 | } 33 | pfig->hold(0); 34 | } 35 | #endif 36 | 37 | double star1d::luminosity() const { 38 | 39 | return 4*PI*(map.gl.I,rho*nuc.eps*r*r)(0)*units.rho*units.r*units.r*units.r; 40 | 41 | } 42 | 43 | matrix star1d::Teff() const { 44 | 45 | // return pow(luminosity()/4./PI/R/R/SIG_SB,0.25)*ones(1,1); 46 | matrix F; 47 | F=-opa.xi*(D,T); 48 | matrix teff = pow(F(-1)/SIG_SB*units.T/units.r,0.25)*ones(1,1); 49 | if (std::isnan(teff(0))) { 50 | ester_err("Teff is NaN (D,T) = %e", (D,T)(-1)); 51 | } 52 | return teff; 53 | 54 | } 55 | 56 | matrix star1d::gsup() const { 57 | 58 | return GRAV*M/R/R*ones(1,1); 59 | //return (D.row(-1),phi)(0)*units.phi/units.r*ones(1,1); 60 | 61 | } 62 | 63 | matrix star1d::N2() const { 64 | 65 | matrix N2; 66 | 67 | N2=-(D,p)/rho*((D,p)/p/eos.G1-(D,rho)/rho); 68 | N2(0)=0; 69 | 70 | N2=N2*units.phi/units.r/units.r; 71 | 72 | return N2; 73 | } 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/star/star_phys.cpp: -------------------------------------------------------------------------------- 1 | #ifndef WITH_CMAKE 2 | #include "ester-config.h" 3 | #endif 4 | #include "star.h" 5 | #include "matplotlib.h" 6 | 7 | extern "C" { 8 | #include 9 | #include 10 | #include 11 | } 12 | 13 | void star2d::opacity() { 14 | 15 | int error; 16 | 17 | //error=opa_calc(comp.X(),Z0,Tc*T,rhoc*rho,opa,comp.Xsol(),comp.Ysol(),comp.Zsol(),AbundanceMap()); // this is the cpp file I think, I don't think I can just do comp.Zsol() can I? try! 18 | //error=opa_calc(comp.X(),Z0,Tc*T,rhoc*rho,opa,comp.Xsol(),comp.Ysol(),comp.Zsol(),abundance_map); // this is the cpp file I think, I don't think 19 | 20 | error=opa_calc(comp.X(),Z0,Tc*T,rhoc*rho,opa,comp.Xsol(),comp.Ysol(),comp.Zsol()); 21 | if(error) exit(1); 22 | 23 | } 24 | 25 | void star2d::nuclear() { 26 | 27 | int error; 28 | 29 | error=nuc_calc(comp,T*Tc,rho*rhoc,nuc); 30 | 31 | if(error) exit(1); 32 | 33 | } 34 | 35 | void star2d::eq_state() { 36 | 37 | int error; 38 | 39 | matrix rhoc_m(1,1); 40 | eos_calc(comp.X()(0,0)*ones(1,1),Z0,ones(1,1)*Tc,ones(1,1)*pc,rhoc_m,eos); 41 | rhoc=rhoc_m(0); 42 | 43 | error=eos_calc(comp.X(),Z0,T*Tc,p*pc,rho,eos); 44 | 45 | 46 | // rhoc=rho(0); 47 | rho=rho/rhoc; 48 | 49 | if(error) exit(1); 50 | 51 | } 52 | 53 | void star2d::atmosphere() { 54 | 55 | int error; 56 | 57 | if(!strcmp(atm.name,"simple")) { 58 | ps=surff*gsup()/opa.k.row(-1)/pc; 59 | matrix q; 60 | q=surff*p.row(-1)/ps; 61 | Ts=pow(q,0.25)*Teff()/Tc; 62 | return; 63 | } 64 | 65 | 66 | //error=atm_calc(comp.X(),Z0,gsup(),Teff(),eos.name,opa.name,atm,comp.Xsol(),comp.Ysol(),comp.Zsol(),AbundanceMap()); 67 | //error=atm_calc(comp.X(),Z0,gsup(),Teff(),eos.name,opa.name,atm,comp.Xsol(),comp.Ysol(),comp.Zsol(),abundance_map); 68 | error=atm_calc(comp.X(),Z0,gsup(),Teff(),eos.name,opa.name,atm,comp.Xsol(),comp.Ysol(),comp.Zsol()); 69 | 70 | if(error) exit(1); 71 | 72 | matrix q; 73 | ps=surff*atm.ps/pc; 74 | q=surff*p.row(-1)/ps;//q=ones(1,nth); 75 | Ts=pow(q,0.25)*atm.Ts/Tc; 76 | 77 | } 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /src/utils/iofile.cpp: -------------------------------------------------------------------------------- 1 | #ifndef WITH_CMAKE 2 | #include "ester-config.h" 3 | #endif 4 | #include 5 | #include 6 | 7 | bool isHDF5Name(const char *fileName) { 8 | if (fileName == NULL) { 9 | return false; 10 | } 11 | 12 | const char *ext; 13 | if((ext = strstr(fileName, ".")) == NULL) { 14 | return false; 15 | } 16 | if (strcasecmp(ext, ".hdf5") == 0 || strcasecmp(ext, ".h5") == 0) { 17 | return true; 18 | } 19 | return false; 20 | } 21 | -------------------------------------------------------------------------------- /tables/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = cesam houdek/v9 opal freeeos 2 | 3 | -------------------------------------------------------------------------------- /tables/cesam/chim_gram.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/chim_gram.f -------------------------------------------------------------------------------- /tables/cesam/ini_ctes.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/ini_ctes.f -------------------------------------------------------------------------------- /tables/cesam/inter.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/inter.f -------------------------------------------------------------------------------- /tables/cesam/journal.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/journal.f -------------------------------------------------------------------------------- /tables/cesam/lit_nl.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/lit_nl.f -------------------------------------------------------------------------------- /tables/cesam/mod_donnees.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/mod_donnees.f -------------------------------------------------------------------------------- /tables/cesam/mod_kind.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/mod_kind.f -------------------------------------------------------------------------------- /tables/cesam/mod_nuc.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/mod_nuc.f -------------------------------------------------------------------------------- /tables/cesam/mod_numerique.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/mod_numerique.f -------------------------------------------------------------------------------- /tables/cesam/mod_opa.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/mod_opa.f -------------------------------------------------------------------------------- /tables/cesam/mod_variables.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/mod_variables.f -------------------------------------------------------------------------------- /tables/cesam/nuc/abon_ini.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/abon_ini.f -------------------------------------------------------------------------------- /tables/cesam/nuc/iben.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/iben.f -------------------------------------------------------------------------------- /tables/cesam/nuc/nuc.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/nuc.f -------------------------------------------------------------------------------- /tables/cesam/nuc/pp1.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/pp1.f -------------------------------------------------------------------------------- /tables/cesam/nuc/pp3.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/pp3.f -------------------------------------------------------------------------------- /tables/cesam/nuc/ppcno10.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/ppcno10.f -------------------------------------------------------------------------------- /tables/cesam/nuc/ppcno10BeBFe.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/ppcno10BeBFe.f -------------------------------------------------------------------------------- /tables/cesam/nuc/ppcno10Fe.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/ppcno10Fe.f -------------------------------------------------------------------------------- /tables/cesam/nuc/ppcno10K.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/ppcno10K.f -------------------------------------------------------------------------------- /tables/cesam/nuc/ppcno11.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/ppcno11.f -------------------------------------------------------------------------------- /tables/cesam/nuc/ppcno12.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/ppcno12.f -------------------------------------------------------------------------------- /tables/cesam/nuc/ppcno12Be.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/ppcno12Be.f -------------------------------------------------------------------------------- /tables/cesam/nuc/ppcno12BeBFe.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/ppcno12BeBFe.f -------------------------------------------------------------------------------- /tables/cesam/nuc/ppcno12Li.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/ppcno12Li.f -------------------------------------------------------------------------------- /tables/cesam/nuc/ppcno3a12Ne.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/ppcno3a12Ne.f -------------------------------------------------------------------------------- /tables/cesam/nuc/ppcno3a9.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/ppcno3a9.f -------------------------------------------------------------------------------- /tables/cesam/nuc/ppcno3aco.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/ppcno3aco.f -------------------------------------------------------------------------------- /tables/cesam/nuc/ppcno9.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/ppcno9.f -------------------------------------------------------------------------------- /tables/cesam/nuc/ppcno9Fe.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/ppcno9Fe.f -------------------------------------------------------------------------------- /tables/cesam/nuc/rq_reac.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/rq_reac.f -------------------------------------------------------------------------------- /tables/cesam/nuc/tabul_nuc.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/tabul_nuc.f -------------------------------------------------------------------------------- /tables/cesam/nuc/taux_nuc.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/nuc/taux_nuc.f -------------------------------------------------------------------------------- /tables/cesam/numeric/arb_rom.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/arb_rom.f -------------------------------------------------------------------------------- /tables/cesam/numeric/boite.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/boite.f -------------------------------------------------------------------------------- /tables/cesam/numeric/box.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/box.f -------------------------------------------------------------------------------- /tables/cesam/numeric/bsp1ddn.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/bsp1ddn.f -------------------------------------------------------------------------------- /tables/cesam/numeric/bsp1dn.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/bsp1dn.f -------------------------------------------------------------------------------- /tables/cesam/numeric/bsp_dis.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/bsp_dis.f -------------------------------------------------------------------------------- /tables/cesam/numeric/bsp_gal.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/bsp_gal.f -------------------------------------------------------------------------------- /tables/cesam/numeric/bval0.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/bval0.f -------------------------------------------------------------------------------- /tables/cesam/numeric/bval1.f: -------------------------------------------------------------------------------- 1 | 2 | c****************************************************************** 3 | 4 | SUBROUTINE bval1(x,y,m,l,q,d) 5 | 6 | c subroutine public de mod_numerique 7 | 8 | c calcul les B-splines normalisees d'ordre m > 1 9 | c et leurs derivees premieres au point x tel que y(l) <= x < y(l+1) 10 | c si x est l'extremite droite : y(l) < x = y(l+1) on obtient 11 | c la limite a droite 12 | c les valeurs des m b-splines non nulles : l-m+1, ..., l sont 13 | c dans q(1), ..., q(m), les derivees dans d(1), ... , d(m) 14 | c !! ATTENTION : q doit etre dimensionne au moins a m+1 !! 15 | 16 | c d'apres l'algorithme 5-5 p.192 de schumaker 17 | c et addition d'une instruction pour les derivees 18 | 19 | c Auteur: P. Morel, Departement J.D. Cassini, O.C.A. 20 | 21 | c derive de bvald.f 22 | 23 | c entrees: 24 | c x: point de calcul 25 | c y(knot): points de table 26 | c m: ordre des splines 27 | c l: indice 28 | 29 | c sorties: 30 | c q(m+1): table des valeurs des m B-splines 31 | c d(m): table des valeurs des derivees premieres 32 | 33 | c------------------------------------------------------------------------ 34 | 35 | USE mod_kind 36 | 37 | IMPLICIT NONE 38 | 39 | REAL (kind=dp), INTENT(in) , DIMENSION(:) :: y 40 | REAL (kind=dp), INTENT(in) :: x 41 | INTEGER, INTENT(in) :: l, m 42 | REAL (kind=dp), INTENT(out) , DIMENSION(:) :: d, q 43 | 44 | REAL (kind=dp) :: a1, a2, denom 45 | 46 | INTEGER :: i, j 47 | 48 | c------------------------------------------------------------------------- 49 | 50 | DO j=1,m-1 51 | q(j)=0.d0 52 | ENDDO 53 | 54 | q(m)=1.d0/(y(l+1)-y(l)) ; q(m+1)=0.d0 55 | 56 | DO j=2,m-1 57 | DO i=m-j+1,m 58 | denom=y(i+l-m+j)-y(i+l-m) ; a1=(x-y(i+l-m))/denom 59 | a2=1.d0-a1 ; q(i)=a1*q(i)+a2*q(i+1) 60 | ENDDO 61 | ENDDO 62 | 63 | DO i=1,m 64 | d(i)=(q(i)-q(i+1))*(m-1.d0) ; q(i)=(x-y(i+l-m))*q(i)+(y(i+l)-x)*q(i+1) 65 | ENDDO 66 | 67 | RETURN 68 | 69 | END SUBROUTINE bval1 70 | -------------------------------------------------------------------------------- /tables/cesam/numeric/coll.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/coll.f -------------------------------------------------------------------------------- /tables/cesam/numeric/colpnt.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/colpnt.f -------------------------------------------------------------------------------- /tables/cesam/numeric/delete_doubles.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/delete_doubles.f -------------------------------------------------------------------------------- /tables/cesam/numeric/difdiv.f: -------------------------------------------------------------------------------- 1 | 2 | c****************************************************************** 3 | 4 | SUBROUTINE difdiv(l,k,f,x,a) 5 | 6 | c differences divisees 7 | 8 | c Auteur: P. Morel, Departement J.D. Cassini, O.C.A. 9 | c version: 03 06 91 10 | c F95 29 08 00 11 | 12 | c entree 13 | c l : premier indice 14 | c k : degre du polynome 15 | c f : fonction 16 | c x : abscisses 17 | 18 | c sortie 19 | c a : differences divisees 20 | 21 | c--------------------------------------------------------------------- 22 | 23 | USE mod_kind 24 | 25 | IMPLICIT NONE 26 | 27 | REAL (kind=dp), INTENT(in), DIMENSION(0:*) :: f,x 28 | INTEGER, INTENT(in) :: l,k 29 | REAL (kind=dp), INTENT(out), DIMENSION(0:*) :: a 30 | 31 | REAL (kind=dp), ALLOCATABLE, DIMENSION(:) :: d 32 | 33 | INTEGER :: i,j 34 | 35 | c------------------------------------------------------------------------- 36 | 37 | c PRINT*,(f(l+j),j=0,k) ; PRINT*,(x(l+j),j=0,k) 38 | 39 | ALLOCATE(d(0:k)) 40 | 41 | DO j=0,k 42 | d(j)=f(l+j) 43 | DO i=j-1,0,-1 44 | d(i)=(d(i+1)-d(i))/(x(l+j)-x(l+i)) 45 | ENDDO 46 | a(j)=d(0) 47 | ENDDO 48 | c PRINT*,'les a' ; PRINT*,(a(j),j=0,k) 49 | 50 | DEALLOCATE(d) 51 | 52 | RETURN 53 | 54 | END SUBROUTINE difdiv 55 | -------------------------------------------------------------------------------- /tables/cesam/numeric/fermi_dirac.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/fermi_dirac.f -------------------------------------------------------------------------------- /tables/cesam/numeric/gauss_band.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/gauss_band.f -------------------------------------------------------------------------------- /tables/cesam/numeric/horner.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/horner.f -------------------------------------------------------------------------------- /tables/cesam/numeric/left_right.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/left_right.f -------------------------------------------------------------------------------- /tables/cesam/numeric/linf.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/linf.f -------------------------------------------------------------------------------- /tables/cesam/numeric/matinv.f: -------------------------------------------------------------------------------- 1 | 2 | c************************************************************** 3 | 4 | SUBROUTINE matinv(a,n,inversible) 5 | 6 | 7 | c inversion de matrice par elimination de Gauss, pivot partiel 8 | c utilisation de gauss_band 9 | 10 | c entree: 11 | c n: ordre 12 | 13 | c entree/sortie: 14 | c a: matrice/matrice inverse 15 | 16 | c sortie: 17 | c inversible=.false.: matrice non inversible 18 | 19 | c Auteur: P. Morel, Departement J.D. Cassini, O.C.A. 20 | 21 | c---------------------------------------------------------------- 22 | 23 | USE mod_kind 24 | 25 | IMPLICIT NONE 26 | 27 | INTEGER, INTENT(in) :: n 28 | REAL (kind=dp), INTENT(inout), DIMENSION(n,n) :: a 29 | LOGICAL, INTENT(out) :: inversible 30 | 31 | REAL (kind=dp), DIMENSION(n,n) :: am1 32 | INTEGER, DIMENSION(n) :: indpc 33 | INTEGER :: i 34 | 35 | c--------------------------------------------------------------- 36 | 37 | 2000 FORMAT(8es10.3) 38 | 39 | c PRINT*,'matinv',n 40 | 41 | c identite dans am1 42 | 43 | am1=0.d0 ; indpc=1 44 | DO i=1,n 45 | am1(i,i)=1.d0 46 | ENDDO 47 | 48 | CALL gauss_band(a,am1,indpc,n,n,n,n,inversible) 49 | 50 | IF(.NOT.inversible)THEN 51 | PRINT*,'dans matinv matrice non inversible' ; STOP 52 | ENDIF 53 | 54 | c transposition car avec gauss_band on a resolu A t(A^-1) = I 55 | c la matrice second membre etant stockee (colonnes,lignes) 56 | 57 | a=transpose(am1) 58 | 59 | RETURN 60 | 61 | END SUBROUTINE matinv 62 | -------------------------------------------------------------------------------- /tables/cesam/numeric/max_local.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/max_local.f -------------------------------------------------------------------------------- /tables/cesam/numeric/min_max.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/min_max.f -------------------------------------------------------------------------------- /tables/cesam/numeric/neville.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/neville.f -------------------------------------------------------------------------------- /tables/cesam/numeric/newspl.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/newspl.f -------------------------------------------------------------------------------- /tables/cesam/numeric/newspl_gal.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/newspl_gal.f -------------------------------------------------------------------------------- /tables/cesam/numeric/newton.f: -------------------------------------------------------------------------------- 1 | 2 | c******************************************************************** 3 | 4 | SUBROUTINE newton(l,k,f,x,z,p,der) 5 | 6 | c routine public du module mod_numerique 7 | 8 | c polynome de newton 9 | 10 | c Auteur: P. Morel, Departement J.D. Cassini, O.C.A., Observatoire de Nice 11 | c version: 03 06 91 12 | c F95: 29 08 00 13 | 14 | c entree 15 | c l : premier indice 16 | c k : degre du polynome 17 | c f : table des f 18 | c x : abscisses 19 | c z : point d'interpolation 20 | c der : ordre de la derivee 21 | 22 | c sortie 23 | c p : valeur des derivees 24 | 25 | c----------------------------------------------------------------- 26 | 27 | USE mod_kind 28 | 29 | IMPLICIT NONE 30 | 31 | REAL (kind=dp), INTENT(in), DIMENSION(0:) :: f, x 32 | REAL (kind=dp), INTENT(in) :: z 33 | INTEGER, INTENT(in) :: l, k, der 34 | REAL (kind=dp), INTENT(out), DIMENSION(0:) :: p 35 | 36 | REAL (kind=dp), ALLOCATABLE, DIMENSION(:) :: a, ah, xh 37 | INTEGER :: j 38 | 39 | c------------------------------------------------------------------- 40 | 41 | ALLOCATE(a(0:k),xh(0:k),ah(0:k)) 42 | 43 | c PRINT*,l,k,der,z 44 | 45 | CALL difdiv(l,k,f,x,a) 46 | 47 | DO j=0,k 48 | xh(j)=x(l+j) ; ah(j)=a(j) 49 | ENDDO 50 | c PRINT*,(f(j+l),j=0,k) ; PRINT*,(xh(j),j=0,k) ; PRINT*,(ah(j),j=0,k) 51 | CALL horner(k,der,z,ah,xh,p) 52 | 53 | DEALLOCATE(a, ah, xh) 54 | 55 | RETURN 56 | 57 | END SUBROUTINE newton 58 | -------------------------------------------------------------------------------- /tables/cesam/numeric/noedif.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/noedif.f -------------------------------------------------------------------------------- /tables/cesam/numeric/noein.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/noein.f -------------------------------------------------------------------------------- /tables/cesam/numeric/noeu_dis.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/noeu_dis.f -------------------------------------------------------------------------------- /tables/cesam/numeric/noeud.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/noeud.f -------------------------------------------------------------------------------- /tables/cesam/numeric/pause.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/pause.f -------------------------------------------------------------------------------- /tables/cesam/numeric/polyder.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/polyder.f -------------------------------------------------------------------------------- /tables/cesam/numeric/schu58_n.f: -------------------------------------------------------------------------------- 1 | 2 | c********************************************************** 3 | 4 | SUBROUTINE schu58_n(n,f,xx,xt,m,l,val) 5 | 6 | c subroutine private du module mod_numerique 7 | 8 | c interpolation pour n fonctions par l'algorithme 5-8 p.194 de schumaker 9 | c au point xx, xt(l) .le. xx. lt. xt(l+1) par spline d'ordre m 10 | c dont les coefficients sont dans le tableau f 11 | 12 | c Auteur: P. Morel, Departement J.D. Cassini, O.C.A. 13 | c 25 11 00: version F95 14 | 15 | c entrees 16 | c n, f: nombre de fonctions f en spline 17 | c xx, xt: abscisse d'interpolation et vecteur nodal 18 | c m: ordre des splines 19 | c l: localisation 20 | 21 | c sortie 22 | c val: vecteur des interpolees 23 | 24 | c--------------------------------------------------------------- 25 | 26 | USE mod_kind 27 | 28 | IMPLICIT NONE 29 | 30 | REAL (kind=dp), INTENT(in), DIMENSION(:,:) :: f 31 | REAL (kind=dp), INTENT(in), DIMENSION(:) :: xt 32 | REAL (kind=dp), INTENT(in) :: xx 33 | INTEGER, INTENT(in) :: l, m, n 34 | REAL (kind=dp), INTENT(out), DIMENSION(n) :: val 35 | 36 | REAL (kind=dp), DIMENSION(n,m) :: cx 37 | REAL (kind=dp) :: a1, a2 38 | INTEGER :: i, j, k 39 | 40 | c---------------------------------------------------------------- 41 | 42 | 2000 FORMAT(8es10.3) 43 | 44 | cx=0.d0 45 | DO k=1,n 46 | DO j=1,m 47 | IF(j+l-m .gt. 0)cx(k,j)=f(k,j+l-m) 48 | ENDDO 49 | ENDDO 50 | 51 | DO j=2,m 52 | DO i=m,j,-1 53 | a1=(xx-xt(i+l-m))/(xt(i+l-j+1)-xt(i+l-m)) ; a2=1.d0-a1 54 | DO k=1,n 55 | cx(k,i)=a1*cx(k,i)+a2*cx(k,i-1) 56 | ENDDO 57 | ENDDO 58 | ENDDO 59 | 60 | val=cx(:,m) 61 | 62 | RETURN 63 | 64 | END SUBROUTINE schu58_n 65 | -------------------------------------------------------------------------------- /tables/cesam/numeric/shell.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/shell.f -------------------------------------------------------------------------------- /tables/cesam/numeric/sum_n.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/sum_n.f -------------------------------------------------------------------------------- /tables/cesam/numeric/zoning.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/numeric/zoning.f -------------------------------------------------------------------------------- /tables/cesam/opa/kappa_cond.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/opa/kappa_cond.f -------------------------------------------------------------------------------- /tables/cesam/opa/opa.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/opa/opa.f -------------------------------------------------------------------------------- /tables/cesam/opa/opa_compton.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/opa/opa_compton.f -------------------------------------------------------------------------------- /tables/cesam/opa/opa_gong.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/opa/opa_gong.f -------------------------------------------------------------------------------- /tables/cesam/opa/opa_int_zsx.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/opa/opa_int_zsx.f -------------------------------------------------------------------------------- /tables/cesam/opa/opa_opal2.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/opa/opa_opal2.f -------------------------------------------------------------------------------- /tables/cesam/opa/opa_opalCO.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/opa/opa_opalCO.f -------------------------------------------------------------------------------- /tables/cesam/opa/opa_yveline.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/opa/opa_yveline.f -------------------------------------------------------------------------------- /tables/cesam/opa/opa_yveline_lisse.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/opa/opa_yveline_lisse.f -------------------------------------------------------------------------------- /tables/cesam/print_ctes.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/print_ctes.f -------------------------------------------------------------------------------- /tables/cesam/sortie.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam/sortie.f -------------------------------------------------------------------------------- /tables/cesam/test_opa.f: -------------------------------------------------------------------------------- 1 | program test_opa 2 | ! Test les opacity de CESAM2k 3 | 4 | USE mod_opa 5 | USE mod_donnees, ONLY : langue, f_opa, nchim, nom_opa,x0,y0,z0,ihe4,NOM_CHEMIN 6 | 7 | IMPLICIT NONE 8 | 9 | real*8 ro,t,xchim(3) 10 | real*8 kap,dkapt,dkapro,dkapx 11 | 12 | langue='PSE' 13 | NOM_CHEMIN='./' 14 | f_opa(1)='opa_yveline.bin' 15 | nom_opa='opa_yveline' 16 | nchim=3 17 | !x0=0.70d0 18 | x0=0.706454d0 19 | x0=7.0645714230d-1 20 | z0=0.02d0 21 | !y0=1d0-x0-z0 22 | xchim(1)=x0 23 | !xchim(2)=2.8D-01 ; ihe4=2 24 | xchim(2)=1d0-x0-z0; ihe4=2 25 | xchim(3)=0.02d0 26 | !xchim(3)=8.827E-05 27 | xchim(4)=3.425E-03 28 | xchim(5)=4.128E-05 29 | xchim(6)=1.059E-03 30 | xchim(7)=4.167E-06 31 | xchim(8)=9.640E-03 32 | xchim(9)=3.903E-06 33 | xchim(10)=5.827E-03 34 | 35 | !7.000E-01, He3 : 8.827E-05, He4 : 2.799E-01, C12 : 3.425E-03, C13 : 4.128E-05 36 | !N14 : 1.059E-03, N15 : 4.167E-06, O16 : 9.640E-03, O17 : 3.903E-06, Ex : 5.827E-03 37 | 38 | 39 | t=4.847d6 40 | ro=0.1436225d0 41 | t=1.278502d7 42 | ro=5.038447d0 43 | t=4.801568411954308860d+06 44 | ro=1.382857932544305501d-01 45 | t=2.8d+03 46 | ro=1.38d-07 47 | print*,xchim,t,ro 48 | 49 | 50 | CALL opa(xchim,t,ro,kap,dkapt,dkapro,dkapx) 51 | 52 | print*,'opacity = ',kap 53 | 54 | end 55 | -------------------------------------------------------------------------------- /tables/cesam_nuc/Makefile.am: -------------------------------------------------------------------------------- 1 | # AM_LDFLAGS = -lgfortran 2 | 3 | export HDF5_CXX=$(HDF5_BACKEND) 4 | 5 | lib_LTLIBRARIES = libnuc.la 6 | 7 | libnuc_la_SOURCES = mod_kind.f \ 8 | mod_numerique.f \ 9 | mod_donnees.f \ 10 | sortie.f \ 11 | mod_variables.f \ 12 | mod_nuc.f 13 | 14 | mod_numerique.lo : mod_kind.lo 15 | mod_donnees.lo : mod_kind.lo mod_numerique.lo 16 | sortie.lo : mod_donnees.lo 17 | mod_variables.lo : mod_kind.lo mod_donnees.lo mod_numerique.lo 18 | mod_nuc.lo : mod_kind.lo mod_donnees.lo mod_variables.lo mod_numerique.lo 19 | 20 | EXTRA_DIST = arb_rom.f abon_ini.f arb_rom.f bsp1ddn.f bsp1dn.f \ 21 | bsp_dis.f bsp_gal.f bval0.f bval1.f bvald.f \ 22 | chim_gram.f coll.f colpnt.f delete_doubles.f difdiv.f \ 23 | fermi_dirac.f gauss_band.f horner.f iben.f ini_ctes.f \ 24 | inter.f intgauss.f journal.f left_right.f linf.f \ 25 | lit_nl.f matinv.f max_local.f min_max.f \ 26 | neville.f newspl.f newspl_gal.f newton.f noedif.f noein.f \ 27 | noeud.f noeu_dis.f nuc.f pause.f polyder.f \ 28 | pp1.f pp3.f ppcno10BeBFe.f ppcno10.f ppcno10Fe.f \ 29 | ppcno10K.f ppcno11.f ppcno12BeBFe.f ppcno12Be.f ppcno12.f \ 30 | ppcno12Li.f ppcno3a12Ne.f ppcno3a9.f ppcno3aco.f ppcno9.f \ 31 | ppcno9Fe.f print_ctes.f rq_reac.f schu58_n.f shell.f \ 32 | sum_n.f tabul_nuc.f taux_nuc.f zoning.f 33 | 34 | clean-local: 35 | rm -f *.mod 36 | -------------------------------------------------------------------------------- /tables/cesam_nuc/arb_rom.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/arb_rom.f -------------------------------------------------------------------------------- /tables/cesam_nuc/bsp1ddn.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/bsp1ddn.f -------------------------------------------------------------------------------- /tables/cesam_nuc/bsp1dn.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/bsp1dn.f -------------------------------------------------------------------------------- /tables/cesam_nuc/bsp_dis.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/bsp_dis.f -------------------------------------------------------------------------------- /tables/cesam_nuc/bsp_gal.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/bsp_gal.f -------------------------------------------------------------------------------- /tables/cesam_nuc/bval0.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/bval0.f -------------------------------------------------------------------------------- /tables/cesam_nuc/bval1.f: -------------------------------------------------------------------------------- 1 | 2 | c****************************************************************** 3 | 4 | SUBROUTINE bval1(x,y,m,l,q,d) 5 | 6 | c subroutine public de mod_numerique 7 | 8 | c calcul les B-splines normalisees d'ordre m > 1 9 | c et leurs derivees premieres au point x tel que y(l) <= x < y(l+1) 10 | c si x est l'extremite droite : y(l) < x = y(l+1) on obtient 11 | c la limite a droite 12 | c les valeurs des m b-splines non nulles : l-m+1, ..., l sont 13 | c dans q(1), ..., q(m), les derivees dans d(1), ... , d(m) 14 | c !! ATTENTION : q doit etre dimensionne au moins a m+1 !! 15 | 16 | c d'apres l'algorithme 5-5 p.192 de schumaker 17 | c et addition d'une instruction pour les derivees 18 | 19 | c Auteur: P. Morel, Departement J.D. Cassini, O.C.A. 20 | 21 | c derive de bvald.f 22 | 23 | c entrees: 24 | c x: point de calcul 25 | c y(knot): points de table 26 | c m: ordre des splines 27 | c l: indice 28 | 29 | c sorties: 30 | c q(m+1): table des valeurs des m B-splines 31 | c d(m): table des valeurs des derivees premieres 32 | 33 | c------------------------------------------------------------------------ 34 | 35 | USE mod_kind 36 | 37 | IMPLICIT NONE 38 | 39 | REAL (kind=dp), INTENT(in) , DIMENSION(:) :: y 40 | REAL (kind=dp), INTENT(in) :: x 41 | INTEGER, INTENT(in) :: l, m 42 | REAL (kind=dp), INTENT(out) , DIMENSION(:) :: d, q 43 | 44 | REAL (kind=dp) :: a1, a2, denom 45 | 46 | INTEGER :: i, j 47 | 48 | c------------------------------------------------------------------------- 49 | 50 | DO j=1,m-1 51 | q(j)=0.d0 52 | ENDDO 53 | 54 | q(m)=1.d0/(y(l+1)-y(l)) ; q(m+1)=0.d0 55 | 56 | DO j=2,m-1 57 | DO i=m-j+1,m 58 | denom=y(i+l-m+j)-y(i+l-m) ; a1=(x-y(i+l-m))/denom 59 | a2=1.d0-a1 ; q(i)=a1*q(i)+a2*q(i+1) 60 | ENDDO 61 | ENDDO 62 | 63 | DO i=1,m 64 | d(i)=(q(i)-q(i+1))*(m-1.d0) ; q(i)=(x-y(i+l-m))*q(i)+(y(i+l)-x)*q(i+1) 65 | ENDDO 66 | 67 | RETURN 68 | 69 | END SUBROUTINE bval1 70 | -------------------------------------------------------------------------------- /tables/cesam_nuc/chim_gram.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/chim_gram.f -------------------------------------------------------------------------------- /tables/cesam_nuc/coll.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/coll.f -------------------------------------------------------------------------------- /tables/cesam_nuc/colpnt.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/colpnt.f -------------------------------------------------------------------------------- /tables/cesam_nuc/delete_doubles.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/delete_doubles.f -------------------------------------------------------------------------------- /tables/cesam_nuc/difdiv.f: -------------------------------------------------------------------------------- 1 | 2 | c****************************************************************** 3 | 4 | SUBROUTINE difdiv(l,k,f,x,a) 5 | 6 | c differences divisees 7 | 8 | c Auteur: P. Morel, Departement J.D. Cassini, O.C.A. 9 | c version: 03 06 91 10 | c F95 29 08 00 11 | 12 | c entree 13 | c l : premier indice 14 | c k : degre du polynome 15 | c f : fonction 16 | c x : abscisses 17 | 18 | c sortie 19 | c a : differences divisees 20 | 21 | c--------------------------------------------------------------------- 22 | 23 | USE mod_kind 24 | 25 | IMPLICIT NONE 26 | 27 | REAL (kind=dp), INTENT(in), DIMENSION(0:*) :: f,x 28 | INTEGER, INTENT(in) :: l,k 29 | REAL (kind=dp), INTENT(out), DIMENSION(0:*) :: a 30 | 31 | REAL (kind=dp), ALLOCATABLE, DIMENSION(:) :: d 32 | 33 | INTEGER :: i,j 34 | 35 | c------------------------------------------------------------------------- 36 | 37 | c PRINT*,(f(l+j),j=0,k) ; PRINT*,(x(l+j),j=0,k) 38 | 39 | ALLOCATE(d(0:k)) 40 | 41 | DO j=0,k 42 | d(j)=f(l+j) 43 | DO i=j-1,0,-1 44 | d(i)=(d(i+1)-d(i))/(x(l+j)-x(l+i)) 45 | ENDDO 46 | a(j)=d(0) 47 | ENDDO 48 | c PRINT*,'les a' ; PRINT*,(a(j),j=0,k) 49 | 50 | DEALLOCATE(d) 51 | 52 | RETURN 53 | 54 | END SUBROUTINE difdiv 55 | -------------------------------------------------------------------------------- /tables/cesam_nuc/fermi_dirac.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/fermi_dirac.f -------------------------------------------------------------------------------- /tables/cesam_nuc/gauss_band.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/gauss_band.f -------------------------------------------------------------------------------- /tables/cesam_nuc/horner.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/horner.f -------------------------------------------------------------------------------- /tables/cesam_nuc/ini_ctes.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/ini_ctes.f -------------------------------------------------------------------------------- /tables/cesam_nuc/inter.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/inter.f -------------------------------------------------------------------------------- /tables/cesam_nuc/journal.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/journal.f -------------------------------------------------------------------------------- /tables/cesam_nuc/left_right.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/left_right.f -------------------------------------------------------------------------------- /tables/cesam_nuc/linf.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/linf.f -------------------------------------------------------------------------------- /tables/cesam_nuc/lit_nl.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/lit_nl.f -------------------------------------------------------------------------------- /tables/cesam_nuc/matinv.f: -------------------------------------------------------------------------------- 1 | 2 | c************************************************************** 3 | 4 | SUBROUTINE matinv(a,n,inversible) 5 | 6 | 7 | c inversion de matrice par elimination de Gauss, pivot partiel 8 | c utilisation de gauss_band 9 | 10 | c entree: 11 | c n: ordre 12 | 13 | c entree/sortie: 14 | c a: matrice/matrice inverse 15 | 16 | c sortie: 17 | c inversible=.false.: matrice non inversible 18 | 19 | c Auteur: P. Morel, Departement J.D. Cassini, O.C.A. 20 | 21 | c---------------------------------------------------------------- 22 | 23 | USE mod_kind 24 | 25 | IMPLICIT NONE 26 | 27 | INTEGER, INTENT(in) :: n 28 | REAL (kind=dp), INTENT(inout), DIMENSION(n,n) :: a 29 | LOGICAL, INTENT(out) :: inversible 30 | 31 | REAL (kind=dp), DIMENSION(n,n) :: am1 32 | INTEGER, DIMENSION(n) :: indpc 33 | INTEGER :: i 34 | 35 | c--------------------------------------------------------------- 36 | 37 | 2000 FORMAT(8es10.3) 38 | 39 | c PRINT*,'matinv',n 40 | 41 | c identite dans am1 42 | 43 | am1=0.d0 ; indpc=1 44 | DO i=1,n 45 | am1(i,i)=1.d0 46 | ENDDO 47 | 48 | CALL gauss_band(a,am1,indpc,n,n,n,n,inversible) 49 | 50 | IF(.NOT.inversible)THEN 51 | PRINT*,'dans matinv matrice non inversible' ; STOP 52 | ENDIF 53 | 54 | c transposition car avec gauss_band on a resolu A t(A^-1) = I 55 | c la matrice second membre etant stockee (colonnes,lignes) 56 | 57 | a=transpose(am1) 58 | 59 | RETURN 60 | 61 | END SUBROUTINE matinv 62 | -------------------------------------------------------------------------------- /tables/cesam_nuc/max_local.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/max_local.f -------------------------------------------------------------------------------- /tables/cesam_nuc/min_max.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/min_max.f -------------------------------------------------------------------------------- /tables/cesam_nuc/mod_donnees.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/mod_donnees.f -------------------------------------------------------------------------------- /tables/cesam_nuc/mod_kind.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/mod_kind.f -------------------------------------------------------------------------------- /tables/cesam_nuc/mod_nuc.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/mod_nuc.f -------------------------------------------------------------------------------- /tables/cesam_nuc/mod_numerique.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/mod_numerique.f -------------------------------------------------------------------------------- /tables/cesam_nuc/mod_variables.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/mod_variables.f -------------------------------------------------------------------------------- /tables/cesam_nuc/neville.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/neville.f -------------------------------------------------------------------------------- /tables/cesam_nuc/newspl.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/newspl.f -------------------------------------------------------------------------------- /tables/cesam_nuc/newspl_gal.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/newspl_gal.f -------------------------------------------------------------------------------- /tables/cesam_nuc/newton.f: -------------------------------------------------------------------------------- 1 | 2 | c******************************************************************** 3 | 4 | SUBROUTINE newton(l,k,f,x,z,p,der) 5 | 6 | c routine public du module mod_numerique 7 | 8 | c polynome de newton 9 | 10 | c Auteur: P. Morel, Departement J.D. Cassini, O.C.A., Observatoire de Nice 11 | c version: 03 06 91 12 | c F95: 29 08 00 13 | 14 | c entree 15 | c l : premier indice 16 | c k : degre du polynome 17 | c f : table des f 18 | c x : abscisses 19 | c z : point d'interpolation 20 | c der : ordre de la derivee 21 | 22 | c sortie 23 | c p : valeur des derivees 24 | 25 | c----------------------------------------------------------------- 26 | 27 | USE mod_kind 28 | 29 | IMPLICIT NONE 30 | 31 | REAL (kind=dp), INTENT(in), DIMENSION(0:) :: f, x 32 | REAL (kind=dp), INTENT(in) :: z 33 | INTEGER, INTENT(in) :: l, k, der 34 | REAL (kind=dp), INTENT(out), DIMENSION(0:) :: p 35 | 36 | REAL (kind=dp), ALLOCATABLE, DIMENSION(:) :: a, ah, xh 37 | INTEGER :: j 38 | 39 | c------------------------------------------------------------------- 40 | 41 | ALLOCATE(a(0:k),xh(0:k),ah(0:k)) 42 | 43 | c PRINT*,l,k,der,z 44 | 45 | CALL difdiv(l,k,f,x,a) 46 | 47 | DO j=0,k 48 | xh(j)=x(l+j) ; ah(j)=a(j) 49 | ENDDO 50 | c PRINT*,(f(j+l),j=0,k) ; PRINT*,(xh(j),j=0,k) ; PRINT*,(ah(j),j=0,k) 51 | CALL horner(k,der,z,ah,xh,p) 52 | 53 | DEALLOCATE(a, ah, xh) 54 | 55 | RETURN 56 | 57 | END SUBROUTINE newton 58 | -------------------------------------------------------------------------------- /tables/cesam_nuc/noedif.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/noedif.f -------------------------------------------------------------------------------- /tables/cesam_nuc/noein.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/noein.f -------------------------------------------------------------------------------- /tables/cesam_nuc/noeu_dis.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/noeu_dis.f -------------------------------------------------------------------------------- /tables/cesam_nuc/noeud.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/noeud.f -------------------------------------------------------------------------------- /tables/cesam_nuc/pause.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/pause.f -------------------------------------------------------------------------------- /tables/cesam_nuc/polyder.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/polyder.f -------------------------------------------------------------------------------- /tables/cesam_nuc/print_ctes.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/print_ctes.f -------------------------------------------------------------------------------- /tables/cesam_nuc/schu58_n.f: -------------------------------------------------------------------------------- 1 | 2 | c********************************************************** 3 | 4 | SUBROUTINE schu58_n(n,f,xx,xt,m,l,val) 5 | 6 | c subroutine private du module mod_numerique 7 | 8 | c interpolation pour n fonctions par l'algorithme 5-8 p.194 de schumaker 9 | c au point xx, xt(l) .le. xx. lt. xt(l+1) par spline d'ordre m 10 | c dont les coefficients sont dans le tableau f 11 | 12 | c Auteur: P. Morel, Departement J.D. Cassini, O.C.A. 13 | c 25 11 00: version F95 14 | 15 | c entrees 16 | c n, f: nombre de fonctions f en spline 17 | c xx, xt: abscisse d'interpolation et vecteur nodal 18 | c m: ordre des splines 19 | c l: localisation 20 | 21 | c sortie 22 | c val: vecteur des interpolees 23 | 24 | c--------------------------------------------------------------- 25 | 26 | USE mod_kind 27 | 28 | IMPLICIT NONE 29 | 30 | REAL (kind=dp), INTENT(in), DIMENSION(:,:) :: f 31 | REAL (kind=dp), INTENT(in), DIMENSION(:) :: xt 32 | REAL (kind=dp), INTENT(in) :: xx 33 | INTEGER, INTENT(in) :: l, m, n 34 | REAL (kind=dp), INTENT(out), DIMENSION(n) :: val 35 | 36 | REAL (kind=dp), DIMENSION(n,m) :: cx 37 | REAL (kind=dp) :: a1, a2 38 | INTEGER :: i, j, k 39 | 40 | c---------------------------------------------------------------- 41 | 42 | 2000 FORMAT(8es10.3) 43 | 44 | cx=0.d0 45 | DO k=1,n 46 | DO j=1,m 47 | IF(j+l-m .gt. 0)cx(k,j)=f(k,j+l-m) 48 | ENDDO 49 | ENDDO 50 | 51 | DO j=2,m 52 | DO i=m,j,-1 53 | a1=(xx-xt(i+l-m))/(xt(i+l-j+1)-xt(i+l-m)) ; a2=1.d0-a1 54 | DO k=1,n 55 | cx(k,i)=a1*cx(k,i)+a2*cx(k,i-1) 56 | ENDDO 57 | ENDDO 58 | ENDDO 59 | 60 | val=cx(:,m) 61 | 62 | RETURN 63 | 64 | END SUBROUTINE schu58_n 65 | -------------------------------------------------------------------------------- /tables/cesam_nuc/shell.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/shell.f -------------------------------------------------------------------------------- /tables/cesam_nuc/sortie.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/sortie.f -------------------------------------------------------------------------------- /tables/cesam_nuc/sum_n.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/sum_n.f -------------------------------------------------------------------------------- /tables/cesam_nuc/test.don: -------------------------------------------------------------------------------- 1 | &NL_CESAM 2 | NOM_CHEMIN='~/SUN_STAR_DATA/', 3 | NOM_CTES='ctes_94', 4 | NOM_DES='des_m', 5 | NOM_OUTPUT='osc_adia', 6 | N_MAX=2000, 7 | PRECISION='pr' 8 | / 9 | &NL_MASS 10 | MTOT=1.5d0, 11 | NOM_PERTM='pertm_ext', 12 | MDOT=0.d0 13 | / 14 | &NL_EVOL 15 | AGEMAX=5000.d0, 16 | ARRET='else', 17 | DTLIST=1.d10, 18 | LOG_TEFF=10.d0, 19 | NB_MAX_MODELES=300, 20 | HE_CORE=-1.D0, 21 | T_STOP=5.d10, 22 | X_STOP=0.1d0 23 | / 24 | &NL_CHIM 25 | GRILLE_FIXE=f, 26 | NOM_ABON='solaire_gn', 27 | MODIF_CHIM=.TRUE., 28 | GARDE_XISH=.FALSE., 29 | X0=0.70, 30 | Y0=0.28, 31 | ZSX0=0.0d0 32 | / 33 | &NL_CONV 34 | NOM_CONV='conv_jmj', 35 | ALPHA=1.8d0, 36 | OVSHTS=0.d0, 37 | OVSHTI=0.0d0, 38 | JPZ=F, 39 | CPTURB=0.d0, 40 | LEDOUX=F 41 | / 42 | &NL_DIFF 43 | DIFFUSION=f, 44 | NOM_DIFFM='diffm_0', 45 | NOM_DIFFT='difft_smc', 46 | D_TURB=10.0000000E+00, 47 | RE_NU=1.000000000000000, 48 | NOM_FRAD='no_frad' 49 | / 50 | &NL_ROT 51 | W_ROT=0.d0, 52 | UNIT='kms/s', 53 | NOM_DIFFW='diffw_mpz', 54 | NOM_THW='rot_0', 55 | NOM_PERTW='pertw_0', 56 | P_PERTW=0.d0, 57 | LIM_JPZ=.FALSE., 58 | NOM_DES_ROT='end_mod' 59 | / 60 | &NL_ETAT 61 | NOM_ETAT='etat_eff', 62 | F_EOS='eos_opal_200.bin',7*' ' 63 | / 64 | &NL_OPA 65 | NOM_OPA='opa_yveline', 66 | F_OPA='opa_yveline.bin','/HOUDEK/OPINTPATH_AX95',6*' ' 67 | / 68 | &NL_NUC 69 | NOM_NUC='ppcno9', 70 | NOM_NUC_CPL='NACRE', 71 | MITLER=F 72 | / 73 | &NL_ATM 74 | NOM_ATM='lim_atm', 75 | NOM_TDETAU='k5777', 76 | TAU_MAX=20.d0, 77 | LIM_RO=T 78 | / 79 | -------------------------------------------------------------------------------- /tables/cesam_nuc/zoning.f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/cesam_nuc/zoning.f -------------------------------------------------------------------------------- /tables/freeeos/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libfreeeos.la 2 | 3 | EXTRA_DIST = aux_scale.h \ 4 | bfgs.h \ 5 | constants.h \ 6 | diagnostics.h \ 7 | eff_fit.h \ 8 | eos_free_calc_argument.h \ 9 | excitation_block.h \ 10 | helium1.h \ 11 | ionization.h \ 12 | nuvar.h \ 13 | pi_fit.h \ 14 | quad4block.h \ 15 | statistical_weights.h 16 | 17 | libfreeeos_la_SOURCES = aux_to_traditional.f \ 18 | bfgs.f \ 19 | coulomb_adjust.f \ 20 | coulomb.f \ 21 | deriv_product.f \ 22 | deriv_ratio.f \ 23 | effective_radius.f \ 24 | effsum_calc.f \ 25 | eos_bfgs.f \ 26 | eos_calc.f \ 27 | eos_cold_start.f \ 28 | eos_free_calc.f \ 29 | eos_jacobian.f \ 30 | eos_sum_calc.f \ 31 | eos_tqft.f \ 32 | eos_tqsum_calc.f \ 33 | eos_warm_step.f \ 34 | exchange_coeff.f \ 35 | exchange_gcpf.f \ 36 | excitation_pi_end.f \ 37 | excitation_pi.f \ 38 | excitation_sum.f \ 39 | exct_calc.f \ 40 | fermi_dirac_coeff.f \ 41 | fermi_dirac_ct.f \ 42 | fermi_dirac_direct.f \ 43 | fermi_dirac_exchange.f \ 44 | fermi_dirac.f \ 45 | fermi_dirac_minusnr_coeff.f \ 46 | fermi_dirac_original_coeff.f \ 47 | fermi_dirac_recursion.f \ 48 | fjs_pi.f \ 49 | fp12_calc.f \ 50 | f_psi.f \ 51 | free_eos_detailed.f \ 52 | free_eos.f \ 53 | free_eos_interpolated.f \ 54 | free_non_ideal_calc.f \ 55 | ionize.f \ 56 | lnblnk.f \ 57 | lnx_calc.f \ 58 | Makefile.am \ 59 | master_coulomb.f \ 60 | mdh_pi.f \ 61 | molecular_hydrogen.f \ 62 | pl_prepare.f \ 63 | plsum_approx.f \ 64 | plsum.f \ 65 | poly_sum.f \ 66 | pteh_pi.f \ 67 | pteh_theta.f \ 68 | qmhd_calc.f \ 69 | qryd_approx.f \ 70 | qryd_calc.f \ 71 | qstar_calc.f \ 72 | quad4b.f \ 73 | round_ln.f \ 74 | tau_calc.f \ 75 | version.f 76 | -------------------------------------------------------------------------------- /tables/freeeos/diagnostics.h: -------------------------------------------------------------------------------- 1 | C******************************************************************************* 2 | C Start of the header for a fortran source file for a subroutine 3 | C of the Free_EOS stellar interior equation of state code 4 | C Copyright (C) 1996, 1998, 2000, 2001, 2004, 2005, 2006 Alan W. Irwin 5 | C 6 | C $Id: diagnostics.h 354 2006-04-13 02:37:41Z airwin $ 7 | C 8 | C For the latest version of this source code, please contact 9 | C Alan W. Irwin 10 | C Department of Physics and Astronomy 11 | C University of Victoria, 12 | C Box 3055 13 | C Victoria, B.C., Canada 14 | C V8W 3P6 15 | C e-mail: irwin@beluga.phys.uvic.ca. 16 | C 17 | C This program is free software; you can redistribute it and/or modify 18 | C it under the terms of the GNU General Public License as published by 19 | C the Free Software Foundation; either version 2 of the License, or 20 | C (at your option) any later version. 21 | C 22 | C This program is distributed in the hope that it will be useful, 23 | C but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 25 | C GNU General Public License for more details. 26 | C 27 | C You should have received a copy of the GNU General Public License 28 | C along with this program; if not, write to the Free Software 29 | C Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 30 | C 31 | C End of the header for a fortran source file for a subroutine 32 | C of the Free_EOS stellar interior equation of state code 33 | C******************************************************************************* 34 | C Quantities saved from free_eos_detailed for diagnostic and teaching 35 | C purposes. 36 | real*8 pr_ratio, ppie_ratio, pc_ratio, pex_ratio 37 | common /diagnostics/pr_ratio, ppie_ratio, pc_ratio, pex_ratio 38 | -------------------------------------------------------------------------------- /tables/freeeos/lnblnk.f: -------------------------------------------------------------------------------- 1 | C******************************************************************************* 2 | C Start of the header for a fortran source file for a subroutine 3 | C of the Free_EOS stellar interior equation of state code 4 | C Copyright (C) 1996, 1998, 2000, 2001, 2004, 2005, 2006 Alan W. Irwin 5 | C 6 | C $Id: lnblnk.f 352 2006-04-13 02:12:47Z airwin $ 7 | C 8 | C For the latest version of this source code, please contact 9 | C Alan W. Irwin 10 | C Department of Physics and Astronomy 11 | C University of Victoria, 12 | C Box 3055 13 | C Victoria, B.C., Canada 14 | C V8W 3P6 15 | C e-mail: irwin@beluga.phys.uvic.ca. 16 | C 17 | C This program is free software; you can redistribute it and/or modify 18 | C it under the terms of the GNU General Public License as published by 19 | C the Free Software Foundation; either version 2 of the License, or 20 | C (at your option) any later version. 21 | C 22 | C This program is distributed in the hope that it will be useful, 23 | C but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 25 | C GNU General Public License for more details. 26 | C 27 | C You should have received a copy of the GNU General Public License 28 | C along with this program; if not, write to the Free Software 29 | C Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 30 | C 31 | C End of the header for a fortran source file for a subroutine 32 | C of the Free_EOS stellar interior equation of state code 33 | C******************************************************************************* 34 | integer function lnblnk(string) 35 | character*(*) string 36 | integer n, len 37 | n = len(string) 38 | if(n.gt.0) then 39 | do while(n.ge.1.and.string(max(1,n):max(1,n)).eq.' ') 40 | n = n - 1 41 | enddo 42 | endif 43 | lnblnk = n 44 | end 45 | -------------------------------------------------------------------------------- /tables/freeeos/poly_sum.f: -------------------------------------------------------------------------------- 1 | C******************************************************************************* 2 | C Start of the header for a fortran source file for a subroutine 3 | C of the Free_EOS stellar interior equation of state code 4 | C Copyright (C) 1996, 1998, 2000, 2001, 2004, 2005, 2006 Alan W. Irwin 5 | C 6 | C $Id: poly_sum.f 352 2006-04-13 02:12:47Z airwin $ 7 | C 8 | C For the latest version of this source code, please contact 9 | C Alan W. Irwin 10 | C Department of Physics and Astronomy 11 | C University of Victoria, 12 | C Box 3055 13 | C Victoria, B.C., Canada 14 | C V8W 3P6 15 | C e-mail: irwin@beluga.phys.uvic.ca. 16 | C 17 | C This program is free software; you can redistribute it and/or modify 18 | C it under the terms of the GNU General Public License as published by 19 | C the Free Software Foundation; either version 2 of the License, or 20 | C (at your option) any later version. 21 | C 22 | C This program is distributed in the hope that it will be useful, 23 | C but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 25 | C GNU General Public License for more details. 26 | C 27 | C You should have received a copy of the GNU General Public License 28 | C along with this program; if not, write to the Free Software 29 | C Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 30 | C 31 | C End of the header for a fortran source file for a subroutine 32 | C of the Free_EOS stellar interior equation of state code 33 | C******************************************************************************* 34 | FUNCTION poly_sum(X,A,N) 35 | C 36 | C NESTED MULTIPLICATION EVALUATION OF POLYNOMIALS IN X WITH 37 | C COEFFICIENTS A. 38 | C 39 | IMPLICIT none 40 | real*8 poly_sum, x, a(*) 41 | integer*4 i, n 42 | C IF N IS ZERO OR NEGATIVE, RETURN ZERO 43 | poly_sum=0.D0 44 | DO I = 1,N 45 | poly_sum=X*poly_sum+A(N-I+1) 46 | ENDDO 47 | END 48 | -------------------------------------------------------------------------------- /tables/freeeos/quad4block.h: -------------------------------------------------------------------------------- 1 | C******************************************************************************* 2 | C Start of the header for a fortran source file for a subroutine 3 | C of the Free_EOS stellar interior equation of state code 4 | C Copyright (C) 1996, 1998, 2000, 2001, 2004, 2005, 2006 Alan W. Irwin 5 | C 6 | C $Id: quad4block.h 354 2006-04-13 02:37:41Z airwin $ 7 | C 8 | C For the latest version of this source code, please contact 9 | C Alan W. Irwin 10 | C Department of Physics and Astronomy 11 | C University of Victoria, 12 | C Box 3055 13 | C Victoria, B.C., Canada 14 | C V8W 3P6 15 | C e-mail: irwin@beluga.phys.uvic.ca. 16 | C 17 | C This program is free software; you can redistribute it and/or modify 18 | C it under the terms of the GNU General Public License as published by 19 | C the Free Software Foundation; either version 2 of the License, or 20 | C (at your option) any later version. 21 | C 22 | C This program is distributed in the hope that it will be useful, 23 | C but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 25 | C GNU General Public License for more details. 26 | C 27 | C You should have received a copy of the GNU General Public License 28 | C along with this program; if not, write to the Free Software 29 | C Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 30 | C 31 | C End of the header for a fortran source file for a subroutine 32 | C of the Free_EOS stellar interior equation of state code 33 | C******************************************************************************* 34 | C Parameters of Fermi-Dirac integrals as defined by Cox and Giuli eq. 35 | C 24.172. 36 | C akindex is the 'k' index. 37 | C eta is the degeneracy parameter 38 | C beta = kT/m_ec^2 is the relativistic parameter 39 | C betahalf = sqrt(beta) 40 | real*8 akindex, eta, beta, betahalf 41 | common/linkquad4b/ akindex,eta,beta,betahalf 42 | -------------------------------------------------------------------------------- /tables/freeeos/version.f: -------------------------------------------------------------------------------- 1 | C******************************************************************************* 2 | C Start of the header for a fortran source file for a subroutine 3 | C of the Free_EOS stellar interior equation of state code 4 | C Copyright (C) 1996, 1998, 2000, 2001, 2004, 2005, 2006 Alan W. Irwin 5 | C 6 | C $Id: version.f 838 2008-07-07 18:56:11Z airwin $ 7 | C 8 | C For the latest version of this source code, please contact 9 | C Alan W. Irwin 10 | C Department of Physics and Astronomy 11 | C University of Victoria, 12 | C Box 3055 13 | C Victoria, B.C., Canada 14 | C V8W 3P6 15 | C e-mail: irwin@beluga.phys.uvic.ca. 16 | C 17 | C This program is free software; you can redistribute it and/or modify 18 | C it under the terms of the GNU General Public License as published by 19 | C the Free Software Foundation; either version 2 of the License, or 20 | C (at your option) any later version. 21 | C 22 | C This program is distributed in the hope that it will be useful, 23 | C but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 25 | C GNU General Public License for more details. 26 | C 27 | C You should have received a copy of the GNU General Public License 28 | C along with this program; if not, write to the Free Software 29 | C Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 30 | C 31 | C End of the header for a fortran source file for a subroutine 32 | C of the Free_EOS stellar interior equation of state code 33 | C******************************************************************************* 34 | character*(*) function version() 35 | version = '2.2.1' 36 | end 37 | -------------------------------------------------------------------------------- /tables/houdek/v9/.sbinit: -------------------------------------------------------------------------------- 1 | import ./lib 2 | import ./rksuite/lib 3 | -------------------------------------------------------------------------------- /tables/houdek/v9/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = opal95/opal95e.bin alex94/alex94.bin \ 2 | opal95/opal95e+alex94-pd.bin \ 3 | opal95/ival95.dat 4 | 5 | SUBDIRS = lib 6 | 7 | houdekdir = $(datadir)/ester/tables/houdek/v9 8 | houdek_DATA = OPINTPATH_AX \ 9 | opal95/opal95e.bin \ 10 | alex94/alex94.bin \ 11 | opal95/opal95e+alex94-pd.bin \ 12 | opal95/ival95.dat 13 | 14 | OPINTPATH_AX: 15 | echo "$(datadir)/ester/tables/houdek/v9/opal95e.bin" > $@ 16 | echo "$(datadir)/ester/tables/houdek/v9/alex94.bin" >> $@ 17 | echo "$(datadir)/ester/tables/houdek/v9/opal95e+alex94-pd.bin" >> $@ 18 | echo "$(datadir)/ester/tables/houdek/v9/ival95.dat" >> $@ 19 | 20 | clean-local: 21 | rm -f OPINTPATH_AX 22 | -------------------------------------------------------------------------------- /tables/houdek/v9/OPINTPATH_92: -------------------------------------------------------------------------------- 1 | ./opal92/opal92e.bin 2 | ./kuru91/kuru91X92.bin 3 | ./opal92/opal92e-pd.bin 4 | ./opal92/ival92.dat 5 | -------------------------------------------------------------------------------- /tables/houdek/v9/OPINTPATH_95: -------------------------------------------------------------------------------- 1 | ./opal95/opal95e.bin 2 | ./kuru91/kuru91X95.bin 3 | ./opal95/opal95e+kuru91-pd.bin 4 | ./opal95/ival95.dat 5 | -------------------------------------------------------------------------------- /tables/houdek/v9/README: -------------------------------------------------------------------------------- 1 | This is version v9. (20/08/97) 2 | 3 | Documentation can be found in the doc subdir: 4 | 5 | ./doc/notes.ps ...... Postscript file 6 | ./doc/notes.dvi ...... dvi file (device independent) 7 | 8 | -------------------------------------------------------------------------------- /tables/houdek/v9/Release_history: -------------------------------------------------------------------------------- 1 | Version Comments 2 | ------- ---------- 3 | v6a use linear interpolation for partial derivatives. 4 | 5 | v6b use analytical formular for partial derivatives. 6 | Known bugs: eps to small -> can lead to 'division by zero' 7 | 8 | v7 birational splines option, selectable with new argument 9 | variable imode > 0 . 10 | use analytical formular for y-partial derivatives (T). 11 | drelpr -> 10.d0*eps to prevent bug 'division by zero' as in v6b. 12 | 13 | v8 inclusion of OPAL95 14 | use analytical formular for part.derivatives 15 | 16 | v8z 25/05/97: a) interpolate logarithmical in Z 17 | b) use min(|Z_tab-Z_val|) for table selection 18 | & min(|X_tab-X_val|) 19 | 20 | v9 20/08/97: - use Akima's scheme for OPAL95 table extrapolation 21 | (before Shepard's method was used) 22 | - inclusion of Itoh's electron conduction (ApJ 273,774) 23 | - added low-T tables of Alexander & Ferguson (1995) 24 | - rearrangement of dir-structure (only one library 25 | necessary yet for the link process) 26 | -------------------------------------------------------------------------------- /tables/houdek/v9/alex94/alex94.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/alex94/alex94.bin -------------------------------------------------------------------------------- /tables/houdek/v9/doc/notes.dvi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/doc/notes.dvi -------------------------------------------------------------------------------- /tables/houdek/v9/idl/opdo.pro.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/idl/opdo.pro.gz -------------------------------------------------------------------------------- /tables/houdek/v9/idl/read_opdo.pro.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/idl/read_opdo.pro.gz -------------------------------------------------------------------------------- /tables/houdek/v9/kurset.f: -------------------------------------------------------------------------------- 1 | subroutine kurset(ir,infile) 2 | c====================================================================== 3 | c 4 | implicit real*8 (a-h,o-z) 5 | character*(*) infile 6 | character*80 headr1,headr2 7 | c 8 | parameter(mt=56,mp=38,iv=3,nkur=11,lkur=2128) 9 | c 10 | c ... var(i,j,1)=log p, var(i,j,2)=log op, var(i,j,3)=log rho 11 | c 12 | c ... vark(1...nkur) (of original Kurucz data file): 13 | c ... logT logP 0km/s 1km/s 2km/s 4km/s 8km/s log Ne log Na log rho IPloCM-1 14 | c 15 | common/kurtab/tl(mt),var(mt,mp,iv),zv,nt,np(mt) 16 | dimension vark(nkur) 17 | c 18 | open(unit=ir,status='old',file=infile,err=9030) 19 | c 20 | read(ir,'(a80)') headr1 21 | read(ir,'(a80)') headr2 22 | write(6,*) headr1 23 | read(headr1(42:45),'(f4.1)') zv 24 | c write(6,*) headr2 25 | c 26 | tlgold = 0. 27 | it = 0 28 | ip = 0 29 | do 100 ikur=1,3000 30 | read(ir,9000,end=1000) (vark(j),j=1,nkur) 31 | lines = ikur 32 | tlgnew = vark(1) 33 | if(tlgnew.ne.tlgold) then 34 | it = it + 1 35 | ip = 0 36 | tlgold = tlgnew 37 | end if 38 | nt = it 39 | ip = ip + 1 40 | np(it) = ip 41 | tl(it) = tlgnew 42 | var(it,ip,1) = vark(2) 43 | var(it,ip,2) = vark(3) 44 | var(it,ip,3) = vark(10) 45 | 100 continue 46 | c 47 | 1000 if(lines.ne.lkur) then 48 | write(6,*) 'kurucz opacity: wrong line number in table.' 49 | write(6,*) 'lines expected, read: ',lkur,lines 50 | else 51 | write(6,'(2a,2i3,i5)') 'table successfully read. nt,np(nt),', 52 | + 'lines = ',nt,np(nt),lines 53 | end if 54 | c 55 | return 56 | 9000 format(2f5.2,5f7.3,3f9.5,f8.3) 57 | 9030 print *,'error in opening ',infile 58 | stop 59 | c 60 | end 61 | -------------------------------------------------------------------------------- /tables/houdek/v9/kuru91/KURTABS: -------------------------------------------------------------------------------- 1 | 19 2 | kurkapm5.0 3 | kurkapm4.5 4 | kurkapm4.0 5 | kurkapm3.5 6 | kurkapm3.0 7 | kurkapm2.5 8 | kurkapm2.0 9 | kurkapm1.5 10 | kurkapm1.0 11 | kurkapm0.5 12 | kurkapm0.3 13 | kurkapm0.2 14 | kurkapm0.1 15 | kurkapp0.0 16 | kurkapp0.1 17 | kurkapp0.2 18 | kurkapp0.3 19 | kurkapp0.5 20 | kurkapp1.0 21 | -------------------------------------------------------------------------------- /tables/houdek/v9/kuru91/OPINTPATH_92: -------------------------------------------------------------------------------- 1 | ./opal92/opal92e.bin 2 | ./kuru91/kuru91X92.bin 3 | ./opal92/opal92e-pd.bin 4 | ./opal92/ival92.dat 5 | -------------------------------------------------------------------------------- /tables/houdek/v9/kuru91/OPINTPATH_92X: -------------------------------------------------------------------------------- 1 | ../opal92/opal92e.bin 2 | ../opal92/opal92e-pd.bin 3 | ../opal92/ival92.dat 4 | ../kuru91/kuru91_92.bin 5 | ../kuru91/kuru91X92.bin 6 | -------------------------------------------------------------------------------- /tables/houdek/v9/kuru91/OPINTPATH_95: -------------------------------------------------------------------------------- 1 | ../opal95/opal95e.bin 2 | ../kuru91/kuru91X95.bin 3 | ../opal95/opal95e+kuru91-pd.bin 4 | ../opal95/ival95.dat 5 | -------------------------------------------------------------------------------- /tables/houdek/v9/kuru91/OPINTPATH_95X: -------------------------------------------------------------------------------- 1 | ../opal95/opal95e.bin 2 | ../opal95/opal95e+kuru91-pd.bin 3 | ../opal95/ival95.dat 4 | ../kuru91/kuru91_95.bin 5 | ../kuru91/kuru91X95.bin 6 | -------------------------------------------------------------------------------- /tables/houdek/v9/kuru91/kuru91X92.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/kuru91/kuru91X92.bin -------------------------------------------------------------------------------- /tables/houdek/v9/kuru91/kuru91X95.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/kuru91/kuru91X95.bin -------------------------------------------------------------------------------- /tables/houdek/v9/kuru91/kuru91_95.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/kuru91/kuru91_95.bin -------------------------------------------------------------------------------- /tables/houdek/v9/kuru91/kurucz.pro.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/kuru91/kurucz.pro.gz -------------------------------------------------------------------------------- /tables/houdek/v9/kuru91/kurucz_NOHe.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/kuru91/kurucz_NOHe.gz -------------------------------------------------------------------------------- /tables/houdek/v9/lib/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libopint.la 2 | libopint_la_SOURCES = condux_ad.f \ 3 | dopinit.f \ 4 | dreadkx.f \ 5 | ratmat.f \ 6 | condux_cf.f \ 7 | dopintc.f \ 8 | dshep.f \ 9 | rbival.f \ 10 | dadjac.f \ 11 | dopintf.f \ 12 | duvip3d.f \ 13 | rbivpd.f \ 14 | dctang.f \ 15 | dopints.f \ 16 | duvip3p.f \ 17 | rde95.f \ 18 | dextrp.f \ 19 | dordgr.f \ 20 | gi.f \ 21 | rdi95.f \ 22 | dhunt.f \ 23 | dordgri.f \ 24 | gid.f \ 25 | readal.f \ 26 | dintrp.f \ 27 | dpderix.f \ 28 | inttwo.f \ 29 | rtperm.f \ 30 | dintrpi.f \ 31 | dpderiy.f \ 32 | itoh_coeff_cf.f \ 33 | sbilin.f \ 34 | dmaceps.f \ 35 | dpdmin.f \ 36 | itoh_ec_ad.f \ 37 | sfa_ad.f \ 38 | dmasub.f \ 39 | dpdste.f \ 40 | itoh_ec_cf.f \ 41 | sfa_cf.f \ 42 | dmasube.f \ 43 | dreade.f \ 44 | itoh_init_ad.f \ 45 | trdisa.f \ 46 | dmasubi.f \ 47 | dreadi.f \ 48 | itoh_init_cf.f \ 49 | trdisb.f \ 50 | dmaxmn.f \ 51 | dreadk.f \ 52 | rat2d.f \ 53 | dcspline.f 54 | 55 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/condux_cf.f: -------------------------------------------------------------------------------- 1 | subroutine condux( ro6, t8, zz, iel, cond ) 2 | implicit none 3 | 4 | C============================================== 5 | C define parameters 6 | C============================================== 7 | 8 | C============================================== 9 | C define common blocks 10 | C============================================== 11 | common /output/ gam,rs,s1,s2,s,fact 12 | C============================================== 13 | C define arguments 14 | C============================================== 15 | integer iel 16 | double precision cond 17 | double precision ro6 18 | double precision t8 19 | double precision zz 20 | 21 | C============================================== 22 | C define local variables 23 | C============================================== 24 | double precision a 25 | double precision fact 26 | double precision gam 27 | double precision rs 28 | double precision s 29 | double precision s1 30 | double precision s2 31 | double precision xx 32 | 33 | C********************************************** 34 | C executable statements of routine 35 | C********************************************** 36 | cond = -1.d0 37 | a = zz*2.d0 38 | gam = 0.2275d0*zz**2/t8*(ro6/a)**(1.d0/3.d0) 39 | xx = 0.45641d0*dlog(gam)-1.31636d0 40 | rs = 0.01388d0*(a/zz)**(1.d0/3.d0)/ro6**(1.d0/3.d0) 41 | if (rs .gt. 1.0d1) then 42 | rs = 1.0d1 43 | endif 44 | call sfa( rs,xx,iel,s1,s2 ) 45 | fact = 1.018d0*(zz/a)**(2.d0/3.d0)*ro6**(2.d0/3.d0) 46 | s = s1-fact/(1.d0+fact)*s2 47 | if (s .lt. 0.1d0) then 48 | s = 0.1d0 49 | endif 50 | cond = 2.363d+17*(ro6*t8/a)/((1.d0+fact)*s) 51 | c 52 | end 53 | 54 | 55 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/dadjac.f: -------------------------------------------------------------------------------- 1 | subroutine adjac(nt,ipt,n,iadve,nadve) 2 | implicit double precision (a-h,o-z) 3 | c it estimates the adjacencies monodimensional array containing 4 | c for each vertex the indices of the vertexes adjacent in the 5 | c triangulation. 6 | c 7 | c the input parameters are 8 | c nt = number of triangles, 9 | c ipt = integer array of dimension 3*nt containing the indices 10 | c of the vertexes of the triangles, 11 | c n = number of data points. 12 | c 13 | c the output parameters are 14 | c iadve = integer array of dimension 6*n-12 containing for each 15 | c vertex the indices of the vertexes adjacent in the 16 | c triangulation, 17 | c nadve = integer array of dimension n+1 containing for each 18 | c vertex the number of the vertexes adjacent in the 19 | c triangulation. 20 | c 21 | c declaration statement. 22 | dimension ipt(*),iadve(*),nadve(*),item(1000) 23 | nadve(1)=0 24 | kin=0 25 | nt3=3*nt 26 | do 70 i=1,n 27 | i2=0 28 | c stores the indices of the adjacent vertexes. 29 | do 30 j1=1,nt3,3 30 | j2=j1+2 31 | do 10 j=j1,j2 32 | if(i.eq.ipt(j))go to 20 33 | 10 continue 34 | go to 30 35 | 20 i1=i2+1 36 | i2=i2+2 37 | item(i1)=ipt(j1+mod(j,3)) 38 | item(i2)=ipt(j1+mod(j+1,3)) 39 | 30 continue 40 | c discards the indices that have been stored twice. 41 | jin=kin+1 42 | kin=kin+2 43 | jfin=kin 44 | iadve(jin)=item(1) 45 | iadve(jfin)=item(2) 46 | if(i2.eq.2)go to 60 47 | do 50 j=3,i2 48 | do 40 l=jin,jfin 49 | if(item(j).eq.iadve(l))go to 50 50 | 40 continue 51 | kin=kin+1 52 | iadve(kin)=item(j) 53 | jfin=kin 54 | 50 continue 55 | 60 nadve(i+1)=kin 56 | 70 continue 57 | return 58 | end 59 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/dhunt.f: -------------------------------------------------------------------------------- 1 | subroutine hunt(xx,n,x,jlo) 2 | implicit double precision (a-h,o-z) 3 | c 4 | c Reference: 5 | c Numerical Recipes 6 | c Cap. 3.4 /Page 91 7 | c 8 | dimension xx(n) 9 | logical ascnd 10 | ascnd=xx(n).gt.xx(1) 11 | if(jlo.le.0.or.jlo.gt.n)then 12 | jlo=0 13 | jhi=n+1 14 | go to 3 15 | endif 16 | inc=1 17 | if(x.ge.xx(jlo).eqv.ascnd)then 18 | 1 jhi=jlo+inc 19 | if(jhi.gt.n)then 20 | jhi=n+1 21 | else if(x.ge.xx(jhi).eqv.ascnd)then 22 | jlo=jhi 23 | inc=inc+inc 24 | go to 1 25 | endif 26 | else 27 | jhi=jlo 28 | 2 jlo=jhi-inc 29 | if(jlo.lt.1)then 30 | jlo=0 31 | else if(x.lt.xx(jlo).eqv.ascnd)then 32 | jhi=jlo 33 | inc=inc+inc 34 | go to 2 35 | endif 36 | endif 37 | 3 if(jhi-jlo.eq.1)return 38 | jm=(jhi+jlo)/2 39 | if(x.ge.xx(jm).eqv.ascnd)then 40 | jlo=jm 41 | else 42 | jhi=jm 43 | endif 44 | go to 3 45 | end 46 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/dmaceps.f: -------------------------------------------------------------------------------- 1 | subroutine maceps(drelpr) 2 | implicit double precision (a-h,o-z) 3 | c it carries out an approximation of the double relative precision 4 | c constant 5 | drelpr=1.0d0 6 | 10 drelpr=0.5d0*drelpr 7 | c the do loop statement is necessary when the arithmetic unit has more 8 | c bits than in storage (intel 8087 family of arithmetic units is of 9 | c this type), infact a do loop involves a store from register to memory 10 | c of the value for drelpr. 11 | do 20 i=1,2 12 | 20 continue 13 | if (drelpr+1.0d0.gt.1.0d0) goto 10 14 | drelpr=2.0d0*drelpr 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/dmaxmn.f: -------------------------------------------------------------------------------- 1 | function maxmn(x,y,i1,i2,i3,i4) 2 | implicit double precision (a-h,o-z) 3 | c it determines whether the exchange of two triangles is necessary 4 | c or not on the basis of the max-min-angle criterion by c.lawson. 5 | c 6 | c the input parameters are 7 | c x,y = arrays containing the coordinates of the data points, 8 | c i1,i2,i3,i4 = point numbers of four points p1,p2,p3 and p4 9 | c forming a quadrilateral with p3 and p4 10 | c diagonally connected. 11 | c 12 | c function maxmn returns an integer value 1 (one) when an exchange is 13 | c necessary, otherwise 0 (zero). 14 | c 15 | c declaration statement. 16 | dimension x(*),y(*) 17 | equivalence (c2sq,c1sq),(a3sq,b2sq),(b3sq,a1sq), 18 | 1 (a4sq,b1sq),(b4sq,a2sq),(c4sq,c3sq) 19 | c preliminary processing. 20 | x1=x(i1) 21 | y1=y(i1) 22 | x2=x(i2) 23 | y2=y(i2) 24 | x3=x(i3) 25 | y3=y(i3) 26 | x4=x(i4) 27 | y4=y(i4) 28 | c calculation. 29 | idx=0 30 | u3=(y2-y3)*(x1-x3)-(x2-x3)*(y1-y3) 31 | u4=(y1-y4)*(x2-x4)-(x1-x4)*(y2-y4) 32 | if(u3*u4.le.0.0d0)go to 10 33 | u1=(y3-y1)*(x4-x1)-(x3-x1)*(y4-y1) 34 | u2=(y4-y2)*(x3-x2)-(x4-x2)*(y3-y2) 35 | a1sq=(x1-x3)**2+(y1-y3)**2 36 | b1sq=(x4-x1)**2+(y4-y1)**2 37 | c1sq=(x3-x4)**2+(y3-y4)**2 38 | a2sq=(x2-x4)**2+(y2-y4)**2 39 | b2sq=(x3-x2)**2+(y3-y2)**2 40 | c3sq=(x2-x1)**2+(y2-y1)**2 41 | s1sq=u1*u1/(c1sq*dmax1(a1sq,b1sq)) 42 | s2sq=u2*u2/(c2sq*dmax1(a2sq,b2sq)) 43 | s3sq=u3*u3/(c3sq*dmax1(a3sq,b3sq)) 44 | s4sq=u4*u4/(c4sq*dmax1(a4sq,b4sq)) 45 | if(dmin1(s1sq,s2sq).lt.dmin1(s3sq,s4sq))idx=1 46 | 10 maxmn=idx 47 | return 48 | end 49 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/dshep.f: -------------------------------------------------------------------------------- 1 | double precision function shep(ncp,x,y,z,x0,y0) 2 | implicit double precision (a-h,o-z) 3 | c 4 | c extrapolate the z0-value at coordinate (x0,y0) following the shepard method. 5 | c 6 | c the input parameters are 7 | c ncp = number of data points, 8 | c x,y,z = arrays of dimension ncp containing the x,y and z 9 | c coordinates of the data points 10 | c 11 | c the output parameter is 12 | c shep = extrapolated value at the coordinate x0,y0 13 | c 14 | c declaration statement. 15 | double precision x0,y0 16 | dimension x(ncp),y(ncp),z(ncp) 17 | c 18 | intrinsic dmax1,dabs 19 | c 20 | c statement functions. 21 | c 22 | c dinf(u1,v1,u2,v2)=dmax1(dabs(u1-u2),dabs(v1-v2)) 23 | dsqf(u1,v1,u2,v2)=((u2-u1)**2+(v2-v1)**2)**2 24 | c 25 | c estimates the function value z0 at the new external point (x0,y0). 26 | c 27 | anum=0.d0 28 | aden=0.d0 29 | do 260 i=1,ncp 30 | r4=dsqf(x0,y0,x(i),y(i)) 31 | if(r4.eq.0.d0)go to 260 32 | anum=anum+z(i)/r4 33 | aden=aden+1/r4 34 | 260 continue 35 | shep=anum/aden 36 | return 37 | end 38 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/gi.f: -------------------------------------------------------------------------------- 1 | function gi(i,x,pp) 2 | implicit double precision(a-h,o-z) 3 | h=1.d0-x 4 | if(i.eq.1)gi=h 5 | if(i.eq.2)gi=x 6 | if(i.eq.3)gi=h*h*h/(pp*x+1.d0) 7 | if(i.eq.4)gi=x*x*x/(pp*h+1.d0) 8 | return 9 | end 10 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/gid.f: -------------------------------------------------------------------------------- 1 | function gid(i,x,pp) 2 | implicit double precision(a-h,o-z) 3 | if(i.eq.1)gid=-1.d0 4 | if(i.eq.2)gid= 1.d0 5 | if(i.eq.3)gid=-((x-1.d0)**2)*(2.d0*pp*x+3.d0+pp)/ 6 | + ((pp*x+1.d0)**2) 7 | if(i.eq.4)gid=-x*x*(-3.d0*pp+2.d0*pp*x-3.d0)/ 8 | + ((-pp+pp*x-1.d0)**2) 9 | return 10 | end 11 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/inttwo.f: -------------------------------------------------------------------------------- 1 | subroutine inttwo(x,n,y,m,v,w,i,j,iflag) 2 | implicit double precision(a-h,o-z) 3 | dimension x(n),y(m) 4 | iflag=0 5 | if(v.lt.x(1).or.v.gt.x(n).or.w.lt.y(1).or.w.gt.y(m))then 6 | iflag=3 7 | return 8 | endif 9 | if(i.lt.1.or.i.ge.n.or.j.lt.1.or.j.ge.m)then 10 | i=1 11 | j=1 12 | endif 13 | if(v.lt.x(i)) goto 10 14 | if(v.le.x(i+1))goto 40 15 | l=n 16 | goto 30 17 | 10 l=i 18 | i=1 19 | 20 k=(i+l)/2 20 | if(v.lt.x(k))then 21 | l=k 22 | else 23 | i=k 24 | endif 25 | 30 if(l.gt.i+1) goto 20 26 | 40 if(w.lt.y(j))goto 50 27 | if(w.le.y(j+1))return 28 | l=m 29 | goto 70 30 | 50 l=j 31 | j=1 32 | 60 k=(j+l)/2 33 | if(w.lt.y(k))then 34 | l=k 35 | else 36 | j=k 37 | endif 38 | 70 if(l.gt.j+1) goto 60 39 | return 40 | end 41 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/itoh_ec_cf.f: -------------------------------------------------------------------------------- 1 | subroutine itohec( xch, zch, t, rho, ec ) 2 | implicit none 3 | 4 | C============================================== 5 | C define parameters 6 | C============================================== 7 | integer nel 8 | parameter ( nel = 10 ) 9 | 10 | C============================================== 11 | C define common blocks 12 | C============================================== 13 | common /itohcz/ a, atw, y, x, z 14 | double precision a(nel) 15 | double precision atw(nel) 16 | double precision x(nel) 17 | double precision y(nel) 18 | double precision z(nel) 19 | 20 | C============================================== 21 | C define arguments 22 | C============================================== 23 | double precision ec 24 | double precision rho 25 | double precision t 26 | double precision xch 27 | double precision zch 28 | 29 | C============================================== 30 | C define local variables 31 | C============================================== 32 | double precision cond 33 | double precision conmed 34 | integer i 35 | integer iel 36 | double precision ro6 37 | double precision t8 38 | double precision xa 39 | double precision ya 40 | double precision za 41 | double precision zz 42 | 43 | C********************************************** 44 | C executable statements of routine 45 | C********************************************** 46 | xa = xch 47 | za = zch 48 | ya = 1.d0-xch-zch 49 | call itohin( xa,ya,za ) 50 | t8 = 10.d0**(t-8.d0) 51 | ro6 = 10.d0**(rho-6.d0) 52 | conmed = 0.d0 53 | do i = 1, nel 54 | zz = z(i) 55 | iel = i 56 | call condux( ro6,t8,zz,iel,cond ) 57 | conmed = conmed+cond*y(i) 58 | end do 59 | ec = dlog10(3.024272d0)-4.d0+3.d0*t-rho-dlog10(conmed) 60 | c 61 | end 62 | 63 | 64 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/ratmat.f: -------------------------------------------------------------------------------- 1 | subroutine ratmat(h,pp,b) 2 | implicit double precision (a-h,o-z) 3 | dimension b(4,4) 4 | fa=h/(pp+3.d0) 5 | b(1,2)= b(1,1)*fa 6 | b(2,2)= b(2,1)*fa 7 | b(3,2)=-b(1,2) 8 | b(4,2)=-b(2,2) 9 | b(1,4)= b(4,2) 10 | b(2,4)= b(2,2)*(pp+2.d0) 11 | b(3,4)= b(2,2) 12 | b(4,4)=-b(2,4) 13 | return 14 | end 15 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/rbival.f: -------------------------------------------------------------------------------- 1 | function rbival(u,v,n,ndim,m,mdim,x,y,a,pp,iflag) 2 | implicit double precision (a-h,o-z) 3 | dimension x(n),y(m),a(ndim,mdim,4,4) 4 | data i,j /2*1/ 5 | if(n.lt.2.or.m.lt.2)then 6 | iflag=1 7 | rbival=0.0d0 8 | return 9 | endif 10 | call inttwo(x,n,y,m,u,v,i,j,iflag) 11 | if(iflag.ne.0)then 12 | rbival=0.0d0 13 | return 14 | endif 15 | ux=(u-x(i))/(x(i+1)-x(i)) 16 | vy=(v-y(j))/(y(j+1)-y(j)) 17 | rbival=0.d0 18 | do 20 k=1,4 19 | h=gi(k,ux,pp) 20 | do 10 l=1,4 21 | rbival=rbival+a(i,j,k,l)*h*gi(l,vy,pp) 22 | 10 continue 23 | 20 continue 24 | return 25 | end 26 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/rbivpd.f: -------------------------------------------------------------------------------- 1 | subroutine rbivpd(u,v,n,ndim,m,mdim,x,y,a,pp,z,zx,zy,iflag) 2 | implicit double precision (a-h,o-z) 3 | real a 4 | dimension x(n),y(m),a(ndim,mdim,4,4) 5 | data i,j /2*1/ 6 | if(n.lt.2.or.m.lt.2)then 7 | iflag=1 8 | return 9 | endif 10 | call inttwo(x,n,y,m,u,v,i,j,iflag) 11 | if(iflag.ne.0)return 12 | ux=(u-x(i))/(x(i+1)-x(i)) 13 | vy=(v-y(j))/(y(j+1)-y(j)) 14 | z =0.d0 15 | zx=0.d0 16 | zy=0.d0 17 | do 20 k=1,4 18 | h=gi(k,ux,pp) 19 | hx=gid(k,ux,pp) 20 | do 10 l=1,4 21 | z =z +dble(a(i,j,k,l))*h*gi(l,vy,pp) 22 | zx=zx+dble(a(i,j,k,l))*hx*gi(l,vy,pp)/(x(i+1)-x(i)) 23 | zy=zy+dble(a(i,j,k,l))*h*gid(l,vy,pp)/(y(j+1)-y(j)) 24 | 10 continue 25 | 20 continue 26 | return 27 | end 28 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/rtperm.f: -------------------------------------------------------------------------------- 1 | subroutine rtperm(ivj,m,m1,n,ndim,n1,n2,p,u,p3,ax,bx,cx,dx,rx) 2 | implicit double precision (a-h,o-z) 3 | dimension p(ndim,*),u(ndim,*),ax(n),bx(n),cx(n),dx(n),rx(n) 4 | do 40 j=1,m,m1 5 | do 20 i=1,n1 6 | i1=i-1 7 | if(ivj.ne.0)then 8 | r2=p3*dx(i)*dx(i)*(u(j,i+1)-u(j,i)) 9 | if(i.eq.1)goto 10 10 | rx(i1)=r1+r2 11 | if(i.eq.2) rx(i1)=rx(i1)-dx(1) *p(j,1) 12 | if(i.eq.n1)rx(i1)=rx(i1)-dx(n1)*p(j,n) 13 | else 14 | r2=p3*dx(i)*dx(i)*(u(i+1,j)-u(i,j)) 15 | if(i.eq.1)goto 10 16 | rx(i1)=r1+r2 17 | if(i.eq.2) rx(i1)=rx(i1)-dx(1) *p(1,j) 18 | if(i.eq.n1)rx(i1)=rx(i1)-dx(n1)*p(n,j) 19 | endif 20 | 10 r1=r2 21 | 20 continue 22 | call trdisb(n2,ax,bx,cx,rx) 23 | do 30 i=2,n1 24 | if(ivj.eq.0)p(i,j)=rx(i-1) 25 | if(ivj.ne.0)p(j,i)=rx(i-1) 26 | 30 continue 27 | 40 continue 28 | return 29 | end 30 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/sbilin.f: -------------------------------------------------------------------------------- 1 | function sbilin(x,n,y,m,u,ndim,v,w,iflag) 2 | implicit double precision(a-h,o-z) 3 | dimension x(n),y(m),u(ndim,m) 4 | data i,j /1,1/ 5 | iflag=0 6 | if(n.lt.2.or.m.lt.2) then 7 | iflag=1 8 | sbilin=0.0d0 9 | return 10 | endif 11 | call inttwo(x,n,y,m,v,w,i,j,iflag) 12 | if(iflag.ne.0)then 13 | sbilin=0.0d0 14 | return 15 | endif 16 | dv=v-x(i) 17 | dw=w-y(j) 18 | dx=x(i+1)-x(i) 19 | dy=y(j+1)-y(j) 20 | h1=u(i,j) 21 | h2=u(i+1,j) 22 | h3=u(i,j+1) 23 | h4=u(i+1,j+1) 24 | sbilin=h1+(h2-h1)/dx*dv+(h3-h1)/dy*dw+(h4-h3-h2+h1)/(dx*dy)*dv*dw 25 | return 26 | end 27 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/sfa_cf.f: -------------------------------------------------------------------------------- 1 | subroutine sfa( rs, xx, iel, s1, s2 ) 2 | implicit none 3 | 4 | C============================================== 5 | C define parameters 6 | C============================================== 7 | 8 | C============================================== 9 | C define common blocks 10 | C============================================== 11 | common /itohcc/ a, b, c, d, e, f 12 | double precision a(4,10) 13 | double precision b(3,10) 14 | double precision c(3,10) 15 | double precision d(4,10) 16 | double precision e(3,10) 17 | double precision f(3,10) 18 | 19 | C============================================== 20 | C define arguments 21 | C============================================== 22 | integer iel 23 | double precision rs 24 | double precision s1 25 | double precision s2 26 | double precision xx 27 | 28 | C============================================== 29 | C define local variables 30 | C============================================== 31 | integer k 32 | double precision v1 33 | double precision v2 34 | double precision v3 35 | double precision v4 36 | double precision v5 37 | double precision v6 38 | 39 | C********************************************** 40 | C executable statements of routine 41 | C********************************************** 42 | v1 = 0.d0 43 | v2 = 0.d0 44 | v3 = 0.d0 45 | v4 = 0.d0 46 | v5 = 0.d0 47 | v6 = 0.d0 48 | do k = 1, 4 49 | v1 = v1+a(k,iel)*xx**(k-1) 50 | v4 = v4+d(k,iel)*xx**(k-1) 51 | if (k .lt. 4) then 52 | v2 = v2+b(k,iel)*xx**(k-1) 53 | v5 = v5+e(k,iel)*xx**(k-1) 54 | v3 = v3+c(k,iel)*xx**(k-1) 55 | v6 = v6+f(k,iel)*xx**(k-1) 56 | endif 57 | end do 58 | s1 = v1*(1.d0+v2*rs+v3*rs*rs) 59 | s2 = v4*(1.d0+v5*rs+v6*rs*rs) 60 | c 61 | end 62 | 63 | 64 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/trdisa.f: -------------------------------------------------------------------------------- 1 | subroutine trdisa(n,a,b,c,eps,iflag) 2 | implicit double precision(a-h,o-z) 3 | dimension a(n),b(n),c(n) 4 | iflag=0 5 | n1=n-1 6 | do 10 k=2,n 7 | km1=k-1 8 | h=b(km1) 9 | if(abs(h).lt.eps)then 10 | iflag=2 11 | return 12 | endif 13 | h=a(km1)/h 14 | c(km1)=h 15 | b(k)=b(k)-h*a(km1) 16 | 10 continue 17 | return 18 | end 19 | -------------------------------------------------------------------------------- /tables/houdek/v9/lib/trdisb.f: -------------------------------------------------------------------------------- 1 | subroutine trdisb(n,a,b,c,d) 2 | implicit double precision(a-h,o-z) 3 | dimension a(n),b(n),c(n),d(n) 4 | d(1)=d(1)/b(1) 5 | do 10 k=2,n 6 | km1=k-1 7 | d(k)=(d(k)-a(km1)*d(km1))/b(k) 8 | 10 continue 9 | do 20 k=n-1,1,-1 10 | d(k)=d(k)-c(k)*d(k+1) 11 | 20 continue 12 | return 13 | end 14 | -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/OPINTPATH_92: -------------------------------------------------------------------------------- 1 | ./opal92/opal92e.bin 2 | ./kuru91/kuru91X.bin 3 | ./opal92/opal92e-pd.bin 4 | ./opal92/ival92.dat 5 | -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/OPINTPATH_92X: -------------------------------------------------------------------------------- 1 | ../opal92/opal92e.bin 2 | ../opal92/opal92e-pd.bin 3 | ../opal92/ival92.dat 4 | ../kuru91/kuru91.bin 5 | ../kuru91/kuru91X.bin 6 | -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/OPINTPATH_95: -------------------------------------------------------------------------------- 1 | ../opal95/opal95e.bin 2 | ../kuru91/kuru95X.bin 3 | ../opal95/opal95e-pd.dat 4 | ../opal95/ival95.dat 5 | -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/OPINTPATH_95X: -------------------------------------------------------------------------------- 1 | ../opal95/opal95e.bin 2 | ../opal95/opal95e-pd.dat 3 | ../opal95/ival95.dat 4 | ../kuru91/kuru91_95.bin 5 | ../kuru91/kuru91_95.binX 6 | -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/opal92.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal92/opal92.bin -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/opal92e-pd.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal92/opal92e-pd.bin -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/opal92e.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal92/opal92e.bin -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/z0000.tab.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal92/z0000.tab.gz -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/z0001.tab.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal92/z0001.tab.gz -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/z0003.tab.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal92/z0003.tab.gz -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/z0010.tab.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal92/z0010.tab.gz -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/z0020.tab.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal92/z0020.tab.gz -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/z0040.tab.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal92/z0040.tab.gz -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/z0100.tab.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal92/z0100.tab.gz -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/z0200.tab.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal92/z0200.tab.gz -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/z0300.tab.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal92/z0300.tab.gz -------------------------------------------------------------------------------- /tables/houdek/v9/opal92/z0400.tab.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal92/z0400.tab.gz -------------------------------------------------------------------------------- /tables/houdek/v9/opal95/OPINTPATH_92: -------------------------------------------------------------------------------- 1 | ./opal92/opal92e.bin 2 | ./kuru91/kuru91X92.bin 3 | ./opal92/opal92e-pd.bin 4 | ./opal92/ival92.dat 5 | -------------------------------------------------------------------------------- /tables/houdek/v9/opal95/OPINTPATH_92X: -------------------------------------------------------------------------------- 1 | ../opal92/opal92e.bin 2 | ../opal92/opal92e-pd.bin 3 | ../opal92/ival92.dat 4 | ../kuru91/kuru91_92.bin 5 | ../kuru91/kuru91X92.bin 6 | -------------------------------------------------------------------------------- /tables/houdek/v9/opal95/OPINTPATH_95: -------------------------------------------------------------------------------- 1 | ../opal95/opal95e.bin 2 | ../kuru91/kuru91X95.bin 3 | ../opal95/opal95e+kuru91-pd.dat 4 | ../opal95/ival95.dat 5 | -------------------------------------------------------------------------------- /tables/houdek/v9/opal95/OPINTPATH_95X: -------------------------------------------------------------------------------- 1 | ../opal95/opal95e.bin 2 | ../opal95/opal95e+kuru91-pd.dat 3 | ../opal95/ival95.dat 4 | ../kuru91/kuru91_95.bin 5 | ../kuru91/kuru91X95.bin 6 | -------------------------------------------------------------------------------- /tables/houdek/v9/opal95/opal95.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal95/opal95.bin -------------------------------------------------------------------------------- /tables/houdek/v9/opal95/opal95e+alex94-pd.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal95/opal95e+alex94-pd.bin -------------------------------------------------------------------------------- /tables/houdek/v9/opal95/opal95e+kuru91-pd.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal95/opal95e+kuru91-pd.bin -------------------------------------------------------------------------------- /tables/houdek/v9/opal95/opal95e.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal95/opal95e.bin -------------------------------------------------------------------------------- /tables/houdek/v9/opal95/readme_dplasma.llnl.gov.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/opal95/readme_dplasma.llnl.gov.gz -------------------------------------------------------------------------------- /tables/houdek/v9/rksuite/README.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/houdek/v9/rksuite/README.gz -------------------------------------------------------------------------------- /tables/houdek/v9/rksuite/chkfl.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE CHKFL(ASK,ERROR) 2 | C 3 | C Purpose: Enquiry routine used in conjunction with SOFTFL. 4 | C Reports whether a "catastrophic" error was detected. 5 | C 6 | C Input: ASK 7 | C Input/output: ERROR 8 | C 9 | C Comments: 10 | C ========= 11 | C When a "catastrophic" failure is detected, the default action of 12 | C RKSUITE is to write an explanation to the standard output channel, 13 | C OUTCH, and STOP. SOFTFL can be used to prevent the STOP and so 14 | C allow the main program to continue. It is then necessary to call 15 | C CHKFL with ASK = .TRUE. after every call to a user-callable routine 16 | C in RKSUITE to check whether a catastrophic error occurred and take 17 | C appropriate action if it did. If there was a catastrophic error, 18 | C ERROR is returned .TRUE. Of course, you may call SETUP at any time 19 | C to start a new problem, but calling any other user-callable routine 20 | C in RKSUITE after a catastrophic error will lead to a STOP (even when 21 | C "soft failure" has been set "on"). 22 | C 23 | C When a catastrophic failure (IER = 911) is detected in one of 24 | C the routines in RKSUITE, it calls CHKFL with ASK = .FALSE. and 25 | C ERROR = .TRUE. This value of ERROR is SAVEd. 26 | C 27 | C .. Scalar Arguments .. 28 | LOGICAL ASK, ERROR 29 | C .. Local Scalars .. 30 | LOGICAL SAVERR 31 | C .. Save statement .. 32 | SAVE SAVERR 33 | C .. Data statements .. 34 | DATA SAVERR/.FALSE./ 35 | C .. Executable Statements .. 36 | C 37 | IF (ASK) THEN 38 | ERROR = SAVERR 39 | ELSE 40 | SAVERR = ERROR 41 | END IF 42 | C 43 | RETURN 44 | END 45 | -------------------------------------------------------------------------------- /tables/houdek/v9/rksuite/dotprd.f: -------------------------------------------------------------------------------- 1 | DOUBLE PRECISION FUNCTION DOTPRD(U,V,WT,NEQ) 2 | C************************************************ 3 | C**** NOT A DESIGNATED USER-CALLABLE ROUTINE **** 4 | C************************************************ 5 | C 6 | C Purpose: To compute a weighted Euclidean dot (inner) product of 7 | C two vectors. 8 | C 9 | C Input: U(*), V(*), WT(*), NEQ 10 | C Output: the result DOTPRD is returned via the subprogram name 11 | C 12 | C Comments: 13 | C ========= 14 | C The vectors U(*), V(*), and WT(*) are of length NEQ. The components 15 | C of WT(*) are weights that must be non-zero. 16 | C 17 | C .. Scalar Arguments .. 18 | INTEGER NEQ 19 | C .. Array Arguments .. 20 | DOUBLE PRECISION U(*), V(*), WT(*) 21 | C .. Parameters .. 22 | DOUBLE PRECISION ZERO 23 | PARAMETER (ZERO=0.0D0) 24 | C .. Local Scalars .. 25 | DOUBLE PRECISION SUM 26 | INTEGER L 27 | C .. Executable Statements .. 28 | C 29 | SUM = ZERO 30 | DO 20 L = 1, NEQ 31 | SUM = SUM + (U(L)/WT(L))*(V(L)/WT(L)) 32 | 20 CONTINUE 33 | C 34 | DOTPRD = SUM 35 | C 36 | RETURN 37 | END 38 | -------------------------------------------------------------------------------- /tables/houdek/v9/rksuite/mconst.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE MCONST(METHOD) 2 | C************************************************ 3 | C**** NOT A DESIGNATED USER-CALLABLE ROUTINE **** 4 | C************************************************ 5 | C 6 | C Purpose: Sets machine-dependent global quantities 7 | C 8 | C Common: Initializes: /RKCOM7/ OUTCH, MCHEPS, DWARF, RNDOFF, 9 | C SQRRMC, CUBRMC, TINY 10 | C Reads: none 11 | C Alters: none 12 | C 13 | C Comments: 14 | C ========= 15 | C OUTCH, MCHEPS, DWARF are pure environmental parameters with values 16 | C obtained from a call to ENVIRN. The other quantities set depend on 17 | C the environmental parameters, the implementation, and, possibly, 18 | C METHOD. At present the METHODs implemented in the RK suite do not 19 | C influence the values of these quantities. 20 | C OUTCH - Standard output channel 21 | C MCHEPS - Largest positive number such that 1.0D0 + MCHEPS = 1.0D0 22 | C DWARF - Smallest positive number 23 | C RNDOFF - 10 times MCHEPS 24 | C SQRRMC - Square root of MCHEPS 25 | C CUBRMC - Cube root of MCHEPS 26 | C TINY - Square root of DWARF 27 | C 28 | C .. Scalar Arguments .. 29 | INTEGER METHOD 30 | C .. Common Block for Environment Parameters .. 31 | DOUBLE PRECISION MCHEPS, DWARF, RNDOFF, SQRRMC, CUBRMC, TINY 32 | INTEGER OUTCH 33 | COMMON /RKCOM7/ MCHEPS, DWARF, RNDOFF, SQRRMC, CUBRMC, TINY, 34 | & OUTCH 35 | SAVE /RKCOM7/ 36 | C .. Parameters .. 37 | DOUBLE PRECISION TEN, THIRD 38 | PARAMETER (TEN=10.0D+0,THIRD=1.0D+0/3.0D+0) 39 | C .. External Subroutines .. 40 | EXTERNAL ENVIRN 41 | C .. Intrinsic Functions .. 42 | INTRINSIC SQRT 43 | C .. Executable Statements .. 44 | C 45 | CALL ENVIRN(OUTCH,MCHEPS,DWARF) 46 | C 47 | RNDOFF = TEN*MCHEPS 48 | SQRRMC = SQRT(MCHEPS) 49 | CUBRMC = MCHEPS**THIRD 50 | TINY = SQRT(DWARF) 51 | C 52 | RETURN 53 | END 54 | -------------------------------------------------------------------------------- /tables/houdek/v9/rksuite/softfl.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE SOFTFL(ASK,ON) 2 | C 3 | C Purpose: To prevent a program STOP after a "catastrophic" 4 | C failure when using a routine from RKSUITE. 5 | C 6 | C Input: ASK 7 | C Input/output: ON 8 | C 9 | C Comments: 10 | C ========= 11 | C When a "catastrophic" failure is detected, the default action of 12 | C RKSUITE is to write an explanation to the standard output channel, 13 | C OUTCH, and STOP. This subroutine can be used to prevent the STOP and 14 | C so allow the main program to continue. To do this, you call SOFTFL with 15 | C ASK = .FALSE. and ON = .TRUE. You must then call the subroutine CHKFL 16 | C after every call to a user-callable routine in RKSUITE to check whether 17 | C a catastrophic error occurred and take appropriate action if it did. Of 18 | C course, you may call SETUP at any time to start a new problem, but calling 19 | C any other user-callable routine in RKSUITE after a catastrophic error will 20 | C lead to a STOP (even when "soft failure" has been set "on"). 21 | C 22 | C When ON is set by a call to SOFTFL with ASK = .FALSE., the value of ON 23 | C is SAVEd. The subroutine RKMSG in RKSUITE calls SOFTFL with ASK = .TRUE. 24 | C to find out the SAVEd value of ON. 25 | C 26 | C .. Scalar Arguments .. 27 | LOGICAL ASK, ON 28 | C .. Local Scalars .. 29 | LOGICAL SOFT 30 | C .. Save statement .. 31 | SAVE SOFT 32 | C .. Data statements .. 33 | DATA SOFT/.FALSE./ 34 | C .. Executable Statements .. 35 | C 36 | IF (ASK) THEN 37 | ON = SOFT 38 | ELSE 39 | SOFT = ON 40 | END IF 41 | C 42 | RETURN 43 | END 44 | -------------------------------------------------------------------------------- /tables/houdek/v9/rksuite/stiffc.f: -------------------------------------------------------------------------------- 1 | SUBROUTINE STIFFC(ALPHA,BETA,R1,R2) 2 | C************************************************ 3 | C**** NOT A DESIGNATED USER-CALLABLE ROUTINE **** 4 | C************************************************ 5 | C 6 | C Input: ALPHA, BETA 7 | C Output: R1(*), R2(*) 8 | C 9 | C This subroutine computes the two complex roots R1 and R2 of 10 | C the quadratic equation X**2 + ALPHA*X + BETA = 0. The magnitude 11 | C of R1 is greater than or equal to the magnitude of R2. R1 and R2 are 12 | C returned as vectors of two components with the first being the real 13 | C part of the complex number and the second being the imaginary part. 14 | C 15 | C .. Scalar Arguments .. 16 | DOUBLE PRECISION ALPHA, BETA 17 | C .. Array Arguments .. 18 | DOUBLE PRECISION R1(2), R2(2) 19 | C .. Parameters .. 20 | DOUBLE PRECISION ZERO, TWO 21 | PARAMETER (ZERO=0.0D+0,TWO=2.0D+0) 22 | C .. Local Scalars .. 23 | DOUBLE PRECISION DISC, SQDISC, TEMP 24 | C .. Intrinsic Functions .. 25 | INTRINSIC ABS, SQRT 26 | C .. Executable Statements .. 27 | TEMP = ALPHA/TWO 28 | DISC = TEMP**2 - BETA 29 | IF (DISC.EQ.ZERO) THEN 30 | C 31 | C Double root. 32 | C 33 | R1(1) = -TEMP 34 | R1(2) = ZERO 35 | R2(1) = R1(1) 36 | R2(2) = R1(2) 37 | RETURN 38 | END IF 39 | C 40 | SQDISC = SQRT(ABS(DISC)) 41 | IF (DISC.LT.ZERO) THEN 42 | C 43 | C Complex conjugate roots. 44 | C 45 | R1(1) = -TEMP 46 | R1(2) = SQDISC 47 | R2(1) = R1(1) 48 | R2(2) = -R1(2) 49 | ELSE 50 | C 51 | C Real pair of roots. Calculate the bigger one in R1(1). 52 | C 53 | IF (TEMP.GT.ZERO) THEN 54 | R1(1) = -TEMP - SQDISC 55 | ELSE 56 | R1(1) = -TEMP + SQDISC 57 | END IF 58 | R1(2) = ZERO 59 | R2(1) = BETA/R1(1) 60 | R2(2) = ZERO 61 | END IF 62 | C 63 | RETURN 64 | END 65 | -------------------------------------------------------------------------------- /tables/opal/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = eos_tables.tar.gz GN93hz 2 | 3 | tablesdir = $(datadir)/ester/tables/opal 4 | eostablesdir = $(datadir)/ester/tables/opal/eos_tables 5 | tables_DATA = GN93hz 6 | eostables_DATA = eos_tables/EOS5_00z0x \ 7 | eos_tables/EOS5_00z10x \ 8 | eos_tables/EOS5_00z2x \ 9 | eos_tables/EOS5_00z4x \ 10 | eos_tables/EOS5_00z6x \ 11 | eos_tables/EOS5_00z8x \ 12 | eos_tables/EOS5_02z0x \ 13 | eos_tables/EOS5_02z2x \ 14 | eos_tables/EOS5_02z4x \ 15 | eos_tables/EOS5_02z6x \ 16 | eos_tables/EOS5_02z8x \ 17 | eos_tables/EOS5_04z0x \ 18 | eos_tables/EOS5_04z2x \ 19 | eos_tables/EOS5_04z4x \ 20 | eos_tables/EOS5_04z6x \ 21 | eos_tables/EOS5_04z8x 22 | 23 | eos_tables/EOS5_00z0x : eos_tables 24 | eos_tables/EOS5_00z10x : eos_tables 25 | eos_tables/EOS5_00z2x : eos_tables 26 | eos_tables/EOS5_00z4x : eos_tables 27 | eos_tables/EOS5_00z6x : eos_tables 28 | eos_tables/EOS5_00z8x : eos_tables 29 | eos_tables/EOS5_02z0x : eos_tables 30 | eos_tables/EOS5_02z2x : eos_tables 31 | eos_tables/EOS5_02z4x : eos_tables 32 | eos_tables/EOS5_02z6x : eos_tables 33 | eos_tables/EOS5_02z8x : eos_tables 34 | eos_tables/EOS5_04z0x : eos_tables 35 | eos_tables/EOS5_04z2x : eos_tables 36 | eos_tables/EOS5_04z4x : eos_tables 37 | eos_tables/EOS5_04z6x : eos_tables 38 | eos_tables/EOS5_04z8x : eos_tables 39 | 40 | eos_tables: 41 | tar zxf $(top_srcdir)/tables/opal/eos_tables.tar.gz 42 | 43 | clean-local: 44 | rm -rf eos_tables 45 | 46 | -------------------------------------------------------------------------------- /tables/opal/eos_tables.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/tables/opal/eos_tables.tar.gz -------------------------------------------------------------------------------- /test/models/1d.par: -------------------------------------------------------------------------------- 1 | ndomains=8 2 | npts=30,30,30,30,30,30,30,30 3 | 4 | M=5 5 | X=0.7 6 | Z=0.02 7 | 8 | Xc=1 9 | surff=1 10 | 11 | Tc=3e7 12 | pc=3e16 13 | 14 | opa=opal 15 | eos=opal 16 | nuc=simple 17 | atm=simple 18 | 19 | core_convec=1 20 | min_core_size=0.03 21 | env_convec=0 22 | -------------------------------------------------------------------------------- /test/models/2d.par: -------------------------------------------------------------------------------- 1 | 2 | nth=24 3 | nex=30 4 | 5 | Omega_bk=0 6 | 7 | Ekman=1 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/models/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = 1d.par \ 2 | 2d.par \ 3 | out1 \ 4 | out2 \ 5 | out3 \ 6 | out4 \ 7 | star.out \ 8 | template_1d \ 9 | template_2d \ 10 | $(top_srcdir)/test/models/test_models.in 11 | 12 | if USE_HDF5 13 | hdf5=1 14 | else 15 | hdf5=0 16 | endif 17 | do_subst = sed -e 's,[@]datadir[@],$(datadir),g' \ 18 | -e 's,[@]prefix[@],$(prefix),g' \ 19 | -e 's,[@]use_hdf5[@],$(hdf5),g' \ 20 | -e 's,[@]PYTHON[@],$(PYTHON),g' 21 | 22 | bin_SCRIPTS = ester-check-models 23 | CLEANFILES = $(bin_SCRIPTS) 24 | 25 | ester-check-models: $(top_srcdir)/test/models/test_models.in Makefile 26 | $(do_subst) < $< > $@ 27 | chmod +x $@ 28 | 29 | checksdir = $(datadir)/ester/test/models 30 | checks_DATA = 1d.par 2d.par out1 out2 out3 out4 star.out template_1d template_2d 31 | 32 | -------------------------------------------------------------------------------- /test/models/out1: -------------------------------------------------------------------------------- 1 | 9.9455e+33 2 | 1.8219e+11 3 | 2.0853e+36 4 | 2.7585e+07 5 | 8.0054e+16 6 | 2.1289e+01 7 | -------------------------------------------------------------------------------- /test/models/out2: -------------------------------------------------------------------------------- 1 | 9.9455e+33 2 | 1.7968e+11 3 | 2.0224e+11 4 | 2.0013e+36 5 | 2.7504e+07 6 | 8.0914e+16 7 | 2.1589e+01 8 | -------------------------------------------------------------------------------- /test/models/out3: -------------------------------------------------------------------------------- 1 | 1.9891e+34 2 | 3.8990e+11 3 | 3.4832e+37 4 | 3.4915e+07 5 | 3.7270e+16 6 | 9.8080e+00 7 | -------------------------------------------------------------------------------- /test/models/out4: -------------------------------------------------------------------------------- 1 | 1.9891e+34 2 | 3.8827e+11 3 | 4.0560e+11 4 | 3.4320e+37 5 | 3.4879e+07 6 | 3.7392e+16 7 | 9.8583e+00 8 | -------------------------------------------------------------------------------- /test/models/star.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ester-project/ester/f1924f11879e2b36287a7239a447a9e7582984f7/test/models/star.out -------------------------------------------------------------------------------- /test/models/template_1d: -------------------------------------------------------------------------------- 1 | ${M,%.4e} 2 | 3 | ${R,%.4e} 4 | 5 | ${L,%.4e} 6 | 7 | ${Tc,%.4e} 8 | 9 | ${pc,%.4e} 10 | 11 | ${rhoc,%.4e} 12 | 13 | -------------------------------------------------------------------------------- /test/models/template_2d: -------------------------------------------------------------------------------- 1 | ${M,%.4e} 2 | 3 | ${Rp,%.4e} 4 | 5 | ${Re,%.4e} 6 | 7 | ${L,%.4e} 8 | 9 | ${Tc,%.4e} 10 | 11 | ${pc,%.4e} 12 | 13 | ${rhoc,%.4e} 14 | 15 | -------------------------------------------------------------------------------- /utils/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CXXFLAGS=-Wall 2 | 3 | BUILT_SOURCES = star1dR.cpp star2dR.cpp read_config.cpp 4 | 5 | AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(srcdir)/graphics 6 | AM_CPPFLAGS +=-I$(top_srcdir)/tables/cesam -I$(srcdir)/starR 7 | AM_CPPFLAGS +=-I$(top_srcdir)/src/graphics 8 | 9 | EXTRA_DIST = $(srcdir)/starR/starR.h 10 | 11 | bin_PROGRAMS = star1dR star2dR app_luminosity 12 | 13 | star1dR_LDADD = $(top_builddir)/src/libester.la 14 | star2dR_LDADD = $(top_builddir)/src/libester.la 15 | 16 | 17 | star1dR_SOURCES = star1dR.cpp read_config.cpp starR/star1dR_class.cpp 18 | star2dR_SOURCES = star2dR.cpp read_config.cpp starR/star2dR_class.cpp 19 | app_luminosity_SOURCES = app_luminosity.cpp 20 | app_luminosity_LDADD = $(top_builddir)/src/libester.la 21 | 22 | do_subst = sed -e 's,[@]datadir[@],$(datadir),g' \ 23 | -e 's,[@]prefix[@],$(prefix),g' \ 24 | -e 's,[@]PYTHON[@],$(PYTHON),g' \ 25 | -e 's,star1d,star1dR,g' \ 26 | -e 's,star2d,star2dR,g' \ 27 | -e '1a\#include \"starR.h\"' 28 | 29 | star1dR.cpp: $(top_srcdir)/src/main/star1d.cpp Makefile 30 | $(do_subst) < $< > $@ 31 | 32 | star2dR.cpp: $(top_srcdir)/src/main/star2d.cpp Makefile 33 | $(do_subst) < $< > $@ 34 | 35 | read_config.cpp: $(top_srcdir)/src/main/read_config.cpp Makefile 36 | cp $< $@ 37 | 38 | CLEANFILES = star1dR.cpp star2dR.cpp read_config.cpp 39 | -------------------------------------------------------------------------------- /utils/app_luminosity.cpp: -------------------------------------------------------------------------------- 1 | #include"star.h" 2 | #include 3 | 4 | int main(int argc,char *argv[]) { 5 | 6 | if(argc!=3) { 7 | printf("Usage: app_luminosity model_file i\n\t i: Inclination angle (deg.)\n"); 8 | return 1; 9 | } 10 | 11 | star2d A; 12 | A.read(argv[1]); 13 | 14 | double i=atof(argv[2]); 15 | 16 | printf("L= %.3f Lsun\n", A.luminosity()/L_SUN); 17 | printf("L_app (%.2fº)= %.3f Lsun\n",i, A.apparent_luminosity(i/180.*PI)/L_SUN); 18 | return 0; 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /utils/starR/Makefile: -------------------------------------------------------------------------------- 1 | ESTER_DIR=../.. 2 | 3 | all: 4 | sed -e '1a#include"starR.h"' -e 's/star1d/star1dR/g' $(ESTER_DIR)/src/main/star1d.cpp >star1dR.cpp 5 | sed -e '1a#include"starR.h"' -e 's/star2d/star2dR/g' $(ESTER_DIR)/src/main/star2d.cpp >star2dR.cpp 6 | cp $(ESTER_DIR)/src/main/read_config.cpp . 7 | $(ESTER_DIR)/bin/ester_build star1dR.cpp star1dR_class.cpp -o $(ESTER_DIR)/bin/star1dR 8 | $(ESTER_DIR)/bin/ester_build star2dR.cpp star2dR_class.cpp -o $(ESTER_DIR)/bin/star2dR 9 | -------------------------------------------------------------------------------- /utils/starR/readme.txt: -------------------------------------------------------------------------------- 1 | Utilities to calculate a 1d/2d stellar model using as input parameters the radius 2 | and effective temperature instead of mass and Xc. 3 | 4 | Compile with 5 | 6 | $ make 7 | 8 | This creates 2 executables and place them in $(ESTER_DIR)/bin. The executables are 9 | 10 | - star1dR. 11 | For calculating a non-rotating stellar model. The input parameters M and Xc have been replaced by 12 | - R : Radius 13 | - Teff : Effective temperature. 14 | If these parameters are not set in the command-line or in a parameter file, the new model will 15 | have the same radius and Teff that the input model. 16 | 17 | - star2dR. 18 | For calculating a rotating stellar model. The input parameters M, Xc and Omega_bk have been replaced by 19 | - Rp or R : Polar radius 20 | - Re : Equatorial radius 21 | - Teff : Polar effective temperature. 22 | If these parameters are not set in the command-line or in a parameter file, the new model will 23 | have the same radius and Teff that the input model. 24 | 25 | Known limitations: 26 | 27 | These routines are designed to refine an existing model. If the input model is not specified or 28 | it is too far from the solution, convergence is not guaranteed. 29 | 30 | The 2d version star2dR has problems to converge when the rotation velocity of the input model 31 | is zero, or it is much lower than the final velocity. 32 | 33 | Recommended workflow: 34 | 35 | 1. Calculate an initial model using star1d. 36 | 2. Refine this model with star1dR to have the correct values of R and Teff. 37 | 3. Use star2d to obtain the corresponding rotating model using an initial estimation of Omega_bk. 38 | 4. Refine the model using star2dR. 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /utils/starR/starR.h: -------------------------------------------------------------------------------- 1 | #ifndef _STARR_H 2 | #define _STARR_H 3 | 4 | #include"ester.h" 5 | 6 | class star1dR: public star1d { 7 | public: 8 | star1dR(); 9 | double Teff_obj; 10 | int check_arg(char *arg,char *val,int *change_grid); 11 | solver *init_solver(int nvar_add=0); 12 | void register_variables(solver *); 13 | double solve(solver *); 14 | virtual double solve(solver *, matrix_map& error, int); 15 | void fill(); 16 | void solve_dim(solver *); 17 | void solve_definitions(solver *); 18 | 19 | }; 20 | 21 | class star2dR: public star2d { 22 | public: 23 | star2dR(); 24 | double Teff_obj,Re_obj; 25 | int check_arg(char *arg,char *val,int *change_grid); 26 | solver *init_solver(int nvar_add=0); 27 | void register_variables(solver *); 28 | double solve(solver *); 29 | virtual double solve(solver *, matrix_map& error, int); 30 | void fill(); 31 | void solve_dim(solver *); 32 | void solve_definitions(solver *); 33 | void solve_Omega(solver *); 34 | 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /version.m4: -------------------------------------------------------------------------------- 1 | m4_define([ESTER_VERSION], [1.2.git-master]) 2 | --------------------------------------------------------------------------------