Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/softbody/src/admmpd_linsolve.h')
-rw-r--r--extern/softbody/src/admmpd_linsolve.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/extern/softbody/src/admmpd_linsolve.h b/extern/softbody/src/admmpd_linsolve.h
new file mode 100644
index 00000000000..b1dd9ae8f4e
--- /dev/null
+++ b/extern/softbody/src/admmpd_linsolve.h
@@ -0,0 +1,36 @@
+// Copyright Matt Overby 2020.
+// Distributed under the MIT License.
+
+#ifndef ADMMPD_LINSOLVE_H_
+#define ADMMPD_LINSOLVE_H_
+
+#include "admmpd_types.h"
+
+namespace admmpd {
+
+class GaussSeidel {
+public:
+ // Solves (A + KtK) x = (b + Ktl)
+ // x and b passed as separate variables
+ // for debugging/testing purposes.
+ void solve(
+ const Options *options,
+ SolverData *data);
+
+protected:
+ // Allocates data, computes colors
+ void init_solve(
+ const Options *options,
+ SolverData *data);
+
+ // Computes colors of A + KtK
+ void compute_colors(
+ const RowSparseMatrix<double> *A,
+ const RowSparseMatrix<double> *KtK, // if null, just A
+ std::vector<std::vector<int> > &colors);
+
+};
+
+} // namespace admmpd
+
+#endif // ADMMPD_LINSOLVE_H_