Blender  V3.3
Classes | Typedefs | Functions
linear_solver.cc File Reference
#include "linear_solver.h"
#include <Eigen/Sparse>
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <iostream>
#include <vector>

Go to the source code of this file.

Classes

struct  LinearSolver
 
struct  LinearSolver::Coeff
 
struct  LinearSolver::Variable
 

Typedefs

typedef Eigen::SparseMatrix< double, Eigen::ColMajor > EigenSparseMatrix
 
typedef Eigen::SparseLU< EigenSparseMatrixEigenSparseLU
 
typedef Eigen::VectorXd EigenVectorX
 
typedef Eigen::Triplet< doubleEigenTriplet
 

Functions

LinearSolverEIG_linear_solver_new (int num_rows, int num_columns, int num_rhs)
 
LinearSolverEIG_linear_least_squares_solver_new (int num_rows, int num_columns, int num_rhs)
 
void EIG_linear_solver_delete (LinearSolver *solver)
 
void EIG_linear_solver_variable_set (LinearSolver *solver, int rhs, int index, double value)
 
double EIG_linear_solver_variable_get (LinearSolver *solver, int rhs, int index)
 
void EIG_linear_solver_variable_lock (LinearSolver *solver, int index)
 
void EIG_linear_solver_variable_unlock (LinearSolver *solver, int index)
 
static void linear_solver_variables_to_vector (LinearSolver *solver)
 
static void linear_solver_vector_to_variables (LinearSolver *solver)
 
static void linear_solver_ensure_matrix_construct (LinearSolver *solver)
 
void EIG_linear_solver_matrix_add (LinearSolver *solver, int row, int col, double value)
 
void EIG_linear_solver_right_hand_side_add (LinearSolver *solver, int rhs, int index, double value)
 
bool EIG_linear_solver_solve (LinearSolver *solver)
 
void EIG_linear_solver_print_matrix (LinearSolver *solver)
 

Detailed Description

Sparse linear solver.

Definition in file linear_solver.cc.

Typedef Documentation

◆ EigenSparseLU

typedef Eigen::SparseLU<EigenSparseMatrix> EigenSparseLU

Definition at line 23 of file linear_solver.cc.

◆ EigenSparseMatrix

typedef Eigen::SparseMatrix<double, Eigen::ColMajor> EigenSparseMatrix

Definition at line 22 of file linear_solver.cc.

◆ EigenTriplet

Definition at line 25 of file linear_solver.cc.

◆ EigenVectorX

typedef Eigen::VectorXd EigenVectorX

Definition at line 24 of file linear_solver.cc.

Function Documentation

◆ EIG_linear_least_squares_solver_new()

LinearSolver* EIG_linear_least_squares_solver_new ( int  num_rows,
int  num_columns,
int  num_rhs 
)

◆ EIG_linear_solver_delete()

void EIG_linear_solver_delete ( LinearSolver solver)

◆ EIG_linear_solver_matrix_add()

void EIG_linear_solver_matrix_add ( LinearSolver solver,
int  row,
int  col,
double  value 
)

◆ EIG_linear_solver_new()

LinearSolver* EIG_linear_solver_new ( int  num_rows,
int  num_columns,
int  num_rhs 
)

◆ EIG_linear_solver_print_matrix()

void EIG_linear_solver_print_matrix ( LinearSolver solver)

◆ EIG_linear_solver_right_hand_side_add()

void EIG_linear_solver_right_hand_side_add ( LinearSolver solver,
int  rhs,
int  index,
double  value 
)

◆ EIG_linear_solver_solve()

bool EIG_linear_solver_solve ( LinearSolver solver)

◆ EIG_linear_solver_variable_get()

double EIG_linear_solver_variable_get ( LinearSolver solver,
int  rhs,
int  index 
)

◆ EIG_linear_solver_variable_lock()

void EIG_linear_solver_variable_lock ( LinearSolver solver,
int  index 
)

◆ EIG_linear_solver_variable_set()

void EIG_linear_solver_variable_set ( LinearSolver solver,
int  rhs,
int  index,
double  value 
)

◆ EIG_linear_solver_variable_unlock()

void EIG_linear_solver_variable_unlock ( LinearSolver solver,
int  index 
)

◆ linear_solver_ensure_matrix_construct()

static void linear_solver_ensure_matrix_construct ( LinearSolver solver)
static

◆ linear_solver_variables_to_vector()

static void linear_solver_variables_to_vector ( LinearSolver solver)
static

◆ linear_solver_vector_to_variables()

static void linear_solver_vector_to_variables ( LinearSolver solver)
static