Blender V5.0
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

using EigenSparseMatrix = Eigen::SparseMatrix<double, Eigen::ColMajor>
using EigenSparseLU = Eigen::SparseLU<EigenSparseMatrix>
using EigenVectorX = Eigen::VectorXd
using EigenTriplet = Eigen::Triplet<double>

Functions

LinearSolverEIG_linear_solver_new (int num_rows, int num_columns, int num_right_hand_sides)
LinearSolverEIG_linear_least_squares_solver_new (int num_rows, int num_columns, int num_right_hand_sides)
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

using EigenSparseLU = Eigen::SparseLU<EigenSparseMatrix>

Definition at line 24 of file linear_solver.cc.

◆ EigenSparseMatrix

using EigenSparseMatrix = Eigen::SparseMatrix<double, Eigen::ColMajor>

Definition at line 23 of file linear_solver.cc.

◆ EigenTriplet

using EigenTriplet = Eigen::Triplet<double>

Definition at line 26 of file linear_solver.cc.

◆ EigenVectorX

using EigenVectorX = Eigen::VectorXd

Definition at line 25 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_right_hand_sides )

◆ EIG_linear_solver_delete()

◆ EIG_linear_solver_matrix_add()

◆ EIG_linear_solver_new()

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

◆ EIG_linear_solver_print_matrix()

void EIG_linear_solver_print_matrix ( LinearSolver * solver)

◆ EIG_linear_solver_right_hand_side_add()

◆ EIG_linear_solver_solve()

◆ EIG_linear_solver_variable_get()

◆ 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()

◆ linear_solver_variables_to_vector()

void linear_solver_variables_to_vector ( LinearSolver * solver)
static

◆ linear_solver_vector_to_variables()

void linear_solver_vector_to_variables ( LinearSolver * solver)
static