boilercore_tests.modelfun.test_modelfun#

Test model function and model fit.

Module Contents#

Functions#

approx

Approximate equality with a relative tolerance of 1e-3.

test_syms

Test that declared symbolic variables are assigned to the correct symbols.

test_forward_model

Test that the model evaluates to the expected output for known input.

test_model_fit

Test that the model fit is as expected.

test_ode

Verify the solution to the ODE by substitution.

test_temperature_continuous

Test that temperature is continuous at the domain transition.

test_temperature_gradient_continuous

Test that the temperature gradient is continuous at the domain transition.

API#

boilercore_tests.modelfun.test_modelfun.approx(
*args,
)#

Approximate equality with a relative tolerance of 1e-3.

boilercore_tests.modelfun.test_modelfun.test_syms(
group_name: str,
)#

Test that declared symbolic variables are assigned to the correct symbols.

boilercore_tests.modelfun.test_modelfun.test_forward_model(
model,
)#

Test that the model evaluates to the expected output for known input.

boilercore_tests.modelfun.test_modelfun.test_model_fit(
params,
model,
run,
y,
expected,
)#

Test that the model fit is as expected.

boilercore_tests.modelfun.test_modelfun.test_ode(
ns,
)#

Verify the solution to the ODE by substitution.

boilercore_tests.modelfun.test_modelfun.test_temperature_continuous(
ns,
)#

Test that temperature is continuous at the domain transition.

boilercore_tests.modelfun.test_modelfun.test_temperature_gradient_continuous(
ns,
)#

Test that the temperature gradient is continuous at the domain transition.