Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/hsp2/hsp2/HYDR.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from hsp2.hsp2.utilities import initm, make_numba_dict

# the following imports added by rb to handle dynamic code and special actions
from hsp2.hsp2.state import hydr_get_ix, hydr_init_ix, hydr_state_vars
from hsp2.state.state import hydr_get_ix, hydr_init_ix, hydr_state_vars
from hsp2.hsp2.om import pre_step_model, step_model, model_domain_dependencies
from numba.typed import Dict

Expand Down Expand Up @@ -159,7 +159,7 @@ def hydr(io_manager, siminfo, parameters, ts, ftables, state):
if hsp2_local_py != False:
from hsp2_local_py import state_step_hydr
else:
from hsp2.hsp2.state_fn_defaults import state_step_hydr
from hsp2.state.state_fn_defaults import state_step_hydr
# initialize the hydr paths in case they don't already reside here
hydr_init_ix(state, state["domain"])
# must split dicts out of state Dict since numba cannot handle mixed-type nested Dicts
Expand Down
2 changes: 1 addition & 1 deletion src/hsp2/hsp2/RQUAL.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from hsp2.hsp2.utilities import initm, initmd, make_numba_dict

# the following imports added to handle special actions
from hsp2.hsp2.state import rqual_init_ix, rqual_state_vars
from hsp2.state.state import rqual_init_ix, rqual_state_vars
from hsp2.hsp2.om import model_domain_dependencies

ERRMSGS_oxrx = (
Expand Down
2 changes: 1 addition & 1 deletion src/hsp2/hsp2/RQUAL_Class.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from hsp2.hsp2.PLANK_Class import PLANK_Class

# the following imports added to handle special actions
from hsp2.hsp2.state import rqual_get_ix
from hsp2.state.state import rqual_get_ix
from hsp2.hsp2.om import pre_step_model, step_model

if os.environ.get("NUMBA_DISABLE_JIT", 0): # jit should be on by default.
Expand Down
2 changes: 1 addition & 1 deletion src/hsp2/hsp2/SEDMNT.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from hsp2.hsp2.utilities import hourflag, initm, make_numba_dict

# the following imports added to handle special actions
from hsp2.hsp2.state import sedmnt_get_ix, sedmnt_init_ix, sedmnt_state_vars
from hsp2.state.state import sedmnt_get_ix, sedmnt_init_ix, sedmnt_state_vars
from hsp2.hsp2.om import pre_step_model, step_model, model_domain_dependencies
from numba.typed import Dict

Expand Down
4 changes: 2 additions & 2 deletions src/hsp2/hsp2/SEDTRN.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from hsp2.hsp2.utilities import make_numba_dict

# the following imports added to handle special actions
from hsp2.hsp2.state import sedtrn_get_ix, sedtrn_init_ix, sedtrn_state_vars
from hsp2.state.state import sedtrn_get_ix, sedtrn_init_ix, sedtrn_state_vars
from hsp2.hsp2.om import pre_step_model, step_model, model_domain_dependencies
from numba.typed import Dict

Expand Down Expand Up @@ -110,7 +110,7 @@ def sedtrn(io_manager, siminfo, parameters, ts, state):
# if (hsp2_local_py != False):
# from hsp2_local_py import state_step_hydr
# else:
# from hsp2.hsp2.state_fn_defaults import state_step_hydr
# from hsp2.state.state_fn_defaults import state_step_hydr
# must split dicts out of state Dict since numba cannot handle mixed-type nested Dicts
# initialize the sedtrn paths in case they don't already reside here
sedtrn_init_ix(state, state["domain"])
Expand Down
2 changes: 1 addition & 1 deletion src/hsp2/hsp2/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
get_gener_timeseries,
)
from hsp2.hsp2.configuration import activities, noop, expand_masslinks
from hsp2.hsp2.state import (
from hsp2.state.state import (
init_state_dicts,
state_siminfo_hsp2,
state_load_dynamics_hsp2,
Expand Down
2 changes: 1 addition & 1 deletion src/hsp2/hsp2/om.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import time
from numpy import zeros
from numba import njit # import the types
from hsp2.hsp2.state import append_state, get_ix_path
from hsp2.state.state import append_state, get_ix_path


def get_exec_order(model_exec_list, var_ix):
Expand Down
4 changes: 2 additions & 2 deletions src/hsp2/hsp2/om_equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"""

from hsp2.hsp2.om import is_float_digit
from hsp2.hsp2.state import set_state, get_state_ix
from hsp2.state.state import set_state, get_state_ix
from hsp2.hsp2.om_model_object import ModelObject, ModelConstant
from numba import njit
from numpy import array, append

# from hsp2.hsp2.state import set_state, get_state_ix
# from hsp2.state.state import set_state, get_state_ix
# from numba.typed import Dict
# from hsp2.hsp2.om import get_exec_order, is_float_digit
# from pandas import Series, DataFrame, concat, HDFStore, set_option, to_numeric
Expand Down
2 changes: 1 addition & 1 deletion src/hsp2/hsp2/om_model_linkage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
during a model simulation.
"""

from hsp2.hsp2.state import state_add_ts, get_state_ix
from hsp2.state.state import state_add_ts, get_state_ix
from hsp2.hsp2.om import *
from hsp2.hsp2.om_model_object import ModelObject
from numba import njit
Expand Down
2 changes: 1 addition & 1 deletion src/hsp2/hsp2/om_model_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
All runtime exec is done by child classes.
"""

from hsp2.hsp2.state import set_state, get_state_ix
from hsp2.state.state import set_state, get_state_ix
from numba.typed import Dict
from hsp2.hsp2.om import get_exec_order, is_float_digit
from pandas import HDFStore
Expand Down
2 changes: 1 addition & 1 deletion src/hsp2/hsp2/om_sim_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
during a model simulation.
"""

from hsp2.hsp2.state import set_state
from hsp2.state.state import set_state
from hsp2.hsp2.om import ModelObject
from hsp2.hsp2.om_model_object import ModelObject
from pandas import DataFrame
Expand Down
2 changes: 1 addition & 1 deletion src/hsp2/hsp2/sedtrn_step.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from numba import njit

# the following imports added to handle special actions
from hsp2.hsp2.state import (
from hsp2.state.state import (
get_domain_state,
set_domain_state,
)
Expand Down
Empty file added src/hsp2/state/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions tests/testcbp/HSP2results/check_equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from hsp2.hsp2.om import *
from hsp2.hsp2io.hdf import HDF5
from hsp2.hsp2io.io import IOManager
from hsp2.state.state import *

fpath = "./tests/testcbp/HSP2results/JL1_6562_6560.h5"
# try also:
Expand Down