3D-ICE 3.0.0
Data Structures | Typedefs | Functions
system_matrix.h File Reference
#include "types.h"
#include "string_t.h"
#include "dimensions.h"
#include "thermal_grid.h"
#include "analysis.h"
#include "slu_ddefs.h"

Go to the source code of this file.

Data Structures

struct  SystemMatrix_t
 Structure representing the squared matrix storing the coefficients of the linear system that is solved tu run the thermal simulation. More...
 

Typedefs

typedef struct SystemMatrix_t SystemMatrix_t
 

Functions

void system_matrix_init (SystemMatrix_t *sysmatrix)
 
Error_t system_matrix_build (SystemMatrix_t *sysmatrix, CellIndex_t size, CellIndex_t nnz)
 
void system_matrix_destroy (SystemMatrix_t *sysmatrix)
 
void fill_system_matrix (SystemMatrix_t *sysmatrix, ThermalGrid_t *thermal_grid, Analysis_t *analysis, Dimensions_t *dimensions)
 
Error_t do_factorization (SystemMatrix_t *sysmatrix)
 
Error_t solve_sparse_linear_system (SystemMatrix_t *sysmatrix, SuperMatrix *b)
 
void system_matrix_print (SystemMatrix_t sysmatrix, String_t file_name)
 

Typedef Documentation

◆ SystemMatrix_t

Definition of the type SystemMatrix_t

Definition at line 141 of file system_matrix.h.

Function Documentation

◆ do_factorization()

Error_t do_factorization ( SystemMatrix_t sysmatrix)

Perform the A=LU decomposition on the system matrix

Parameters
sysmatrixpointer to the (system) matrix A to factorize
Returns
TDICE_SUCCESS if the factorization succeded
TDICE_FAILURE if some error occured

Definition at line 177 of file system_matrix.c.

◆ fill_system_matrix()

void fill_system_matrix ( SystemMatrix_t sysmatrix,
ThermalGrid_t thermal_grid,
Analysis_t analysis,
Dimensions_t dimensions 
)

Fills the system matrix

The function fills, layer by layer, all the columns of the system matrix.

Parameters
sysmatrixpointer to the system matrix to fill
thermal_gridpointer to the thermal grid structure
analysispointer to the structure containing info about the type of thermal analysis
dimensionspointer to the structure containing the dimensions of the IC

Definition at line 1808 of file system_matrix.c.

◆ solve_sparse_linear_system()

Error_t solve_sparse_linear_system ( SystemMatrix_t sysmatrix,
SuperMatrix *  b 
)

Solve the linear system b = A/b

Parameters
sysmatrixpointer to the (system) matrix A
bpointer to the input vector b
Returns
TDICE_SUCCESS if the solution b has been found
TDICE_FAILURE if some error occured

Definition at line 2019 of file system_matrix.c.

◆ system_matrix_build()

Error_t system_matrix_build ( SystemMatrix_t sysmatrix,
CellIndex_t  size,
CellIndex_t  nnz 
)

Allocates memory to store indexes and coefficients of a SystemMatrix

Parameters
sysmatrixthe address of the system matrix
sizethe dimension of the (square) matrix
nnzthe number of nonzeroes coeffcients
Returns
TDICE_SUCCESS if the memory allocation succeded
TDICE_FAILURE if the memory allocation fails

Definition at line 85 of file system_matrix.c.

◆ system_matrix_destroy()

void system_matrix_destroy ( SystemMatrix_t sysmatrix)

Destroys the content of the fields of the structure sysmatrix

The function releases any dynamic memory used by the structure and resets its state calling system_matrix_init .

Parameters
sysmatrixthe address of the structure to destroy

Definition at line 230 of file system_matrix.c.

◆ system_matrix_init()

void system_matrix_init ( SystemMatrix_t sysmatrix)

Inits the fields of the sysmatrix structure with default values

Parameters
sysmatrixthe address of the structure to initalize

Definition at line 46 of file system_matrix.c.

◆ system_matrix_print()

void system_matrix_print ( SystemMatrix_t  sysmatrix,
String_t  file_name 
)

Generates a text file storing the sparse matrix

The file will contain one row of the form row-column-value" for each zero coefficient (COO format). The first row (or column) has index 1 (matlab compatibile)

Parameters
sysmatrixthe system matrix structure
file_namethe name of the file to create

Definition at line 2040 of file system_matrix.c.