3#include "eigen_matrix_defs.h"
4#include "ObjectFactoryStack.h"
7#include "LinearOperator.h"
8#include "AsynchronousTask.h"
9#include "MatrixConnectome.h"
10#include <Eigen/StdVector>
39 void StartBuilding(
int size);
41 void AddToMatrixThreadSafe(
int i,
int j,
const mat6& M );
47 virtual int SystemSize();
49 mat6 GetElementMatrix(
int index);
58 void AddToMatrix(
int i,
int j,
const mat6& M);
63 void FillSubMatrix(SparseMat& result, std::vector<int>::iterator elements_begin, std::vector<int>::iterator elements_end);
70 std::vector<MatrixConnectome::CRix> m_connection_indices;
71 std::vector<mat6,Eigen::aligned_allocator<mat6>> m_connection_matrices;
72 std::mutex m_ConnectionElementLock;
93 std::vector<int> elements;
94 Eigen::SimplicialLLT<SparseMat, Eigen::Upper, Eigen::NaturalOrdering<int>>* m_sparse_solver;
96 SparseMat connection_matrix;
97 const Vector* global_B;
104 enum State {COMPUTE,SOLVE} state;
108 std::vector<ConnectionSolverTask> m_connection_solver;
120 void setSubMatrix(
int start_index,
int end_index, mat6* A0, mat6* A1);
121 void MultiplySubDomain(
const Vector* x, Vector* y);
123 double GetAccumulator(){
return m_accumulator;}
133 double m_accumulator;
147 void SetMemoryRoot(mat6* U0_root, mat6* U1_root);
149 void InvertSubDomain(
int start_index,
int end_index, mat6* A0, mat6* A1);
150 void SolveSubDomain(
const Vector* b, Vector* x);
152 double GetAccumulator(){
return m_accumulator;}
154 enum State {COMPUTE,SOLVE};
174 double m_accumulator;
177 std::vector<TridiagonalSubSolverTask> m_TridiagonalSubSolverTask;
Definition: AsynchronousTask.h:20
Definition: AsynchronousTask.h:15
Definition: LinearOperator.h:12
Definition: MatrixConnectome.h:29
Definition: SparseMatrixBuilder.h:90
Definition: SparseMatrixBuilder.h:117
mat6 * m_A0
end index
Definition: SparseMatrixBuilder.h:129
int m_ix1
start index
Definition: SparseMatrixBuilder.h:128
mat6 * m_A1
main diagonal;
Definition: SparseMatrixBuilder.h:130
const Vector * m_x
neighbor diagonal;
Definition: SparseMatrixBuilder.h:131
Definition: SparseMatrixBuilder.h:144
int m_num
end index
Definition: SparseMatrixBuilder.h:162
int m_ix1
start index
Definition: SparseMatrixBuilder.h:161
const Vector * m_b
neighbor diagonal;
Definition: SparseMatrixBuilder.h:165
mat6 * m_A1
main diagonal;
Definition: SparseMatrixBuilder.h:164
Definition: SparseMatrixBuilder.h:34
std::mutex * m_MatrixColumnLocks
number of 6DOF elements in the system
Definition: SparseMatrixBuilder.h:75
virtual void ComputeApproximateInverse()
approximately solve the linear system Ax = b
mat6 * m_U_1_diagonal
the main diagonal blocks of the block-tridiagonal UtU decomposition
Definition: SparseMatrixBuilder.h:83
void SetDropSize(int size)
Definition: SparseMatrixBuilder.h:55
void FillSubMatrix(SparseMat &result, std::vector< int >::iterator elements_begin, std::vector< int >::iterator elements_end)
add to submatrix at index i,j
virtual double ApplyLinearOperator(const Vector &x, Vector &y)
add to submatrix at index i,j with mutex lock
virtual double ApplyApproximateInverse(const Vector &b, Vector &x)
perform matrix multiplication y = Ax
mat6 * m_U_0_diagonal
first extra-diagonal of the system matrix
Definition: SparseMatrixBuilder.h:82
bool * m_set
first extra-diagonal of the block-tridiagonal UtU decomposition
Definition: SparseMatrixBuilder.h:85
void InitializeElementMatrix(int i, const mat6 &M)
Resets matrix to zero.
CoreBoundThreadPool * m_ThreadPool
list of asynchronous matrix sub domain
Definition: SparseMatrixBuilder.h:180
mat6 * m_A_1_diagonal
the main diagonal blocks of the system matrix
Definition: SparseMatrixBuilder.h:80
std::vector< SubMultiplicationTask > m_SubMultiplicationTask
List of asynchronous block-tridiagonal sub domain solvers.
Definition: SparseMatrixBuilder.h:178
Definition: CollisionManager.h:6