31 Commits

Author SHA1 Message Date
284e8cd10a perf(Composition): Internally switched from map -> vector
This brings a major performance improvment as all memory is contiguous
on the heap rather than spread around.
2025-12-08 11:31:46 -05:00
184df676ca perf(hashing): Much faster hash algorithm
For compositions we have implimented a much faster hashing algorithm
2025-12-07 09:41:58 -05:00
51c6a97b47 fix(cache): Cache properly clears
Cache now clears properly when setting molar abundances
2025-12-07 07:52:08 -05:00
75ba6c8456 perf(hash): Hash caching
added ability for composition to stash their own hash values
2025-12-07 07:47:32 -05:00
522d766bc2 feat(composition): added map overloads 2025-11-25 11:27:45 -05:00
408dd71eee feat(composition-hash): added robust hashed for compositions
also added ability to use Compositions as a std::hash in unordered_* types. Further added a constructor to build a Composition from a const CompositionAbstract&
2025-11-12 15:21:33 -05:00
2492b5f652 feat(MaskedComposition): added MaskedComposition to libcomposition
MaskedComposition is a generally useful decorator, therefore instead of forcing callers to impliment it on their own, we have implimented it as part of libcomposition
2025-11-10 08:47:35 -05:00
31407c91f7 feat(CompositionDecorator): added composition decorator
It is sometimes useful for callers to be able to create new composition objects without overloading all the required methods. The CompositionDecorator acts as a simple translation layer which will pass any calls to virtual methods down to the next level of the composition stack (other than those which may have been overloaded by the caller)
2025-11-09 07:42:03 -05:00
84947a2b12 feat(composition): changed how composition is conmstructed
Composition objects now must be built from vectors of molar abundances.  Things such as mass fraction and number fraction are computed on the fly (with some caching for performance). This will allow for many fewer issues when converting from solver space to composition space.

BREAKING CHANGE: The entire old API has been broken. There is no longer any need to finalize. In fact the entire concept of finalization has been removed. Further, the entire CompositionEntry and GlobalComposition data structure has been removed. Any code written for the old version will no longer work and major reworking will be needed to use the new version.
2025-11-07 15:49:25 -05:00
5baa671ddd docs(libcomposition): added more docstrings 2025-10-12 10:21:28 -04:00
0ef3b1a195 feat(Composition): Composition now inherits from abstract base class
The composition object is now a specialization of the abstract base CompositionAbstract. This interface enforces getters but not setters (those are left up to children). The intention here is that other code can specialize particular getters for cases where special handling (like unrestricted amounts of one species) are required.
2025-10-12 10:12:49 -04:00
f539e498b8 feat(az_to_species): az_to_species now returns an expected and error type
this will allow for much easier checking if a particular a,z pair actually exists
2025-10-08 15:17:33 -04:00
5fba54c1a2 feat(Added-ability-to-get-electron-abundance-and-fixed-some-conversion-bugs): Now Ye can be retrived directly from the composition object. Further a bug which prevented proper conversion to and from number or mass frac modes without messing up the numbers has been resolved 2025-10-06 14:29:33 -04:00
b94d9b456f feat(species-lookup): added function to get species from a and z 2025-08-13 13:07:49 -04:00
9f5ef7fd6a docs(docs): added robust docs 2025-07-24 09:35:52 -04:00
e8e69f00c7 feat(composition): added more expressive errors 2025-07-21 07:48:00 -04:00
85e89692e1 feat(composition): added species queries and < > operators for species based on mass 2025-07-14 11:29:04 -04:00
f3d946bc51 feat(species): added spin parsing from spin parity string 2025-07-02 10:35:54 -04:00
5fe127ff04 feat(species): added half life, spin parity, and decay modes to species database 2025-06-28 06:31:41 -04:00
5990fa62a7 feat(Composition): added getMolarAbundance method 2025-06-25 08:26:50 -04:00
209d61f61f fix(headers): moved all headers to fourdst/ 2025-06-22 04:56:04 -04:00
db88e308de build(libcomposition): brought working build system into libcomposition 2025-06-21 11:33:27 -04:00
b0896d20e9 fix(atomicSpecies.h-->-species.h): added species.h includes for spesific species where needed 2025-06-19 14:51:42 -04:00
774bdca083 feat(reaclib): working on building efficient reaclib tooling for general nuclear network
this commit primarily adds a more robust ability to cull reactions that are not needed from the generated header
2025-06-18 12:13:24 -04:00
7c854ea3d1 test(tests): updated tests to use fractional checks
tests for eos and approx8 now use relative error to account for large dynamic range
2025-06-17 10:17:46 -04:00
675dcf9b41 refactor(serif): updated tests to reflect new serif namespaces 2025-06-11 14:49:26 -04:00
82d74c7bb2 feat(composition): added mix method to combine compositions. Also overloaded the + operator to mix with an assumed fraction of 50/50 2025-03-26 08:07:11 -04:00
e850f78831 feat(composition): added ability to change composition modes 2025-03-25 13:01:22 -04:00
95e4d10c59 feat(composition): added numberFrac methods and subset method
Composition can now be placed in either number fraction or mass fraction mode and can (after finalization) convert between them. Subsets of compositions can also be made. Normalization has also been added to finalize. Tests have been added
2025-03-25 12:49:37 -04:00
b17cdbf1bf test(tests/composition): added composition tests, atomicSpecies tests, and sandbox 2025-03-24 12:59:17 -04:00
4840b439df feat(composition): added composition module stub 2025-03-24 10:41:13 -04:00