diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-05-27 22:26:21 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-05-27 22:26:21 -0400 |
commit | ae6ad8569615d81fd4b4a8f13318c8f90a768a37 (patch) | |
tree | e8580c1fb0c4112cebc4a2caf2b661b2af853bbb /lib/include/problem.hpp | |
parent | 1e939e597964fa081b347e40af2be1069867b906 (diff) | |
download | fuse_networks-ae6ad8569615d81fd4b4a8f13318c8f90a768a37.tar.gz fuse_networks-ae6ad8569615d81fd4b4a8f13318c8f90a768a37.tar.bz2 fuse_networks-ae6ad8569615d81fd4b4a8f13318c8f90a768a37.zip |
refactored much of the fracture library and fixed some percolation measurements
Diffstat (limited to 'lib/include/problem.hpp')
-rw-r--r-- | lib/include/problem.hpp | 38 |
1 files changed, 38 insertions, 0 deletions
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 <vector> +#include <limits> + +#include <cholmod.h> +#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<bool>& fuses); + void break_edge(unsigned, bool unbreak = false); +}; + |