47 Commits
Author SHA1 Message Date
Gaetanosaure b4aeae5325 [thermo] Correct the instrinsic heating expression in PlasmaPhase: the energy deposited by the plasma corresponds to Joules heating, elastic power losses are a fraction of it and were thus counted twice in the previous expression 2026-07-07 15:08:08 -04:00
Ray SpethandClaude Sonnet 4.6 27376a428f [Reactor/Test] Improve coverage for cross-reactor Jacobian calculations
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 08:01:16 -05:00
665302b6cb [Reactor] Add accessors for full-network Jacobians
Co-authored-by: Anthony Walker <walkanth@oregonstate.edu>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 08:01:16 -05:00
Ray SpethandOpenAI Codex 6cd6723b26 [Reactor] Implement cross-reactor Jacobian terms for preconditioners
Co-authored-by: OpenAI Codex <codex@openai.com>
2026-05-29 08:01:16 -05:00
Ray SpethandOpenAI Codex 4be08e69b6 [Reactor] Adjust default atol for mole-based reactors
Scale the default atol (1e-15) by the total mole number of the reactor
to maintain accuracy even for very large / very small reactors.

Co-authored-by: OpenAI Codex <codex@openai.com>
2026-05-08 16:49:05 -05:00
Ray Speth cbcf86b64f [Test] Simplify direct execution of test binaries
Specify RPATH for test binaries to avoid needing to set LD_LIBRARY_PATH
or DYLD_LIBRARY_PATH.

For GTest tests, add relative paths to data and test/data directories
to allow running these directly from the repository root directory.
2026-05-05 09:39:10 -04:00
Ray Speth 4418e2f74c Finish span conversion of CVodesintegrator/IdasIntegrator 2026-02-15 20:33:04 -06:00
Ray Speth 186abfb11b Update Reactor classes to use span 2026-02-15 20:33:04 -06:00
Ray Speth b735be8661 Use span for Phase methods that return arrays 2026-02-07 18:26:48 -06:00
Matthew Quiram bd8f886472 made the PlasmaPhase reactor network test a regression test 2026-01-28 21:49:15 -05:00
Matthew Quiram d712eb0b01 added PlasmaPhase reactor network test 2026-01-28 21:49:15 -05:00
Ray Speth b048fc4062 Remove code deprecated in Cantera 3.2.0 2025-11-21 21:38:21 -05:00
Ray Speth c246d63870 Fix integer size-related compiler warnings 2025-10-28 17:17:06 -05:00
Ingmar Schoegl e6f6e2de20 [zeroD] Make energy/chemistryEnabled setter consistent 2025-10-27 13:49:13 -04:00
Ingmar Schoegl 6ae17f633f [CI] Add some unit tests 2025-10-22 06:20:12 -05:00
Ingmar Schoegl 8ef3115a06 [zeroD] Replace contents4 by phase 2025-10-17 18:01:53 -04:00
Ray Speth 2409e8d291 [Reactor] Begin transition of ReactorBase.contents to return Solution 2025-10-09 06:54:33 -05:00
Ray Speth 1c913b98eb [Reactor] Make cloning of Solution objects optional 2025-10-08 10:18:27 -04:00
Ingmar Schoegl 7fa6782449 [CI] Update headers for test 2025-09-22 21:11:54 -04:00
Ingmar Schoegl 1b5a4e2860 [unittest] Avoid building ReactorNet incrementally 2025-05-18 15:33:50 -04:00
Ingmar Schoegl 3f9742dcd0 [unittests] Improve test-zeroD coverage 2025-03-21 15:55:12 -04:00
Ray Speth 020c690c7e Rename PreconditionerBase to SystemJacobian 2025-02-01 14:15:18 -06:00
Ray Speth 118a49a8fe [Numerics] Enable using AdaptivePreconditioner as OneDim linear solver 2025-02-01 14:15:18 -06:00
Ray Speth 22ad9348b4 Add option to show stack trace as part of CanteraError message 2024-07-09 09:50:40 +02:00
Ingmar Schoegl cb2be38dc8 [0D] Remove legacy wall methods 2024-04-10 23:03:52 -04:00
Ingmar Schoegl cfcb2f2f80 Address review comments 2024-02-20 21:56:45 -05:00
Ingmar Schoegl cda3c30590 [0D] Prepare newReactor with contents 2024-02-20 21:56:45 -05:00
Ingmar Schoegl 3bc6a4befe [unittest] Update unit tests 2024-02-20 21:56:45 -05:00
Ingmar Schoegl 32f9ea6ec8 [0D] Deprecate zeroD insert 2024-02-20 21:56:45 -05:00
Ingmar Schoegl 0ead71c534 [unittest] Add googletests to check guards 2024-01-20 15:16:53 -05:00
Ray Speth 43fca53547 [Test] Fix unused variable warning 2023-08-15 14:21:04 -04:00
Ingmar Schoegl 64ade35c22 Using std::string 2023-08-05 16:26:32 -04:00
Ingmar Schoegl e482e13ca2 Using std::shared_ptr 2023-08-05 16:26:32 -04:00
Ingmar Schoegl 845a551277 Replace vector_fp 2023-08-05 16:26:32 -04:00
Ray Speth 3b2ce47dd7 Fix compiler warnings in gtest test suite 2023-07-02 09:58:03 -04:00
Ray Speth 3f245880c4 [Test] Enable printing stack trace after fatal errors 2023-06-10 20:57:53 -06:00
Ingmar Schoegl 1f16bf247e [unittest] Implement gtest for 'test-clib'
Unit tests cover 'clib' from within C++ googletest code
- port test-clib to google tests
- rename pre-existing version to test-clib-demo
- add tests indirectly probing SharedCabinet
- add tests for Solution access routines
- add tests for ctonedim
2023-03-06 18:02:07 -06:00
Ray Speth 48b0998675 Combine CVODES stats retrieval functions 2022-08-30 13:23:38 -04:00
Anthony Walker 26058075b9 Address PR review comments
- Adds a check for surfaces
- adds updateState and updatePreconditioner in proper locations
- Fixes documentation and makes other formatting changes
- Adds utilities tests and expected failures tests for the preconditioner
2022-07-20 10:17:51 -04:00
Anthony Walker c361a5e237 Implement adaptive preconditioning for reactor networks
Adds PreconditionerBase and derives AdaptivePreconditioner from this
base class. PreconditionerBase is intended to be an abstract class so
other types of preconditioners can be extended. AdaptivePreconditioner
is a specific type of preconditioning based on a tolerance.

