MoDeNa  1.0
Software framework facilitating sequential multi-scale modelling
allocation.cc File Reference

Shorthand functions for allocation of matrices. More...

#include <stdlib.h>

Go to the source code of this file.

Functions

double *** alloc_3Ddmatrix (int nx, int ny, int nz)
 allocate 3D double matrix More...
 
double *** free_3Ddmatrix (double ***amat)
 free 3D double matrix More...
 
float *** alloc_3Dfmatrix (int nx, int ny, int nz)
 allocate 3D float matrix More...
 
float *** free_3Dfmatrix (float ***amat)
 free 3D float matrix More...
 
int *** alloc_3Dmatrix (int nx, int ny, int nz)
 allocate 3D integer matrix More...
 
int *** free_3Dmatrix (int ***amat)
 free 3D integer matrix More...
 
double ** alloc_dmatrix (int nx, int ny)
 allocate 2D double matrix More...
 
double ** free_dmatrix (double **amat)
 free 2D double matrix More...
 
float ** alloc_fmatrix (int nx, int ny)
 allocate 2D float matrix More...
 
float ** free_fmatrix (float **amat)
 free 2D float matrix More...
 
int ** alloc_matrix (int nx, int ny)
 allocate 2D integer matrix More...
 
int ** free_matrix (int **amat)
 free 2D integer matrix More...
 

Detailed Description

Shorthand functions for allocation of matrices.

Author
Pavel Ferkl
Juraj Kosek

Definition in file allocation.cc.

Function Documentation

◆ alloc_3Ddmatrix()

double*** alloc_3Ddmatrix ( int  nx,
int  ny,
int  nz 
)

allocate 3D double matrix

Parameters
[in]nxnumber of elements in 1st direction
[in]nynumber of elements in 2nd direction
[in]nznumber of elements in 3rd direction

Definition at line 9 of file allocation.cc.

References globals::nx, and globals::ny.

Referenced by makeNodeStruts().

◆ alloc_3Dfmatrix()

float*** alloc_3Dfmatrix ( int  nx,
int  ny,
int  nz 
)

allocate 3D float matrix

Parameters
[in]nxnumber of elements in 1st direction
[in]nynumber of elements in 2nd direction
[in]nznumber of elements in 3rd direction

Definition at line 46 of file allocation.cc.

References globals::nx, and globals::ny.

◆ alloc_3Dmatrix()

int*** alloc_3Dmatrix ( int  nx,
int  ny,
int  nz 
)

allocate 3D integer matrix

Parameters
[in]nxnumber of elements in 1st direction
[in]nynumber of elements in 2nd direction
[in]nznumber of elements in 3rd direction

Definition at line 83 of file allocation.cc.

References globals::nx, and globals::ny.

Referenced by allocateFromVTK(), and main().

◆ alloc_dmatrix()

double** alloc_dmatrix ( int  nx,
int  ny 
)

allocate 2D double matrix

Parameters
[in]nxnumber of elements in 1st direction
[in]nynumber of elements in 2nd direction

Definition at line 120 of file allocation.cc.

References globals::nx, and globals::ny.

Referenced by main().

◆ alloc_fmatrix()

float** alloc_fmatrix ( int  nx,
int  ny 
)

allocate 2D float matrix

Parameters
[in]nxnumber of elements in 1st direction
[in]nynumber of elements in 2nd direction

Definition at line 152 of file allocation.cc.

References globals::nx, and globals::ny.

◆ alloc_matrix()

int** alloc_matrix ( int  nx,
int  ny 
)

allocate 2D integer matrix

Parameters
[in]nxnumber of elements in 1st direction
[in]nynumber of elements in 2nd direction

Definition at line 184 of file allocation.cc.

References globals::nx, and globals::ny.

Referenced by main().

◆ free_3Ddmatrix()

double*** free_3Ddmatrix ( double ***  amat)

free 3D double matrix

Parameters
[in,out]amatmatrix

Definition at line 37 of file allocation.cc.

Referenced by makeNodeStruts().

◆ free_3Dfmatrix()

float*** free_3Dfmatrix ( float ***  amat)

free 3D float matrix

Parameters
[in,out]amatmatrix

Definition at line 74 of file allocation.cc.

◆ free_3Dmatrix()

int*** free_3Dmatrix ( int ***  amat)

free 3D integer matrix

Parameters
[in,out]amatmatrix

Definition at line 111 of file allocation.cc.

Referenced by main().

◆ free_dmatrix()

double** free_dmatrix ( double **  amat)

free 2D double matrix

Parameters
[in,out]amatmatrix

Definition at line 144 of file allocation.cc.

Referenced by main().

◆ free_fmatrix()

float** free_fmatrix ( float **  amat)

free 2D float matrix

Parameters
[in,out]amatmatrix

Definition at line 176 of file allocation.cc.

◆ free_matrix()

int** free_matrix ( int **  amat)

free 2D integer matrix

Parameters
[in,out]amatmatrix

Definition at line 208 of file allocation.cc.

Referenced by main().