feat(reaclib): working AD system and nearly working network

a few issues remain with letting the composition evolve as new species come online
This commit is contained in:
2025-06-20 13:52:09 -04:00
parent af8401e4ee
commit fe73a021bf
6 changed files with 466 additions and 141 deletions

View File

@@ -6,7 +6,7 @@
#include "network.h"
#include "composition.h"
#include "reaclib.h"
#include "reactions.h"
#include "netgraph.h"
#include <vector>
@@ -74,8 +74,19 @@ TEST_F(approx8Test, reaclib) {
serif::composition::Composition composition;
composition.registerSymbol(symbols, true);
composition.setMassFraction(symbols, comp);
bool isFinalized = composition.finalize(true);
composition.finalize(true);
reaclib::REACLIBReactionSet reactionSet = build_reaclib_nuclear_network(composition);
std::cout << reactionSet.size() << std::endl;
NetIn netIn;
netIn.composition = composition;
netIn.temperature = 1e7;
netIn.density = 1e2;
netIn.energy = 0.0;
netIn.tMax = 3.15e17;
netIn.dt0 = 1e12;
GraphNetwork network(composition);
NetOut netOut;
netOut = network.evaluate(netIn);
std::cout << netOut << std::endl;
}