The preconditioned integrator works with all Sundials versions supported
by Cantera.

The ILUT algorithm is used to limit fill-in when factorizing the preconditioner.

Adds access to CVODES integrator statistics in C++ and Python

Adds reactor classes "IdealGasConstPressureMoleReactor" and "IdealGasMoleReactor"
that use a mole-based state vector to increase the sparsity of the preconditioner.
2022-07-20 10:17:51 -04:00
Anthony Walker 44f54d2df2 Adjusted the test tolerance and completed suggested formatting changes 2021-06-26 12:19:26 -04:00
Anthony Walker 1204500119 This commit applies a suggested simplification to the test.
It specifically changes the application of the phase and kinetics
objects to the reactor by using "insert" instead of setKineticMgr and
setThermoMgr. It also changes the initial pressure to use a built in
constant in cantera.
2021-06-26 12:19:26 -04:00
Anthony Walker 367e3a383b Remove t0 from updateConnected function call 2021-06-26 12:19:26 -04:00
Anthony Walker 0b6f2364f6 Using vector as a fix for CI instead of raw double pointer 2021-06-26 12:19:26 -04:00
Anthony Walker df0d5acb46 Makes requested formatting changes and fixes CI.
Specifically, it ends lines of at 88 characters and adds space after inline comments. It also changed the allocation of arrays to satisfy CI.
2021-06-26 12:19:26 -04:00
Anthony Walker b77781dbb9 This commit makes requested changes to the reactor initialization test.
This commit changes the former test to use Reactor classes in lieu of IdealGasConstPressureReactor classes because it is the base class. It also changes some of the comparisons between the two reactor objects.
2021-06-26 12:19:26 -04:00
Anthony Walker b920d62409 Adding a test for single reactor initialize fix.
I adapted the example ./interfaces/cython/cantera/test_reactor.py::test_equilibrium_HP to C++ and performed the reactor initialization with an arbitrary value to show that it no longer creates a segmentation fault and also still integrates successfully in a network post individual initialization. I added this to it's own folder called zeroD because I could not find C++ instances of Reactor tests elsewhere.
2021-06-26 12:19:26 -04:00