Commit Graph

168 Commits

Author SHA1 Message Date
d7237e7367 docs(docs): rebuilt 2025-11-06 09:16:40 -05:00
ba306523d6 docs(docs): rebuilt 2025-11-05 18:38:07 -05:00
18d289da7e docs(policy): added doxygen docs to policy system 2025-11-05 18:37:31 -05:00
9fdbb57996 feat(policy): began addition of robust policy system
The policy system provides a way for users to ensure that they get a network with certain traits. For example being sure that the network they get has all of the proton proton reactions in its base reaction set. This is an extensible system which is intended to be used by researchers to build various determanistic network policies to make network results more reproducable
2025-11-05 12:48:08 -05:00
9bc6e9b0d4 feat(io): added ability to export the rate calculations of any engine to a python file
GridFire can now (to a very limited degree) approximate the abilities of pynucastro in so far as it can not just solve an engine but it can also export it to a python file. Currently only the rates are exported so no solver can yet be used (since things like the rest of the RHS and the jacobian are missing) but this is a step in that direction
2025-11-05 09:21:52 -05:00
7364eaafbd test(sandbox): some work on sandbox tests 2025-11-04 14:04:54 -05:00
77e6a918a5 docs(docs): rebuilt docs 2025-11-04 14:04:26 -05:00
e87206a4a3 docs(readme): updated readme to v0.7.0-alpha 2025-11-04 14:03:46 -05:00
d7e9597643 fix(python/solver): fidxed any cast issue with set_callback and moved initialization of solver context to before set callback 2025-11-04 13:24:29 -05:00
72a3f5bf4c feat(triggers): added ConvergenceFailureTrigger
added new trigger which throws on convergence failures. This also required adding a new "step" method for other triggers which gets called every step instead of every trigger throw. The ConvergenceFailureTrigger has sucsessgully let teh engine evolve to 10Gyr without any meaningful growth of convergence failures.
2025-11-04 13:22:57 -05:00
7f19143ff6 docs(construction): documented current default construction behavior 2025-11-04 13:20:46 -05:00
3c80ccc77f fix(python): added temporary patch to let python bindings work on mac
Mirroring what was done in fourdst (see fourdst/tree/v0.8.5) we have added a temporary patch to let python bindings work on mac while the meson-python folks resolve the duplicate rpath issue in the shared object file
2025-11-03 15:10:03 -05:00
0adc340767 fix(construction): removed std::optional arguments for weakRateInterpolator
Passing weak rate interpolator as an std::optional was resulting in use-after-free bugs due to std::optional making a copy of WeakRateInterpolator. This resulted in segfaults. Since we have the new construction semantics with flags this is no longer needed so the optional argument has been removed in favor of a simple const &
2025-11-03 09:43:36 -05:00
70ebe151ba fix(gcc-builds): fixed signedness warnings on gcc builds 2025-11-03 08:53:56 -05:00
86d7a283a1 feat(GraphEngine): More robust reaction type selection at network construction
Added new ways to select exactly what types of reactions (strong, beta+, beta-, electron capture, positron capture, or any combination thereof) can be turned on at network construction time. There are a few quality of life masks added as well such as weak which addes all weak type reactions, and all which adds weak + strong reactions. The default is to just add strong reactions for now.
2025-11-03 08:38:21 -05:00
56f9342052 fix(AtomicWeakRate): added bool overrides for sparsity calculations
these allow the atomic weak rate to be used with the current sparsity code. Note also that this commit reintroduces the full weak reaction set which does introduce an enormouse degree of stiffness which will need to be filtered out. What this means is that this commit practically cannot evolve a network due to this stiffness
2025-10-31 07:38:04 -04:00
1af54132b8 fix(construction): added reaclib_reaction_is_weak call
previously I had neglected to actually call the heuristic removing weak reaclib reactions. This is now called properly. Therefore it is this commit which actually prevents weak reaclib reactions from getting registered
2025-10-31 07:08:54 -04:00
c40dd9d0f7 fix(network-construction): added check to reject reaclib weak reactions
reaclib provides a small number of weak reactions which allow for things like closing the CNO cycle. Howevever, they are not of the same quality as the WRL reactions. Therefore we ignore them during network construction through a simple heuristic (is the mass number the same on both sides and is there exactly 1 product and reactant (ignoring the beta +/- particle). This is one of the final steps before actually enabling weak reactions since withouty turning these off we would be double counting weak reactions.
2025-10-30 15:30:55 -04:00
6088fb9c12 test(graphnet_sandbox): updated graphnet sandbox to test full network stack 2025-10-30 15:06:59 -04:00
7fded59814 fix(python-bindings): Updated python bindings to new interface
The python bindings now work with the polymorphic reaction class and the CVODE solver
2025-10-30 15:05:08 -04:00
23df87f915 fix(graph_engine): fixed major bug with jacobian sparsity
previousl the sparsity calculations for the jacobian matrix were completly broken. The method subgraph_sparsity was returning that all derivities were only depenednt on temperature and density. It should have been reporting that they also depended on some of the abundances. This was resolved by switching to a different structural sparsity engine (for_jac_sparsity). This bug had turned the solver into a fixed point iteration solver which failed for the stiff system we have. Now that it is resolved the solver can once again evolved over Gyr timescales.
2025-10-29 14:47:11 -04:00
66b2471c13 fix(LogicalReaclibReaction): fixed bug where reaclib reverse reactions were being included in forward reaction sets erroneously
Previously, due to a indexing issue, reverse rates were sometimes included in the forward rates for strong reactions. This lead to erroneously high molar reaction flows for some reactions. This has been resolved so now each logical reaction set is guareteed to include only either forward reactions or reverse reactions (not both)
2025-10-28 07:35:38 -04:00
c94740f08f fix(CVODE_solver_strategy): solved a bug wherein mass fractions were not being properly computed from molar abundances. 2025-10-26 15:15:03 -04:00
3fac6390e6 perf(graph_engine): refactored recordEpsTape to reduce repeated work
previously recordADTape was duplicating a lot of work which recordEpsTape also needed to do. Now all derivs are being recorded into m_rhsADFun so that only one tape recording phase is needed per network build stage.
2025-10-24 14:47:21 -04:00
98db2b1d43 perf(graph_engine): finished sparsity system for jacobian, major preformance win, roughly 20x faster
essentially all callers can now inform the graph engine about which species they hold active and graph engine then uses those to define a sparsity pattern and only calculate the jacobian along that sparsity pattern
2025-10-24 11:17:22 -04:00
0581f69c48 perf(engine_multiscale): performance enhancments due to improved hashing, locality, and data structure optimization
This particular commit speeds up QSE solving for systems where reverse reactions and engine caching is disabled by about 24%
2025-10-22 15:08:49 -04:00
b20d3467fa build(libcomposition): version bump for fourdst to bring in libcomposition v1.9.1 whith major preformance enhancments
fourdst version v0.8.4
2025-10-22 15:06:11 -04:00
ced29d2f63 fix(engine_multiscale): resolved bug which prevented proper equilibrium abundances from being found
this was done by adjusting the scaling of the QSE operator() residuals from r = dy/dt to r=(dy/dt)/y
2025-10-22 09:54:10 -04:00
3b8a0a1f33 fix(engine_multiscale): resolved a major species index ordering bug
All jacobian calculations were broken because the indexing used to record the AD tape was broken (see not parallel to) the indexing used by the composition object. A fix for this was to sort the network species by mass. However, more generally we should introduce a mechanism to ensure these two indexed sets always remain parallel
2025-10-14 13:37:48 -04:00
408f6d83a2 build(fourdst): version bump v0.8.2 -> v0.8.3
This fourdst version bump brings the libcomposition v1.9.0 which brings the abstract base class CompositionAbstract. This will allow us to impliment overrides which return specific molarAbundances skirting around Composition internal checks. This is for the purpose of allowing unrestricted molar flow when ccalculating the destruction rate constant for particular species.
2025-10-12 10:29:41 -04:00
25393f2470 refactor(engine_multiscale): removed debug output 2025-10-12 07:58:12 -04:00
bc666ff783 docs(engine_multiscale): improved error message when Eigen failes to converge to a solution for QSE solver 2025-10-12 07:52:30 -04:00
2f1077c02d fix(weakRates): major progress in resolving bugs
bigs were introduced by the interface change from accepting raw molar abundance vectors to using the composition vector. This commit resolves many of these, including preformant ways to report that a species is not present in the composition and unified index lookups using composition object tooling.

BREAKING CHANGE:
2025-10-10 09:12:40 -04:00
13e2ea9ffa feat(weak-reactions): brought weak reaction code up to a point where it will compile (NOT YET TESTED) 2025-10-08 11:17:35 -04:00
274c566726 docs(docs): rebuilt docs with loads more detail for triggers and weak reactions 2025-10-08 11:17:09 -04:00
8a0b5b2c36 feat(weak): major weak rate progress
Major weak rate progress which includes: A refactor of many of the public interfaces for GridFire Engines to use composition objects as opposed to raw abundance vectors. This helps prevent index mismatch errors. Further, the weak reaction class has been expanded with the majority of an implimentation, including an atomic_base derived class to allow for proper auto diff tracking of the interpolated table results. Some additional changes are that the version of fourdst and libcomposition have been bumped to versions with smarter caching of intermediate vectors and a few bug fixes.
2025-10-07 15:16:03 -04:00
4f1c260444 feat(trigger): added working robust repartitioning trigger system
more work is needed to identify the most robust set of criteria to trigger on but the system is now very easy to exend, probe, and use.
2025-09-29 13:35:48 -04:00
4c91f8c525 feat(CVODE_Solver_Strategy): added non negative constraint to CVODE based abundance solver
this prevents abundance values from going negative which is non physical
2025-09-22 11:15:14 -04:00
813e62bdd6 feat(dynamic-engine): added derivitves for energy generation rate. dε/dT and dε/dρ have been added to NetOut and computed with auto diff 2025-09-19 15:14:46 -04:00
ed1c5a1ac7 feat(solver): added CVODE solver from SUNDIALS 2025-08-15 12:11:32 -04:00
0b77f2e269 refactor(reaction): refactored to an abstract reaction class in prep for weak reactions 2025-08-14 13:33:46 -04:00
d920a55ba6 docs(readme): added toc 2025-08-05 15:23:04 -04:00
de582b938a docs(docs): added workflow page 2025-08-01 05:19:00 -04:00
a3ccd5e730 docs(readme): spelling correction 2025-07-31 18:10:13 -04:00
3488e4d039 Merge pull request #4 from tboudreaux/feature/observerCallback
Solver callback functions
2025-07-31 15:41:53 -04:00
b0c1daada4 docs(docs): added more callback docs 2025-07-31 15:41:27 -04:00
24049b2658 feat(solver): added callback functions to solver in C++ and python 2025-07-31 15:04:57 -04:00
5b74155477 build(wheels): added wheel generation scripts and social logo 2025-07-31 12:02:10 -04:00
7373ca2f9a docs(docs): updated index.html and readme 2025-07-31 11:10:02 -04:00
63265a2dc3 docs(docs): rebuilt 2025-07-31 10:54:31 -04:00