From ae6ad8569615d81fd4b4a8f13318c8f90a768a37 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Mon, 27 May 2019 22:26:21 -0400 Subject: refactored much of the fracture library and fixed some percolation measurements --- lib/include/problem.hpp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 lib/include/problem.hpp (limited to 'lib/include/problem.hpp') diff --git a/lib/include/problem.hpp b/lib/include/problem.hpp new file mode 100644 index 0000000..c2c9e09 --- /dev/null +++ b/lib/include/problem.hpp @@ -0,0 +1,38 @@ + +#include +#include + +#include +#include "graph.hpp" +#include "current_info.hpp" + +#ifdef FRACTURE_LONGINT + +#define CHOL_F(x) cholmod_l_##x +#define CHOL_INT long int + +#else + +#define CHOL_F(x) cholmod_##x +#define CHOL_INT int + +#endif + +class problem { + private: + const graph& G; + unsigned axis; + cholmod_dense* b; + cholmod_factor* factor; + cholmod_sparse* voltcurmat; + cholmod_common* c; + + public: + problem(const graph&, unsigned, cholmod_common*); + problem(const graph&, unsigned, cholmod_sparse*, cholmod_common*); + problem(const problem&); + ~problem(); + current_info solve(std::vector& fuses); + void break_edge(unsigned, bool unbreak = false); +}; + -- cgit v1.2.3-54-g00ecf