-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
79 allow updates to custom rate constant parameters and mapping by na…
…me (#80) * converting tests into python unit tests, adding analytical test * moving configs * moving one more config * adding python interfade, stubbing c stuff for fortran * passing rate constants in solve with python * trying to fix mac build * fine I'll add the three * trying a python setup action * release builds in docker files * am annoyed * thing * stuff * using most recent micm version
- Loading branch information
Showing
41 changed files
with
368 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"camp-files": ["species.json", "reactions.json"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"camp-data": [{"type": "MECHANISM", "name": "music box interactive configuration", "reactions": [{"type": "ARRHENIUS", "A": 0.00012, "B": 7, "C" : 75, "D": 50, "E": 0.5, "reactants": {"B": {"qty": 1}}, "products": {"C": {"yield": 1}, "irr__089f1f45-4cd8-4278-83d5-d638e98e4315": {"yield": 1}}}, {"type": "ARRHENIUS", "A": 0.004, "C" : 50, "reactants": {"A": {"qty": 1}}, "products": {"B": {"yield": 1}, "irr__2a109b21-bb24-41ae-8f06-7485fd36f1a7": {"yield": 1}}}]}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"camp-data": [{"name": "A", "type": "CHEM_SPEC"}, {"name": "B", "type": "CHEM_SPEC"}, {"name": "C", "type": "CHEM_SPEC"}, {"name": "irr__089f1f45-4cd8-4278-83d5-d638e98e4315", "type": "CHEM_SPEC"}, {"name": "irr__2a109b21-bb24-41ae-8f06-7485fd36f1a7", "type": "CHEM_SPEC"}]} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
"species.json", | ||
"reactions.json" | ||
] | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
program test_micm_fort_api | ||
use iso_c_binding | ||
use micm_core, only: micm_t | ||
|
||
implicit none | ||
|
||
type(micm_t), pointer :: micm | ||
real(c_double) :: time_step | ||
real(c_double) :: temperature | ||
real(c_double) :: pressure | ||
integer(c_int) :: num_concentrations | ||
real(c_double), dimension(5) :: concentrations | ||
integer :: errcode | ||
character(len=7) :: config_path | ||
|
||
time_step = 200 | ||
temperature = 272.5 | ||
pressure = 101253.3 | ||
num_concentrations = 5 | ||
concentrations = (/ 0.75, 0.4, 0.8, 0.01, 0.02 /) | ||
config_path = "configs/chapman" | ||
|
||
write(*,*) "[test micm fort api] Creating MICM solver..." | ||
micm => micm_t(config_path, errcode) | ||
|
||
if (errcode /= 0) then | ||
write(*,*) "[test micm fort api] Failed in creating solver." | ||
stop 3 | ||
endif | ||
|
||
write(*,*) "[test micm fort api] Initial concentrations", concentrations | ||
|
||
write(*,*) "[test micm fort api] Solving starts..." | ||
call micm%solve(time_step, temperature, pressure, num_concentrations, concentrations) | ||
|
||
write(*,*) "[test micm fort api] After solving, concentrations", concentrations | ||
|
||
write(*,*) "[test micm fort api] Finished." | ||
|
||
end program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule micm
updated
47 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
numpy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
add_test(NAME musica_python_chapman_test | ||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${PYTHON_MODULE_PATH} | ||
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/chapman.py) | ||
|
||
add_test(NAME musica_python_analytical_test | ||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${PYTHON_MODULE_PATH} | ||
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/analytical.py) |
Oops, something went wrong.