├── ISAT ├── test_cases │ ├── PaSR │ │ ├── test_case │ │ │ ├── test_1 │ │ │ │ ├── cputime.op │ │ │ │ ├── ci.nml │ │ │ │ ├── pasr.nml │ │ │ │ ├── ci.op │ │ │ │ └── streams.in │ │ │ ├── test_67 │ │ │ │ ├── pasrm.op │ │ │ │ ├── pasrs.op │ │ │ │ ├── cputime.op │ │ │ │ ├── runtime.op │ │ │ │ ├── use_dist.txt │ │ │ │ ├── ci.nml │ │ │ │ ├── isat_1.nml │ │ │ │ ├── chem.bin │ │ │ │ ├── rmdump.op │ │ │ │ ├── chem.bin.oldtherm │ │ │ │ ├── pasr.nml │ │ │ │ ├── ddasacd.op │ │ │ │ ├── thermselect.py │ │ │ │ └── pasr_op.txt │ │ │ ├── test_89 │ │ │ │ ├── pasrm.op │ │ │ │ ├── pasrs.op │ │ │ │ ├── cputime.op │ │ │ │ ├── runtime.op │ │ │ │ ├── use_dist.txt │ │ │ │ ├── dta_0.log │ │ │ │ ├── ci.nml │ │ │ │ ├── isat_1.nml │ │ │ │ ├── chem.bin │ │ │ │ ├── rmdump.op │ │ │ │ ├── pasr.nml │ │ │ │ ├── ddasacd.op │ │ │ │ └── pasr_op.txt │ │ │ └── test_23 │ │ │ │ ├── ci.nml │ │ │ │ └── pasr.nml │ │ └── test_case_output │ │ │ ├── test_1 │ │ │ ├── cputime.op │ │ │ ├── ci.nml │ │ │ ├── pasr.nml │ │ │ ├── ci.op │ │ │ └── streams.in │ │ │ ├── test_23 │ │ │ ├── cputime.op │ │ │ ├── ci.nml │ │ │ ├── pasr.nml │ │ │ └── ci.op │ │ │ ├── test_67 │ │ │ ├── ci.nml │ │ │ ├── isat_1.nml │ │ │ ├── cputime.op │ │ │ └── pasr.nml │ │ │ └── test_89 │ │ │ ├── ci.nml │ │ │ ├── isat_1.nml │ │ │ ├── cputime.op │ │ │ ├── pasr.nml │ │ │ └── dta_0.log │ └── isatab │ │ ├── test_case_mpi │ │ ├── isat_1.nml │ │ ├── isat_2.nml │ │ ├── isat_3.nml │ │ └── job.sh │ │ ├── test_case_ser │ │ ├── isat_1.nml │ │ ├── isat_2.nml │ │ └── isat_3.nml │ │ ├── test_case_mpi_output │ │ ├── isat_1.nml │ │ ├── isat_2.nml │ │ ├── isat_3.nml │ │ ├── isat_err_1_0.cdf │ │ ├── isat_err_1_1.cdf │ │ ├── isat_err_1_10.cdf │ │ ├── isat_err_1_11.cdf │ │ ├── isat_err_1_12.cdf │ │ ├── isat_err_1_13.cdf │ │ ├── isat_err_1_14.cdf │ │ ├── isat_err_1_15.cdf │ │ ├── isat_err_1_2.cdf │ │ ├── isat_err_1_3.cdf │ │ ├── isat_err_1_4.cdf │ │ ├── isat_err_1_5.cdf │ │ ├── isat_err_1_6.cdf │ │ ├── isat_err_1_7.cdf │ │ ├── isat_err_1_8.cdf │ │ └── isat_err_1_9.cdf │ │ ├── test_case_ser_output │ │ ├── isat_1.nml │ │ ├── isat_2.nml │ │ └── isat_3.nml │ │ └── README.txt ├── rnu_lib │ ├── SOURCES.mk │ ├── Makefile │ └── Makefile.windows ├── ADIFOR_stub │ ├── README.txt │ ├── SOURCES.mk │ ├── ehufdo.f │ ├── ehbfdo.f │ ├── eadfstub.f90 │ └── Makefile ├── PaSR │ ├── SOURCES.mk │ ├── comp │ ├── Makefile.windows │ ├── Makefile │ └── usrate.f ├── isatab_test │ ├── SOURCES_mpi.mk │ ├── SOURCES_ser.mk │ ├── Makefile │ ├── Makefile_mpi │ └── Makefile_ser ├── sell_lib │ ├── SOURCES.mk │ ├── DEPENDS.mk │ ├── Makefile │ └── Makefile.windows ├── isat-ck-ext │ ├── DEPENDS.mk │ ├── SOURCES.mk │ ├── Makefile.windows │ └── Makefile ├── canteralib │ ├── SOURCES.mk │ ├── canteraaccess_f.f90 │ ├── Makefile.windows │ ├── Makefile │ ├── README.txt │ └── canteraaccess.cpp ├── cklib_ext_stub │ ├── SOURCES.mk │ ├── Makefile.windows │ ├── cklib_ext_stub.f │ ├── cklib_ext_stub.f.bak │ ├── Makefile │ ├── README.txt │ └── temphz_stub.f90 ├── CEQ │ ├── DEPENDS.mk │ ├── SOURCES.mk │ ├── Makefile │ ├── Makefile.windows │ ├── ceq_norm.f90 │ ├── ceq_reorder.f90 │ ├── ceq_lss.f90 │ ├── ceq_ming.f90 │ ├── ceq_input.f90 │ ├── ceq_cp.f90 │ ├── ceq_h.f90 │ ├── ceq_linprog.f90 │ ├── ceq_dgdt.f90 │ ├── ceq_g.f90 │ ├── ceq_ind_col.f90 │ └── ceq_maxmin.f90 ├── build-files │ ├── MPI.windows │ ├── build-targets.windows │ ├── vars.windows │ ├── build-targets.mk │ ├── vars.mk.bak │ └── vars.mk ├── ell_lib │ ├── Makefile │ ├── Makefile.windows │ ├── SOURCES.mk │ ├── ell_full2low.f90 │ ├── ell_chol_det.f90 │ ├── ell_low2chol.f90 │ ├── ell_eig2chol.f90 │ ├── ell_full2eig.f90 │ ├── ell_bbt2eig.f90 │ ├── ellu_chol2eig.f90 │ ├── ell_house.f90 │ ├── ell_pt_near_far.f90 │ ├── ellu_bbt2chol.f90 │ ├── ell_chol2eig.f90 │ ├── ell_bbt2chol.f90 │ ├── ell_pt_hyper.f90 │ ├── ell_pt_dist.f90 │ ├── ell_line_proj.f90 │ ├── ellu_radii.f90 │ ├── ell_rad_lower.f90 │ ├── ell_pair_cover_query.f90 │ ├── ell_pair_cover.f90 │ └── ell_pt_in.f90 ├── isat-ck │ ├── SOURCES.mk │ ├── ci_prec.f │ ├── DEPENDS.mk │ ├── ci_ck_flag.f │ ├── ckstrt.h │ ├── Makefile.windows │ └── Makefile ├── isatab_ser │ ├── SOURCES.mk │ ├── Makefile │ ├── Makefile.windows │ ├── isat_lu_m.f90 │ ├── isat_prec.f90 │ ├── DEPENDS.mk │ ├── isat_sys_unix.f90 │ ├── isat_mpi_type.f90 │ ├── isat_mpi_ser.f90 │ └── isat_abort_ser.f90 ├── isatab_mpi │ ├── SOURCES.mk │ ├── Makefile │ ├── Makefile.windows │ ├── isat_lu_m.f90 │ ├── isat_prec.f90 │ ├── isat_sys_unix.f90 │ ├── DEPENDS.mk │ ├── isat_mpi_mpi.f90 │ └── isat_mpi_type.f90 ├── ice-pic │ ├── Makefile │ ├── Makefile.windows │ ├── SOURCES.mk │ ├── ci_recon.f90 │ └── ci_ice_pim_tan.f90 ├── LICENSE-CU.txt ├── LICENSE-ICE.txt ├── ChangeLogCantera.txt └── makelinks.txt ├── ISAT_dependencies └── lib │ └── libcantera_fortran.a ├── x2f_mpi ├── flowchart.pdf ├── pasr_multi_test_files │ ├── test_case │ │ ├── rxn.nml │ │ ├── isat_1.nml │ │ ├── pasr.nml │ │ └── job.sh │ ├── test_case_output │ │ ├── rxn.nml │ │ ├── isatmp.op │ │ ├── isat_1.nml │ │ ├── pasr.nml │ │ └── job.sh │ └── post_process │ │ ├── post_pasr_np.m │ │ └── post_isat_1_np.m ├── test_x2f_mpi │ ├── DEPENDS.mk │ ├── SOURCES.mk │ ├── Makefile │ └── Makefile.windows ├── test_sort_tools │ ├── DEPENDS.mk │ ├── SOURCES.mk │ ├── Makefile │ ├── Makefile.windows │ ├── x2f_setmethod_mock.f90 │ └── x2f_cirxn_mock.f90 ├── x2f_mpi_isat │ ├── SOURCES.mk │ ├── DEPENDS.mk │ ├── Makefile │ ├── Makefile.windows │ ├── x2f_setmethod.f90 │ ├── x2f_mpi_grpdata.f90 │ ├── x2f_cirxn.f90 │ └── x2f_rw_isatab.f90 ├── pasr_multi │ ├── SOURCES.mk │ ├── DEPENDS.mk │ ├── Makefile │ ├── Makefile.windows │ └── usrate.f ├── x2f_mpi │ ├── DEPENDS.mk │ ├── SOURCES.mk │ ├── Makefile │ ├── Makefile.windows │ ├── trymatch.c │ ├── x2f_mpi_nproc.f90 │ ├── buildGraph.c │ ├── x2f_check_atmpts.f90 │ ├── graphtypes.h │ └── x2f_mpi_bksize.f90 ├── build-files │ ├── build-targets.windows │ ├── PATHS.windows │ ├── build-targets.mk │ ├── vars.windows │ └── vars.mk ├── LICENSE-CU.txt └── Makefile.windows └── README.md /ISAT/test_cases/PaSR/test_case/test_1/cputime.op: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_67/pasrm.op: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_67/pasrs.op: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_89/pasrm.op: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_89/pasrs.op: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_67/cputime.op: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_67/runtime.op: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_67/use_dist.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_89/cputime.op: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_89/runtime.op: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_89/use_dist.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_1/cputime.op: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_23/cputime.op: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ISAT_dependencies/lib/libcantera_fortran.a: -------------------------------------------------------------------------------- 1 | /usr/local/lib/libcantera_fortran.a -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_89/dta_0.log: -------------------------------------------------------------------------------- 1 | ci_dpt_dr: initializing dta matrix 2 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_1/ci.nml: -------------------------------------------------------------------------------- 1 | &cinml 2 | m_jac=1 3 | m_ckwyp=1 4 | us_rate=0 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_23/ci.nml: -------------------------------------------------------------------------------- 1 | &cinml 2 | m_jac=1 3 | m_ckwyp=1 4 | us_rate=0 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_67/ci.nml: -------------------------------------------------------------------------------- 1 | &cinml 2 | m_jac=1 3 | m_ckwyp=1 4 | us_rate=0 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_89/ci.nml: -------------------------------------------------------------------------------- 1 | &cinml 2 | m_jac=1 3 | m_ckwyp=1 4 | us_rate=0 5 | / 6 | -------------------------------------------------------------------------------- /x2f_mpi/flowchart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nogenmyr/ISAT-CK7-Cantera/HEAD/x2f_mpi/flowchart.pdf -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_1/ci.nml: -------------------------------------------------------------------------------- 1 | &cinml 2 | m_jac=1 3 | m_ckwyp=1 4 | us_rate=0 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_23/ci.nml: -------------------------------------------------------------------------------- 1 | &cinml 2 | m_jac=1 3 | m_ckwyp=1 4 | us_rate=0 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_67/ci.nml: -------------------------------------------------------------------------------- 1 | &cinml 2 | m_jac=1 3 | m_ckwyp=1 4 | us_rate=0 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_89/ci.nml: -------------------------------------------------------------------------------- 1 | &cinml 2 | m_jac=1 3 | m_ckwyp=1 4 | us_rate=0 5 | / 6 | -------------------------------------------------------------------------------- /x2f_mpi/pasr_multi_test_files/test_case/rxn.nml: -------------------------------------------------------------------------------- 1 | &rxnnml 2 | mode = 1 3 | qt = .false. 4 | adapt = 1 5 | / 6 | -------------------------------------------------------------------------------- /x2f_mpi/pasr_multi_test_files/test_case_output/rxn.nml: -------------------------------------------------------------------------------- 1 | &rxnnml 2 | mode = 1 3 | qt = .false. 4 | adapt = 1 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi/isat_1.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | stomby = 100.d0 4 | etola = 1.d-4 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi/isat_2.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | stomby = 100.d0 4 | etola = 1.d-4 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi/isat_3.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | stomby = 100.d0 4 | etola = 1.d-4 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_ser/isat_1.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | stomby = 100.d0 4 | etola = 1.d-4 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_ser/isat_2.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | stomby = 100.d0 4 | etola = 1.d-4 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_ser/isat_3.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | stomby = 100.d0 4 | etola = 1.d-4 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_67/isat_1.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | stomby = 1000.d0 4 | etola = 1.d-4 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_89/isat_1.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | stomby = 1000.d0 4 | etola = 1.d-4 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_67/isat_1.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | stomby = 1000.d0 4 | etola = 1.d-4 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_89/isat_1.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | stomby = 1000.d0 4 | etola = 1.d-4 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_1.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | stomby = 100.d0 4 | etola = 1.d-4 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_2.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | stomby = 100.d0 4 | etola = 1.d-4 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_3.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | stomby = 100.d0 4 | etola = 1.d-4 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_ser_output/isat_1.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | stomby = 100.d0 4 | etola = 1.d-4 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_ser_output/isat_2.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | stomby = 100.d0 4 | etola = 1.d-4 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_ser_output/isat_3.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | stomby = 100.d0 4 | etola = 1.d-4 5 | / 6 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_67/chem.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nogenmyr/ISAT-CK7-Cantera/HEAD/ISAT/test_cases/PaSR/test_case/test_67/chem.bin -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_67/rmdump.op: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nogenmyr/ISAT-CK7-Cantera/HEAD/ISAT/test_cases/PaSR/test_case/test_67/rmdump.op -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_89/chem.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nogenmyr/ISAT-CK7-Cantera/HEAD/ISAT/test_cases/PaSR/test_case/test_89/chem.bin -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_89/rmdump.op: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nogenmyr/ISAT-CK7-Cantera/HEAD/ISAT/test_cases/PaSR/test_case/test_89/rmdump.op -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_67/chem.bin.oldtherm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nogenmyr/ISAT-CK7-Cantera/HEAD/ISAT/test_cases/PaSR/test_case/test_67/chem.bin.oldtherm -------------------------------------------------------------------------------- /ISAT/rnu_lib/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:30:19 -0500 3 | 4 | # List of source files to build 5 | 6 | FILES=isat_rnu.f90 7 | -------------------------------------------------------------------------------- /x2f_mpi/pasr_multi_test_files/test_case_output/isatmp.op: -------------------------------------------------------------------------------- 1 | adaptive init 16 2 1 2 | nolocal 0 3 | distribution strategies: 4 4 1 4 | number of attempts : 16 1 1 5 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_67/cputime.op: -------------------------------------------------------------------------------- 1 | 7 38 7.2441E+03 2.2167E+02 3.6945E+00 6.1575E-02 2 | 7 38 7.2439E+03 2.2166E+02 3.6944E+00 6.1573E-02 3 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_89/cputime.op: -------------------------------------------------------------------------------- 1 | 8 13 1.2831E+04 3.9262E+02 6.5437E+00 1.0906E-01 2 | 8 13 1.2723E+04 3.8932E+02 6.4887E+00 1.0815E-01 3 | -------------------------------------------------------------------------------- /ISAT/ADIFOR_stub/README.txt: -------------------------------------------------------------------------------- 1 | This stub version is not compatible with ISAT modes that use an analytical 2 | Jacobian. The ADIFOR software must be downloaded separately to enable this 3 | functionality. 4 | -------------------------------------------------------------------------------- /ISAT/PaSR/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:28:35 -0500 3 | 4 | # List of source files to build 5 | 6 | FILES = pasr.f pasrsubs.f usrate.f 7 | -------------------------------------------------------------------------------- /ISAT/isatab_test/SOURCES_mpi.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Date: Tue, 4 Sep 2012 16:55:51 -0500 3 | 4 | # List of source files to build 5 | 6 | FILES = test_mpi.f90 fghex.f90 7 | -------------------------------------------------------------------------------- /ISAT/isatab_test/SOURCES_ser.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Date: Tue, 4 Sep 2012 16:56:03 -0500 3 | 4 | # List of source files to build 5 | 6 | FILES = test_ser.f90 fghex.f90 7 | -------------------------------------------------------------------------------- /x2f_mpi/test_x2f_mpi/DEPENDS.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 8 Jul 2010 17:48:00 -0400 3 | 4 | # List of dependencies 5 | 6 | test_x2f_mpi.$(OBJ): $(MPI_OBJ) 7 | 8 | -------------------------------------------------------------------------------- /x2f_mpi/test_x2f_mpi/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 8 Jul 2010 17:48:05 -0400 3 | 4 | # List of source files to build 5 | 6 | FILES = test_x2f_mpi.f90 7 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_err_1_0.cdf: -------------------------------------------------------------------------------- 1 | 0.000000000000E+00 1.087791964408E-15 2 | 1.001000000000E+03 1.001000000000E+03 3 | 1.001382553395E-07 1.000000000000E+00 4 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_err_1_1.cdf: -------------------------------------------------------------------------------- 1 | 0.000000000000E+00 1.195746792056E-15 2 | 1.001000000000E+03 1.001000000000E+03 3 | 1.001382553395E-07 1.000000000000E+00 4 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_err_1_10.cdf: -------------------------------------------------------------------------------- 1 | 0.000000000000E+00 1.200889812746E-15 2 | 1.001000000000E+03 1.001000000000E+03 3 | 1.001382553395E-07 1.000000000000E+00 4 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_err_1_11.cdf: -------------------------------------------------------------------------------- 1 | 0.000000000000E+00 1.137640067257E-15 2 | 1.001000000000E+03 1.001000000000E+03 3 | 1.001382553395E-07 1.000000000000E+00 4 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_err_1_12.cdf: -------------------------------------------------------------------------------- 1 | 0.000000000000E+00 1.041481514324E-15 2 | 1.001000000000E+03 1.001000000000E+03 3 | 1.001382553395E-07 1.000000000000E+00 4 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_err_1_13.cdf: -------------------------------------------------------------------------------- 1 | 0.000000000000E+00 1.110223024625E-15 2 | 1.001000000000E+03 1.001000000000E+03 3 | 1.001382553395E-07 1.000000000000E+00 4 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_err_1_14.cdf: -------------------------------------------------------------------------------- 1 | 0.000000000000E+00 1.110223024625E-15 2 | 1.001000000000E+03 1.001000000000E+03 3 | 1.001382553395E-07 1.000000000000E+00 4 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_err_1_15.cdf: -------------------------------------------------------------------------------- 1 | 0.000000000000E+00 1.195746792056E-15 2 | 1.001000000000E+03 1.001000000000E+03 3 | 1.001382553395E-07 1.000000000000E+00 4 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_err_1_2.cdf: -------------------------------------------------------------------------------- 1 | 0.000000000000E+00 1.110223024625E-15 2 | 1.001000000000E+03 1.001000000000E+03 3 | 1.001382553395E-07 1.000000000000E+00 4 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_err_1_3.cdf: -------------------------------------------------------------------------------- 1 | 0.000000000000E+00 1.115760330919E-15 2 | 1.001000000000E+03 1.001000000000E+03 3 | 1.001382553395E-07 1.000000000000E+00 4 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_err_1_4.cdf: -------------------------------------------------------------------------------- 1 | 0.000000000000E+00 1.216188388898E-15 2 | 1.001000000000E+03 1.001000000000E+03 3 | 1.001382553395E-07 1.000000000000E+00 4 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_err_1_5.cdf: -------------------------------------------------------------------------------- 1 | 0.000000000000E+00 1.195746792056E-15 2 | 1.001000000000E+03 1.001000000000E+03 3 | 1.001382553395E-07 1.000000000000E+00 4 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_err_1_6.cdf: -------------------------------------------------------------------------------- 1 | 0.000000000000E+00 1.195746792056E-15 2 | 1.001000000000E+03 1.001000000000E+03 3 | 1.001382553395E-07 1.000000000000E+00 4 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_err_1_7.cdf: -------------------------------------------------------------------------------- 1 | 0.000000000000E+00 1.195746792056E-15 2 | 1.001000000000E+03 1.001000000000E+03 3 | 1.001382553395E-07 1.000000000000E+00 4 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_err_1_8.cdf: -------------------------------------------------------------------------------- 1 | 0.000000000000E+00 1.221245327088E-15 2 | 1.001000000000E+03 1.001000000000E+03 3 | 1.001382553395E-07 1.000000000000E+00 4 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi_output/isat_err_1_9.cdf: -------------------------------------------------------------------------------- 1 | 0.000000000000E+00 1.421779191587E-15 2 | 1.001000000000E+03 1.001000000000E+03 3 | 1.001382553395E-07 1.000000000000E+00 4 | -------------------------------------------------------------------------------- /x2f_mpi/test_sort_tools/DEPENDS.mk: -------------------------------------------------------------------------------- 1 | # Author: Steve Lantz 2 | # Last Modified: Mon Jan 31 2011 17:05:34 -0400 by Steve Lantz 3 | 4 | # List of dependencies 5 | 6 | test_sort_tools.$(OBJ): 7 | -------------------------------------------------------------------------------- /x2f_mpi/test_sort_tools/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Steve Lantz 2 | # Last Modified: Mon Jan 31 2011 17:05:34 -0400 by Steve Lantz 3 | 4 | # List of source files to build 5 | 6 | FILES = test_sort_tools.f90 7 | -------------------------------------------------------------------------------- /ISAT/sell_lib/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:31:56 -0500 3 | 4 | # List of source files to build 5 | 6 | FILES=id_list.f90 sell_bt.f90 sell_ebt.f90 sell_ll.f90 sell_m.f90 7 | -------------------------------------------------------------------------------- /ISAT/isat-ck-ext/DEPENDS.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Fri, 12 Mar 2010 17:05:38 -0500 3 | 4 | # List of dependencies 5 | 6 | streams_mod.$(OBJ): 7 | ci_subs_ext.$(OBJ): streams_mod.$(OBJ) 8 | ci_ext_routines.$(OBJ): streams_mod.$(OBJ) 9 | -------------------------------------------------------------------------------- /ISAT/isat-ck-ext/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Fri, 12 Mar 2010 17:05:03 -0500 3 | 4 | # List of source files to build 5 | 6 | FILESf90 = streams_mod.f90 ci_ext_routines.f90 ci_subs_ext.f90 7 | 8 | FILES = $(FILESf90) $(FILESf) 9 | -------------------------------------------------------------------------------- /x2f_mpi/pasr_multi_test_files/test_case/isat_1.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | ret_frac = -1.d0 4 | grow_frac= -1.d0 5 | stomby = -2500 !! -2500 !! -20000 6 | etola = 2.d-4 7 | icheck = 0 8 | idites = 10000 9 | ! grow_max = 100 10 | ! outinc = 2 11 | / -------------------------------------------------------------------------------- /x2f_mpi/pasr_multi_test_files/test_case_output/isat_1.nml: -------------------------------------------------------------------------------- 1 | &isat_nml 2 | nml_op = 2 3 | ret_frac = -1.d0 4 | grow_frac= -1.d0 5 | stomby = -2500 !! -2500 !! -20000 6 | etola = 2.d-4 7 | icheck = 0 8 | idites = 10000 9 | ! grow_max = 100 10 | ! outinc = 2 11 | / -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi_isat/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Date: Fri, 11 May 2012 15:49:19 -0500 3 | 4 | # List of source files to build 5 | 6 | FILES = ISAT_MP.f90 x2f_cirxn.f90 x2f_mpi_adapt.f90 x2f_mpi_grpdata.f90 x2f_setmethod.f90 x2f_rw_isatab.f90 7 | 8 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_1/pasr.nml: -------------------------------------------------------------------------------- 1 | &pasrnml 2 | !! This version for Ethylene (constant p and dt) 3 | !! Note that there are 3e4 queries per residence time. 4 | anres = 1.d0 5 | tres = 10.e-3 6 | tmix = 1.e-3 7 | tpair = 1.e-3 8 | full_op = .false. 9 | screen = .false. 10 | / 11 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_23/pasr.nml: -------------------------------------------------------------------------------- 1 | &pasrnml 2 | !! This version for Ethylene (constant p and dt) 3 | !! Note that there are 3e4 queries per residence time. 4 | anres = 1.d0 5 | tres = 10.e-3 6 | tmix = 1.e-3 7 | tpair = 1.e-3 8 | full_op = .false. 9 | screen = .false. 10 | / 11 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_67/pasr.nml: -------------------------------------------------------------------------------- 1 | &pasrnml 2 | !! This version for Ethylene (constant p and dt) 3 | !! Note that there are 3e4 queries per residence time. 4 | anres = 1.d0 5 | tres = 10.e-3 6 | tmix = 1.e-3 7 | tpair = 1.e-3 8 | full_op = .false. 9 | screen = .false. 10 | / 11 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_89/pasr.nml: -------------------------------------------------------------------------------- 1 | &pasrnml 2 | !! This version for Ethylene (constant p and dt) 3 | !! Note that there are 3e4 queries per residence time. 4 | anres = 1.d0 5 | tres = 10.e-3 6 | tmix = 1.e-3 7 | tpair = 1.e-3 8 | full_op = .false. 9 | screen = .false. 10 | / 11 | -------------------------------------------------------------------------------- /ISAT/ADIFOR_stub/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Wed Nov 28 10:03:59 EST 2012 by Steve Lantz 3 | 4 | # List of source files to build 5 | 6 | FILESf90=eadfstub.f90 7 | FILESf=ehbfdo.f ehufdo.f 8 | FILESh= 9 | FILES= $(FILESh) $(FILESf90) $(FILESf) 10 | -------------------------------------------------------------------------------- /ISAT/canteralib/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Tue Jan 20 09:37:26 CET 2015 3 | 4 | # List of source files to build 5 | 6 | FILESf90=canteralib.f90 canteraaccess_f.f90 7 | FILEScpp=canteraaccess.cpp 8 | FILESh= 9 | FILES= $(FILESh) $(FILESf90) 10 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_1/pasr.nml: -------------------------------------------------------------------------------- 1 | &pasrnml 2 | !! This version for Ethylene (constant p and dt) 3 | !! Note that there are 3e4 queries per residence time. 4 | anres = 1.d0 5 | tres = 10.e-3 6 | tmix = 1.e-3 7 | tpair = 1.e-3 8 | full_op = .false. 9 | screen = .false. 10 | / 11 | -------------------------------------------------------------------------------- /ISAT/cklib_ext_stub/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Mon Nov 19 17:35:43 EST 2012 by Steve Lantz 3 | 4 | # List of source files to build 5 | 6 | FILESf=cklib_ext_stub.f 7 | FILESf90=temphz_stub.f90 8 | FILESh= 9 | FILES= $(FILESh) $(FILESf) $(FILESf90) 10 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_23/pasr.nml: -------------------------------------------------------------------------------- 1 | &pasrnml 2 | !! This version for Ethylene (constant p and dt) 3 | !! Note that there are 3e4 queries per residence time. 4 | anres = 1.d0 5 | tres = 10.e-3 6 | tmix = 1.e-3 7 | tpair = 1.e-3 8 | full_op = .false. 9 | screen = .false. 10 | / 11 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_67/pasr.nml: -------------------------------------------------------------------------------- 1 | &pasrnml 2 | !! This version for Ethylene (constant p and dt) 3 | !! Note that there are 3e4 queries per residence time. 4 | anres = 1.d0 5 | tres = 10.e-3 6 | tmix = 1.e-3 7 | tpair = 1.e-3 8 | full_op = .false. 9 | screen = .false. 10 | / 11 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_89/pasr.nml: -------------------------------------------------------------------------------- 1 | &pasrnml 2 | !! This version for Ethylene (constant p and dt) 3 | !! Note that there are 3e4 queries per residence time. 4 | anres = 1.d0 5 | tres = 10.e-3 6 | tmix = 1.e-3 7 | tpair = 1.e-3 8 | full_op = .false. 9 | screen = .false. 10 | / 11 | -------------------------------------------------------------------------------- /ISAT/canteralib/canteraaccess_f.f90: -------------------------------------------------------------------------------- 1 | module canteraAccess 2 | interface 3 | 4 | integer function nasadata(n,thermo_ns) 5 | integer, intent(in) :: n 6 | double precision, intent(inout) :: thermo_ns(*) 7 | end function nasadata 8 | 9 | end interface 10 | end module canteraAccess 11 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_67/ddasacd.op: -------------------------------------------------------------------------------- 1 | 2 1 -33 0 0 0 6 0 0 0 0.0000E+00 3.3333E-05 0.0000E+00 1.1876E-20 0.0000E+00 0.0000E+00 2 | 2 1 -33 0 0 0 6 0 0 0 0.0000E+00 3.3333E-05 0.0000E+00 1.1876E-20 0.0000E+00 0.0000E+00 3 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_89/ddasacd.op: -------------------------------------------------------------------------------- 1 | 3 1 -33 0 0 0 6 0 0 0 0.0000E+00 3.3333E-05 0.0000E+00 1.1876E-20 0.0000E+00 0.0000E+00 2 | 3 1 -33 0 0 0 6 0 0 0 0.0000E+00 3.3333E-05 0.0000E+00 1.1876E-20 0.0000E+00 0.0000E+00 3 | -------------------------------------------------------------------------------- /ISAT/CEQ/DEPENDS.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:07:01 -0500 3 | 4 | # List of dependencies 5 | 6 | ceq_linprog.$(OBJ): linprog.$(OBJ) 7 | ceq_solve.$(OBJ): ceq_types.$(OBJ) 8 | ceq_state.$(OBJ): ceq_solve.$(OBJ) 9 | ceq_system.$(OBJ): ceq_state.$(OBJ) 10 | -------------------------------------------------------------------------------- /x2f_mpi/pasr_multi/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Fri, 13 Aug 2010 17:55:37 -0400 by Steve Lantz 3 | 4 | # List of source files to build 5 | 6 | FILESf90 = pasr_multi.f90 pasr_multi_subs.f90 7 | 8 | FILESf = usrate.f 9 | 10 | FILES = $(FILESf90) $(FILESf) 11 | -------------------------------------------------------------------------------- /ISAT/sell_lib/DEPENDS.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:32:52 -0500 3 | 4 | # List of dependencies 5 | 6 | id_list.$(OBJ): 7 | sell_bt.$(OBJ): sell_m.$(OBJ) 8 | sell_ebt.$(OBJ): sell_m.$(OBJ) 9 | sell_ll.$(OBJ): sell_m.$(OBJ) 10 | sell_m.$(OBJ): id_list.$(OBJ) 11 | 12 | -------------------------------------------------------------------------------- /ISAT/ADIFOR_stub/ehufdo.f: -------------------------------------------------------------------------------- 1 | subroutine ehufdo(type,x,z,fx,file,line) 2 | integer type 3 | DOUBLE PRECISION x 4 | ! function result 5 | DOUBLE PRECISION z 6 | DOUBLE PRECISION fx 7 | integer line 8 | integer file 9 | call eadfstub('ehufdo') 10 | return 11 | end 12 | -------------------------------------------------------------------------------- /ISAT/ADIFOR_stub/ehbfdo.f: -------------------------------------------------------------------------------- 1 | subroutine ehbfdo(type,x,y,z,fx,fy,file,line) 2 | integer type 3 | DOUBLE PRECISION x,y 4 | ! function result 5 | DOUBLE PRECISION z 6 | DOUBLE PRECISION fx,fy 7 | integer line 8 | integer file 9 | call eadfstub('ehbfdo') 10 | return 11 | end 12 | -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi_isat/DEPENDS.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Date: Fri, 11 May 2012 15:49:30 -0500 3 | 4 | # List of dependencies 5 | 6 | ISAT_MP.$(OBJ): x2f_mpi_grpdata.$(OBJ) x2f_mpi_adapt.$(OBJ) 7 | x2f_mpi_grpdata.$(OBJ): $(MPI_OBJ) 8 | x2f_mpi_adapt.$(OBJ): $(MPI_OBJ) 9 | x2f_rw_isatab.$(OBJ): x2f_mpi_grpdata.$(OBJ) 10 | -------------------------------------------------------------------------------- /x2f_mpi/pasr_multi_test_files/test_case/pasr.nml: -------------------------------------------------------------------------------- 1 | &pasrnml 2 | !! Note that there are 3e4 queries per residence time. 34res=10^6 queries 3 | !! anres = 34.d6 ! residence time 4 | !! anres = 500d-1 !!340d-1 5 | !! anres = 2.d-1 6 | !! screen =.false. ! o/p to screen (true) or file (false) 7 | anres = 1 8 | ng_pasr = 32 9 | n0 = 5000 10 | rstr = .false. 11 | / 12 | -------------------------------------------------------------------------------- /x2f_mpi/pasr_multi_test_files/test_case_output/pasr.nml: -------------------------------------------------------------------------------- 1 | &pasrnml 2 | !! Note that there are 3e4 queries per residence time. 34res=10^6 queries 3 | !! anres = 34.d6 ! residence time 4 | !! anres = 500d-1 !!340d-1 5 | !! anres = 2.d-1 6 | !! screen =.false. ! o/p to screen (true) or file (false) 7 | anres = 1 8 | ng_pasr = 32 9 | n0 = 5000 10 | rstr = .false. 11 | / 12 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_89/dta_0.log: -------------------------------------------------------------------------------- 1 | ci_dpt_dr: initializing dta matrix 2 | cidpt_dr_update: attempting to update using 5274 stored zu values 3 | ci_dpt_dr: updating PT failed, rank, dpt_info = 0 -2 4 | cidpt_dr_update: attempting to update using 12037 stored zu values 5 | ci_dpt_dr: updating PT failed, rank, dpt_info = 0 -2 6 | -------------------------------------------------------------------------------- /x2f_mpi/pasr_multi/DEPENDS.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Fri, 15 Mar 2013 18:03:56 -0500 by Steve Lantz 3 | 4 | # List of dependencies 5 | 6 | #isat_rnu.$(OBJ): isat_abort_mpi.$(OBJ) 7 | #isat_abort_mpi.$(OBJ): $(MPI_OBJ) isat_prec_dp.$(OBJ) 8 | #pasr_multi_subs.$(OBJ): isat_rnu.$(OBJ) 9 | pasr_multi.$(OBJ): $(MPI_OBJ) pasr_multi_subs.$(OBJ) 10 | 11 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_1/ci.op: -------------------------------------------------------------------------------- 1 | 2 | ===== ISAT-CK Version: 7.0 initialization starting ====== 3 | 4 | Date (MM/DD/YEAR): 1/ 4/2015 Time: 20: 4:24. 5 | 6 | modeci = 1 7 | 8 | CI arrays to be allocated with: nc= 1, nfull= 1, nstr= 1 9 | 10 | cinit1: modeci=1 initialized; dens = 1.2000E+00 11 | 12 | ====== ISAT-CK initialization completed ====== 13 | -------------------------------------------------------------------------------- /x2f_mpi/pasr_multi_test_files/test_case/job.sh: -------------------------------------------------------------------------------- 1 | #$ -V # Inherit the submission environment 2 | #$ -cwd # Start job in submission directory 3 | #$ -N pasr_multi # Job Name 4 | #$ -pe 16way 32 # Requests 16 cores/node, 16 cores total 5 | #$ -q development # Queue name 6 | #$ -l h_rt=01:30:00 # Run time (hh:mm:ss) - 1.5 hours 7 | ibrun ./pasr_multi 8 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_1/ci.op: -------------------------------------------------------------------------------- 1 | 2 | ===== ISAT-CK Version: 7.0 initialization starting ====== 3 | 4 | Date (MM/DD/YEAR): 11/29/2012 Time: 15:43: 6. 5 | 6 | modeci = 1 7 | 8 | CI arrays to be allocated with: nc= 1, nfull= 1, nstr= 1 9 | 10 | cinit1: modeci=1 initialized; dens = 1.2000E+00 11 | 12 | ====== ISAT-CK initialization completed ====== 13 | -------------------------------------------------------------------------------- /x2f_mpi/pasr_multi_test_files/test_case_output/job.sh: -------------------------------------------------------------------------------- 1 | #$ -V # Inherit the submission environment 2 | #$ -cwd # Start job in submission directory 3 | #$ -N pasr_multi # Job Name 4 | #$ -pe 16way 32 # Requests 16 cores/node, 16 cores total 5 | #$ -q development # Queue name 6 | #$ -l h_rt=01:30:00 # Run time (hh:mm:ss) - 1.5 hours 7 | ibrun ./pasr_multi 8 | -------------------------------------------------------------------------------- /ISAT/rnu_lib/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:30:47 -0500 3 | 4 | include ../build-files/vars.mk 5 | 6 | LIB_NAME = libisat_rnu 7 | 8 | # ------------- OBJECTS -------------------- 9 | 10 | include SOURCES.mk 11 | 12 | OBJS=$(FILES:.f90=.$(OBJ)) 13 | 14 | # ------------- TARGETS -------------------- 15 | 16 | all: $(FILES) $(CREATE_LIBS) 17 | 18 | include ../build-files/build-targets.mk 19 | -------------------------------------------------------------------------------- /ISAT/canteralib/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 15:46:29 -0500 3 | 4 | include ../build-files/vars.windows 5 | 6 | LIB_NAME = ck 7 | 8 | # ------------- OBJECTS -------------------- 9 | 10 | include SOURCES.mk 11 | 12 | OBJS=$(FILESf:.f=.obj) 13 | 14 | # ------------- TARGETS -------------------- 15 | 16 | all: $(FILES) $(CREATE_LIBS) 17 | 18 | include ../build-files/build-targets.windows 19 | -------------------------------------------------------------------------------- /ISAT/cklib_ext_stub/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 15:46:29 -0500 3 | 4 | include ../build-files/vars.windows 5 | 6 | LIB_NAME = ck 7 | 8 | # ------------- OBJECTS -------------------- 9 | 10 | include SOURCES.mk 11 | 12 | OBJS=$(FILESf:.f=.obj) 13 | 14 | # ------------- TARGETS -------------------- 15 | 16 | all: $(FILES) $(CREATE_LIBS) 17 | 18 | include ../build-files/build-targets.windows 19 | -------------------------------------------------------------------------------- /ISAT/rnu_lib/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:30:56 -0500 3 | 4 | include ../build-files/vars.windows 5 | 6 | LIB_NAME = isat_rnu 7 | 8 | # ------------- OBJECTS -------------------- 9 | 10 | include SOURCES.mk 11 | 12 | OBJS=$(FILES:.f90=.obj) 13 | 14 | # ------------- TARGETS -------------------- 15 | 16 | all: $(FILES) $(CREATE_LIBS) 17 | 18 | include ../build-files/build-targets.windows 19 | -------------------------------------------------------------------------------- /ISAT/build-files/MPI.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Mon, 6 Feb 2012 12:43:01 -0500 by Steve Lantz 3 | 4 | # This file should provide the path to mpi.f90 which is used to 5 | # compile mpi code in ISAT. 6 | 7 | # mpi.f90 source file used on CATS, name and path 8 | MPI_FILE = mpi.f90 9 | MPI_PATH = "C:\Program Files\Microsoft HPC Pack 2008 R2\Inc\mpi.f90" 10 | 11 | # set MPI_OBJ 12 | MPI_OBJ=$(MPI_FILE:.f90=.obj) 13 | 14 | -------------------------------------------------------------------------------- /ISAT/ell_lib/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:27:00 -0500 3 | 4 | include ../build-files/vars.mk 5 | 6 | LIB_NAME = libell 7 | 8 | # ------------- OBJECTS -------------------- 9 | 10 | include SOURCES.mk 11 | 12 | OBJS=$(FILESf90:.f90=.$(OBJ)) $(FILESf:.f=.$(OBJ)) 13 | 14 | # ------------- TARGETS -------------------- 15 | 16 | all: $(FILES) $(CREATE_LIBS) 17 | 18 | include ../build-files/build-targets.mk 19 | -------------------------------------------------------------------------------- /ISAT/isat-ck/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:17:01 -0500 3 | 4 | # List of source files to build 5 | 6 | FILESf90 = ci_sens.f90 ci_stats.f90 7 | 8 | FILESf = ci_1.f ci_2.f ci_6.f ci_ck.f ci_ck_flag.f ci_cksubs.f \ 9 | ci_dasubs.f ci_dat.f ci_dat6.f ci_prec.f ci_rmap.f ci_subs.f \ 10 | cireal.f cirmap1.f 11 | 12 | FILES = $(FILESf) $(FILESf90) 13 | 14 | # Left out: g_jacadf.f (not ported to Cantera) 15 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/test_case_mpi/job.sh: -------------------------------------------------------------------------------- 1 | #$ -V # Inherit the submission environment 2 | #$ -cwd # Start job in submission directory 3 | #$ -N test_mpi # Job Name 4 | #$ -j y # combine stderr & stdout into stdout 5 | #$ -pe 8way 24 # Requests 8 cores/node, 2 nodes total 6 | #$ -q development # Queue name 7 | #$ -l h_rt=01:00:00 # Run time (hh:mm:ss) - 1.0 hours 8 | ibrun ./test_mpi 9 | -------------------------------------------------------------------------------- /ISAT/ell_lib/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:27:24 -0500 3 | 4 | include ../build-files/vars.windows 5 | 6 | LIB_NAME = ell 7 | 8 | # ------------- OBJECTS -------------------- 9 | 10 | include SOURCES.mk 11 | 12 | OBJS=$(FILESf90:.f90=.obj) $(FILESf:.f=.obj) 13 | 14 | # ------------- TARGETS -------------------- 15 | 16 | all: $(FILES) $(CREATE_LIBS) 17 | 18 | include ../build-files/build-targets.windows 19 | -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi/DEPENDS.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 8 Jul 2010 17:44:09 -0400 3 | 4 | # List of dependencies 5 | 6 | x2f_mpi.$(OBJ): $(MPI_OBJ) x2f_uran.$(OBJ) x2f_loclev.$(OBJ) x2f_strata.$(OBJ) x2f_pref.$(OBJ) sort_tools.$(OBJ) 7 | x2f_uran.$(OBJ): $(MPI_OBJ) 8 | x2f_pref.$(OBJ): $(MPI_OBJ) 9 | x2f_loclev.$(OBJ): $(MPI_OBJ) 10 | x2f_strata.$(OBJ): $(MPI_OBJ) 11 | x2f_mpi_nproc.$(OBJ): $(MPI_OBJ) 12 | x2f_mpi_bksize.$(OBJ): $(MPI_OBJ) 13 | -------------------------------------------------------------------------------- /ISAT/PaSR/comp: -------------------------------------------------------------------------------- 1 | touch * 2 | mpif90 -O2 -fPIC -ftree-vectorizer-verbose=1 -I../isatab_ser -I../isat-ck -I../ice-pic -c pasr.f 3 | mpif90 -O2 -fPIC -ftree-vectorizer-verbose=1 -I../isatab_ser -I../isat-ck -I../ice-pic -c pasrsubs.f 4 | mpif90 -O2 -fPIC -ftree-vectorizer-verbose=1 -I../isatab_ser -I../isat-ck -I../ice-pic -c usrate.f 5 | #mpif90 -o PaSR pasr.o pasrsubs.o usrate.o -Bstatic -L/home/kalle/work/ISAT-CK7/ISAT/lib -lisat7_ser -l:liblapack.so.3 -Bdynamic -L/home/kalle/work/ISAT-CK7/ISAT_dependencies/lib 6 | -------------------------------------------------------------------------------- /ISAT/isatab_ser/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:09:32 -0500 3 | 4 | # List of source files to build 5 | 6 | FILES = isat_prec.f90 \ 7 | isatab.f90 isat_abort_ser.f90 isat_cdf_action.f90 isat_cdf.f90 \ 8 | isat_change_m.f90 isat_defaults.f90 isat_init.f90 isat_io.f90 \ 9 | isat_kill.f90 isat_lu.f90 isat_lu_m.f90 isat_mpi_ser.f90 \ 10 | isat_mpi_type.f90 isat_rnu.f90 isat_subs.f90 isat_sys_unix.f90 \ 11 | isat_types.f90 isat_val.f90 12 | 13 | -------------------------------------------------------------------------------- /ISAT/CEQ/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 15:51:58 -0500 3 | 4 | # List of source files to build 5 | 6 | FILES = ceq_cp.f90 ceq_dgdt.f90 ceq_g.f90 ceq_h2T.f90 ceq_h.f90 \ 7 | ceq_ind_col.f90 ceq_input.f90 ceq_linprog.f90 ceq_lss.f90 \ 8 | ceq_maxmin.f90 ceq_ming.f90 ceq_min_pert.f90 ceq_norm.f90 \ 9 | ceq_perturb.f90 ceq_red_con.f90 ceq_reorder.f90 ceq_solve.f90 \ 10 | ceq_state.f90 ceq_system.f90 ceq_sys_diff.f90 ceq_types.f90 \ 11 | linprog.f90 12 | -------------------------------------------------------------------------------- /ISAT/isatab_mpi/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Fri, 15 Mar 2013 17:35:16 -0500 by Steve Lantz 3 | 4 | # List of source files to build 5 | 6 | FILES = isat_prec.f90 \ 7 | isatab.f90 isat_abort_mpi.f90 isat_cdf_action.f90 isat_cdf.f90 \ 8 | isat_change_m.f90 isat_defaults.f90 isat_init.f90 isat_io.f90 \ 9 | isat_kill.f90 isat_lu.f90 isat_lu_m.f90 isat_mpi_mpi.f90 \ 10 | isat_mpi_type.f90 isat_rnu.f90 isat_subs.f90 isat_sys_unix.f90 \ 11 | isat_types.f90 isat_val.f90 12 | -------------------------------------------------------------------------------- /ISAT/isatab_test/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Date: Tue, 4 Sep 2012 16:56:19 -0500 3 | 4 | all: 5 | @echo -e "\n>> BUILDING ISATAB SERIAL TEST CASE"; 6 | make -f Makefile_ser 7 | @echo -e "\n>> BUILDING ISATAB MPI TEST CASE"; 8 | make -f Makefile_mpi 9 | 10 | install-programs: 11 | make -f Makefile_ser install-programs DESTDIR=$(DESTDIR) 12 | make -f Makefile_mpi install-programs DESTDIR=$(DESTDIR) 13 | 14 | clean: 15 | make -f Makefile_ser clean 16 | make -f Makefile_mpi clean 17 | -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 8 Jul 2010 17:43:24 -0400 3 | 4 | # List of source files to build 5 | 6 | FILESf90 = sort_tools.f90 x2f_check_atmpts.f90 x2f_loclev.f90 \ 7 | x2f_mpi_bksize.f90 x2f_mpi.f90 x2fmpi_file_name.f90 \ 8 | x2f_mpi_nproc.f90 x2f_pref.f90 x2f_strata.f90 x2f_uran.f90 9 | 10 | FILESc = buildGraph.c glib.c match.c trymatch.c 11 | 12 | FILESh = graphtypes.h 13 | 14 | FILES = $(FILESf90) $(FILESc) $(FILESh) 15 | -------------------------------------------------------------------------------- /ISAT/CEQ/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 15:49:41 -0500 3 | 4 | include ../build-files/vars.mk 5 | 6 | LIB_NAME = libceq 7 | 8 | # ------------- OBJECTS -------------------- 9 | 10 | include SOURCES.mk 11 | 12 | OBJS=$(FILES:.f90=.$(OBJ)) 13 | 14 | # ------------- TARGETS -------------------- 15 | 16 | all: $(FILES) $(CREATE_LIBS) 17 | 18 | include ../build-files/build-targets.mk 19 | 20 | # ----------- DEPENDENCIES ----------------- 21 | 22 | include DEPENDS.mk 23 | -------------------------------------------------------------------------------- /ISAT/ADIFOR_stub/eadfstub.f90: -------------------------------------------------------------------------------- 1 | SUBROUTINE EADFSTUB(RNAME) 2 | USE isat_abort_m 3 | CHARACTER*6 RNAME 4 | CHARACTER*52 S1, S2, S3 5 | CHARACTER*162 SBIG 6 | S1 = ' is an ADIFOR stub library routine. You must link to' 7 | S2 = ' the real ADIFOR software to use this functionality.' 8 | S3 = ' Please refer to the README files for instructions. ' 9 | WRITE (SBIG,'(A6,3A52)') RNAME, S1, S2, S3 10 | CALL isat_abort('ADIFOR STUB',0,mess=SBIG) 11 | RETURN 12 | END 13 | -------------------------------------------------------------------------------- /ISAT/CEQ/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 15:51:39 -0500 3 | 4 | include ../build-files/vars.windows 5 | 6 | LIB_NAME = ceq 7 | 8 | # ------------- OBJECTS -------------------- 9 | 10 | include SOURCES.mk 11 | 12 | OBJS=$(FILES:.f90=.obj) 13 | 14 | # ------------- TARGETS -------------------- 15 | 16 | all: $(FILES) $(CREATE_LIBS) 17 | 18 | include ../build-files/build-targets.windows 19 | 20 | # ----------- DEPENDENCIES ----------------- 21 | 22 | include DEPENDS.mk 23 | -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 8 Jul 2010 17:43:03 -0400 3 | 4 | include ../build-files/vars.mk 5 | 6 | LIB_NAME = libx2f_mpi 7 | 8 | # ------------- OBJECTS -------------------- 9 | 10 | include SOURCES.mk 11 | 12 | OBJS=$(FILESf90:.f90=.$(OBJ)) $(FILESc:.c=.$(OBJ)) 13 | 14 | # ------------- TARGETS -------------------- 15 | 16 | all: $(FILES) $(CREATE_LIBS) 17 | 18 | include ../build-files/build-targets.mk 19 | 20 | # ----------- DEPENDENCIES ----------------- 21 | 22 | include DEPENDS.mk 23 | -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi_isat/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 8 Jul 2010 17:44:24 -0400 3 | 4 | include ../build-files/vars.mk 5 | 6 | LIB_NAME = libx2f_mpi_isat 7 | 8 | # ------------- OBJECTS -------------------- 9 | 10 | include SOURCES.mk 11 | 12 | OBJS=$(FILES:.f90=.$(OBJ)) 13 | 14 | # ------------- TARGETS -------------------- 15 | 16 | all: $(FILES) $(CREATE_LIBS) 17 | 18 | include ../build-files/build-targets.mk 19 | 20 | # ----------- DEPENDENCIES ----------------- 21 | 22 | include DEPENDS.mk 23 | -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi_isat/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 8 Jul 2010 17:44:32 -0400 3 | 4 | include ../build-files/vars.windows 5 | include ../build-files/PATHS.windows 6 | 7 | LIB_NAME = x2f_mpi_isat 8 | 9 | # ------------- OBJECTS -------------------- 10 | 11 | include SOURCES.mk 12 | 13 | OBJS=$(FILES:.f90=.obj) $(MPI_OBJ) 14 | 15 | # ------------- TARGETS -------------------- 16 | 17 | all: $(FILES) $(CREATE_LIBS) 18 | 19 | include ../build-files/build-targets.windows 20 | 21 | # ----------- DEPENDENCIES ----------------- 22 | 23 | include DEPENDS.mk 24 | -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 8 Jul 2010 17:43:11 -0400 3 | 4 | include ../build-files/vars.windows 5 | include ../build-files/PATHS.windows 6 | 7 | LIB_NAME = x2f_mpi 8 | 9 | # ------------- OBJECTS -------------------- 10 | 11 | include SOURCES.mk 12 | 13 | OBJS=$(FILESf90:.f90=.obj) $(FILESc:.c=.obj) $(MPI_OBJ) 14 | 15 | # ------------- TARGETS -------------------- 16 | 17 | all: $(FILES) $(CREATE_LIBS) 18 | 19 | include ../build-files/build-targets.windows 20 | 21 | # ----------- DEPENDENCIES ----------------- 22 | 23 | include DEPENDS.mk 24 | -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi/trymatch.c: -------------------------------------------------------------------------------- 1 | #include "graphtypes.h" 2 | 3 | void trymatch(ngrp,dgr,nds,MAT) 4 | int *ngrp, *dgr, *nds, *MAT; 5 | 6 | { 7 | int i; 8 | Graph graph, buildGraph(); 9 | int *MAT1; 10 | 11 | /*printf("reach here1\n");*/ 12 | graph = buildGraph(ngrp,dgr,nds); 13 | /*printf("reach here2\n");*/ 14 | MAT1 = Match(graph); 15 | 16 | for (i=1; i<=*ngrp; ++i) 17 | { 18 | /* printf("%d %d\n",i,MAT1[i]); */ 19 | MAT[i-1] = MAT1[i]; 20 | } 21 | /*printf("reach here3\n");*/ 22 | } 23 | 24 | void trymatch_ (ngrp,dgr,nds,MAT) 25 | int *ngrp, *dgr, *nds, *MAT; { 26 | trymatch (ngrp,dgr,nds,MAT); 27 | } 28 | -------------------------------------------------------------------------------- /ISAT/build-files/build-targets.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last modified: Wed, 26 Aug 2009 00:45:22 -0400 3 | 4 | $(FILES): 5 | $(LN) $(SOURCE_DIR)\$@ . 6 | 7 | .f90.obj: 8 | $(FC) $(FCFLAGS) $(IFLAGS) /c $< 9 | 10 | .f.obj: 11 | $(FC) $(FCFLAGS) $(IFLAGS) /c $< 12 | 13 | $(LIB_NAME).lib: $(OBJS) 14 | $(AR) /out:$@ $(OBJS) 15 | 16 | $(NAME): $(OBJS) 17 | $(FC) /exe:$@ $(OBJS) $(LINK_OPS) $(LDFLAGS) 18 | 19 | $(MPI_OBJ): 20 | $(FC) $(FCFLAGS) $(IFLAGS) /c $(MPI_PATH) 21 | 22 | debug: clean 23 | $(MAKE) BUILD_TYPE=debug 24 | 25 | clean:: 26 | $(RM) $(CREATE_LIBS) $(NAME) $(OBJS) *.mod 27 | -------------------------------------------------------------------------------- /ISAT/cklib_ext_stub/cklib_ext_stub.f: -------------------------------------------------------------------------------- 1 | ! If you have your own CKWYP file, you can use it here. If the code is relying on 2 | ! the Chemkin arrays ICKWRK or RCKWRK, it cannot be used with this Cantera 3 | ! based version of ISAT-CK7. If the code need subroutines from Chemkin, you can 4 | ! call the corresponding subroutine in canteralib.f90 instead (if the corresponding 5 | ! subroutine exists) 6 | SUBROUTINE CKWYP_EXT (P, T, Y, WDOT, GAS) 7 | use cantera 8 | IMPLICIT DOUBLE PRECISION (A-H, O-Z), INTEGER (I-N) 9 | DIMENSION Y(*), WDOT(*) 10 | type(phase_t) :: GAS 11 | CALL CTWYP(P, T, Y, WDOT, GAS) 12 | RETURN 13 | END 14 | -------------------------------------------------------------------------------- /ISAT/cklib_ext_stub/cklib_ext_stub.f.bak: -------------------------------------------------------------------------------- 1 | ! If you have your own CKWYP file, you can use it here. If the code is relying on 2 | ! the Chemkin arrays ICKWRK or RCKWRK, it cannot be used with this Cantera 3 | ! based version of ISAT-CK7. If the code need subroutines from Chemkin, you can 4 | ! call the corresponding subroutine in canteralib.f90 instead (if the corresponding 5 | ! subroutine exists) 6 | SUBROUTINE CKWYP_EXT (P, T, Y, WDOT, GAS) 7 | use cantera 8 | IMPLICIT DOUBLE PRECISION (A-H, O-Z), INTEGER (I-N) 9 | DIMENSION Y(*), WDOT(*) 10 | type(phase_t) :: GAS 11 | CALL CTWYP(P, T, Y, WDOT, GAS) 12 | RETURN 13 | END 14 | -------------------------------------------------------------------------------- /ISAT/isat-ck/ci_prec.f: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | module ci_prec 10 | 11 | integer, parameter :: k_dp = kind(1.d0), k_sp = kind(1.0) 12 | 13 | end module ci_prec 14 | -------------------------------------------------------------------------------- /ISAT/ADIFOR_stub/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Wed Nov 28 14:27:51 EST 2012 by Steve Lantz 3 | 4 | include ../build-files/vars.mk 5 | 6 | ISATAB_PATH=../isatab_ser 7 | IFLAGS = -I$(ISATAB_PATH) 8 | 9 | LIB_NAME = libadifor 10 | 11 | # ------------- OBJECTS -------------------- 12 | 13 | include SOURCES.mk 14 | 15 | OBJS=$(FILESf90:.f90=.$(OBJ)) $(FILESf:.f=.$(OBJ)) 16 | 17 | # ------------- TARGETS -------------------- 18 | 19 | all: $(FILES) BUILD-ISATAB $(CREATE_LIBS) 20 | 21 | BUILD-ISATAB: 22 | (cd $(ISATAB_PATH); $(MAKE)) 23 | touch $@ 24 | 25 | include ../build-files/build-targets.mk 26 | 27 | clean:: 28 | $(RM) BUILD-ISATAB 29 | -------------------------------------------------------------------------------- /ISAT/isatab_test/Makefile_mpi: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Date: Tue, 4 Sep 2012 17:26:26 -0500 3 | # Modified: Fri Sep 14 17:44:16 UTC 2012 by Steve Lantz 4 | 5 | include ../build-files/vars.mk 6 | 7 | RNU_PATH = ../rnu_lib 8 | ISATAB_PATH = ../isatab_mpi 9 | IFLAGS = -I$(RNU_PATH) -I$(ISATAB_PATH) 10 | LIBS_PATH = $(DESTDIR)/lib 11 | LDFLAGS = -L$(LIBS_PATH) -lisat7_mpi -L${TACC_MKL_LIB} $(MKL_LIST) 12 | NAME = test_mpi 13 | 14 | # ------------- OBJECTS -------------------- 15 | 16 | include SOURCES_mpi.mk 17 | 18 | OBJS = $(FILES:.f90=.$(OBJ)) 19 | 20 | # ------------- TARGETS -------------------- 21 | 22 | all: $(FILES) $(NAME) 23 | 24 | include ../build-files/build-targets.mk 25 | -------------------------------------------------------------------------------- /ISAT/isatab_test/Makefile_ser: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Date: Tue, 4 Sep 2012 17:26:14 -0500 3 | # Modified: Fri Sep 14 17:44:16 UTC 2012 by Steve Lantz 4 | 5 | include ../build-files/vars.mk 6 | 7 | RNU_PATH = ../rnu_lib 8 | ISATAB_PATH = ../isatab_ser 9 | IFLAGS = -I$(RNU_PATH) -I$(ISATAB_PATH) 10 | LIBS_PATH = $(DESTDIR)/lib 11 | LDFLAGS = -L$(LIBS_PATH) -lisat7_ser -L${TACC_MKL_LIB} $(MKL_LIST) 12 | NAME = test_ser 13 | 14 | # ------------- OBJECTS -------------------- 15 | 16 | include SOURCES_ser.mk 17 | 18 | OBJS = $(FILES:.f90=.$(OBJ)) 19 | 20 | # ------------- TARGETS -------------------- 21 | 22 | all: $(FILES) $(NAME) 23 | 24 | include ../build-files/build-targets.mk 25 | -------------------------------------------------------------------------------- /ISAT/PaSR/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:30:00 -0500 3 | 4 | include ../build-files/vars.windows 5 | 6 | ISATCK_PATH = ..\isat-ck 7 | ICEPIC_PATH = ..\ice-pic 8 | ISATAB_PATH = ..\isatab_ser 9 | IFLAGS = /I$(ISATAB_PATH) /I$(ISATCK_PATH) /I$(ICEPIC_PATH) 10 | LIBS_PATH = ..\lib 11 | LDFLAGS= /LIBPATH:$(LIBS_PATH) isat7_ser.lib lapack.lib 12 | NAME = PaSR.exe 13 | 14 | # ------------- OBJECTS -------------------- 15 | 16 | include SOURCES.mk 17 | 18 | OBJS = $(FILES:.f=.obj) 19 | 20 | # ------------- TARGETS -------------------- 21 | 22 | all: $(FILES) $(NAME) 23 | 24 | include ../build-files/build-targets.windows 25 | -------------------------------------------------------------------------------- /ISAT/sell_lib/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:32:31 -0500 3 | 4 | include ../build-files/vars.mk 5 | 6 | RNU_LIB_PATH=../rnu_lib 7 | IFLAGS = -I$(RNU_LIB_PATH) 8 | LIB_NAME = libsell 9 | 10 | # ------------- OBJECTS -------------------- 11 | 12 | include SOURCES.mk 13 | 14 | OBJS=$(FILES:.f90=.$(OBJ)) 15 | 16 | # ------------- TARGETS -------------------- 17 | 18 | all: $(FILES) BUILD-RNU $(CREATE_LIBS) 19 | 20 | BUILD-RNU: 21 | (cd $(RNU_LIB_PATH); make) 22 | touch $@ 23 | 24 | include ../build-files/build-targets.mk 25 | 26 | clean:: 27 | $(RM) BUILD-RNU 28 | 29 | # ----------- DEPENDENCIES ------------------ 30 | 31 | include DEPENDS.mk 32 | -------------------------------------------------------------------------------- /x2f_mpi/build-files/build-targets.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Tue, 27 Jul 2010 13:25:23 -0400 3 | 4 | $(FILES): 5 | $(LN) $(SOURCE_DIR)\$@ . 6 | 7 | .f90.obj: 8 | $(FC) $(FCFLAGS) $(IFLAGS) /c $< 9 | 10 | .f.obj: 11 | $(FC) $(FCFLAGS) $(IFLAGS) /c $< 12 | 13 | .c.obj: 14 | $(CC) $(CFLAGS) $(IFLAGS) /c $< 15 | 16 | $(LIB_NAME).lib: $(OBJS) 17 | $(AR) /out:$@ $(OBJS) 18 | 19 | $(NAME): $(OBJS) 20 | $(FC) /exe:$@ $(OBJS) $(LINK_OPS) $(LDFLAGS) 21 | 22 | $(MPI_OBJ): 23 | $(FC) $(FCFLAGS) $(IFLAGS) /c $(MPI_PATH)\$(MPI_FILE) 24 | 25 | debug: clean 26 | $(MAKE) BUILD_TYPE=debug 27 | 28 | clean:: 29 | $(RM) $(CREATE_LIBS) $(NAME) $(OBJS) *.mod 30 | -------------------------------------------------------------------------------- /ISAT/isatab_mpi/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:42:03 -0500 3 | 4 | include ../build-files/vars.mk 5 | 6 | SELL_LIB_PATH=../sell_lib 7 | IFLAGS = -I$(SELL_LIB_PATH) 8 | LIB_NAME = libisatab_mpi 9 | 10 | # ------------- OBJECTS -------------------- 11 | 12 | include SOURCES.mk 13 | 14 | OBJS=$(FILES:.f90=.$(OBJ)) 15 | 16 | # ------------- TARGETS -------------------- 17 | 18 | all: $(FILES) BUILD-SELL $(CREATE_LIBS) 19 | 20 | BUILD-SELL: 21 | (cd $(SELL_LIB_PATH); $(MAKE)) 22 | touch $@ 23 | 24 | include ../build-files/build-targets.mk 25 | 26 | clean:: 27 | $(RM) BUILD-SELL 28 | 29 | # ----------- DEPENDENCIES ----------------- 30 | 31 | include DEPENDS.mk 32 | -------------------------------------------------------------------------------- /ISAT/isatab_ser/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:11:15 -0500 3 | 4 | include ../build-files/vars.mk 5 | 6 | SELL_LIB_PATH=../sell_lib 7 | IFLAGS = -I$(SELL_LIB_PATH) 8 | LIB_NAME = libisatab_ser 9 | 10 | # ------------- OBJECTS -------------------- 11 | 12 | include SOURCES.mk 13 | 14 | OBJS=$(FILES:.f90=.$(OBJ)) 15 | 16 | # ------------- TARGETS -------------------- 17 | 18 | all: $(FILES) BUILD-SELL $(CREATE_LIBS) 19 | 20 | BUILD-SELL: 21 | (cd $(SELL_LIB_PATH); $(MAKE)) 22 | touch $@ 23 | 24 | include ../build-files/build-targets.mk 25 | 26 | clean:: 27 | $(RM) BUILD-SELL 28 | 29 | # ------------- DEPENDENCIES -------------- 30 | 31 | include DEPENDS.mk 32 | -------------------------------------------------------------------------------- /ISAT/sell_lib/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:33:21 -0500 3 | 4 | include ../build-files/vars.windows 5 | 6 | RNU_LIB_PATH=..\rnu_lib 7 | IFLAGS = /I$(RNU_LIB_PATH) 8 | LIB_NAME = sell 9 | 10 | # ------------- OBJECTS -------------------- 11 | 12 | include SOURCES.mk 13 | 14 | OBJS=$(FILES:.f90=.obj) 15 | 16 | # ------------- TARGETS -------------------- 17 | 18 | all: $(FILES) BUILD-RNU $(CREATE_LIBS) 19 | 20 | BUILD-RNU: 21 | (cd $(RNU_LIB_PATH) & $(MAKE)) 22 | $(TOUCH) $@ 23 | 24 | include ../build-files/build-targets.windows 25 | 26 | clean:: 27 | $(RM) BUILD-RNU 28 | 29 | # ----------- DEPENDENCIES ----------------- 30 | 31 | include DEPENDS.mk 32 | -------------------------------------------------------------------------------- /ISAT/isatab_ser/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:12:09 -0500 3 | 4 | include ../build-files/vars.windows 5 | 6 | SELL_LIB_PATH=..\sell_lib 7 | IFLAGS = /I$(SELL_LIB_PATH) 8 | LIB_NAME = isatab_ser 9 | 10 | # ------------- OBJECTS -------------------- 11 | 12 | include SOURCES.mk 13 | 14 | OBJS=$(FILES:.f90=.obj) 15 | 16 | # ------------- TARGETS -------------------- 17 | 18 | all: $(FILES) BUILD-SELL $(CREATE_LIBS) 19 | 20 | BUILD-SELL: 21 | (cd $(SELL_LIB_PATH) && $(MAKE)) 22 | $(TOUCH) $@ 23 | 24 | include ../build-files/build-targets.windows 25 | 26 | clean:: 27 | $(RM) BUILD-SELL 28 | 29 | # ----------- DEPENDENCIES ----------------- 30 | 31 | include DEPENDS.mk 32 | -------------------------------------------------------------------------------- /x2f_mpi/build-files/PATHS.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Mon Jan 31 2011 17:05:34 -0400 by Steve Lantz 3 | 4 | # This file provides paths to MPI and INTEL MKL libraries on windows (CATS) 5 | 6 | # mpi.f90 source file used on CATS, name and path 7 | MPI_FILE = mpi.f90 8 | MPI_PATH = "C:\Program Files\Microsoft HPC Pack 2008 R2\Inc" 9 | 10 | # MPI include directory 11 | MPI_INC = "C:\Program Files\Microsoft HPC Pack 2008 R2\Inc" 12 | 13 | # set MPI_OBJ 14 | MPI_OBJ=$(MPI_FILE:.f90=.obj) 15 | 16 | # set MKL and MPI LIB PATHS 17 | MKL_LIBS_PATH = "C:\Program Files (x86)\Intel\Compiler\11.1\051\mkl\em64t\lib" 18 | MPI_LIBS_PATH = "C:\Program Files\Microsoft HPC Pack 2008 R2\Lib\amd64" 19 | -------------------------------------------------------------------------------- /x2f_mpi/build-files/build-targets.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Date: Tue, 29 Nov 2011 20:37:48 -0600 3 | 4 | $(FILES): 5 | $(LN) $(SOURCE_DIR)/$@ . 6 | 7 | %.o: %.f90 8 | $(FC) $(FCFLAGS) $(IFLAGS) -c $< 9 | 10 | %.o: %.f 11 | $(FC) $(FCFLAGS) $(IFLAGS) -c $< 12 | 13 | %.o: %.c 14 | $(CC) $(CCFLAGS) $(IFLAGS) -c $< 15 | 16 | $(LIB_NAME).so: $(OBJS) 17 | $(FC) -shared -o $@ $(OBJS) $(LDFLAGS) 18 | 19 | $(LIB_NAME).a: $(OBJS) 20 | $(AR) $@ $(OBJS) 21 | 22 | $(NAME): $(OBJS) 23 | $(FC) -o $@ $(OBJS) $(LINK_LIBS) $(LDFLAGS) $(LINK_SYS_LIBS) 24 | ifneq ($(BUILD_TYPE), debug) 25 | strip $(NAME) 26 | endif 27 | 28 | debug: clean 29 | make BUILD_TYPE=debug 30 | 31 | clean:: 32 | $(RM) $(CREATE_LIBS) $(NAME) $(OBJS) *.mod 33 | -------------------------------------------------------------------------------- /x2f_mpi/test_x2f_mpi/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Date: Thu, 29 Nov 2012 20:08:17 -0600 3 | 4 | include ../build-files/vars.mk 5 | 6 | X2F_LIBS_PATH = ../lib/ 7 | ISAT_LIBS_PATH = ../../ISAT/lib/ 8 | LDFLAGS= -L$(X2F_LIBS_PATH) -L$(ISAT_LIBS_PATH) -L$(TACC_MKL_LIB) -Xlinker --start-group -lx2f_mpi $(MKL_LIBS) -Xlinker --end-group 9 | 10 | NAME = test_x2f_mpi 11 | 12 | # ------------- OBJECTS -------------------- 13 | 14 | include SOURCES.mk 15 | 16 | OBJS = $(FILES:.f90=.$(OBJ)) 17 | 18 | # ------------- TARGETS -------------------- 19 | 20 | all: $(FILES) $(NAME) 21 | 22 | include ../build-files/build-targets.mk 23 | 24 | # ----------- DEPENDENCIES ----------------- 25 | 26 | include DEPENDS.mk 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ISAT-CK7-Cantera 2 | 3 | The original library can be found here: https://tcg.mae.cornell.edu/ISATCK7/ 4 | 5 | That library uses ChemkinII as a backend for thermochemistry. The library provided here uses Cantera 2.1 or 2.2 for thermochemistry. The code in ice-pic/g_jacadf.f was however very dependent on Chemkins internal work arrays. This is yet to port to Cantera. I currently do not see any easy way to do that unfortunately. (one way can be to create those work arrays using Cantera. That is however not straight-forward.) This means that the ice-pic library is not functional. Ths ISAT code does however work without problems. 6 | 7 | Before compiling, see README.txt and ChangeLogCantera.txt 8 | 9 | See the work by Daniel Moell: http://www.tfd.chalmers.se/~hani/kurser/OS_CFD/ 10 | -------------------------------------------------------------------------------- /x2f_mpi/pasr_multi/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Date: Thu, 29 Nov 2012 20:06:21 -0600 3 | 4 | include ../build-files/vars.mk 5 | 6 | X2F_LIBS_PATH = ../lib/ 7 | ISAT_LIBS_PATH = ../../ISAT/lib/ 8 | 9 | LDFLAGS= -L$(X2F_LIBS_PATH) -L$(ISAT_LIBS_PATH) -Xlinker --start-group -lisat7_mpi -lx2f_mpi -lx2f_mpi_isat $(MKL_LIBS) -Xlinker --end-group 10 | 11 | NAME = pasr_multi 12 | 13 | # ------------- OBJECTS -------------------- 14 | 15 | include SOURCES.mk 16 | 17 | OBJS = $(FILESf90:.f90=.$(OBJ)) $(FILESf:.f=.$(OBJ)) 18 | 19 | # ------------- TARGETS -------------------- 20 | 21 | all: $(FILES) $(NAME) 22 | 23 | include ../build-files/build-targets.mk 24 | 25 | # ----------- DEPENDENCIES ----------------- 26 | 27 | include DEPENDS.mk 28 | -------------------------------------------------------------------------------- /x2f_mpi/test_sort_tools/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Date: Thu, 29 Nov 2012 20:06:10 -0600 3 | 4 | include ../build-files/vars.mk 5 | 6 | IFLAGS = -I../x2f_mpi/ 7 | X2F_LIBS_PATH = ../lib/ 8 | ISAT_LIBS_PATH = ../../ISAT/lib/ 9 | LDFLAGS= -L$(X2F_LIBS_PATH) -L$(ISAT_LIBS_PATH) -L$(TACC_MKL_LIB) -Xlinker --start-group -lx2f_mpi $(MKL_LIBS) -Xlinker --end-group 10 | 11 | NAME = test_sort_tools 12 | 13 | # ------------- OBJECTS -------------------- 14 | 15 | include SOURCES.mk 16 | 17 | OBJS = $(FILES:.f90=.$(OBJ)) 18 | 19 | # ------------- TARGETS -------------------- 20 | 21 | all: $(FILES) $(NAME) 22 | 23 | include ../build-files/build-targets.mk 24 | 25 | # ----------- DEPENDENCIES ----------------- 26 | 27 | include DEPENDS.mk 28 | -------------------------------------------------------------------------------- /ISAT/build-files/vars.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last modified: Wed, 26 Aug 2009 00:45:22 -0400 3 | 4 | FC=ifort 5 | 6 | #Optimize Mode Flags: 7 | FCFLAGS = /nologo /nodebug /nocheck /traceback /threads /Qlowercase /Qvec-report:0 8 | 9 | #Debug Mode Flags: 10 | #FCFLAGS = /nologo /debug:full /warn:unused /Qtrapuv /Qlowercase /Qfp-stack-check /traceback /check:pointer /check:bounds /check:uninit /libs:static /threads /dbglibs 11 | 12 | LINK_OPS = /link /INCREMENTAL:NO /SUBSYSTEM:CONSOLE /NOLOGO /stack:500000000 13 | 14 | LN = copy /Y 15 | CP = copy /Y 16 | RM = del /Q 17 | RMDIR = rmdir /s /q 18 | AR = lib 19 | OBJ = obj 20 | TOUCH = echo "" > 21 | MAKE = nmake -f Makefile.windows 22 | NAME = empty 23 | MPI_OBJ = null 24 | CREATE_LIBS = $(LIB_NAME).lib 25 | -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi/x2f_mpi_nproc.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Cornell University ! 3 | ! COPYRIGHT: © 2012, Cornell University ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-CU.txt' file included in the x2f_mpi ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine x2f_mpi_nproc( nproc ) 10 | 11 | use MPI 12 | implicit none 13 | integer, intent(inout) :: nproc 14 | integer :: ierr 15 | 16 | call MPI_COMM_size( MPI_COMM_WORLD, nproc, ierr ) 17 | 18 | end subroutine x2f_mpi_nproc -------------------------------------------------------------------------------- /ISAT/canteralib/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Tue Jan 20 09:37:26 CET 2015 3 | 4 | include ../build-files/vars.mk 5 | 6 | ISATAB_PATH=../isatab_ser 7 | 8 | IFLAGS = -I$(ISATAB_PATH) -I$(CANTERA_INCPATH) -I$(CANTERA_SRC) 9 | 10 | LIB_NAME = libct 11 | 12 | LDFLAGS = -L$(CANTERA_LIBPATH) -lcantera_fortran -lcantera -lpthread -lstdc++ 13 | 14 | # ------------- OBJECTS -------------------- 15 | 16 | include SOURCES.mk 17 | 18 | OBJS=$(FILESf90:.f90=.$(OBJ)) $(FILEScpp:.cpp=.$(OBJ)) $(FILESf:.f=.$(OBJ)) 19 | 20 | # ------------- TARGETS -------------------- 21 | 22 | all: $(FILES) BUILD-ISATAB $(CREATE_LIBS) 23 | 24 | BUILD-ISATAB: 25 | (cd $(ISATAB_PATH); $(MAKE)) 26 | touch $@ 27 | 28 | include ../build-files/build-targets.mk 29 | 30 | clean:: 31 | $(RM) BUILD-ISATAB 32 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_67/thermselect.py: -------------------------------------------------------------------------------- 1 | species = ["C2H4", "O2", "CO2", "H2O", "OH", "H", "CO", "H2", "O", "HO2", "CH3", "C4H2", "CH4", "C2H2", "HCCO", "CH2CHO", "CH2", "C2H5", "CH3O", "C2H3", "C2H6", "H2O2", "C3H6", "C2O", "CH", "aC3H5", "C2H", "CH2*", "H2CC", "C", "CH2O", "iC4H3", "C4H6", "HCO", "CH2OCH2", "CH2CHCO", "AR", "N2"] 2 | 3 | thermfile = open('therm.dat', 'r') 4 | 5 | newtherm = '' 6 | ln = 0 7 | sample = False 8 | for line in thermfile: 9 | words = line.split() 10 | if words[0] in species: 11 | sample = True 12 | if sample: 13 | ln += 1 14 | newtherm += line 15 | if ln == 4: 16 | sample = False 17 | ln = 0 18 | 19 | 20 | newthermfile = open('newtherm.dat', 'w') 21 | newthermfile.write(newtherm) 22 | newthermfile.close() 23 | thermfile.close() 24 | -------------------------------------------------------------------------------- /ISAT/isatab_mpi/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:42:16 -0500 3 | 4 | include ../build-files/vars.windows 5 | 6 | SELL_LIB_PATH=..\sell_lib 7 | IFLAGS = /I$(SELL_LIB_PATH) 8 | LIB_NAME = isatab_mpi 9 | 10 | # ------------- OBJECTS -------------------- 11 | 12 | include SOURCES.mk 13 | include ../build-files/MPI.windows 14 | 15 | OBJS = $(FILES:.f90=.obj) $(MPI_OBJ) 16 | 17 | # ------------- TARGETS -------------------- 18 | 19 | all: $(FILES) BUILD-SELL $(CREATE_LIBS) 20 | 21 | BUILD-SELL: 22 | (cd $(SELL_LIB_PATH) && $(MAKE)) 23 | $(TOUCH) $@ 24 | 25 | include ../build-files/build-targets.windows 26 | 27 | clean:: 28 | $(RM) BUILD-SELL 29 | 30 | # ---------- DEPENDENCIES ----------------- 31 | 32 | include DEPENDS.mk 33 | 34 | -------------------------------------------------------------------------------- /ISAT/PaSR/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Wed Nov 28 10:18:09 EST 2012 by Steve Lantz 3 | 4 | include ../build-files/vars.mk 5 | 6 | ISATCK_PATH = ../isat-ck 7 | ICEPIC_PATH = ../ice-pic 8 | ISATAB_PATH = ../isatab_ser 9 | 10 | IFLAGS = -I$(ISATAB_PATH) -I$(ISATCK_PATH) -I$(ICEPIC_PATH) -I$(CANTERA_INCPATH) 11 | LIBS_PATH = $(DESTDIR)/lib 12 | LDFLAGS= -L$(LIBS_PATH) -lisat7_ser -lck_ext $(MKL_LIST) -L$(CANTERA_LIBPATH) -lcantera_fortran -lcantera -lpthread -lstdc++ 13 | 14 | #$(CANTERA_LIBPATH)/libcantera_fortran.a 15 | 16 | NAME = PaSR 17 | 18 | # ------------- OBJECTS -------------------- 19 | 20 | include SOURCES.mk 21 | 22 | OBJS = $(FILES:.f=.$(OBJ)) 23 | 24 | # ------------- TARGETS -------------------- 25 | 26 | all: $(FILES) $(NAME) 27 | 28 | include ../build-files/build-targets.mk 29 | -------------------------------------------------------------------------------- /ISAT/isat-ck-ext/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Sat, 3 Apr 2010 17:57:14 -0400 3 | 4 | include ../build-files/vars.windows 5 | 6 | ISATAB_PATH=..\isatab_ser 7 | ISATCK_PATH=..\isat-ck 8 | IFLAGS = /I$(ISATCK_PATH) /I$(ISATAB_PATH) 9 | 10 | LIB_NAME = isatck_ext 11 | 12 | # ------------- OBJECTS -------------------- 13 | 14 | include SOURCES.mk 15 | 16 | OBJS=$(FILESf90:.f90=.obj) $(FILESf:.f=.obj) 17 | 18 | # ------------- TARGETS -------------------- 19 | 20 | all: $(FILES) $(CREATE_LIBS) 21 | 22 | STREAMS-MOD: streams_mod.obj 23 | 24 | BUILD-ISATCK: 25 | (cd $(ISATCK_PATH) & $(MAKE)) 26 | $(TOUCH) $@ 27 | 28 | include ../build-files/build-targets.windows 29 | 30 | clean:: 31 | $(RM) BUILD-ISATCK 32 | 33 | # ----------- DEPENDENCIES ----------------- 34 | 35 | include DEPENDS.mk 36 | -------------------------------------------------------------------------------- /ISAT/isat-ck-ext/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Sat, 3 Apr 2010 17:57:14 -0400 3 | 4 | include ../build-files/vars.mk 5 | 6 | ISATAB_PATH=../isatab_ser 7 | ISATCK_PATH=../isat-ck 8 | IFLAGS = -I$(ISATCK_PATH) -I$(ISATAB_PATH) 9 | 10 | LIB_NAME = libisatck_ext 11 | 12 | # ------------- OBJECTS -------------------- 13 | 14 | include SOURCES.mk 15 | 16 | OBJS=$(FILESf90:.f90=.$(OBJ)) $(FILESf:.f=.$(OBJ)) 17 | 18 | # ------------- TARGETS -------------------- 19 | 20 | all: $(FILES) BUILD-ISATCK $(CREATE_LIBS) 21 | 22 | STREAMS-MOD: streams_mod.$(OBJ) 23 | 24 | BUILD-ISATCK: 25 | (cd $(ISATCK_PATH); $(MAKE)) 26 | touch $@ 27 | 28 | include ../build-files/build-targets.mk 29 | 30 | clean:: 31 | $(RM) BUILD-ISATCK 32 | 33 | # ----------- DEPENDENCIES ----------------- 34 | 35 | include DEPENDS.mk 36 | -------------------------------------------------------------------------------- /x2f_mpi/test_x2f_mpi/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 8 Jul 2010 17:47:44 -0400 3 | 4 | include ../build-files/vars.windows 5 | include ../build-files/PATHS.windows 6 | 7 | LIBS_PATH = ..\lib 8 | 9 | LDFLAGS = /LIBPATH:$(LIBS_PATH) /LIBPATH:$(MKL_LIBS_PATH) /LIBPATH:$(MPI_LIBS_PATH) x2f_mpi.lib msmpifec.lib msmpi.lib mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib libiomp5mt.lib 10 | 11 | NAME = test_x2f_mpi.exe 12 | 13 | # ------------- OBJECTS -------------------- 14 | 15 | include SOURCES.mk 16 | 17 | OBJS = $(FILES:.f90=.obj) $(MPI_OBJ) 18 | 19 | # ------------- TARGETS -------------------- 20 | 21 | all: $(FILES) $(NAME) 22 | 23 | include ../build-files/build-targets.windows 24 | 25 | # ----------- DEPENDENCIES ----------------- 26 | 27 | include DEPENDS.mk 28 | -------------------------------------------------------------------------------- /ISAT/isat-ck/DEPENDS.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:17:56 -0500 3 | 4 | # List of dependencies 5 | 6 | ci_1.$(OBJ): ci_dat.$(OBJ) 7 | ci_2.$(OBJ): ci_dat.$(OBJ) 8 | ci_6.$(OBJ): ci_ck.$(OBJ) ci_dat.$(OBJ) ci_rmap.$(OBJ) 9 | ci_ck.$(OBJ): ci_dat.$(OBJ) ci_dat6.$(OBJ) 10 | ci_cksubs.$(OBJ): ci_dat6.$(OBJ) 11 | ci_dasubs.$(OBJ): ci_cksubs.$(OBJ) ci_dat6.$(OBJ) 12 | ci_dat.$(OBJ): ci_prec.$(OBJ) 13 | ci_dat6.$(OBJ): ci_prec.$(OBJ) ckstrt.h 14 | ci_rmap.$(OBJ): ci_cksubs.$(OBJ) ci_stats.$(OBJ) 15 | ci_sens.$(OBJ): ci_dat6.$(OBJ) ci_stats.$(OBJ) 16 | ci_stats.$(OBJ): ci_dat.$(OBJ) ci_prec.$(OBJ) 17 | ci_subs.$(OBJ): ci_1.$(OBJ) ci_2.$(OBJ) ci_6.$(OBJ) ci_cksubs.$(OBJ) ci_dat.$(OBJ) ci_dat6.$(OBJ) ci_prec.$(OBJ) 18 | cireal.$(OBJ): ci_cksubs.$(OBJ) 19 | cirmap1.$(OBJ): ci_dat.$(OBJ) ci_rmap.$(OBJ) ci_sens.$(OBJ) 20 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_67/pasr_op.txt: -------------------------------------------------------------------------------- 1 | Number of species = 38 2 | Number of streams = 3 3 | Flow rates of streams = 0.0500 0.8500 0.1000 4 | PASR starting: number of particles= 100 5 | Residence time, tres (seconds) = 1.0000E-02 6 | 04/06/2012: Prior to this date, due to a bug tres was twice the specified tres 7 | Mixing time, tmix (seconds) = 1.0000E-03 8 | Pairing time, tpair (seconds) = 1.0000E-03 9 | Min. and max. time step (seconds) = 1.0000E-04 1.0000E-04 10 | Number of steps = 1.0000E+02 11 | Number of sub-steps per step = 3 12 | Number of particle-sub-steps = 3.0000E+04 13 | Maximum pressure (atm.) = 1.0000E+00 14 | Minumum pressure (atm.) = 1.0000E+00 15 | Period of pressure variation (sec)= 1.0000E-03 16 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_89/pasr_op.txt: -------------------------------------------------------------------------------- 1 | Number of species = 18 2 | Number of streams = 3 3 | Flow rates of streams = 0.0500 0.8500 0.1000 4 | PASR starting: number of particles= 100 5 | Residence time, tres (seconds) = 1.0000E-02 6 | 04/06/2012: Prior to this date, due to a bug tres was twice the specified tres 7 | Mixing time, tmix (seconds) = 1.0000E-03 8 | Pairing time, tpair (seconds) = 1.0000E-03 9 | Min. and max. time step (seconds) = 1.0000E-04 1.0000E-04 10 | Number of steps = 1.0000E+02 11 | Number of sub-steps per step = 3 12 | Number of particle-sub-steps = 3.0000E+04 13 | Maximum pressure (atm.) = 1.0000E+00 14 | Minumum pressure (atm.) = 1.0000E+00 15 | Period of pressure variation (sec)= 1.0000E-03 16 | -------------------------------------------------------------------------------- /x2f_mpi/test_sort_tools/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 24 Feb 2011 13:46:14 -0600 3 | 4 | include ../build-files/vars.windows 5 | include ../build-files/PATHS.windows 6 | 7 | IFLAGS = /I..\x2f_mpi 8 | LIBS_PATH = ..\lib 9 | 10 | LDFLAGS = /LIBPATH:$(LIBS_PATH) /LIBPATH:$(MKL_LIBS_PATH) /LIBPATH:$(MPI_LIBS_PATH) x2f_mpi.lib msmpifec.lib msmpi.lib mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib libiomp5mt.lib 11 | 12 | NAME = test_sort_tools.exe 13 | 14 | # ------------- OBJECTS -------------------- 15 | 16 | include SOURCES.mk 17 | 18 | OBJS = $(FILES:.f90=.obj) 19 | 20 | # ------------- TARGETS -------------------- 21 | 22 | all: $(FILES) $(NAME) 23 | 24 | include ../build-files/build-targets.windows 25 | 26 | # ----------- DEPENDENCIES ----------------- 27 | 28 | include DEPENDS.mk 29 | -------------------------------------------------------------------------------- /ISAT/isat-ck/ci_ck_flag.f: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | ! ci_ck: subroutine ci_ckinit to call ctinit 10 | ! this version with iflag 11 | 12 | subroutine ci_ckinit( iflag, gas ) 13 | 14 | use cantera 15 | implicit none 16 | integer :: iflag 17 | type(phase_t):: gas 18 | 19 | iflag = 0 20 | call ctinit( iflag, gas ) 21 | 22 | return 23 | end subroutine ci_ckinit 24 | 25 | -------------------------------------------------------------------------------- /x2f_mpi/build-files/vars.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Mon Jan 31 2011 17:05:34 -0400 by Steve Lantz 3 | 4 | FC=ifort 5 | CC=cl 6 | 7 | #Optimize Mode Flags: 8 | FCFLAGS = /nologo /nodebug /nocheck /traceback /threads /Qlowercase /Qvec-report:0 9 | 10 | #Debug Mode Flags: 11 | #FCFLAGS = /nologo /debug:full /warn:unused /Qtrapuv /Qlowercase /Qfp-stack-check /traceback /check:pointer /check:bounds /check:uninit /libs:static /threads /dbglibs 12 | 13 | IFLAGS = /include:$(MPI_INC) /include:"..\x2f_mpi" 14 | 15 | LINK_OPS = /link /nodefaultlib:libc /INCREMENTAL:NO /SUBSYSTEM:CONSOLE /NOLOGO /stack:500000000 16 | 17 | LN = copy /Y 18 | CP = copy /Y 19 | RM = del /Q 20 | AR = lib 21 | OBJ = obj 22 | TOUCH = echo "" > 23 | MAKE = nmake -f Makefile.windows 24 | NAME = empty 25 | MPI_OBJ = null 26 | CREATE_LIBS = $(LIB_NAME).lib 27 | -------------------------------------------------------------------------------- /ISAT/build-files/build-targets.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Date: Tue, 29 Nov 2011 20:37:39 -0600 3 | 4 | $(FILES): 5 | $(LN) $(SOURCE_DIR)/$@ . 6 | 7 | %.o: %.f90 8 | $(FC) $(FCFLAGS) $(IFLAGS) -c $< 9 | 10 | %.o: %.f 11 | $(FC) $(FCFLAGS) $(IFLAGS) -c $< 12 | 13 | %.o: %.cpp 14 | $(CPP) $(CPPFLAGS) $(IFLAGS) -c $< 15 | 16 | $(LIB_NAME).so: $(OBJS) 17 | $(FC) -shared -o $@ $(OBJS) $(LDFLAGS) 18 | 19 | $(LIB_NAME).a: $(OBJS) 20 | $(AR) $@ $(OBJS) 21 | 22 | $(NAME): $(OBJS) 23 | $(FC) -o $@ $(OBJS) $(LINK_LIBS) $(LDFLAGS) $(LINK_SYS_LIBS) 24 | ifneq ($(BUILD_TYPE), debug) 25 | strip $(NAME) 26 | endif 27 | 28 | debug: clean 29 | make BUILD_TYPE=debug 30 | 31 | install-libs: 32 | cp -f $(LIB_NAME).so $(DESTDIR)/lib 33 | cp -f $(LIB_NAME).a $(DESTDIR)/lib 34 | 35 | install-programs: 36 | cp -f $(NAME) $(DESTDIR)/bin 37 | 38 | clean:: 39 | $(RM) $(CREATE_LIBS) $(NAME) $(OBJS) *.mod 40 | -------------------------------------------------------------------------------- /ISAT/isatab_mpi/isat_lu_m.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | module isat_lu_m 10 | 11 | implicit none 12 | integer, save :: lu = 60, luf = 60, lul = 99 13 | 14 | contains 15 | 16 | subroutine isat_lu_set( lufset, lulset ) 17 | 18 | integer, intent(in) :: lufset, lulset 19 | 20 | luf = lufset 21 | lul = lulset 22 | 23 | return 24 | end subroutine isat_lu_set 25 | 26 | end module isat_lu_m 27 | -------------------------------------------------------------------------------- /ISAT/isatab_ser/isat_lu_m.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | module isat_lu_m 10 | 11 | implicit none 12 | integer, save :: lu = 60, luf = 60, lul = 99 13 | 14 | contains 15 | 16 | subroutine isat_lu_set( lufset, lulset ) 17 | 18 | integer, intent(in) :: lufset, lulset 19 | 20 | luf = lufset 21 | lul = lulset 22 | 23 | return 24 | end subroutine isat_lu_set 25 | 26 | end module isat_lu_m 27 | -------------------------------------------------------------------------------- /ISAT/CEQ/ceq_norm.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | real(kind(1.d0)) function ceq_norm( n, x ) 10 | 11 | ! return the 2-norm of the double-precision n-vector x 12 | 13 | integer, intent(in) :: n 14 | real(kind(1.d0)), intent(in) :: x(n) 15 | 16 | if( n <= 0 ) then 17 | ceq_norm = 0.d0 18 | return 19 | endif 20 | 21 | ceq_norm = sqrt( sum( x(1:n) * x(1:n) ) ) 22 | 23 | return 24 | end function ceq_norm 25 | -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi/buildGraph.c: -------------------------------------------------------------------------------- 1 | #include "graphtypes.h" 2 | #include 3 | #include 4 | 5 | Graph buildGraph(ngrp,dgr,nds) 6 | int *ngrp; 7 | int *dgr, *nds; 8 | { 9 | Graph graph; 10 | int degree, adj_node, elabel, i, j; 11 | int *p2,*p3; 12 | 13 | p2 = (int *)dgr; 14 | p3 = (int *)nds; 15 | graph = NewGraph(*ngrp); 16 | /*printf("ngrp is %d\n:",*ngrp);*/ 17 | for (i=1; i<= *ngrp; ++i) 18 | { 19 | NLabel(graph,i) = 3; 20 | Xcoord(graph,i) = 0; 21 | Ycoord(graph,i) = 0; 22 | degree = *(p2++); 23 | /*printf("degree are %d\n",degree);*/ 24 | for (j=1; j<=degree; ++j) 25 | { 26 | adj_node = *(p3++); 27 | elabel = 0; 28 | /*printf("adj_node and elabel %d %d\n", adj_node,elabel);*/ 29 | { 30 | if (i 2 | # Last Modified: Tue Jan 20 09:37:26 CET 2015 3 | 4 | include ../build-files/vars.mk 5 | 6 | ISATAB_PATH=../../ISAT/isatab_ser 7 | ISATCK_PATH=../../ISAT/isat-ck 8 | 9 | IFLAGS = -I$(ISATCK_PATH) -I$(ISATAB_PATH) -I$(CANTERA_INCPATH) -I$(CANTERA_SRC) 10 | 11 | LIB_NAME = libck_ext 12 | 13 | LDFLAGS = -L$(CANTERA_LIBPATH) -lcantera_fortran -lcantera -lpthread -lstdc++ 14 | 15 | # ------------- OBJECTS -------------------- 16 | 17 | include SOURCES.mk 18 | 19 | OBJS=$(FILESf90:.f90=.$(OBJ)) $(FILESf:.f=.$(OBJ)) 20 | 21 | # ------------- TARGETS -------------------- 22 | 23 | all: $(FILES) BUILD-ISATAB BUILD-ISATCK $(CREATE_LIBS) 24 | 25 | BUILD-ISATAB: 26 | (cd $(ISATAB_PATH); $(MAKE)) 27 | touch $@ 28 | 29 | BUILD-ISATCK: 30 | (cd $(ISATCK_PATH); $(MAKE)) 31 | touch $@ 32 | 33 | include ../build-files/build-targets.mk 34 | 35 | clean:: 36 | $(RM) BUILD-ISATAB BUILD-ISATCK 37 | -------------------------------------------------------------------------------- /ISAT/ell_lib/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:26:17 -0500 3 | 4 | # List of source files to build 5 | 6 | FILESf90 = ell_aff_pr.f90 ell_bbt2chol.f90 ell_bbt2eig.f90 \ 7 | ell_chol2eig.f90 ell_chol_det.f90 ell_cov_2d.f90 \ 8 | ell_eig2chol.f90 ell_full2eig.f90 ell_full2low.f90 \ 9 | ell_house.f90 ell_line_proj.f90 ell_low2chol.f90 \ 10 | ell_pair_cover_cv.f90 ell_pair_cover_cv_ql.f90 \ 11 | ell_pair_cover.f90 ell_pair_cover_it.f90 \ 12 | ell_pair_cover_query.f90 ell_pair_cover_sph.f90 \ 13 | ell_pair_separate.f90 ell_pair_shrink.f90 ell_pt_dist.f90 \ 14 | ell_pt_hyper.f90 ell_pt_in.f90 ell_pt_modify.f90 \ 15 | ell_pt_near_far.f90 ell_pt_shrink.f90 ell_pts_uncover.f90 \ 16 | ell_radii.f90 ell_rad_lower.f90 ell_rad_upper.f90 \ 17 | ellu_bbt2chol.f90 ellu_chol2eig.f90 ellu_pt_near_far.f90 \ 18 | ellu_radii.f90 ellu_rad_upper.f90 19 | 20 | FILESf = destsv.f dgqt.f 21 | 22 | FILES = $(FILESf) $(FILESf90) 23 | 24 | -------------------------------------------------------------------------------- /ISAT/canteralib/README.txt: -------------------------------------------------------------------------------- 1 | INFORMATION 2 | =========== 3 | NAME: CTLIB 4 | DESCRIPTION: A library of gas-phase kinetics subroutines using Cantera 5 | 6 | AUTHOR: Karl-Johan Nogenmyr 7 | 8 | LICENSE: 9 | This is from the "public domain" version of Chemkin developed at 10 | Sandia. This code may be freely used within TCG. However, because of 11 | Sandia's license to Reaction Design, the code must not be 12 | redistributed. 13 | 14 | BUILD 15 | ===== 16 | 17 | PREREQUISITES 18 | ------------- 19 | 1/ ifort (intel fortran compiler, any version >= 9) compiler 20 | 2/ make (on Linux) and nmake (on windows) for building source code 21 | 22 | Linux 23 | ----- 24 | On linux, in the source directory run: 25 | $ make 26 | 27 | This would build the following libraries: 28 | 29 | 1/ libct.so -> dynamic library 30 | 2/ libct.a -> static library 31 | 32 | Windows 33 | ------- 34 | On windows, in the source directory run: 35 | $ nmake -f Makefile.windows 36 | 37 | This would build the following library: 38 | 39 | 1/ ct.lib -> static library 40 | -------------------------------------------------------------------------------- /x2f_mpi/test_sort_tools/x2f_setmethod_mock.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Cornell University ! 3 | ! COPYRIGHT: © 2012, Cornell University ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-CU.txt' file included in the x2f_mpi ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine x2f_setmethod_mock( method, info_xf, rinfo_xf ) 10 | implicit none 11 | integer, intent(in) :: method 12 | integer, intent(inout) :: info_xf(*) 13 | real(kind(1.d0)), intent(inout) :: rinfo_xf(*) 14 | 15 | if ( method==1 ) then 16 | info_xf(1) = 0 17 | rinfo_xf(1) = 0.3 18 | elseif ( method==2 ) then 19 | info_xf(1) = 0 20 | rinfo_xf(1) = 0.6 21 | elseif ( method==3 ) then 22 | info_xf(1) = 2 23 | end if 24 | 25 | end subroutine 26 | -------------------------------------------------------------------------------- /ISAT/isat-ck/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Sat, 3 Apr 2010 17:56:29 -0400 3 | 4 | include ../build-files/vars.windows 5 | 6 | CEQ_PATH=..\CEQ 7 | ISATAB_PATH=..\isatab_ser 8 | ISATCK_EXT_PATH=..\isat-ck-ext 9 | IFLAGS = /I$(ISATAB_PATH) /I$(CEQ_PATH) /I$(ISATCK_EXT_PATH) 10 | 11 | LIB_NAME = isatck 12 | 13 | # ------------- OBJECTS -------------------- 14 | 15 | include SOURCES.mk 16 | 17 | OBJS=$(FILESf90:.f90=.obj) $(FILESf:.f=.obj) 18 | 19 | # ------------- TARGETS -------------------- 20 | 21 | all: $(FILES) BUILD-CEQ BUILD-ISATAB BUILD-STREAMS-MOD $(CREATE_LIBS) 22 | 23 | BUILD-CEQ: 24 | (cd $(CEQ_PATH) & $(MAKE)) 25 | $(TOUCH) $@ 26 | 27 | BUILD-ISATAB: 28 | (cd $(ISATAB_PATH) & $(MAKE)) 29 | $(TOUCH) $@ 30 | 31 | BUILD-STREAMS-MOD: 32 | (cd $(ISATCK_EXT_PATH) & $(MAKE) STREAMS-MOD) 33 | $(TOUCH) $@ 34 | 35 | include ../build-files/build-targets.windows 36 | 37 | clean:: 38 | $(RM) BUILD-CEQ BUILD-ISATAB BUILD-STREAMS-MOD 39 | 40 | # ----------- DEPENDENCIES ----------------- 41 | 42 | include DEPENDS.mk 43 | -------------------------------------------------------------------------------- /x2f_mpi/pasr_multi/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 8 Jul 2010 17:45:21 -0400 3 | 4 | include ../build-files/vars.windows 5 | include ../build-files/PATHS.windows 6 | 7 | LIBS_PATH = ..\lib 8 | ISAT_LIBS_PATH = ..\..\ISAT\lib 9 | 10 | LDFLAGS = /LIBPATH:$(LIBS_PATH) /LIBPATH:$(ISAT_LIBS_PATH) /LIBPATH:$(MKL_LIBS_PATH) /LIBPATH:$(MPI_LIBS_PATH) isat7_mpi.lib adifor.lib ceq.lib ck.lib ell.lib ice_pic.lib isat7_mpi.lib isatab_mpi.lib isatck.lib isatck_ext.lib isat_rnu.lib sell.lib x2f_mpi.lib x2f_mpi_isat.lib msmpifec.lib msmpi.lib mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib libiomp5mt.lib 11 | 12 | NAME = pasr_multi.exe 13 | 14 | # ------------- OBJECTS -------------------- 15 | 16 | include SOURCES.mk 17 | 18 | OBJS = $(FILESf90:.f90=.obj) $(FILESf:.f=.obj) $(MPI_OBJ) 19 | 20 | # ------------- TARGETS -------------------- 21 | 22 | all: $(FILES) $(NAME) 23 | 24 | include ../build-files/build-targets.windows 25 | 26 | # ----------- DEPENDENCIES ----------------- 27 | 28 | include DEPENDS.mk 29 | -------------------------------------------------------------------------------- /ISAT/isatab_mpi/isat_prec.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | module isat_prec ! define precision to be used in isat 10 | 11 | implicit none 12 | 13 | ! the following integer parameters are defined: 14 | 15 | 16 | 17 | ! k_xf 18 | 19 | integer, parameter :: k_sp = kind(1.0) ! kind for single precision 20 | integer, parameter :: k_dp = kind(1.0d0) ! kind for double precision 21 | integer, parameter :: k_xf = k_dp ! kind for x, f, etc. in isatab 22 | integer, parameter :: k_g = k_sp ! kind for g in isatab 23 | 24 | end module isat_prec 25 | -------------------------------------------------------------------------------- /ISAT/isatab_ser/isat_prec.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | module isat_prec ! define precision to be used in isat 10 | 11 | implicit none 12 | 13 | ! the following integer parameters are defined: 14 | 15 | 16 | 17 | ! k_xf 18 | 19 | integer, parameter :: k_sp = kind(1.0) ! kind for single precision 20 | integer, parameter :: k_dp = kind(1.0d0) ! kind for double precision 21 | integer, parameter :: k_xf = k_dp ! kind for x, f, etc. in isatab 22 | integer, parameter :: k_g = k_sp ! kind for g in isatab 23 | 24 | end module isat_prec 25 | -------------------------------------------------------------------------------- /ISAT/ell_lib/ell_full2low.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ell_full2low( n, A, L ) 10 | 11 | ! Given the n x n PSD matrix L, return in L the lower 12 | ! triangle of A in packed format. 13 | 14 | implicit none 15 | integer, parameter :: k_dp = kind(1.d0) 16 | integer, intent(in) :: n 17 | real(k_dp), intent(in) :: A(n,n) 18 | real(k_dp), intent(out) :: L((n*(n+1))/2) 19 | 20 | integer :: i, j, k 21 | 22 | k = 0 23 | do j = 1, n 24 | do i = j,n 25 | k = k + 1 26 | L(k) = A(i,j) 27 | end do 28 | end do 29 | 30 | return 31 | end subroutine ell_full2low 32 | -------------------------------------------------------------------------------- /ISAT/isatab_ser/DEPENDS.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:10:24 -0500 3 | 4 | # List of dependencies 5 | 6 | isat_cdf.$(OBJ): isat_abort_ser.$(OBJ) isat_prec.$(OBJ) 7 | isat_cdf_action.$(OBJ): isat_cdf.$(OBJ) isat_types.$(OBJ) 8 | isat_change_m.$(OBJ): isat_defaults.$(OBJ) isat_subs.$(OBJ) isat_types.$(OBJ) 9 | isat_defaults.$(OBJ): isat_types.$(OBJ) 10 | isat_init.$(OBJ): isat_cdf_action.$(OBJ) isat_change_m.$(OBJ) isat_defaults.$(OBJ) isat_io.$(OBJ) \ 11 | isat_lu_m.$(OBJ) isat_subs.$(OBJ) 12 | isat_io.$(OBJ): isat_cdf.$(OBJ) isat_subs.$(OBJ) isat_types.$(OBJ) 13 | isat_kill.$(OBJ): isat_cdf.$(OBJ) isat_types.$(OBJ) 14 | isat_lu.$(OBJ): isat_abort_ser.$(OBJ) isat_lu_m.$(OBJ) 15 | isat_mpi_type.$(OBJ): isat_prec.$(OBJ) 16 | isat_rnu.$(OBJ): isat_abort_ser.$(OBJ) 17 | isat_subs.$(OBJ): isat_kill.$(OBJ) isat_rnu.$(OBJ) 18 | isat_types.$(OBJ): isat_abort_ser.$(OBJ) isat_cdf.$(OBJ) 19 | isat_val.$(OBJ): isat_abort_ser.$(OBJ) isat_rnu.$(OBJ) 20 | isatab.$(OBJ): isat_cdf.$(OBJ) isat_init.$(OBJ) isat_io.$(OBJ) isat_kill.$(OBJ) isat_prec.$(OBJ) \ 21 | isat_subs.$(OBJ) isat_val.$(OBJ) 22 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_23/ci.op: -------------------------------------------------------------------------------- 1 | 2 | ===== ISAT-CK Version: 7.0 initialization starting ====== 3 | 4 | Date (MM/DD/YEAR): 11/29/2012 Time: 15:43:31. 5 | 6 | modeci = 2 7 | 8 | CI arrays to be allocated with: nc= 1, nfull= 3, nstr= 6 9 | 10 | cinit2: CI initialized for modeci= 2 11 | 12 | f 0.0000E+00 2.0000E-01 4.0000E-01 6.0000E-01 8.0000E-01 1.0000E+00 13 | density 1.0000E+00 1.0000E+00 1.0000E+00 1.0000E+00 1.0000E+00 1.0000E+00 14 | pressure 1.0000E+00 1.0000E+00 1.0000E+00 1.0000E+00 1.0000E+00 1.0000E+00 15 | temperature 3.0000E+02 3.0000E+02 3.0000E+02 3.0000E+02 3.0000E+02 3.0000E+02 16 | 17 | full representation 18 | 19 | 1 H2 1.0000E+00 1.0000E+00 1.0000E+00 1.0000E+00 1.0000E+00 1.0000E+00 20 | 2 O2 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 21 | 3 H2O 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 22 | 23 | ====== ISAT-CK initialization completed ====== 24 | -------------------------------------------------------------------------------- /ISAT/cklib_ext_stub/README.txt: -------------------------------------------------------------------------------- 1 | INFORMATION 2 | =========== 3 | NAME: CKLIB 4 | DESCRIPTION: A library of gas-phase kinetics subroutines for the 5 | collection of codes known as CHEMKIN 6 | VERSION: 4.5 7 | AUTHOR: Sandia National Laboratories 8 | Homepage: http://www.ca.sandia.gov/chemkin/ 9 | LICENSE: 10 | This is from the "public domain" version of Chemkin developed at 11 | Sandia. This code may be freely used within TCG. However, because of 12 | Sandia's license to Reaction Design, the code must not be 13 | redistributed. 14 | 15 | BUILD 16 | ===== 17 | 18 | PREREQUISITES 19 | ------------- 20 | 1/ ifort (intel fortran compiler, any version >= 9) compiler 21 | 2/ make (on Linux) and nmake (on windows) for building source code 22 | 23 | Linux 24 | ----- 25 | On linux, in the source directory run: 26 | $ make 27 | 28 | This would build the following libraries: 29 | 30 | 1/ libck.so -> dynamic library 31 | 2/ libck.a -> static library 32 | 33 | Windows 34 | ------- 35 | On windows, in the source directory run: 36 | $ nmake -f Makefile.windows 37 | 38 | This would build the following library: 39 | 40 | 1/ ck.lib -> static library 41 | -------------------------------------------------------------------------------- /ISAT/isatab_mpi/isat_sys_unix.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | function isat_sys( command ) 10 | 11 | ! call system to execute unix command: return 0 if successful 12 | 13 | implicit none 14 | character(128), intent(in) :: command 15 | integer :: isat_sys, system 16 | 17 | isat_sys = system( command ) 18 | 19 | return 20 | end function isat_sys 21 | 22 | subroutine isat_systype( systype ) 23 | 24 | ! return system type 25 | 26 | character(6), intent(out) :: systype 27 | character(6) :: this_systype = 'UNIX ' 28 | 29 | systype = this_systype 30 | 31 | return 32 | end subroutine isat_systype 33 | -------------------------------------------------------------------------------- /ISAT/isatab_ser/isat_sys_unix.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | function isat_sys( command ) 10 | 11 | ! call system to execute unix command: return 0 if successful 12 | 13 | implicit none 14 | character(128), intent(in) :: command 15 | integer :: isat_sys, system 16 | 17 | isat_sys = system( command ) 18 | 19 | return 20 | end function isat_sys 21 | 22 | subroutine isat_systype( systype ) 23 | 24 | ! return system type 25 | 26 | character(6), intent(out) :: systype 27 | character(6) :: this_systype = 'UNIX ' 28 | 29 | systype = this_systype 30 | 31 | return 32 | end subroutine isat_systype 33 | -------------------------------------------------------------------------------- /ISAT/ice-pic/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Sat, 3 Apr 2010 18:02:59 -0400 3 | 4 | include ../build-files/vars.mk 5 | 6 | CEQ_PATH=../CEQ 7 | ISATAB_PATH=../isatab_ser 8 | ISATCK_PATH=../isat-ck 9 | ISATCK_EXT_PATH=../isat-ck-ext 10 | IFLAGS = -I$(CEQ_PATH) -I$(ISATAB_PATH) -I$(ISATCK_PATH) -I$(ISATCK_EXT_PATH) 11 | 12 | LIB_NAME = libice_pic 13 | 14 | # ------------- OBJECTS -------------------- 15 | 16 | include SOURCES.mk 17 | 18 | OBJS=$(FILESf90:.f90=.$(OBJ)) $(FILESf:.f=.$(OBJ)) 19 | 20 | # ------------- TARGETS -------------------- 21 | 22 | all: $(FILES) BUILD-CEQ BUILD-ISATAB BUILD-ISATCK BUILD-ISATCK-EXT $(CREATE_LIBS) 23 | 24 | BUILD-CEQ: 25 | (cd $(CEQ_PATH); $(MAKE)) 26 | touch $@ 27 | 28 | BUILD-ISATAB: 29 | (cd $(ISATAB_PATH); $(MAKE)) 30 | touch $@ 31 | 32 | BUILD-ISATCK: 33 | (cd $(ISATCK_PATH); $(MAKE)) 34 | touch $@ 35 | 36 | BUILD-ISATCK-EXT: 37 | (cd $(ISATCK_EXT_PATH); $(MAKE)) 38 | touch $@ 39 | 40 | include ../build-files/build-targets.mk 41 | 42 | clean:: 43 | $(RM) BUILD-CEQ BUILD-ISATAB BUILD-ISATCK BUILD-ISATCK-EXT 44 | 45 | # ----------- DEPENDENCIES ------------------ 46 | 47 | include DEPENDS.mk 48 | -------------------------------------------------------------------------------- /ISAT/ice-pic/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Sat, 3 Apr 2010 18:02:59 -0400 3 | 4 | include ../build-files/vars.windows 5 | 6 | CEQ_PATH=..\CEQ 7 | ISATAB_PATH=..\isatab_ser 8 | ISATCK_PATH=..\isat-ck 9 | ISATCK_EXT_PATH=..\isat-ck-ext 10 | IFLAGS = /I$(CEQ_PATH) /I$(ISATAB_PATH) /I$(ISATCK_PATH) /I$(ISATCK_EXT_PATH) 11 | 12 | LIB_NAME = ice_pic 13 | 14 | # ------------- OBJECTS -------------------- 15 | 16 | include SOURCES.mk 17 | 18 | OBJS=$(FILESf90:.f90=.obj) $(FILESf:.f=.obj) 19 | 20 | # ------------- TARGETS -------------------- 21 | 22 | all: $(FILES) BUILD-CEQ BUILD-ISATAB BUILD-ISATCK BUILD-ISATCK-EXT $(CREATE_LIBS) 23 | 24 | BUILD-CEQ: 25 | (cd $(CEQ_PATH) & $(MAKE)) 26 | $(TOUCH) $@ 27 | 28 | BUILD-ISATAB: 29 | (cd $(ISATAB_PATH) & $(MAKE)) 30 | $(TOUCH) $@ 31 | 32 | BUILD-ISATCK: 33 | (cd $(ISATCK_PATH) & $(MAKE)) 34 | $(TOUCH) $@ 35 | 36 | BUILD-ISATCK-EXT: 37 | (cd $(ISATCK_EXT_PATH) & $(MAKE)) 38 | $(TOUCH) $@ 39 | 40 | include ../build-files/build-targets.windows 41 | 42 | clean:: 43 | $(RM) BUILD-CEQ BUILD-ISATAB BUILD-ISATCK BUILD-ISATCK-EXT 44 | 45 | # ----------- DEPENDENCIES ------------------- 46 | 47 | include DEPENDS.mk 48 | -------------------------------------------------------------------------------- /ISAT/PaSR/usrate.f: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | !BEGEXTRACT 10 | 11 | subroutine usrate( ns, p, t, y, wdot, gas ) 12 | 13 | ! User routine to specify reaction rates. This version calls (and is 14 | ! functionally equivalent to) the Chemkin routine ckwyp. 15 | 16 | ! input: 17 | ! ns - number of species 18 | ! p - pressure (Chemkin units) 19 | ! t - temperature (K) 20 | ! y - species mass fractions 21 | ! output: 22 | ! wdot - reaction rates in molar units 23 | 24 | use cantera 25 | integer ns 26 | double precision p, t, y(ns), wdot(ns) 27 | type(phase_t) :: gas 28 | 29 | call ctwyp( p, t, y, wdot, gas ) 30 | 31 | return 32 | end 33 | !ENDEXTRACT 34 | -------------------------------------------------------------------------------- /ISAT/isat-ck/Makefile: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Sat, 3 Apr 2010 17:56:29 -0400 3 | 4 | include ../build-files/vars.mk 5 | 6 | CEQ_PATH=../CEQ 7 | ISATAB_PATH=../isatab_ser 8 | CANTERALIBPATH=../canteralib 9 | ISATCK_EXT_PATH=../isat-ck-ext 10 | 11 | IFLAGS = -I$(CEQ_PATH) -I$(ISATAB_PATH) -I$(ISATCK_EXT_PATH) -I$(CANTERALIBPATH) -I$(CANTERA_INCPATH) 12 | 13 | LDFLAGS = -L/usr/local/lib -lcantera_fortran -lcantera -lpthread -lstdc++ 14 | 15 | LIB_NAME = libisatck 16 | 17 | # ------------- OBJECTS -------------------- 18 | 19 | include SOURCES.mk 20 | 21 | OBJS=$(FILESf90:.f90=.$(OBJ)) $(FILESf:.f=.$(OBJ)) 22 | 23 | # ------------- TARGETS -------------------- 24 | 25 | all: $(FILES) BUILD-CEQ BUILD-ISATAB BUILD-STREAMS-MOD $(CREATE_LIBS) 26 | 27 | BUILD-CEQ: 28 | (cd $(CEQ_PATH); $(MAKE)) 29 | touch $@ 30 | 31 | BUILD-ISATAB: 32 | (cd $(ISATAB_PATH); $(MAKE)) 33 | touch $@ 34 | 35 | BUILD-STREAMS-MOD: 36 | (cd $(ISATCK_EXT_PATH); $(MAKE) STREAMS-MOD) 37 | touch $@ 38 | 39 | include ../build-files/build-targets.mk 40 | 41 | clean:: 42 | $(RM) BUILD-CEQ BUILD-ISATAB BUILD-STREAMS-MOD 43 | 44 | # ----------- DEPENDENCIES ----------------- 45 | 46 | include DEPENDS.mk 47 | -------------------------------------------------------------------------------- /ISAT/ell_lib/ell_chol_det.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ell_chol_det( n, g, det ) 10 | 11 | ! g contains (in packed format) the lower triangular n x n matrix G. 12 | ! The determinant of G, det, is returned. 13 | ! If G represents an ellipsoid E, then det is the inverse of the 14 | ! content (volume) of E. 15 | 16 | implicit none 17 | integer, parameter :: k_dp = kind(1.d0) 18 | integer, intent(in) :: n 19 | real(k_dp), intent(in) :: g((n*(n+1))/2) 20 | real(k_dp), intent(out) :: det 21 | 22 | integer :: j, k 23 | 24 | det = 1.d0 25 | 26 | k = 1 27 | do j = 1, n 28 | det = det * g(k) 29 | k = k + n + 1 - j 30 | end do 31 | 32 | return 33 | end subroutine ell_chol_det 34 | -------------------------------------------------------------------------------- /ISAT/isatab_mpi/DEPENDS.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 12 Nov 2009 16:14:31 -0500 3 | 4 | # List of dependencies 5 | 6 | isat_abort_mpi.$(OBJ): $(MPI_OBJ) 7 | isat_cdf.$(OBJ): isat_abort_mpi.$(OBJ) isat_prec.$(OBJ) 8 | isat_cdf_action.$(OBJ): isat_cdf.$(OBJ) isat_types.$(OBJ) 9 | isat_change_m.$(OBJ): isat_defaults.$(OBJ) isat_subs.$(OBJ) isat_types.$(OBJ) 10 | isat_defaults.$(OBJ): isat_types.$(OBJ) 11 | isat_init.$(OBJ): isat_cdf_action.$(OBJ) isat_change_m.$(OBJ) isat_defaults.$(OBJ) isat_io.$(OBJ) \ 12 | isat_lu_m.$(OBJ) isat_subs.$(OBJ) 13 | isat_io.$(OBJ): isat_cdf.$(OBJ) isat_subs.$(OBJ) isat_types.$(OBJ) 14 | isat_kill.$(OBJ): isat_cdf.$(OBJ) isat_types.$(OBJ) 15 | isat_lu.$(OBJ): isat_abort_mpi.$(OBJ) isat_lu_m.$(OBJ) 16 | isat_mpi_mpi.$(OBJ): isat_abort_mpi.$(OBJ) $(MPI_OBJ) 17 | isat_mpi_type.$(OBJ): isat_prec.$(OBJ) 18 | isat_rnu.$(OBJ): isat_abort_mpi.$(OBJ) 19 | isat_subs.$(OBJ): isat_kill.$(OBJ) isat_rnu.$(OBJ) 20 | isat_types.$(OBJ): isat_abort_mpi.$(OBJ) isat_cdf.$(OBJ) 21 | isat_val.$(OBJ): isat_abort_mpi.$(OBJ) isat_rnu.$(OBJ) 22 | isatab.$(OBJ): isat_cdf.$(OBJ) isat_init.$(OBJ) isat_io.$(OBJ) isat_kill.$(OBJ) isat_prec.$(OBJ) \ 23 | isat_subs.$(OBJ) isat_val.$(OBJ) 24 | 25 | -------------------------------------------------------------------------------- /ISAT/ell_lib/ell_low2chol.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ell_low2chol( n, l, g ) 10 | 11 | ! l contains the lower triangle L of the n x n PSD matrix A, 12 | ! in packed format. 13 | ! The Cholesky lower triangle G, A = G * G^T is returned in g 14 | ! in packed format in g. 15 | 16 | implicit none 17 | integer, parameter :: k_dp = kind(1.d0) 18 | integer, intent(in) :: n 19 | real(k_dp), intent(in) :: l((n*(n+1))/2) 20 | real(k_dp), intent(out) :: g((n*(n+1))/2) 21 | 22 | integer :: info 23 | 24 | g = l 25 | call dpptrf( 'L', n, g, info ) 26 | 27 | if( info /= 0 ) then 28 | write(0,*)'ell_low2chol: info = ', info 29 | stop 30 | endif 31 | 32 | return 33 | end subroutine ell_low2chol 34 | -------------------------------------------------------------------------------- /ISAT/CEQ/ceq_reorder.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ceq_reorder(nr,nc,x,order,y) 10 | !---------------- 11 | implicit none 12 | integer, intent(in) :: nr, nc, order(nr) 13 | real(kind(1.d0)), intent(in) :: x(nr,nc) 14 | real(kind(1.d0)), intent(out) :: y(nr,nc) 15 | !---------------- 16 | ! re-order rows of input matrix 17 | ! input: 18 | ! nr - number of rows in x 19 | ! nc - number of columns in x 20 | ! x - matrix to be re-ordered 21 | ! order - pointer: j-th row of reordered matrix is row order(j) of x 22 | ! output: 23 | ! y - reordered matrix 24 | 25 | ! S. B. Pope 5/25/02 26 | 27 | integer :: j 28 | 29 | do j=1,nr 30 | y(j,:)=x(order(j),:) 31 | end do 32 | 33 | return 34 | end subroutine ceq_reorder 35 | -------------------------------------------------------------------------------- /ISAT/isatab_mpi/isat_mpi_mpi.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine isat_mpi_rank( myrank, nprocs ) 10 | 11 | ! return rank of this process and number of processes 12 | 13 | use isat_abort_m 14 | use mpi 15 | implicit none 16 | integer, intent(out) :: myrank, nprocs 17 | 18 | logical :: flag 19 | integer :: ierr 20 | 21 | ! check that MPI has been initialized 22 | 23 | call MPI_INITIALIZED( flag, ierr ) 24 | if( .not.flag ) then 25 | write(lu_err,*)'isat_mpi_rank: MPI not initialized; flag, ierr = ', flag, ierr 26 | stop 27 | endif 28 | 29 | ! get myrank and nprocs 30 | 31 | call MPI_COMM_RANK( MPI_COMM_WORLD, myrank, ierr ) 32 | call MPI_COMM_SIZE( MPI_COMM_WORLD, nprocs, ierr ) 33 | 34 | return 35 | end subroutine isat_mpi_rank -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi_isat/x2f_setmethod.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Cornell University ! 3 | ! COPYRIGHT: © 2012, Cornell University ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-CU.txt' file included in the x2f_mpi ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine x2f_setmethod( method, info_xf, rinfo_xf ) 10 | 11 | implicit none 12 | integer, intent(in) :: method 13 | integer, intent(inout) :: info_xf(*) 14 | real(kind(1.d0)),intent(inout) :: rinfo_xf(*) 15 | 16 | integer :: info(100) 17 | real(kind(1.d0)) :: rinfo(50), stats(100) 18 | 19 | info = -12345 20 | rinfo = -12345. 21 | info(80) = 1 22 | 23 | if ( method==1 ) then 24 | !Invoke Primary Retrieve 25 | info(23) = 0 26 | info(24:27) = 1 27 | elseif ( method==2 ) then 28 | !Invoke Secondary Retrieve 29 | info(23:24) = 0 30 | info(25:27) = 1 31 | else 32 | !Invoke Direct Evaluation 33 | info(23:27) = 0 34 | end if 35 | call cisat( 1, info, rinfo, stats ) 36 | 37 | end subroutine x2f_setmethod 38 | -------------------------------------------------------------------------------- /ISAT/isatab_mpi/isat_mpi_type.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | module isat_mpi_type 10 | 11 | ! buffers and other data used in mpi message passing 12 | 13 | use isat_prec 14 | implicit none 15 | 16 | !------------------------------------------------------------------------------ 17 | type :: mpi_type 18 | integer :: comm, nprocm, kxf, pend_max, & 19 | ngsb, gsb_j, gsb_tag, nasb, asb_j, asb_tag, asb_bytes 20 | 21 | real(k_xf), pointer :: gsb(:,:), gsb_to(:), gsb_from(:), gsb_to_recd(:), & 22 | grb(:), asb_to(:), asb_from(:), asb_to_recd(:), & 23 | asb(:,:), arb(:) 24 | integer, pointer :: gsb_req(:), asb_req(:,:) 25 | end type mpi_type 26 | !------------------------------------------------------------------------------ 27 | 28 | end module isat_mpi_type 29 | -------------------------------------------------------------------------------- /ISAT/isatab_ser/isat_mpi_type.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | module isat_mpi_type 10 | 11 | ! buffers and other data used in mpi message passing 12 | 13 | use isat_prec 14 | implicit none 15 | 16 | !------------------------------------------------------------------------------ 17 | type :: mpi_type 18 | integer :: comm, nprocm, kxf, pend_max, & 19 | ngsb, gsb_j, gsb_tag, nasb, asb_j, asb_tag, asb_bytes 20 | 21 | real(k_xf), pointer :: gsb(:,:), gsb_to(:), gsb_from(:), gsb_to_recd(:), & 22 | grb(:), asb_to(:), asb_from(:), asb_to_recd(:), & 23 | asb(:,:), arb(:) 24 | integer, pointer :: gsb_req(:), asb_req(:,:) 25 | end type mpi_type 26 | !------------------------------------------------------------------------------ 27 | 28 | end module isat_mpi_type 29 | -------------------------------------------------------------------------------- /ISAT/ice-pic/SOURCES.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Last Modified: Thu, 18 Feb 2010 19:17:28 -0500 3 | 4 | # List of source files to build 5 | 6 | FILESf90 = ci_chem_one_step.f90 ci_recon.f90 ci_cem_recon.f90 \ 7 | ci_ice_facet_newton.f90 ci_ice_facet_newton_lmap.f90 \ 8 | ci_ice_recon_pic.f90 ci_ice_recon_pic_lmap.f90 \ 9 | ci_ice_pic_bound.f90 ci_ice_pic_newton.f90 \ 10 | ci_ice_pic_newton_lmap.f90 ci_ice_pic_ray.f90 \ 11 | ci_ice_pim_tan.f90 ci_linrmap.f90 ci_ice_recon_bc.f90 \ 12 | ci_ice_recon_bc_lmap.f90 ci_ice_recon.f90 ci_test_grad.f90 \ 13 | ci_test_jacobian.f90 ci_test_linrmap.f90 ci_all_errors.f90 \ 14 | ci_cem_species_sr.f90 ci_cem_species_rm.f90 \ 15 | ci_cem_species_dr.f90 ci_rzmap.f90 ci_test_rzmap.f90 \ 16 | ci_ice_species_sr.f90 ci_ice_species_rm.f90 ci_utils.f90 \ 17 | ci_dr_subs.f90 ci_test_interface.f90 ci_test_dpt.f90 \ 18 | ci_dpt_dr.f90 ci_cem_species_rm_gali.f90 \ 19 | ci_test_rxn_map.f90 ci_test_skeletal.f90 \ 20 | ci_test_detailed.f90 21 | 22 | 23 | FILESf = ci_cem_tan.f ci_ice_tan.f ci_ice_chem_map.f ci_ice_cksubs.f \ 24 | ci_ice_min_norm.f cirmap_dr_ice_pic.f cirmap_dr_rcce.f \ 25 | ddasac5.f gecp.f ci_ice_facet.f ci_8.f ci_dat8.f 26 | 27 | FILES = $(FILESf) $(FILESf90) 28 | 29 | # removed g_jacadf.f (not ported to Cantera) 30 | -------------------------------------------------------------------------------- /ISAT/ell_lib/ell_eig2chol.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ell_eig2chol( n, u, lam, g ) 10 | 11 | ! The n x n matrix A has the eigendecomposition A = u * lam^2 * u^T 12 | ! and the Cholesky decomposition A = G * G^T. Given u and lam, this 13 | ! routine returns G in packed format. 14 | 15 | ! Method: 16 | ! A = u * lam^2 * u^T = B * B^T, where B = u * lam 17 | ! B = G * Q ( LQ factorization) 18 | 19 | implicit none 20 | integer, parameter :: k_dp = kind(1.d0) 21 | integer, intent(in) :: n 22 | real(k_dp), intent(in) :: u(n,n), lam(n) 23 | real(k_dp), intent(out) :: g((n*(n+1))/2) 24 | 25 | real(k_dp) :: B(n,n) 26 | integer :: j 27 | 28 | ! form B 29 | do j = 1, n ! B = u * lam 30 | B(:,j) = u(:,j) * lam(j) 31 | end do 32 | 33 | call ell_bbt2chol( n, B, g ) 34 | 35 | return 36 | end subroutine ell_eig2chol 37 | -------------------------------------------------------------------------------- /ISAT/ell_lib/ell_full2eig.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ell_full2eig( n, A, U, lam ) 10 | 11 | ! A is an n x n PSD matrix with eigen-decomposition: 12 | ! A = U * lam^2 * U^T. This routine returns U and lam. 13 | 14 | implicit none 15 | integer, parameter :: k_dp = kind(1.d0) 16 | integer, intent(in) :: n 17 | real(k_dp), intent(in) :: a(n,n) 18 | real(k_dp), intent(out) :: u(n,n), lam(n) 19 | 20 | real(k_dp) :: vt(n,n), work(5*n*n+20*n) 21 | integer :: lwork, info, i 22 | 23 | lwork = 5*n*n+20*n 24 | 25 | vt = a 26 | call dgesvd( 'A', 'N', n, n, vt, n, lam, u, n, vt, n, work, lwork, info) 27 | 28 | if( info /= 0 ) then 29 | write(0,*)'ell_full2eig: info, lwork, work(1) = ', info, lwork, work(1) 30 | stop 31 | endif 32 | 33 | do i = 1, n 34 | lam(i) = sqrt( lam(i) ) 35 | end do 36 | 37 | return 38 | end subroutine ell_full2eig 39 | -------------------------------------------------------------------------------- /x2f_mpi/test_sort_tools/x2f_cirxn_mock.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Cornell University ! 3 | ! COPYRIGHT: © 2012, Cornell University ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-CU.txt' file included in the x2f_mpi ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | 10 | subroutine x2f_cirxn_mock( ldxf, nx, x, f, k_pos, info_xf, rinfo_xf ) 11 | 12 | implicit none 13 | integer, intent(in) :: nx, ldxf, k_pos, info_xf(*) 14 | real(kind(1.d0)), intent(in) :: x(nx), rinfo_xf(*) 15 | real(kind(1.d0)), intent(inout) :: f(ldxf) 16 | 17 | real :: temp 18 | 19 | f = 0.0 20 | if ( info_xf(1)==1 ) then 21 | return 22 | elseif ( info_xf(1)==2 ) then 23 | f(2) = x(1) 24 | f(1) = x(2) 25 | if ( ldxf>=3 ) f(3:ldxf) = x(1) + 1.0 26 | elseif ( info_xf(1)==0 ) then 27 | call random_number( temp ) 28 | if ( temp=3 ) f(3:ldxf) = x(1) + 1.0 32 | else 33 | f(1:nx) = x(1:nx) 34 | f(k_pos) = -x(k_pos) 35 | end if 36 | end if 37 | 38 | end subroutine 39 | 40 | -------------------------------------------------------------------------------- /ISAT/ell_lib/ell_bbt2eig.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ell_bbt2eig( n, B, U, lam ) 10 | 11 | ! The n x n PSD matrix A is given by A = B * B^T. 12 | ! The SVD of B is: B = U * S * V^T, so that the 13 | ! eigendecomposition of A is: A = U * S^2 * U^T. 14 | ! Given B, return U and lam=diag(S). 15 | 16 | implicit none 17 | integer, parameter :: k_dp = kind(1.d0) 18 | integer, intent(in) :: n 19 | real(k_dp), intent(in) :: B(n,n) 20 | real(k_dp), intent(out) :: U(n,n), lam(n) 21 | 22 | 23 | real(k_dp) :: vt(n,n), work(5*n*n+20*n) 24 | integer :: lwork, info 25 | 26 | lwork = 5*n*n+20*n 27 | 28 | vt = B 29 | call dgesvd( 'A', 'N', n, n, vt, n, lam, u, n, vt, n, work, lwork, info) 30 | 31 | if( info /= 0 ) then 32 | write(0,*)'ell_bbt2eig: info, lwork, work(1) = ', info, lwork, work(1) 33 | stop 34 | endif 35 | 36 | return 37 | end subroutine ell_bbt2eig 38 | 39 | -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi/x2f_check_atmpts.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Cornell University ! 3 | ! COPYRIGHT: © 2012, Cornell University ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-CU.txt' file included in the x2f_mpi ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine x2f_check_atmpts(gat,n_spec1,info,igat,nproc) 10 | ! 11 | ! Check to see if the number of attempts is valid or not! 12 | ! 13 | integer, intent(in) :: gat, n_spec1, info(gat,n_spec1), igat, nproc 14 | 15 | integer :: nolocal, npref, i 16 | 17 | npref = 0 18 | do i = igat, gat 19 | if ( info(i,2)==4 ) then 20 | nolocal = info(igat,3) 21 | if ( npref==0 ) then 22 | npref = npref + 1 23 | elseif ( npref>0.and.info(i,6)==0.and.info(i-1,2)==4 ) then 24 | npref = npref + 1 25 | else 26 | Exit 27 | end if 28 | end if 29 | end do 30 | if ( (nolocal==0.and.npref>nproc).or.(nolocal==1.and.npref>nproc-1) ) then 31 | print *, 'npref & nproc:', npref, nproc 32 | stop 'Err: The number of PREF attempts is larger than processor involved!' 33 | end if 34 | 35 | end subroutine x2f_check_atmpts 36 | 37 | 38 | -------------------------------------------------------------------------------- /ISAT/ell_lib/ellu_chol2eig.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ellu_chol2eig( n, g, u, lam ) 10 | 11 | ! g contains the lower Cholesky factor G of the 12 | ! n x n PSD matrix A = G * G^T. The eigen-decomposition of A is: 13 | ! A = u * lam^2 * u^T. This routine returns u and lam (which are U 14 | ! and S in the SVD of G = U S V^T). 15 | 16 | implicit none 17 | integer, parameter :: k_dp = kind(1.d0) 18 | integer, intent(in) :: n 19 | real(k_dp), intent(in) :: g(n,n) 20 | real(k_dp), intent(out) :: u(n,n), lam(n) 21 | 22 | real(k_dp) :: vt(n,n), work(10*n*n+20*n) 23 | integer :: lwork, info 24 | 25 | lwork = 10*n*n+20*n 26 | 27 | ! copy g into vt 28 | 29 | vt = g 30 | 31 | call dgesvd( 'A', 'N', n, n, vt, n, lam, u, n, vt, n, work, lwork, info) 32 | 33 | if( info /= 0 ) then 34 | write(0,*)'ellu_chol2eig: info, lwork, work(1) = ', info, lwork, work(1) 35 | stop 36 | endif 37 | 38 | return 39 | end subroutine ellu_chol2eig 40 | -------------------------------------------------------------------------------- /x2f_mpi/pasr_multi/usrate.f: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Cornell University ! 3 | ! COPYRIGHT: © 2012, Cornell University ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-CU.txt' file included in the x2f_mpi ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | !BEGEXTRACT 10 | 11 | subroutine usrate( ns, p, t, y, liwk, lrwk, 12 | 1 ickwrk, rckwrk, wdot ) 13 | 14 | ! User routine to specify reaction rates. This version calls (and is 15 | ! functionally equivalent to) the Chemkin routine ckwyp. 16 | 17 | ! input: 18 | ! ns - number of species 19 | ! p - pressure (Chemkin units) 20 | ! t - temperature (K) 21 | ! y - species mass fractions 22 | ! liwk - dimension for Chemkin integer array ickwrk 23 | ! lrwk - dimension for Chemkin double-precision array rckwrk 24 | ! ickwrk - Chemkin integer array 25 | ! rckwrk - Chemkin double-precision array 26 | ! output: 27 | ! wdot - reaction rates in molar units 28 | 29 | integer ns, liwk, lrwk, ickwrk(liwk) 30 | double precision p, t, y(ns), rckwrk(lrwk), wdot(ns) 31 | 32 | call ckwyp( p, t, y, ickwrk, rckwrk, wdot ) 33 | 34 | return 35 | end 36 | !ENDEXTRACT 37 | -------------------------------------------------------------------------------- /ISAT/ell_lib/ell_house.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ell_house( n, x, v, beta ) 10 | 11 | ! Determine a Householder vector v based on x. 12 | ! The orthogonal matrix P = I - beta * v * v^T has the 13 | ! property: Px = |x| * e_1. 14 | 15 | ! From Golub & Van Loan Algorithm 5.1.1 16 | 17 | integer, intent(in) :: n 18 | real(kind(1.d0)), intent(in) :: x(n) 19 | real(kind(1.d0)), intent(out) :: v(n), beta 20 | 21 | real(kind(1.d0)) :: sigma, mu 22 | 23 | v = 0.d0 24 | beta = 0.d0 25 | if( n <= 1 ) return 26 | 27 | sigma = sum( x(2:n)*x(2:n) ) 28 | v(1) = 1.d0 29 | v(2:n) = x(2:n) 30 | 31 | if( sigma == 0.d0 ) then 32 | beta = 0.d0 33 | else 34 | mu = sqrt( x(1)**2 + sigma ) 35 | if( x(1) < 0.d0 ) then 36 | v(1) = x(1) - mu 37 | else 38 | v(1) = -sigma / ( x(1) + mu ) 39 | endif 40 | 41 | beta = 2.*v(1)**2 / (sigma+v(1)**2) 42 | v = v / v(1) 43 | endif 44 | 45 | return 46 | 47 | end subroutine ell_house 48 | -------------------------------------------------------------------------------- /ISAT/isatab_ser/isat_mpi_ser.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | ! This file contains dummy MPI routine for use with serial computations 10 | 11 | subroutine isat_mpi_rank( myrank, nprocs ) 12 | 13 | ! return rank of this process and number of processes 14 | 15 | implicit none 16 | integer, intent(out) :: myrank, nprocs 17 | 18 | myrank = 0 19 | nprocs = 1 20 | 21 | return 22 | 23 | end subroutine isat_mpi_rank !------------------- 24 | 25 | subroutine mpi_initialized( flag, ierr ) 26 | 27 | implicit none 28 | logical, intent(out) :: flag 29 | integer, intent(out) :: ierr 30 | 31 | flag = .false. ! MPI not initialized 32 | ierr = 0 33 | 34 | return 35 | end subroutine mpi_initialized !----------------- 36 | 37 | subroutine mpi_abort( i, j, k ) 38 | ! This should not be called 39 | implicit none 40 | integer :: i, j, k 41 | 42 | write(0,*)'mpi_abort called in serial run: stopping' 43 | stop 44 | 45 | end subroutine mpi_abort -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi_isat/x2f_mpi_grpdata.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Cornell University ! 3 | ! COPYRIGHT: © 2012, Cornell University ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-CU.txt' file included in the x2f_mpi ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | module x2f_mpi_grpdata 10 | ! 11 | ! 12 | ! Store the important datas used in adaptive strategies: 13 | ! grp_index - indicate which group the processor belongs to 14 | ! g - number of processors in each group 15 | ! ng - number of groups in each partition 16 | ! pt_index - indicate which partition the processor belongs to 17 | ! mpicomm_pt - the communicator used within partition 18 | ! intracomm - the communicator used within group 19 | ! ips - the i-th pairing stage 20 | ! mps - total number of pairing stage 21 | ! pairstg - pairing stage or not 22 | ! 23 | implicit none 24 | integer, save :: grp_index, g, ng, pt_index, mpicomm_pt 25 | integer, save :: intracomm, intercomm, ips, mps, rank, set_pt 26 | real, save :: t_C 27 | logical, save :: pairstg 28 | logical, save :: impinit = .false., pairinit = .false. 29 | end module x2f_mpi_grpdata 30 | -------------------------------------------------------------------------------- /x2f_mpi/build-files/vars.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Date: Tue, 29 Nov 2011 20:21:26 -0600 3 | 4 | # intel compiler is used for building, ensure that intel module is loaded: 5 | # -> Lonestar: module load mkl (intel module is loaded by default) 6 | # -> Kraken: module load PrgEnv-intel 7 | # Ranger use 'mpif90' wrapper; and on Kraken use 'ftn' 8 | 9 | CC = icc 10 | FC = ifort 11 | ifeq ($(shell which mpif90 &> /dev/null; echo $$?), 0) 12 | FC = mpif90 13 | LINK_SYS_LIBS = -Bdynamic 14 | endif 15 | ifeq ($(shell which ftn &> /dev/null; echo $$?), 0) 16 | FC = ftn 17 | LINK_SYS_LIBS = -Bstatic 18 | endif 19 | 20 | LINK_LIBS = -Bstatic 21 | # set mkl library path 22 | #ifndef TACC_MKL_LIB 23 | # TACC_MKL_LIB = $(INTEL_PATH)/$(INTEL_MAJOR_VERSION)/$(INTEL_MINOR_VERSION)/mkl/lib/em64t/ 24 | #endif 25 | 26 | # some compilations require ISAT modules 27 | ISAT_MODS_PATH = ../../ISAT/isatab_mpi 28 | 29 | # set mkl libraries for linking 30 | MKL_LIBS = -mkl 31 | #MKL_LIBS = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lguide 32 | 33 | # set debug/optimize modes 34 | ifeq ($(BUILD_TYPE), debug) 35 | FCFLAGS = -fp-stack-check -traceback -g -debug all -debug-parameters all -fPIC -vec-report0 -DDEBUG -D_DEBUG -I$(ISAT_MODS_PATH) 36 | else 37 | FCFLAGS = -O2 -fPIC -vec-report0 -I$(ISAT_MODS_PATH) 38 | endif 39 | CCFLAGS = -O2 -fPIC -vec-report0 -w 40 | 41 | LN = ln -s 42 | CP = cp 43 | RM = rm -f 44 | RMDIR = rm -rf 45 | AR = ar crs 46 | OBJ = o 47 | MAKE=make BUILD_TYPE=$(BUILD_TYPE) 48 | CREATE_LIBS = $(LIB_NAME).a $(LIB_NAME).so 49 | -------------------------------------------------------------------------------- /ISAT/CEQ/ceq_lss.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ceq_lss(nb,nx,A,b,x,info) 10 | 11 | !------------- 12 | implicit none 13 | integer, intent(in) :: nb, nx 14 | real(kind(1.d0)), intent(in) :: A(nb,nx), b(nb) 15 | real(kind(1.d0)), intent(out) :: x(nx) 16 | integer, intent(out) :: info 17 | !-------------- 18 | 19 | ! Determine the least-squares/minimum-norm solution x to 20 | ! the linear equation A x = b. 21 | ! 22 | ! Input: 23 | ! nb - number of rows in b 24 | ! nx - number of rows in A and x 25 | ! A - the nb x nx matrix A 26 | ! b - the nb-vector b 27 | ! Output: 28 | ! x - the solution nx-vector 29 | ! info=0 for successful solution 30 | 31 | ! S.B. Pope 10/2/02 32 | 33 | integer :: lwork, rank 34 | real(kind(1.d0)) :: tol=1.d-9, aa(nb,nx), bb(nb+nx), sv(nb+nx), & 35 | work( 4*(nb+nx+1)*(nb+nx+1) ) 36 | 37 | lwork= size(work) 38 | aa=A 39 | bb=0.d0 40 | bb(1:nb)=b 41 | 42 | call dgelss(nb,nx,1,aa(1:nb,1:nx),nb,bb(1:nb+nx),nb+nx,sv(1:nb+nx), & 43 | tol,rank,work(1:lwork),lwork,info) 44 | x=bb(1:nx) 45 | 46 | end subroutine ceq_lss -------------------------------------------------------------------------------- /ISAT/canteralib/canteraaccess.cpp: -------------------------------------------------------------------------------- 1 | #include "thermo/ThermoFactory.h" 2 | #include "base/config.h" 3 | #include "clib/Cabinet.h" 4 | 5 | using namespace Cantera; 6 | 7 | typedef Cabinet ThermoCabinet; 8 | typedef integer status_t; 9 | 10 | /* 11 | std::string f2string_loc(const char* s, ftnlen n) 12 | { 13 | int k; 14 | std::string ss = ""; 15 | for (k = 0; k < n; k++) { 16 | if (s[k] == '\0') { 17 | break; 18 | } 19 | ss += s[k]; 20 | } 21 | return ss; 22 | } 23 | */ 24 | 25 | inline ThermoPhase* _fph(const integer* n) 26 | { 27 | return &ThermoCabinet::item(*n); 28 | } 29 | 30 | extern "C" { 31 | integer nasadata_( 32 | const integer* n, 33 | double* thermo_ns 34 | ) 35 | { 36 | try { 37 | int type, k, id, tid; 38 | doublereal c[15]; 39 | doublereal minTemp, maxTemp, refPressure; 40 | int nsp = _fph(n)->nSpecies(); 41 | SpeciesThermo& sp = _fph(n)->speciesThermo(); 42 | 43 | for (k = 0; k < nsp; k++) { 44 | // get the NASA coefficients in array c 45 | sp.reportParams(k, type, c, minTemp, maxTemp, refPressure); 46 | // if (type != NASA) stop! 47 | for (id=0; id<15; id++){ 48 | tid = k+id*nsp; 49 | thermo_ns[tid]=c[id]; 50 | } 51 | } 52 | return 0; 53 | } catch (...) { 54 | return handleAllExceptions(-1, ERR); 55 | } 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /ISAT/ell_lib/ell_pt_near_far.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ell_pt_near_far( knf, n, c, gg, p, xnf ) 10 | 11 | ! Determine the point xnf in the specified ellipsoid E that is 12 | ! closest (for knf=1) or furthest (for knf=2) from the specified point p. 13 | ! The ellipsoid E is given by: 14 | ! { x | norm(G^T * (x-c) ) <=1 ), where G is an n x n lower triangular 15 | ! matrix. The array gg contains the matrix G in packed format. 16 | 17 | ! See ellu_pt_near_far for details 18 | 19 | ! S.B. Pope 12/1/2006 20 | 21 | implicit none 22 | 23 | integer, parameter :: k_dp = kind(1.d0) 24 | integer, intent(in) :: knf, n 25 | real(k_dp), intent(in) :: c(n), gg((n*(n+1))/2), p(n) 26 | real(k_dp), intent(out) :: xnf(n) 27 | 28 | integer :: i, j, k 29 | real(k_dp) :: g(n,n) 30 | 31 | ! unpack gg into g 32 | k = 0 33 | g = 0.d0 34 | do j = 1, n 35 | do i = j, n 36 | k = k + 1 37 | g(i,j) = gg(k) 38 | end do 39 | end do 40 | 41 | call ellu_pt_near_far( knf, n, c, g, p, xnf ) 42 | 43 | return 44 | end subroutine ell_pt_near_far 45 | -------------------------------------------------------------------------------- /ISAT/LICENSE-CU.txt: -------------------------------------------------------------------------------- 1 | Copyright © 2012, Cornell University 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | 3. Neither the name of the Cornell University nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /x2f_mpi/LICENSE-CU.txt: -------------------------------------------------------------------------------- 1 | Copyright © 2012, Cornell University 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | 3. Neither the name of the Cornell University nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /ISAT/CEQ/ceq_ming.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ceq_ming(nz,nc,B,c,g,zg,iret) 10 | !-------------------- 11 | implicit none 12 | integer, intent(in) :: nz, nc 13 | real(kind(1.d0)), intent(in) :: B(nz,nc), c(nc), g(nz) 14 | integer, intent(out) :: iret 15 | real(kind(1.d0)), intent(out) :: zg(nz) 16 | !-------------------- 17 | ! return zg, the value of z which minimizes g'z, 18 | ! subject to B'*z=c, z(i)>=0. 19 | ! Exit flag from linprog: iret<=0 for failure. 20 | 21 | ! S.B. Pope 10/1/02 22 | 23 | integer :: i, iftest 24 | real(kind(1.d0)) :: BT(nc,nz), errc(nc), errmax, gmin 25 | 26 | BT=transpose(B) 27 | call ceq_linprog(nz,nc,g,BT,c,zg,iret) 28 | 29 | do i=1,nz ! guard against small negative values due to round-off 30 | zg(i)=max(zg(i),0.d0) 31 | end do 32 | 33 | iftest=0 ! for testing only 34 | if( iftest == 0 ) return 35 | ! test satisfaction of constraints and value of g'z 36 | errc=matmul(zg,B)-c 37 | errmax=max( maxval(errc), -minval(errc) ) 38 | gmin=dot_product(zg,g) 39 | write(0,*)'ceq_ming: iret, errmax, gmin = ', iret, errmax, gmin 40 | 41 | return 42 | end subroutine ceq_ming -------------------------------------------------------------------------------- /ISAT/CEQ/ceq_input.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ceq_input(ns,ne,nth,nsamp,ndi,Ein,thermo,DI) 10 | 11 | ! Read in data 12 | !---------------- 13 | implicit none 14 | integer, intent(in) :: ns,ne,nth,nsamp,ndi 15 | real(kind(1.d0)), intent(out) :: Ein(ns,ne), thermo(ns,nth), DI(nsamp,ndi) 16 | !----------------- 17 | integer :: i 18 | 19 | open( 10, file='element.txt') 20 | do i=1,ns 21 | read(10,*,err=100,end=101)Ein(i,:) 22 | end do 23 | close(10) 24 | 25 | open( 10, file='ck_thermo.txt') 26 | do i=1,ns 27 | read(10,*,err=102,end=103)thermo(i,:) 28 | end do 29 | close(10) 30 | 31 | open( 10, file='pasrp.op') 32 | do i=1,nsamp 33 | read(10,*,err=104,end=105)DI(i,:) 34 | end do 35 | close(10) 36 | 37 | return 38 | 39 | 100 write(0,*)'Error reading element.txt' 40 | return 41 | 102 write(0,*)'Error reading ck_thermo.txt' 42 | return 43 | 104 write(0,*)'Error reading pasrp.op' 44 | return 45 | 46 | 101 write(0,*)'Hit end reading element.txt' 47 | return 48 | 103 write(0,*)'Hit end reading ck_thermo.txt' 49 | return 50 | 105 write(0,*)'Hit end reading pasrp.op' 51 | return 52 | 53 | end subroutine ceq_input -------------------------------------------------------------------------------- /ISAT/ice-pic/ci_recon.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Cornell University ! 3 | ! COPYRIGHT: © 2012, Cornell University ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-CU.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ci_recon( rin, press, hin, z_DR, T_DR ) 10 | ! routine to perform species reconstruction for modes 8 and 9 11 | 12 | use ci_8 13 | use ci_dat8 14 | use ci_cem_recon 15 | implicit none 16 | 17 | real(k_dp), intent(in) :: rin(nrc), press, hin 18 | real(k_dp), intent(out):: z_DR(ns), T_DR 19 | 20 | ! local variables 21 | integer :: info, lu, k_facet, n_iters, n_integs, method 22 | real(k_dp) :: r_e(nrc), r_g(nrc), z_e_CE(ns), z_g(ns), tau_ICE, stats(20) 23 | real(k_dp) :: A_ICE_ODE(ns+1, ns+1), r_normal(nrc), T_e_ICE, T_g 24 | 25 | if( modeci == 8 ) then 26 | call ci_ceq( 0, rin, hin, press, .false., z_DR, T_DR, & 27 | z_DR, T_DR, stats, info, lu ) 28 | elseif( modeci == 9 ) then 29 | call ci_ice_recon( rin, hin, press, z_e_CE, r_g, z_g, T_g, tau_ICE, & 30 | r_e, z_DR, T_DR, A_ICE_ODE, r_normal, k_facet, & 31 | n_iters, n_integs, method, info ) 32 | else 33 | call isat_abort( 'ci_recon', 1, mess = 'bad modeci = ', isv=modeci ) 34 | endif 35 | return 36 | 37 | end subroutine ci_recon 38 | -------------------------------------------------------------------------------- /ISAT/CEQ/ceq_cp.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ceq_cp(ns,T,thermo,cpor) 10 | !------------- 11 | implicit none 12 | integer, parameter :: ncof=7 13 | integer, intent(in) :: ns 14 | real(kind(1.d0)), intent(in) :: T, thermo(ns,2*ncof+1) 15 | real(kind(1.d0)), intent(out) :: cpor(ns) 16 | !------------- 17 | 18 | ! return normalized Cp's at temperature T 19 | ! input: 20 | ! ns - number of species 21 | ! T - temperature (K) 22 | ! thermo - thermo data for all species 23 | ! output: 24 | ! cpor - Cp_j/R - normalized constant-pressure specific heats 25 | 26 | ! S. B. Pope 9/26/02 27 | 28 | real(kind(1.d0)) :: tc(5) 29 | integer :: k, n 30 | 31 | cpor=0.d0 32 | 33 | 34 | tc(1)=1.d0 ! coefficient multipliers for specific heats 35 | do n=2,5 36 | tc(n)=T*tc(n-1) ! =T.^(n-1) 37 | end do 38 | 39 | do k=1,ns 40 | if( T < thermo(k,1) ) then 41 | cpor(k)=dot_product(thermo(k,2:6), tc) ! coefficients in lower temperature range 42 | else 43 | cpor(k)=dot_product(thermo(k,9:13), tc) ! coefficients in upper temperature range 44 | endif 45 | end do 46 | 47 | end subroutine ceq_cp -------------------------------------------------------------------------------- /ISAT/ell_lib/ellu_bbt2chol.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ellu_bbt2chol( n, B, G ) 10 | 11 | ! Given an n x n matrix B, compute the lower 12 | ! Cholesky triangle G: G * G^T = B * B^T 13 | 14 | ! The Cholesky triangle G is returned in full format. 15 | 16 | ! Method: B = L * Q; so that B * B^T = L * L^T; and so G = L. 17 | ! Note: the upper triangle of G is NOT set to zero. 18 | 19 | implicit none 20 | integer, parameter :: k_dp = kind(1.d0) 21 | integer, intent(in) :: n 22 | real(k_dp), intent(in) :: B(n,n) 23 | real(k_dp), intent(out) :: G(n,n) 24 | 25 | integer :: j, info, lwork 26 | real(k_dp) :: tau(n), work(10+n*(10+n)) 27 | 28 | ! perform LQ factorization: B = G*Q 29 | lwork = 10+n*(10+n) 30 | G = B 31 | call dgelqf( n, n, G, n, tau, work, lwork, info ) 32 | 33 | if( info /=0 ) then 34 | write(0,*)'ell_bbt2cholf: dgelqf failed, info = ', info 35 | stop 36 | endif 37 | 38 | ! ensure that diagonal elements are non-negative 39 | do j = 1, n 40 | if( G(j,j) < 0.d0 ) G(j:n,j) = -G(j:n,j) 41 | end do 42 | 43 | return 44 | end subroutine ellu_bbt2chol 45 | -------------------------------------------------------------------------------- /ISAT/LICENSE-ICE.txt: -------------------------------------------------------------------------------- 1 | Copyright © 2012, Ithaca Combustion Enterprise, LLC 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | 3. Neither the name of the Ithaca Combustion Enterprise, LLC nor the 16 | names of its contributors may be used to endorse or promote products 17 | derived from this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi/graphtypes.h: -------------------------------------------------------------------------------- 1 | #define INF 100000000 2 | #define NULL 0 3 | 4 | struct node_entry { 5 | int degree; 6 | int label; 7 | int x; 8 | int y; 9 | struct edge_ent *adj_list; 10 | }; 11 | typedef struct node_entry *Graph; 12 | 13 | struct edge_ent { 14 | int endpoint; 15 | int label; 16 | int label2; 17 | struct edge_ent *nextedge; 18 | struct edge_ent *prevedge; 19 | struct edge_ent *otheredge; 20 | }; 21 | typedef struct edge_ent *Edge; 22 | 23 | extern Graph ReadGraph(),NewGraph(),CopyGraph(); 24 | extern int RemoveEdge(),NumEdges(); 25 | extern Edge FindEdge(); 26 | 27 | #define Degree(graph,n) (graph[n].degree) 28 | #define NLabel(graph,n) (graph[n].label) 29 | #define Xcoord(graph,n) (graph[n].x) 30 | #define Ycoord(graph,n) (graph[n].y) 31 | #define FirstEdge(graph,n) (graph[n].adj_list) 32 | 33 | #define EndPoint(e) (e->endpoint) 34 | #define ELabel(e) (e->label) 35 | #define ELabel2(e) (e->label2) 36 | #define Other(e) (e->otheredge) 37 | #define NextEdge(e) (e->nextedge) 38 | 39 | 40 | extern Graph Prim(); 41 | extern int *EulerTraverse(),*Match(),*Weighted_Match(),*Dijkstra(),*Concomp(); 42 | 43 | /* Euclidean graph type */ 44 | typedef int (*EuclidGraph)[2]; 45 | 46 | extern Graph EuclidPrim(); 47 | extern EuclidGraph ReadEuclid(),NewEuclid(); 48 | extern int eucdist(),eucdistsq(); 49 | 50 | extern int *CvxHull(); 51 | 52 | /* Distance matrix graph type */ 53 | typedef int *MatrixGraph; 54 | 55 | extern int *MatrixDijkstra(); 56 | extern Graph MatrixPrim(); 57 | extern Graph MatrixMaxFlow(); 58 | extern MatrixGraph ReadMatrix(), NewMatrix(); 59 | 60 | -------------------------------------------------------------------------------- /ISAT/ell_lib/ell_chol2eig.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ell_chol2eig( n, g, u, lam ) 10 | 11 | ! g contains (in packed format) the lower Cholesky factor G of the 12 | ! n x n PSD matrix A = G * G^T. The eigen-decomposition of A is: 13 | ! A = u * lam^2 * u^T. This routine returns u and lam (which are U 14 | ! and S in the SVD of G = U S V^T). 15 | 16 | implicit none 17 | integer, parameter :: k_dp = kind(1.d0) 18 | integer, intent(in) :: n 19 | real(k_dp), intent(in) :: g((n*(n+1))/2) 20 | real(k_dp), intent(out) :: u(n,n), lam(n) 21 | 22 | real(k_dp) :: vt(n,n), work(10*n*n+20*n) 23 | integer :: lwork, info, i, j, k 24 | 25 | lwork = 10*n*n+20*n 26 | 27 | ! unpack g into vt 28 | 29 | vt = 0.d0 30 | k = 0 31 | do j = 1, n 32 | do i = j, n 33 | k = k + 1 34 | vt(i,j) = g(k) 35 | end do 36 | end do 37 | 38 | call dgesvd( 'A', 'N', n, n, vt, n, lam, u, n, vt, n, work, lwork, info) 39 | 40 | if( info /= 0 ) then 41 | write(0,*)'ell_chol2eig: info, lwork, work(1) = ', info, lwork, work(1) 42 | stop 43 | endif 44 | 45 | return 46 | end subroutine ell_chol2eig 47 | -------------------------------------------------------------------------------- /ISAT/CEQ/ceq_h.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ceq_h(ns,T,thermo,hort) 10 | !---------------- 11 | implicit none 12 | integer, parameter :: ncof=7 13 | integer, intent(in) :: ns 14 | real(kind(1.d0)), intent(in) :: T, thermo(ns,2*ncof+1) 15 | real(kind(1.d0)), intent(out) :: hort(ns) 16 | !------------- 17 | ! return normalized enthalpies at temperature T 18 | ! input: 19 | ! ns - number of species 20 | ! T - temperature (K) 21 | ! thermo - thermo data for all species 22 | ! output: 23 | ! hort - h_j/(RT) - normalized enthalpies 24 | 25 | ! S. B. Pope 9/26/02 26 | 27 | real(kind(1.d0)) :: th(6), Tpnm1 28 | integer :: k, n 29 | 30 | th(1)=1.d0 ! coefficient multipliers for enthalpy 31 | th(6)=1./T 32 | Tpnm1=1.d0 33 | do n=2,5 34 | Tpnm1=Tpnm1*T ! =T.^(n-1) 35 | th(n)=Tpnm1/float(n) ! =T.^(n-1) ./ n 36 | end do 37 | 38 | do k=1,ns 39 | if( Tn_uneval ) np = n_uneval 35 | call MPI_Allreduce( nb, nbmax, 1, MPI_INTEGER, MPI_MAX, mpicomm, ierr ) 36 | 37 | end subroutine ISAT_MP_bksize -------------------------------------------------------------------------------- /ISAT/build-files/vars.mk.bak: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Date: Thu, 29 Nov 2012 14:39:20 -0600 3 | 4 | # intel compiler is used for building, ensure intel and mkl modules are loaded: 5 | # -> Lonestar (intel is default): module load mkl 6 | # -> Kraken: module load PrgEnv-intel 7 | # Ranger use 'mpif90' wrapper; and on Kraken use 'ftn' 8 | 9 | FC = ifort 10 | 11 | ifeq ($(shell which mpif90 &> /dev/null; echo $$?), 0) 12 | FC = mpif90 13 | LINK_SYS_LIBS = -Bdynamic 14 | endif 15 | ifeq ($(shell which ftn &> /dev/null; echo $$?), 0) 16 | FC = ftn 17 | LINK_SYS_LIBS = -Bstatic 18 | endif 19 | 20 | # set debug/optimize modes 21 | ifeq ($(BUILD_TYPE), debug) 22 | FCFLAGS = -fp-stack-check -traceback -g -debug all -debug-parameters all -fPIC -vec-report0 -DDEBUG -D_DEBUG 23 | else 24 | FCFLAGS = -O2 -fPIC -vec-report0 25 | endif 26 | 27 | LINK_LIBS = -Bstatic 28 | 29 | # for Intel 11.1 with MKL 10.2, linking to MKL requires just one option: 30 | 31 | MKL_LIST = -mkl 32 | 33 | # the -mkl option is equivalent to the following set of flags to ifort: 34 | #MKL_LIST = -L${TACC_MKL_LIB} -lmkl_solver_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 35 | # (Ref.: software.intel.com/en-us/articles/using-mkl-in-intel-compiler-mkl-qmkl-options) 36 | # if -mkl doesn't work on your cluster, uncomment the above line, replacing 37 | # ${TACC_MKL_LIB} with the appropriate MKL path for your cluster 38 | # ...alternatively, uncomment the following line to use the hand-built lapack: 39 | #MKL_LIST = -llapack 40 | 41 | LN = ln -s 42 | CP = cp 43 | RM = rm -f 44 | RMDIR = rm -rf 45 | AR = ar crs 46 | OBJ = o 47 | MAKE=make BUILD_TYPE=$(BUILD_TYPE) 48 | CREATE_LIBS = $(LIB_NAME).a $(LIB_NAME).so 49 | -------------------------------------------------------------------------------- /ISAT/cklib_ext_stub/temphz_stub.f90: -------------------------------------------------------------------------------- 1 | subroutine temphz( h, zi, T, check, info ) 2 | 3 | ! routine to determine temperature, given enthalpy and specific moles 4 | 5 | ! input: 6 | ! h - specific enthalpy of gas mixture (Chemkin/CI units) 7 | ! zi - species specific moles 8 | ! check = 1 - In case T is out of range, return with T force-set to tbadlo or tbadhi 9 | ! = 0 - In case T is out of range, quit ISAT 10 | ! output: 11 | ! T - temperature (K) 12 | ! info = 0 - temperature found within range (tbadlo < T <= tbadhi) 13 | ! = 1 - T > tbadhi, t set to tbadhi 14 | ! = -1 - T <= tbadlo, t set to tbadlo 15 | 16 | ! Full version of September 2010 includes pre-processing to accelerate calculations of h and cp. 17 | ! This "stub" version (for public release of ISAT) merely calls ice_temphy with equivalent parameters. 18 | use ci_prec 19 | use ci_dat6 20 | use isat_abort_m 21 | use ci_stats 22 | use ci_cksubs 23 | implicit none 24 | 25 | real(k_dp) :: y(ns) 26 | real(k_dp), intent(in) :: h, zi(ns) 27 | real(k_dp), intent(out) :: T 28 | integer, intent(in) :: check 29 | integer, intent(out) :: info 30 | 31 | !============ Use old routine temphy() via ICE-PIC instead of temphz() == 32 | call phi2y( zi, amolwt, ns, y ) 33 | call ice_temphy(h, y, T, info ) 34 | if( check == 0 .and. info /= 0 ) then 35 | if( info == 1 ) then 36 | call isat_abort( 'temphz', 0, mess = 'Input Enthalpy out of range (h > hhigh)') 37 | else 38 | call isat_abort( 'temphz', 0, mess = 'Input Enthalpy out of range (h < hhigh)') 39 | endif 40 | endif 41 | return 42 | 43 | end subroutine temphz 44 | 45 | -------------------------------------------------------------------------------- /ISAT/test_cases/isatab/README.txt: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Date: Thu, 29 Nov 2012 15:28:01 -0600 3 | 4 | ISATAB: In Situ Adaptive Tabulation 5 | =================================== 6 | Test cases are provided to run ISATAB in serial and parallel (MPI). 7 | 8 | Executables 9 | ----------- 10 | Use 'test_ser' and 'test_mpi' executables built using the isatab_test 11 | source code provided with ISAT-CK7. 12 | 13 | Serial Test Case 14 | ---------------- 15 | Copy the 'test_ser' executable into the 'test_case_ser' directory 16 | provided, which contains three isat_#.nml files for the three test 17 | cases explained in the test_ser.f90 source file (and listed below). 18 | 19 | Parallel Test Case 20 | ------------------ 21 | Copy the 'test_mpi' executable into the 'test_case_mpi' directory 22 | provided, which contains three isat_#.nml files for the three test 23 | cases explained in the test_mpi.f90 source file (and listed below). 24 | 25 | A sample job script 'job.sh' is provided to run the parallel test case 26 | on 16 cores on the TACC Ranger cluster. 27 | 28 | Test Cases 29 | ---------- 30 | As listed in the source files: 31 | 32 | Table 1: 3D, linear, fixed domain 33 | Table 2: 5D, non-linear, fixed domain (40Mbytes), ifull=1 34 | Table 3: 5D, non-linear, shifting domain 35 | 36 | Input Parameters 37 | ---------------- 38 | The following parameters can be set using the isat_#.nml input file: 39 | etola : ISAT error tolerance 40 | stomby: ISAT table size 41 | 42 | Expected Output 43 | --------------- 44 | The output files generated from the serial test case are included in 45 | the 'test_case_ser_output' directory; and the output files from the 46 | parallel test case are included in the 'test_case_mpi_output' 47 | directory. 48 | -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi_isat/x2f_cirxn.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Cornell University ! 3 | ! COPYRIGHT: © 2012, Cornell University ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-CU.txt' file included in the x2f_mpi ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine x2f_cirxn( ldxf, nx, x, f, k_pos, info_xf, rinfo_xf ) 10 | 11 | ! x2f routine for Chemistry Interface (CI) 12 | ! x = { c(1:ncv), dt, press } 13 | ! f = { c(1:ncv), dens, press, temp} 14 | 15 | implicit none 16 | integer, parameter :: k_dp = kind(1.d0) 17 | 18 | integer, intent(in) :: ldxf, nx, k_pos, info_xf(*) 19 | real(k_dp), intent(in) :: x(nx), rinfo_xf(*) 20 | real(k_dp), intent(out) :: f(ldxf) 21 | 22 | integer :: ncv 23 | real(k_dp) :: dpt(3), dt 24 | 25 | if ( info_xf(1)==-1 ) then 26 | ! measure message passing time, do not evaluate function 27 | f(1:ldxf) = x(1) 28 | else 29 | !--------- (try to) evaluate f(x) ------- 30 | dpt = 0.d0 31 | ncv = nx - 2 32 | dt = x(ncv+1) 33 | dpt(2) = x(ncv+2) 34 | 35 | call cirxn( dt, ncv, x(1:ncv), f(1:ncv), dpt ) 36 | 37 | if ( dpt(1) > 0.d0 ) then 38 | f(ncv+1) = dpt(1) 39 | f(ncv+2) = dpt(2) 40 | f(ncv+3) = dpt(3) 41 | else 42 | f(1:nx) = x(1:nx) 43 | f(k_pos) = -x(k_pos) 44 | if ( ldxf>nx ) then 45 | f(nx+1:ldxf) = 0.0 46 | end if 47 | end if 48 | end if 49 | 50 | end subroutine x2f_cirxn 51 | -------------------------------------------------------------------------------- /x2f_mpi/Makefile.windows: -------------------------------------------------------------------------------- 1 | # Makefile to build all the projects on Windows 2 | # Author: Varun Hiremath 3 | # Last Modified: Mon Jan 31 2011 17:05:34 -0400 by Steve Lantz 4 | 5 | PROJECTS=x2f_mpi x2f_mpi_isat 6 | #PROGRAMS=test_x2f_mpi test_x2f_mpi_isat test_sort_tools pasr_multi 7 | PROGRAMS=test_x2f_mpi test_sort_tools pasr_multi 8 | 9 | DESTDIR=. 10 | 11 | # Set build type 12 | MAKE=nmake -f Makefile.windows 13 | 14 | all: install 15 | 16 | build: build-libs build-programs 17 | 18 | build-libs: 19 | for %%p in ($(PROJECTS)) do \ 20 | (cd %%p && $(MAKE) & cd ..) 21 | 22 | build-programs: install-libs clean 23 | for %%p in ($(PROGRAMS)) do \ 24 | (cd %%p && $(MAKE) & cd ..) 25 | 26 | install: build install-libs install-programs 27 | 28 | install-libs: 29 | for %%p in ($(PROJECTS)) do \ 30 | (xcopy /Y %%p\*.lib $(DESTDIR)\lib\) 31 | @echo "BUILD DONE"; 32 | @echo "THE FOLLOWING LIBS HAVE BEEN GENERATED IN $(DESTDIR)\lib" 33 | dir/p $(DESTDIR)\lib 34 | 35 | install-programs: 36 | for %%p in ($(PROGRAMS)) do \ 37 | (xcopy /Y /I %%p\*.exe $(DESTDIR)\bin\) 38 | @echo "THE FOLLOWING EXECUTABLES HAVE BEEN GENERATED IN $(DESTDIR)\bin" 39 | dir/p $(DESTDIR)\bin 40 | 41 | clean: clean-programs 42 | 43 | dist-clean: clean-libs clean-programs 44 | 45 | clean-libs: 46 | for %%p in ($(PROJECTS)) do \ 47 | (cd %%p && $(MAKE) clean & cd ..) 48 | 49 | clean-programs: 50 | for %%p in ($(PROGRAMS)) do \ 51 | (cd %%p && $(MAKE) clean & cd ..) 52 | 53 | purge: purge-libs purge-programs 54 | 55 | purge-libs: 56 | for %%p in ($(PROJECTS)) do \ 57 | (cd %%p && $(MAKE) purge & cd ..) 58 | 59 | purge-programs: 60 | for %%p in ($(PROGRAMS)) do \ 61 | (cd %%p && $(MAKE) purge & cd ..) 62 | 63 | rebuild: clean build 64 | 65 | .PHONY: clean 66 | -------------------------------------------------------------------------------- /ISAT/ell_lib/ell_bbt2chol.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ell_bbt2chol( n, B, g ) 10 | 11 | ! Given an n x n matrix B, compute the lower 12 | ! Cholesky triangle G: G * G^T = B * B^T 13 | 14 | ! The Cholesky triangle G is returned in g in packed format. 15 | 16 | ! Method: B = L * Q; so that B * B^T = L * L^T; and so G = L. 17 | 18 | implicit none 19 | integer, parameter :: k_dp = kind(1.d0) 20 | integer, intent(in) :: n 21 | real(k_dp), intent(in) :: B(n,n) 22 | real(k_dp), intent(out) :: g((n*(n+1))/2) 23 | 24 | integer :: i, j, k, info, lwork 25 | real(k_dp) :: gf(n,n), tau(n), work(10+n*(10+n)) 26 | 27 | ! perform LQ factorization: B = G*Q 28 | lwork = 10+n*(10+n) 29 | gf = B 30 | call dgelqf( n, n, gf, n, tau, work, lwork, info ) 31 | 32 | if( info /=0 ) then 33 | write(0,*)'ell_bbt2chol: dgelqf failed, info = ', info 34 | stop 35 | endif 36 | 37 | ! put in packed format, ensuring that diagonal elements are non-negative 38 | k = 0 39 | do j = 1, n 40 | if( gf(j,j) >= 0.d0 ) then 41 | do i = j,n 42 | k = k + 1 43 | g(k) = gf(i,j) 44 | end do 45 | else 46 | do i = j,n 47 | k = k + 1 48 | g(k) = -gf(i,j) 49 | end do 50 | endif 51 | end do 52 | 53 | return 54 | end subroutine ell_bbt2chol 55 | -------------------------------------------------------------------------------- /ISAT/CEQ/ceq_linprog.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ceq_linprog(nx,nb,f,A,b,xm,iret) 10 | 11 | !-------------------- 12 | 13 | use linprog 14 | 15 | implicit none 16 | 17 | integer, intent(in) :: nx, nb 18 | 19 | real(kind(1.d0)), intent(in) :: f(nx), A(nb,nx), b(nb) 20 | 21 | integer, intent(out) :: iret 22 | 23 | real(kind(1.d0)), intent(out) :: xm(nx) 24 | 25 | !-------------------- 26 | 27 | ! Determine x=xm which minimizes g=f'*x subject to 28 | 29 | ! x(i)>=0 and A*x=b, where A has full rank. 30 | 31 | 32 | 33 | ! Input: 34 | 35 | ! nx - number of components of x 36 | 37 | ! nb - number of components of b 38 | 39 | ! f - nx-vector f 40 | 41 | ! A - nx x nb matrix A 42 | 43 | ! Output: 44 | 45 | ! xm - solution 46 | 47 | ! iret= 0 if solution is found 48 | 49 | ! iret=-1 if g is unbounded 50 | 51 | ! iret=-2 if there is no feasible solution 52 | 53 | ! iret=-3 if A is rank deficient 54 | 55 | 56 | 57 | ! S.B. Pope 10/1/06 58 | 59 | 60 | 61 | real(kind(1.d0)) :: eps=1.d-9, ale(1,1), age(1,1), ble(1), bge(1) 62 | 63 | 64 | 65 | call lp( nx, 0, 0, nb, ale, age, A, ble, bge, b, f, xm, iret, toler=eps ) 66 | if( iret<0 ) then 67 | !XXX write(0,*)'ceq_linprog, iret = ', iret ! SBP XXX 68 | endif 69 | 70 | 71 | 72 | end subroutine ceq_linprog -------------------------------------------------------------------------------- /ISAT/ell_lib/ell_pt_hyper.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ell_pt_hyper( n, c, gg, p, xh, v ) 10 | 11 | ! Given an ellipsoid E (centered at c) and a point p, determine the 12 | ! hyperplane H which is the perpendicular bisector of the line c-p 13 | ! in the transformed space in which E is the unit ball. 14 | 15 | ! E is defined by: (x-c)^T * G * G^T * (x-c) <= 1. The array 16 | ! gg contains the lower triangular n x n matrix G in packed format. 17 | 18 | ! The hyperplane H is defined by v^T * ( x - xh ) = 0, where v is 19 | ! a unit vector. The quantity s(x) = v^T * ( x - xh ) is the signed 20 | ! distance of the point x from the hyperplane: s(c) is negative, and 21 | ! s(p) is positive. 22 | 23 | ! S.B. Pope 6/4/2006 24 | implicit none 25 | 26 | integer, parameter :: k_dp = kind(1.d0) 27 | integer, intent(in) :: n 28 | real(k_dp), intent(in) :: c(n), gg((n*(n+1))/2), p(n) 29 | real(k_dp), intent(out) :: xh(n), v(n) 30 | 31 | real(k_dp) :: vsq 32 | 33 | xh = 0.5d0 * ( c + p ) 34 | v = p-c 35 | call dtpmv( 'L', 'T', 'N', n, gg, v, 1 ) ! = G * G^T * [p-c] 36 | call dtpmv( 'L', 'N', 'N', n, gg, v, 1 ) 37 | 38 | vsq = sum( v * v ) 39 | if( vsq > 0.d0 ) then 40 | v = v / sqrt( vsq ) 41 | return 42 | endif 43 | 44 | write(0,*)'ell_pt_hyper: vsq = 0.d0' 45 | stop 46 | 47 | end subroutine ell_pt_hyper 48 | -------------------------------------------------------------------------------- /ISAT/CEQ/ceq_dgdt.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ceq_dgdT(ns,T,thermo,dgdT) 10 | !---------------- 11 | implicit none 12 | integer, parameter :: ncof=7 13 | integer, intent(in) :: ns 14 | real(kind(1.d0)), intent(in) :: T, thermo(ns,2*ncof+1) 15 | real(kind(1.d0)), intent(out) :: dgdT(ns) 16 | !------------- 17 | ! return d/dT of the normalized Gibbs functions at temperature T 18 | ! input: 19 | ! T - temperature (K) 20 | ! thermo - thermo data for all species 21 | ! output: 22 | ! dgdT - d/dT (g_j/(RT) ) 23 | 24 | ! S. B. Pope 7/1/03 25 | 26 | real(kind(1.d0)) :: tc(ncof), th(ncof), ts(ncof), tg(ncof) 27 | integer :: k, n 28 | 29 | tc=0.d0 ! coefficient multipliers for specific heats 30 | th=0.d0 ! coefficient multipliers for enthalpy 31 | ts=0.d0 ! coefficient multipliers for entropy 32 | tc(1)=1.d0/T 33 | th(1)=0.d0 34 | th(6)=-1.d0/T**2 35 | ts(1)=1.d0/T 36 | ts(7)=0.d0 37 | 38 | do n=2,5 39 | tc(n)=T*tc(n-1) ! =T.^(n-2) 40 | th(n)=tc(n)*float(n-1)/float(n) ! =T.^(n-2) * (n-1) / n 41 | ts(n)=tc(n) ! =T.^(n-2) 42 | end do 43 | tg=th-ts 44 | 45 | do k=1,ns 46 | if( T 0.d0 ) then 41 | s = 1.d0 / sqrt( ysq ) ! s successfully evaluated 42 | elseif( sum( (p-c)*(p-c) ) == 0.d0 ) then 43 | s = -1.d0 ! p=c 44 | else 45 | s = -2.d0 ! G is not positive definite 46 | endif 47 | 48 | return 49 | end subroutine ell_pt_dist 50 | -------------------------------------------------------------------------------- /ISAT/build-files/vars.mk: -------------------------------------------------------------------------------- 1 | # Author: Varun Hiremath 2 | # Date: Thu, 29 Nov 2012 14:39:20 -0600 3 | 4 | # intel compiler is used for building, ensure intel and mkl modules are loaded: 5 | # -> Lonestar (intel is default): module load mkl 6 | # -> Kraken: module load PrgEnv-intel 7 | # Ranger use 'mpif90' wrapper; and on Kraken use 'ftn' 8 | 9 | FC = mpif90 10 | LINK_SYS_LIBS = -Bdynamic 11 | CPP = g++ 12 | 13 | #ifeq ($(shell which mpif90 &> /dev/null; echo $$?), 0) 14 | # FC = f95 15 | # LINK_SYS_LIBS = -Bdynamic 16 | #endif 17 | 18 | CANTERA_LIBPATH=/usr/local/lib 19 | CANTERA_INCPATH=/usr/local/include/cantera 20 | CANTERA_SRC=/home/kalle/work/cantera/src # Needed for Cabinet.h 21 | 22 | CPPFLAGS= -O3 -fPIC 23 | 24 | # set debug/optimize modes 25 | ifeq ($(BUILD_TYPE), debug) 26 | FCFLAGS = -fp-stack-check -traceback -g -debug all -debug-parameters all -fPIC -vec-report0 -DDEBUG -D_DEBUG 27 | else 28 | FCFLAGS = -O2 -fPIC 29 | endif 30 | 31 | # -ftree-vectorizer-verbose=1 32 | 33 | LINK_LIBS = -Bdynamic -L/usr/local/lib -lcantera_fortran -lcantera -lpthread -lstdc++ 34 | 35 | # for Intel 11.1 with MKL 10.2, linking to MKL requires just one option: 36 | 37 | #MKL_LIST = -mkl 38 | 39 | # the -mkl option is equivalent to the following set of flags to ifort: 40 | #MKL_LIST = -L${TACC_MKL_LIB} -lmkl_solver_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 41 | # (Ref.: software.intel.com/en-us/articles/using-mkl-in-intel-compiler-mkl-qmkl-options) 42 | # if -mkl doesn't work on your cluster, uncomment the above line, replacing 43 | # ${TACC_MKL_LIB} with the appropriate MKL path for your cluster 44 | # ...alternatively, uncomment the following line to use the hand-built lapack: 45 | MKL_LIST = -L/usr/lib -llapack 46 | 47 | LN = ln -s 48 | CP = cp 49 | RM = rm -f 50 | RMDIR = rm -rf 51 | AR = ar crs 52 | OBJ = o 53 | MAKE=make BUILD_TYPE=$(BUILD_TYPE) 54 | CREATE_LIBS = $(LIB_NAME).a $(LIB_NAME).so 55 | -------------------------------------------------------------------------------- /x2f_mpi/pasr_multi_test_files/post_process/post_pasr_np.m: -------------------------------------------------------------------------------- 1 | % script to plot basic statistics for pasr_multi from the files pasr_#.out 2 | % 3 | % specify: np (number of processes) 4 | % run_path (location of output files isat_1_#.op) 5 | 6 | clear all 7 | np = 32; 8 | run_path = '../test_case_output/'; 9 | xscale_type = 'linear'; % 'log' or 'linear' 10 | yscale_type = 'linear'; % 'log' or 'linear' 11 | 12 | figure(); 13 | hold on; 14 | box on; 15 | 16 | cmap = jet(64); 17 | for i = 1:np 18 | clr = cmap(1+floor(63*(np-i)/np),:); 19 | x = load([run_path '/pasr_' num2str(i) '.out']); 20 | 21 | istep = x(:,1); 22 | t = x(:,2); 23 | temp_mean = x(:,3); 24 | x1_mean = x(:,6); 25 | x3_mean = x(:,7); 26 | x6_mean = x(:,8); 27 | max_t = max(t); 28 | 29 | % Temperature 30 | subplot(2,2,1); box on; hold on; 31 | plot(t,temp_mean,'b','linewidth',2,'color',clr); 32 | set(gca,'xscale',xscale_type,'yscale',yscale_type); 33 | xlim([0 max_t]); 34 | xlabel('Time (s)'); 35 | ylabel(' (K)'); 36 | 37 | % Species 1 38 | subplot(2,2,2); box on; hold on; 39 | plot(t,x1_mean,'b','linewidth',2,'color',clr); 40 | set(gca,'xscale',xscale_type,'yscale',yscale_type); 41 | xlim([0 max_t]); 42 | xlabel('Time (s)'); 43 | ylabel(''); 44 | 45 | % Species 3 46 | subplot(2,2,3); box on; hold on; 47 | plot(t,x3_mean,'b','linewidth',2,'color',clr); 48 | set(gca,'xscale',xscale_type,'yscale',yscale_type); 49 | xlim([0 max_t]); 50 | xlabel('Time (s)'); 51 | ylabel(''); 52 | 53 | % Species 6 54 | subplot(2,2,4); box on; hold on; 55 | plot(t,x6_mean,'b','linewidth',2,'color',clr); 56 | set(gca,'xscale',xscale_type,'yscale',yscale_type); 57 | xlim([0 max_t]); 58 | xlabel('Time (s)'); 59 | ylabel(''); 60 | end 61 | legend([num2str(transpose([1:np]))],-1); 62 | -------------------------------------------------------------------------------- /x2f_mpi/pasr_multi_test_files/post_process/post_isat_1_np.m: -------------------------------------------------------------------------------- 1 | % script to plot basic ISAT information for pasr_multi from the files 2 | % isat_1_#.op 3 | % 4 | % specify: np (number of processes) 5 | % run_path (location of output files isat_1_#.op) 6 | 7 | clear all 8 | np = 32; 9 | run_path = '../test_case_output/'; 10 | xscale_type = 'log'; % 'log' or 'linear' 11 | yscale_type = 'log'; % 'log' or 'linear' 12 | 13 | figure(); 14 | hold on; 15 | box on; 16 | 17 | cmap = jet(64); 18 | for i = 1:np 19 | clr = cmap(1+floor(63*(np-i)/np),:); 20 | x = load([run_path '/isat_1_' num2str(i-1) '.op']); 21 | 22 | qu = x(:,1); 23 | pr = x(:,2); 24 | sr = x(:,3); 25 | gr = x(:,4); 26 | ad = x(:,5); 27 | de = x(:,7); 28 | max_qu = max(qu); 29 | 30 | % Primary and secondary retrieves 31 | subplot(2,2,1); box on; hold on; 32 | plot(qu,pr+sr,'b','linewidth',2,'color',clr); 33 | set(gca,'xscale',xscale_type,'yscale',yscale_type); 34 | xlim([0 max_qu]); 35 | xlabel('Queries'); 36 | ylabel('Retrieves'); 37 | 38 | % Grows 39 | subplot(2,2,2); box on; hold on; 40 | plot(qu,gr,'b','linewidth',2,'color',clr); 41 | set(gca,'xscale',xscale_type,'yscale',yscale_type); 42 | xlim([0 max_qu]); 43 | xlabel('Queries'); 44 | ylabel('Grows'); 45 | 46 | % Adds 47 | subplot(2,2,3); box on; hold on; 48 | plot(qu,ad,'b','linewidth',2,'color',clr); 49 | set(gca,'xscale',xscale_type,'yscale',yscale_type); 50 | xlim([0 max_qu]); 51 | xlabel('Queries'); 52 | ylabel('Adds'); 53 | 54 | % Direct evaluations 55 | subplot(2,2,4); box on; hold on; 56 | plot(qu,de,'b','linewidth',2,'color',clr); 57 | set(gca,'xscale',xscale_type,'yscale',yscale_type); 58 | xlim([0 max_qu]); 59 | xlabel('Queries'); 60 | ylabel('Direct evaluations'); 61 | end 62 | legend([num2str(transpose([1:np]))],-1); 63 | -------------------------------------------------------------------------------- /ISAT/CEQ/ceq_g.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ceq_g(ns,T,p,thermo,gort) 10 | !---------------- 11 | implicit none 12 | integer, parameter :: ncof=7 13 | integer, intent(in) :: ns 14 | real(kind(1.d0)), intent(in) :: T, p, thermo(ns,2*ncof+1) 15 | real(kind(1.d0)), intent(out) :: gort(ns) 16 | !------------- 17 | ! return normalized Gibbs functions at temperature T 18 | ! input: 19 | ! T - temperature (K) 20 | ! p - pressure (atm) 21 | ! thermo - thermo data for all species 22 | ! output: 23 | ! gort - g_j/(RT) - normalized Gibbs functions 24 | 25 | ! S. B. Pope 9/26/02 26 | 27 | real(kind(1.d0)) :: tc(ncof), th(ncof), ts(ncof), tg(ncof) 28 | integer :: k, n 29 | 30 | if( ns <= 0 ) return 31 | 32 | tc=0.d0 ! coefficient multipliers for specific heats 33 | th=0.d0 ! coefficient multipliers for enthalpy 34 | ts=0.d0 ! coefficient multipliers for entropy 35 | tc(1)=1.d0 36 | th(1)=1.d0 37 | th(6)=1./T 38 | ts(1)=log(T) 39 | ts(7)=1.d0 40 | do n=2,5 41 | tc(n)=T*tc(n-1) ! =T.^(n-1) 42 | th(n)=tc(n)/float(n) ! =T.^(n-1) ./ n 43 | ts(n)=tc(n)/float((n-1)) ! =T.^(n-1) ./ (n-1) 44 | end do 45 | tg=th-ts 46 | 47 | do k=1,ns 48 | if( T /usr/local/lib/libcantera_fortran.a 34 | 35 | Further, Cantera has to be compiled with the flag -fPIC. Edit the SConstruct file. 36 | 37 | Before building, edit build-files/vars.mk and set the Cantera files path 38 | correctly. 39 | 40 | Windows: I have not tried building this on Windows. There should probably 41 | be changes to the build files to do this! 42 | 43 | -------------------------------------------------------------------------------- /ISAT/makelinks.txt: -------------------------------------------------------------------------------- 1 | rm ./libadifor.so 2 | rm ./libisat7_ser.so 3 | rm ./libceq.so 4 | rm ./libck_ext.so 5 | rm ./libisatab_ser.so 6 | rm ./libct.so 7 | rm ./libck.so 8 | rm ./libisatck_ext.so 9 | rm ./libell.so 10 | rm ./libisatck.so 11 | rm ./libice_pic.so 12 | rm ./libisat_rnu.so 13 | rm ./libsell.so 14 | 15 | ## Cantera version 16 | ln -s /home/kalle/work/ISAT-CK7/ISAT/lib/libadifor.so libadifor.so 17 | ln -s /home/kalle/work/ISAT-CK7/ISAT/lib/libisat7_ser.so libisat7_ser.so 18 | ln -s /home/kalle/work/ISAT-CK7/ISAT/lib/libceq.so libceq.so 19 | ln -s /home/kalle/work/ISAT-CK7/ISAT/lib/libck_ext.so libck_ext.so 20 | ln -s /home/kalle/work/ISAT-CK7/ISAT/lib/libisatab_ser.so libisatab_ser.so 21 | ln -s /home/kalle/work/ISAT-CK7/ISAT/lib/libct.so libct.so 22 | ln -s /home/kalle/work/ISAT-CK7/ISAT/lib/libisatck_ext.so libisatck_ext.so 23 | ln -s /home/kalle/work/ISAT-CK7/ISAT/lib/libell.so libell.so 24 | ln -s /home/kalle/work/ISAT-CK7/ISAT/lib/libisatck.so libisatck.so 25 | ln -s /home/kalle/work/ISAT-CK7/ISAT/lib/libice_pic.so libice_pic.so 26 | ln -s /home/kalle/work/ISAT-CK7/ISAT/lib/libisat_rnu.so libisat_rnu.so 27 | ln -s /home/kalle/work/ISAT-CK7/ISAT/lib/libsell.so libsell.so 28 | 29 | 30 | ## Chemkin version 31 | ln -s /home/kalle/work/ISAT-CK7-CK/ISAT/lib/libadifor.so libadifor.so 32 | ln -s /home/kalle/work/ISAT-CK7-CK/ISAT/lib/libisat7_ser.so libisat7_ser.so 33 | ln -s /home/kalle/work/ISAT-CK7-CK/ISAT/lib/libceq.so libceq.so 34 | ln -s /home/kalle/work/ISAT-CK7-CK/ISAT/lib/libck_ext.so libck_ext.so 35 | ln -s /home/kalle/work/ISAT-CK7-CK/ISAT/lib/libisatab_ser.so libisatab_ser.so 36 | ln -s /home/kalle/work/ISAT-CK7-CK/ISAT/lib/libck.so libck.so 37 | ln -s /home/kalle/work/ISAT-CK7-CK/ISAT/lib/libisatck_ext.so libisatck_ext.so 38 | ln -s /home/kalle/work/ISAT-CK7-CK/ISAT/lib/libell.so libell.so 39 | ln -s /home/kalle/work/ISAT-CK7-CK/ISAT/lib/libisatck.so libisatck.so 40 | ln -s /home/kalle/work/ISAT-CK7-CK/ISAT/lib/libice_pic.so libice_pic.so 41 | ln -s /home/kalle/work/ISAT-CK7-CK/ISAT/lib/libisat_rnu.so libisat_rnu.so 42 | ln -s /home/kalle/work/ISAT-CK7-CK/ISAT/lib/libsell.so libsell.so 43 | 44 | -------------------------------------------------------------------------------- /ISAT/ell_lib/ellu_radii.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ellu_radii( n, g, r_in, r_out ) 10 | 11 | ! g contains the lower triangular matrix G 12 | ! which defines the ellipsoid E = {x | |G^T * x | <=1 }. 13 | ! This routine returns in r_in and r_out the radii of the 14 | ! inscribed and circumscribed balls. These are the inverses of the 15 | ! larges and smallest singular vaues of G. 16 | 17 | implicit none 18 | integer, parameter :: k_dp = kind(1.d0) 19 | integer, intent(in) :: n 20 | real(k_dp), intent(in) :: g(n,n) 21 | real(k_dp), intent(out) :: r_in, r_out 22 | 23 | real(k_dp) :: a(n,n), sv(n), u(n,n), vt(n,n), work(10*n*n+20*n) 24 | integer :: lwork, info 25 | character(1) :: jobu, jobvt 26 | 27 | lwork = 10*n*n+20*n 28 | 29 | if( n > 1 ) then 30 | ! form singular values 31 | a = g 32 | jobu = 'A' !XXX 'N' should be sufficient, but leads to unexplained error 33 | jobvt = 'N' 34 | 35 | call dgesvd( jobu, jobvt, n, n, a, n, sv, u, n, vt, n, work, lwork, info ) 36 | 37 | if( info /= 0 ) then 38 | write(0,*)'ellu_radii: info, n, lwork, work(1) = ', info, n, lwork, work(1) 39 | write(0,*)'sv = ' 40 | write(0,'(1p,5e13.4)') sv 41 | stop 42 | endif 43 | 44 | elseif( n ==1 ) then 45 | 46 | sv(1) = g(1,1) 47 | 48 | else 49 | write(0,*)'ellu_radii: invalid n = ', n 50 | stop 51 | endif 52 | 53 | if( sv(n) <= 0.d0 ) then 54 | write(0,*)'ellu_radii: bad singular value ', sv 55 | stop 56 | endif 57 | 58 | r_in = 1.d0 / sv(1) 59 | r_out = 1.d0 / sv(n) 60 | 61 | return 62 | 63 | return 64 | end subroutine ellu_radii 65 | -------------------------------------------------------------------------------- /ISAT/ell_lib/ell_rad_lower.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ell_rad_lower( n, gg, r ) 10 | 11 | ! Determine the radius r of the ball inscribed in the ellipsoid E given 12 | ! by { x | norm(G^T * x) <=1 ), where G is an n x n lower triangular 13 | ! matrix. The array gg contains the matrix G in packed format. 14 | 15 | ! Method: r = 1 / sqrt(lam_max) where lam_max is the largest 16 | ! eigenvalue of G * G^T 17 | 18 | ! S.B. Pope 6/12/04 19 | 20 | implicit none 21 | 22 | integer, parameter :: k_dp = kind(1.d0) 23 | integer, intent(in) :: n 24 | real(k_dp), intent(in) :: gg((n*(n+1))/2) 25 | real(k_dp), intent(out) :: r 26 | 27 | integer :: info, i, j, k, nev, lwork, iwork(5*n), ifail(n) 28 | real(k_dp) :: g(n,n), a(n,n), dum(1), ev(n), dumz(n,1), work(n*(n+8)) 29 | 30 | lwork = n*(n+8) 31 | 32 | ! unpack gg into g 33 | k = 0 34 | g = 0.d0 35 | do j = 1, n 36 | do i = j, n 37 | k = k + 1 38 | g(i,j) = gg(k) 39 | end do 40 | end do 41 | 42 | ! form a = A = G * G^T 43 | a = g 44 | call dtrmm ( 'R', 'L', 'T', 'N', n, n, 1.d0, g, n, a, n ) 45 | 46 | ! find first (smallest) eigenvalues of A 47 | 48 | call dsyevx( 'N', 'I', 'L', n, a, n, dum, dum, n, n, 0.d0, nev, ev, dumz, n, & 49 | work, lwork, iwork, ifail, info ) 50 | 51 | if( info /= 0 ) then ! use SVD instead 52 | call ell_chol2eig( n, gg, a, work ) 53 | r = 1.d0 / work(1) 54 | return 55 | endif 56 | 57 | if( ev(1) <= 0.d0 ) then 58 | write(0,*)'ell_rad_lower: lam_min <=0 ', ev(1) 59 | stop 60 | endif 61 | 62 | r = 1.d0 / sqrt( ev(1) ) 63 | 64 | return 65 | end subroutine ell_rad_lower 66 | -------------------------------------------------------------------------------- /ISAT/ell_lib/ell_pair_cover_query.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ell_pair_cover_query( n, c1, gg1, c2, gg2, rmax ) 10 | 11 | ! Given a pair of ellipsoids, E1 and E2, determine whether E1 12 | ! covers E2. rmax <=1.d0 indicates that E1 covers E2. 13 | ! E1 is defined by: (x-c1)^T * G1 * G1^T * (x-c1) <= 1, 14 | ! where the array gg1 contains G1 in packed format. Similarly for E2. 15 | 16 | ! Method: 17 | ! 1/ transform to y-space in which E1 is the unit ball at the origin: 18 | ! y = G1^T * (x-c) 19 | ! 2/ in y-space, determine rmax = the distance from the origin to the 20 | ! furthest point in E2 21 | ! 3/ if rmax <=1.d0, then E1 covers E2. 22 | 23 | 24 | ! S.B. Pope 10/27/04 25 | 26 | implicit none 27 | 28 | integer, parameter :: k_dp = kind(1.d0) 29 | integer, intent(in) :: n 30 | real(k_dp), intent(in) :: gg1((n*(n+1))/2), gg2((n*(n+1))/2), c1(n), c2(n) 31 | real(k_dp), intent(out) :: rmax 32 | 33 | integer :: i, j, k 34 | real(k_dp) :: g1(n,n), g2(n,n), c(n), origin(n), r(n) 35 | 36 | ! unpack gg1 and gg2 37 | k = 0 38 | g1 = 0.d0 39 | g2 = 0.d0 40 | do j = 1, n 41 | do i = j, n 42 | k = k + 1 43 | g1(i,j) = gg1(k) 44 | g2(i,j) = gg2(k) 45 | end do 46 | end do 47 | 48 | ! transform to y-space: y = G1^T * x; G2y = G1^{-1} * G2 49 | call dtrsm( 'L', 'L', 'N', 'N', n, n, 1.d0, g1, n, g2, n ) 50 | 51 | c = matmul( (c2-c1), g1 ) 52 | 53 | ! find point in G2y furthest from the origin 54 | 55 | origin = 0.d0 56 | call ellu_pt_near_far( 2, n, c, g2, origin, r ) 57 | 58 | rmax = sqrt( sum(r*r) ) 59 | 60 | return 61 | end subroutine ell_pair_cover_query 62 | -------------------------------------------------------------------------------- /ISAT/ell_lib/ell_pair_cover.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ell_pair_cover( algorithm, n, c1, gg1, c2, gg2, cc, gg ) 10 | 11 | ! Given a pair of ellipsoids, E1 and E2, determine a third ellipsoid 12 | ! E which covers E1 and E2. 13 | ! E is defined by: (x-cc)^T * G * G^T * (x-cc) <= 1, where the array gg 14 | ! contains G in packed format. Similarly for E1 and E2. 15 | 16 | ! Algorithms to compute E are: 17 | ! algorithm = 1 - spheroid (no shrinking) 18 | ! algorithm = 2 - covariance (QL implementation) 19 | ! algorithm = 3 - iterative 20 | ! algorithm = 4 - spheroid (shrinking) 21 | ! algorithm = 5 - covariance (Cholesky implementation) 22 | 23 | implicit none 24 | 25 | integer, parameter :: k_dp = kind(1.d0) 26 | integer, intent(in) :: algorithm, n 27 | real(k_dp), intent(in) :: c1(n), gg1((n*(n+1))/2), c2(n), gg2((n*(n+1))/2) 28 | real(k_dp), intent(out) :: cc(n), gg((n*(n+1))/2) 29 | 30 | if( algorithm == 1 ) then 31 | call ell_pair_cover_sph( n, c1, gg1, c2, gg2, .false., cc, gg ) 32 | 33 | elseif( algorithm == 2 ) then 34 | call ell_pair_cover_cv_ql( n, c1, gg1, c2, gg2, cc, gg ) 35 | 36 | elseif( algorithm == 3 ) then 37 | call ell_pair_cover_it( n, c1, gg1, c2, gg2, cc, gg ) 38 | 39 | elseif( algorithm == 4 ) then 40 | call ell_pair_cover_sph( n, c1, gg1, c2, gg2, .true., cc, gg ) 41 | 42 | elseif( algorithm == 5 ) then 43 | call ell_pair_cover_cv( n, c1, gg1, c2, gg2, cc, gg ) 44 | else 45 | write(0,*)'ell_pair_cover: called for invalid algorithm = ', algorithm 46 | stop 47 | endif 48 | 49 | return 50 | 51 | end subroutine ell_pair_cover 52 | -------------------------------------------------------------------------------- /ISAT/isatab_ser/isat_abort_ser.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | module isat_abort_m 10 | 11 | ! Serial version: file isat_abort_ser.f90 12 | integer, save :: lu_err = 0 13 | 14 | contains 15 | 16 | subroutine isat_abort( sub, loc, mess, chv, isv, ivar, rsv, rvar ) 17 | 18 | ! Aborts ISATAB because of error: prints diagnostic and stops 19 | 20 | use isat_prec 21 | implicit none 22 | 23 | character(*), intent(in) :: sub ! name of calling routine 24 | integer, intent(in) :: loc ! location number 25 | character(*), intent(in), optional :: mess ! message 26 | character(*), intent(in), optional :: chv ! character variable 27 | integer, intent(in), optional :: isv, ivar(:) ! integer variables 28 | real(k_xf), intent(in), optional :: rsv, rvar(:) ! real variables 29 | 30 | write(*,*)'********** ISAT_ABORT **************' 31 | write(*,*)mess, loc, sub, chv 32 | write(lu_err,*)' ' 33 | write(lu_err,*)'********** ISAT_ABORT **************' 34 | write(lu_err,*)' ' 35 | write(lu_err,*)'routine = ', sub 36 | write(lu_err,*)'location = ', loc 37 | if( present(mess) ) write(lu_err,*)'message = ', mess 38 | if( present(chv ) ) write(lu_err,1) chv 39 | if( present(isv ) ) write(lu_err,2) isv 40 | if( present(ivar) ) write(lu_err,2) ivar 41 | if( present(rsv ) ) write(lu_err,3) rsv 42 | if( present(rvar) ) write(lu_err,3) rvar 43 | write(lu_err,*)' ' 44 | write(lu_err,*)'****** END ISAT_ABORT **************' 45 | write(lu_err,*)' ' 46 | 47 | call exit(-1) 48 | 49 | 1 format((a)) 50 | 2 format((8i10)) 51 | 3 format((1p,5e13.4)) 52 | end subroutine isat_abort 53 | 54 | end module isat_abort_m 55 | -------------------------------------------------------------------------------- /ISAT/CEQ/ceq_ind_col.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ceq_ind_col(nr,nc,ncs,B,thresh,indcol,info) 10 | !----------------- 11 | implicit none 12 | integer, intent(in) :: nr, nc, ncs 13 | real(kind(1.d0)), intent(in) :: B(nr,nc), thresh 14 | integer, intent(out) :: indcol(nc), info 15 | !!---------------- 16 | ! determine independent columns of the matrix B, 17 | ! given that columns 1:ncs are independent. 18 | 19 | ! Input: 20 | ! nr - number of rows of B 21 | ! nc - number of columns of B 22 | ! ncs - index, such that B(:,1:ncs) has full column rank 23 | ! B - matrix 24 | ! thresh - threshold for determining rank 25 | 26 | ! Output: 27 | ! indcol(k)=0 if k-th column is dependent of columns 1:k-1 28 | ! indcol(k)=1 if k-th column is independent of columns 1:k-1 29 | ! info < 0 indicates failure 30 | 31 | integer :: lwork, k, jpvt(nc) 32 | real(kind(1.d0)) :: R(nr,nc), tau(nr+nc), work(3*(nr+nc)) 33 | 34 | indcol=0 35 | lwork=size( work ) 36 | R=B 37 | jpvt=0 38 | ! perform QR with column pivoting: B P = Q R 39 | 40 | call dgeqpf(nr,nc,R(1:nr,1:nc),nr,jpvt,tau(1:nr+nc), work(1:lwork), info) 41 | 42 | if( info /=0 ) then 43 | !write(0,*)'ceq_ind_col2: QR failed, info= ', info 44 | return 45 | end if 46 | 47 | do k=1,min(nc,nr) ! loop over possibly dependent columns 48 | if( abs(R(k,k)) >= thresh ) then 49 | indcol( jpvt(k) ) = 1 50 | else 51 | exit 52 | endif 53 | end do 54 | 55 | ! check that the first ncs columns are dependent 56 | 57 | do k=1,ncs 58 | if( indcol(k) /=1 ) then 59 | info = -2 60 | !write(0,*)'ceq_ind_col: 1st ncs columns not independent' 61 | return 62 | endif 63 | end do 64 | 65 | return 66 | 67 | end subroutine ceq_ind_col -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case/test_1/streams.in: -------------------------------------------------------------------------------- 1 | !----------------------------------------------------------------------------! 2 | ! ! 3 | ! Sandia Flame DEF streams.in file (new format) ! 4 | ! (for modes 6, 7, 8, and 9) ! 5 | ! Haifeng Wang, September, 2010 ! 6 | ! ! 7 | ! Note: * any part beginning with "!" is a comment ! 8 | ! * empty lines are ignored ! 9 | ! * keywords are not case-sensitive ! 10 | ! ! 11 | !----------------------------------------------------------------------------! 12 | ! 13 | ! specify MODECI: the mode of thermochemistry to be used in ISAT 14 | ! = 1 or CONST_PROPERTY - inert, constant-density flow 15 | ! = 2 or MIXTURE_FRACTION - mixture fraction formulation 16 | ! = 3 or PROGRESS_VARIABLE - reaction progress variable formulation 17 | ! = 4 - not supported yet 18 | ! = 5 - not supported yet 19 | ! = 6 or DIRECT_INTEGRATION - CHEMKIN/direct integration 20 | ! = 7 or ISAT_DI - CHEMKIN/ISAT 21 | ! = 8 or RCCE - CHEMKIN/ISAT/RCCE 22 | ! = 9 or ICE_PIC - CHEMKIN/ISAT/ICE_PIC 23 | ! 24 | 25 | ! 26 | ! Specify the thermodynamic state of each stream. 27 | ! - Each stream begins with 'STREAM BEGIN' and ends with 'STREAM END'. 28 | ! - Each stream should have a unique name, e.g., "FUEL", "PILOT", "COFLOW" 29 | ! - The species can be specified in two units: [MOLE] and [MASS]. 30 | ! - [EQUIL] [EQUIL-H] [EQUIL-T] indicate to use the equilibrium state of the stream 31 | ! [EQUIL] or [EQUIL-H]: constant enthalpy; [EQUIL-T]: constant temperature 32 | ! - P : pressure in atmosphere unit 33 | ! - T : temperature in unit [K] 34 | ! 35 | 36 | MODECI 1 37 | 38 | DENSITY 1.2 39 | -------------------------------------------------------------------------------- /ISAT/test_cases/PaSR/test_case_output/test_1/streams.in: -------------------------------------------------------------------------------- 1 | !----------------------------------------------------------------------------! 2 | ! ! 3 | ! Sandia Flame DEF streams.in file (new format) ! 4 | ! (for modes 6, 7, 8, and 9) ! 5 | ! Haifeng Wang, September, 2010 ! 6 | ! ! 7 | ! Note: * any part beginning with "!" is a comment ! 8 | ! * empty lines are ignored ! 9 | ! * keywords are not case-sensitive ! 10 | ! ! 11 | !----------------------------------------------------------------------------! 12 | ! 13 | ! specify MODECI: the mode of thermochemistry to be used in ISAT 14 | ! = 1 or CONST_PROPERTY - inert, constant-density flow 15 | ! = 2 or MIXTURE_FRACTION - mixture fraction formulation 16 | ! = 3 or PROGRESS_VARIABLE - reaction progress variable formulation 17 | ! = 4 - not supported yet 18 | ! = 5 - not supported yet 19 | ! = 6 or DIRECT_INTEGRATION - CHEMKIN/direct integration 20 | ! = 7 or ISAT_DI - CHEMKIN/ISAT 21 | ! = 8 or RCCE - CHEMKIN/ISAT/RCCE 22 | ! = 9 or ICE_PIC - CHEMKIN/ISAT/ICE_PIC 23 | ! 24 | 25 | ! 26 | ! Specify the thermodynamic state of each stream. 27 | ! - Each stream begins with 'STREAM BEGIN' and ends with 'STREAM END'. 28 | ! - Each stream should have a unique name, e.g., "FUEL", "PILOT", "COFLOW" 29 | ! - The species can be specified in two units: [MOLE] and [MASS]. 30 | ! - [EQUIL] [EQUIL-H] [EQUIL-T] indicate to use the equilibrium state of the stream 31 | ! [EQUIL] or [EQUIL-H]: constant enthalpy; [EQUIL-T]: constant temperature 32 | ! - P : pressure in atmosphere unit 33 | ! - T : temperature in unit [K] 34 | ! 35 | 36 | MODECI 1 37 | 38 | DENSITY 1.2 39 | -------------------------------------------------------------------------------- /ISAT/ice-pic/ci_ice_pim_tan.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Cornell University ! 3 | ! COPYRIGHT: © 2012, Cornell University ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-CU.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ci_ice_pim_tan( A, S, T_PIM, svrat ) 10 | 11 | ! Determine an orthogonal basis (given by the columns of T_PIM) for the 12 | ! tangent space of the pre-image manifold (PIM). 13 | 14 | ! Input: 15 | ! A - reaction mapping sensitivity matrix 16 | ! S - dz/dt at the pre-image point 17 | 18 | ! Output: 19 | ! T_PIM - span(T_PIM) is the tangent space of the pre-image manifold 20 | ! svrat - ratio of singular values of TPI = [B^T * A B^T * A * S] 21 | 22 | use ci_dat 23 | use ci_dat8 24 | use ci_utils 25 | 26 | real(k_dp), intent(in) :: A(ns+1,ns+1), S(ns) 27 | real(k_dp), intent(out) :: T_PIM(1:ns,1:ns+1-nrc), svrat 28 | 29 | integer :: lwork, info 30 | real(k_dp) :: TPI(nrc,ns+1), Sig(nrc), U(1,1), VT(ns+1,ns+1), & 31 | work(10*(nrc+ns)+nrc*ns) 32 | 33 | lwork = 10*(nrc+ns)+nrc*ns 34 | 35 | ! For dx = [dz_g; dtau], infinitesimal increments in the PIM are given by: 36 | ! TPI * dx = 0, where TPI = [B^T * A B^T * A * S]. Thus, an orthogonal basis 37 | ! for the PIM tangent space is given by T_PIM = V(1:ns,1:nrc+1:ns+1), 38 | ! where the SVD of TPI is: TPI = U * Sig * V^T. 39 | 40 | ! Assemble TPI 41 | TPI(1:nrc,1:ns) = matmul( BBT, A(1:ns,1:ns) ) 42 | TPI(1:nrc,ns+1) = matmul( BBT, matmul(A(1:ns,1:ns), S) ) / norm(S) 43 | 44 | ! Form SVD 45 | call dgesvd( 'N', 'A', nrc, ns+1, TPI, nrc, Sig, U, 1, VT, ns+1, & 46 | work, lwork, info ) 47 | 48 | if( info /= 0 ) call isat_abort('ci_ice_pim_tan', 1, & 49 | mess='SVD failed, info = ', isv = info ) 50 | 51 | svrat = Sig(nrc)/Sig(1) 52 | 53 | T_PIM(1:ns,1:ns+1-nrc) = transpose( VT(nrc+1:ns+1,1:ns) ) 54 | 55 | return 56 | end subroutine ci_ice_pim_tan 57 | -------------------------------------------------------------------------------- /ISAT/ell_lib/ell_pt_in.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ell_pt_in( n, c, gg, p, in ) 10 | 11 | ! Return in=.true. if the point p is in the ellipsoid E. 12 | ! E is given by { x | norm(G^T * (x-c) ) <=1 ), where G is an 13 | ! n x n lower triangular matrix. The array gg contains 14 | ! the matrix G in packed format. 15 | 16 | ! Note: select below method to be used. 17 | 18 | ! S.B. Pope 6/12/04 19 | 20 | implicit none 21 | 22 | integer, parameter :: k_dp = kind(1.d0) 23 | integer, intent(in) :: n 24 | real(k_dp), intent(in) :: c(n), gg((n*(n+1))/2), p(n) 25 | logical, intent(out) :: in 26 | 27 | integer :: j, lm1, kst, method=2 28 | real(k_dp) :: y(n), ysq1, ysq, yj 29 | 30 | in = .false. ! assume p outside E until found otherwise 31 | 32 | ! Method 1: directly evaluate y = G^T * [p-c] and test y^T * y <= 1. 33 | ! (Simple, but not optimal.) 34 | 35 | if( method == 1 ) then 36 | 37 | ! Transform to y-space: y = G^T * [x-c] 38 | y = p-c 39 | call dtpmv( 'L', 'T', 'N', n, gg, y, 1 ) ! yp = G^T * [p-c] 40 | ysq1 = sum(y*y) 41 | if( ysq1 <= 1.d0 ) in = .true. 42 | 43 | else 44 | 45 | ! Method 2: successively evaluate components of y = G^T * [p-c]; accumulate sum; test 46 | ! (More involved, but possibly quicker) 47 | 48 | y = p-c 49 | ysq = 0.d0 50 | kst = (n*(n+1))/2 51 | do j = n, 1, -1 ! loop backwards over columns of G 52 | lm1 = n-j ! length of column vector - 1 53 | yj = sum( gg(kst:kst+lm1) * y(j:n) ) 54 | ysq = ysq + yj*yj 55 | 56 | if( ysq > 1.d0 ) return 57 | 58 | kst = kst - lm1 - 2 59 | end do 60 | 61 | in = .true. 62 | 63 | endif 64 | 65 | return 66 | end subroutine ell_pt_in 67 | -------------------------------------------------------------------------------- /x2f_mpi/x2f_mpi_isat/x2f_rw_isatab.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Cornell University ! 3 | ! COPYRIGHT: © 2012, Cornell University ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-CU.txt' file included in the x2f_mpi ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | ! Author: Varun Hiremath 10 | ! Date: Wed, 9 May 2012 14:36:25 -0500 11 | 12 | ! This file provides subroutines to read/write ISAT tables 13 | 14 | !--------------------------------------------------------------- 15 | subroutine x2f_pt_index(index) 16 | ! returns the partition index for the current rank 17 | use x2f_mpi_grpdata 18 | implicit none 19 | 20 | integer, intent(out) :: index 21 | 22 | if( .not. impinit) then 23 | print *, 'x2f_init_table: ISAT_MP not yet initialized.' 24 | stop 25 | endif 26 | 27 | index = pt_index 28 | return 29 | end subroutine x2f_pt_index 30 | !--------------------------------------------------------------- 31 | subroutine x2f_save_table(itab_opp) 32 | ! save ISAT table 33 | ! itab_opp = 0, save all the tables 34 | ! itab_opp = 1, save only one table (first) per partition 35 | 36 | use x2f_mpi_grpdata 37 | implicit none 38 | 39 | integer, intent(in) :: itab_opp 40 | 41 | integer :: info(100) 42 | real(kind(1.d0)) :: rinfo(50), stats(100) 43 | 44 | info = -12345 45 | rinfo = -12345. 46 | 47 | if(itab_opp == 0) then 48 | info(81) = 1 ! force writing the table 49 | call cisat( 12, info, rinfo, stats ) 50 | elseif( mod(rank, set_pt) == 0 ) then 51 | ! simple method for now: 52 | ! save ISAT table on the first rank of each partition 53 | info(81) = 1 ! force writing the table 54 | call cisat( 12, info, rinfo, stats ) 55 | print *, 'x2f_save_table: saving table on rank ', rank 56 | print *, 'x2f_save_table: using partition index ', pt_index 57 | endif 58 | 59 | return 60 | end subroutine x2f_save_table 61 | !--------------------------------------------------------------- 62 | -------------------------------------------------------------------------------- /ISAT/CEQ/ceq_maxmin.f90: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------! 2 | ! OWNER: Ithaca Combustion Enterprise, LLC ! 3 | ! COPYRIGHT: © 2012, Ithaca Combustion Enterprise, LLC ! 4 | ! LICENSE: BSD 3-Clause License (The complete text of the license can ! 5 | ! be found in the `LICENSE-ICE.txt' file included in the ISAT-CK7 ! 6 | ! source directory.) ! 7 | !---------------------------------------------------------------------! 8 | 9 | subroutine ceq_maxmin(nz,nc,B,c,zm,zmin,iret) 10 | !---------------------- 11 | implicit none 12 | integer, intent(in) :: nz, nc 13 | real(kind(1.d0)), intent(in) :: B(nz,nc), c(nc) 14 | integer, intent(out) :: iret 15 | real(kind(1.d0)), intent(out) :: zm(nz), zmin 16 | !----------------------- 17 | 18 | ! Determine the max-min composition. 19 | ! Find zm which maximizes zmin=min_i(z(i)) subject to B'*z=c. 20 | 21 | ! iret<0 indicates failure 22 | 23 | ! Method: 24 | ! Initially assume zmin>=0. 25 | ! Define: x=[ (z-zmin)' zmin]' 26 | ! Maximize zmin (i.e., minimize -x(n)) subject to x(i)>=0 27 | ! and B'*z=c, which is equivalent to A*x=c, 28 | ! where A=[ B' -sum(B)']. 29 | ! If feasible solution not found, zmin<0, and 30 | ! Define: x=[ (z-zmin)' -zmin]' 31 | ! Maximize zmin (i.e., minimize x(n)) subject to x(i)>=0 32 | ! and B'*z=c, which is equivalent to A*x=c, 33 | ! where A=[ B' sum(B)']. 34 | 35 | ! S.B. Pope 10/1/02 36 | 37 | integer :: nx, tries, j, jj 38 | real(kind(1.d0)) :: A(nc,nz+1), bsum(nc), f(nz+1), x(nz+1) 39 | 40 | 41 | nx=nz+1 42 | bsum=sum(B,dim=1) 43 | f=0 44 | ! first assume zmin>0, x=[z'-zmin zmin]' 45 | f(nx)=-1.d0 ! minimize -zmin 46 | A(1:nc,1:nz)=transpose(B) 47 | A(1:nc,nx)=bsum 48 | 49 | call ceq_linprog(nx,nc,f,A,c,x,iret) 50 | 51 | if( iret == 0 ) then ! success, zmin>=0 52 | zmin=x(nx) 53 | zm=x(1:nz)+zmin 54 | return 55 | elseif( iret /= -2 ) then ! failure 56 | return 57 | endif 58 | ! zmin<0, re-define x=[z'-zmin -zmin]' 59 | f(nx)=1.d0 ! minimize -zmin 60 | A(1:nc,nx)=-bsum 61 | 62 | call ceq_linprog(nx,nc,f,A,c,x,iret) 63 | 64 | if( iret /= 0 ) return ! failure 65 | 66 | zmin=-x(nx) 67 | zm=x(1:nz)+zmin 68 | 69 | return 70 | end subroutine ceq_maxmin --------------------------------------------------------------------------------