SIFEL/GEFEL/matrix-new.cpp File Reference

#include <stdio.h>
#include <math.h>
#include <string.h>
#include "matrix.h"
#include "eigsol.h"

Go to the source code of this file.

Functions

long addm (const matrix &a, const matrix &b, matrix &c)
 adds 2 matrices C := A+B
long allocm (long m, long n, double **&mat)
 allocates double array to the dimensions m x n
long allocm (long m, long n, imatrix &mat)
 allocates imatrix to the dimensions m x n
long allocm (long m, long n, matrix &mat)
 allocates matrix to the dimensions m x n
void bdbj (double *k, const double *b, const double *d, double jac, long m, long n)
 computes matrix product K += B^T . D . B. jac (only upper triangle components are evaluated)
void bdbjac (matrix &d, const matrix &a, const matrix &b, const matrix &c, double jac)
 computes matrix product D += A^T . B . C . jac
long cmulm (double c, matrix &a)
 multiplies matrix by constant A := c.A
long cmulm (const double c, const matrix &a, matrix &b)
 multiplies matrix by constant B := c.A
long condense_matrix (matrix &sm, ivector &cu)
 performs condesation of selected dofs of the given stiffness matrix
long condense_vector (matrix &sm, vector &nf, ivector &cu)
 performs condesation of selected dofs of the given load vector nf according to corresponding stiffness matrix sm
long copym (const matrix &src, matrix &dest)
 copies contents of matrix from the src to dest
long destrm (long **&mat, long m)
 deallocates integer matrix given by 2 dimensional array
long destrm (double **&mat, long m)
 deallocates matrix given by 2 dimensional array
long destrm (matrix &mat)
 deallocates matrix
double det2d (const double *x, const double *y)
 computes determinant of matrix which equals to double area of triangle given by coordinate vectors x and y
double det3d (const double *x, const double *y, const double *z)
 computes determinant of matrix which equals to six-multiple of tetrahedron volume which is given coordinate vectors x,y,z
long detm (const matrix &a, double &det)
 computes determinant of the matrix a, i.e. det(A)
void extractblock (double *a, double *b, long n, long nr, long nc, long fri, long fci)
 extracts submatrix b(nr,nc) from matrix a
void extractm (matrix &a, matrix &b, long fi, long ncomp)
 extracts squared matrix b(ncomp,ncomp) from matrix a
long fillcol (double c, long i, matrix &mat)
 fills i-th column of matrix with given value c
long fillm (double c, matrix &mat)
 fills contents of matrix with given value c
long fillrow (double c, long i, matrix &mat)
 fills i-th row of matrix with given value c
long gause (const matrix &a, matrix &b, vector &r, vector &sol, double zero)
 solves system of linear algebraic equations by the Gauss elimination (A.x = r), resulting matrix is b, resulting vector is stored in r
long gause (const matrix &a, matrix &b, vector &r, double zero)
 solves system of linear algebraic equations by the Gauss elimination (A.x = r), resulting matrix is b, resulting vector is stored in r
long gause (const matrix &a, matrix &b, double zero)
 performs Gauss elimination on the matrix a, result is stored in the matrix b
void gemp (double *a, double *x, double *y, long n, long m, double limit, long pivot)
 solves system of algebraic equations by Gauss method with pivot selection
void glmatrixtransf (matrix &a, const matrix &tmat)
 transforms tensor(matrix) a given in the global coordinate system to the local one (A_l := T^T . A_g . T)
void globloc (const double *gv, double *lv, const long *cn, long n)
 localizes components of local(element) vector to the global(problem) vector
void glvectortransf (const vector &g, vector &l, const matrix &tmat)
 transforms vector g given in the global coordinate system to vector l in local coordinate system (l = T^T . g)
void glvectortransfblock (vector &v, const matrix &t)
 transforms block vector v given in the global coordinate system to the local one (v_l := T^T . v_g) (number of blocks is given by dimension of T)
long invm (const matrix &a, matrix &b, double zero)
 inverts matrix a, i.e. computes A^{-1}
void lgmatrixtransf (matrix &a, const matrix &tmat)
 transforms tensor(matrix) a given in the local coordinate system to the global one (A_g := T . A_l . T^T)
void lgmatrixtransfblock (matrix &a, const matrix &t)
 transforms block matrix a given in the local coordinate system to the global one (A_g := T . A_l . T^T) (number of blocks is given by dimension of T)
void lgvectortransf (vector &g, const vector &l, const matrix &tmat)
 transforms vector l given in the local coordinate system to vector g in global coordinate system (g = T . l)
void lgvectortransfblock (vector &v, const matrix &t)
 transforms block vector v given in the local coordinate system to the global one (v_g := T^T . v_l) (number of blocks is given by dimension of T)
void locglob (double *gv, const double *lv, const long *cn, long n)
 localizes components of local(element) vector to the global(problem) vector
void locvecmat (double *mat, const double *vect, const long *cn, long ci, long m, long n)
void lu_full (double *a, double *x, double *y, long n, double zero, long tc)
 solves system of algebraic equations by LU decomposition
void mat_localize (matrix &gm, matrix &lm, long *rcn, long *ccn)
 localizes components of local matrix lm to the global one gm
void matassem_lsm (double *lsm, vector &natcoord)
 assembles matrix of least square problem for extrapolation of nodal values from integration point values
long mswapc (matrix &mat, long i, long j)
 swaps matrix columns i and j
long mswapr (matrix &mat, long i, long j)
 swaps matrix rows i and j
void mtxm (const double *a, const double *b, double *c, long l, long m, long n)
 multiplies two matrices C := A^T.B given by arrays
long mtxm (const matrix &a, const matrix &b, matrix &c)
 multiplies two matrices C := A^T.B
void mtxmccr (const double *a, const double *b, double *c, long l, long m, long n)
 multiplies transposed matrix a from right by matrix b, C := A^T . B, matrices are stored by columns
void mtxv (const double *a, const double *b, double *c, long m, long n)
 multiplies transposed matrix a given by array from right by vector u given by array v := A^T.u
long mtxv (const matrix &a, const vector &u, vector &v)
 multiplies transposed matrix a from right by vector u v := A^T.u
void mtxvc (const double *a, const double *b, double *c, long m, long n)
void mxm (const double *a, const double *b, double *c, long l, long m, long n)
 multiplies two matrices C := A.B given by arrays
long mxm (const matrix &a, const matrix &b, matrix &c)
 multiplies two matrices C := A.B
void mxmt (const double *a, const double *b, double *c, long l, long m, long n)
 multiplies two matrices C := A.B^T given by arrays
long mxmt (const matrix &a, const matrix &b, matrix &c)
 multiplies two matrices C := A.B^T
void mxv (const double *a, const double *b, double *c, long m, long n)
 multiplies matrix a given by array from right by vector u given by array v := A.u
long mxv (const matrix &a, const vector &u, vector &v)
 multiplies matrix a from right by vector u v := A.u
void mxvc (const double *a, const double *b, double *c, long m, long n)
 multiplies matrix a stored by columns from the right by vector b c := A.b
void nnj (double *m, const double *n, double jac, long mm, long nn)
 computes matrix product M += N^T . N . jac
void nnjac (matrix &d, const matrix &a, const matrix &b, double jac)
 computes matrix product D += A^T . B . jac
void princ_val (matrix &v, vector &pval, matrix &pvect, long ni, double err, double zero, long n, long normalize)
 computes eigenvalues(principal values) of the given matrix v by Jacobi method
long printm (const matrix &a, FILE *out=stdout, int prec=3, int width=11)
 prints the matrix to the file with the given width and precision
long readm (FILE *in, matrix &a)
long reallocm (long m, long n, imatrix &mat)
 reallocates imatrix to the dimensions m x n
long reallocm (long m, long n, matrix &mat)
 reallocates matrix to the dimensions m x n
void rhsassem_lsm (double *rhs, vector &natcoord, vector &values)
 assembles right hand side vector of least square problem for extrapolation of nodal values from integration point values
void solve_lsm (double *lsm, double *lhs, double *rhs, double zero, long n, long m)
 solves system of equation given by least square problem for extrapolation of nodal values from integration point values
long subm (const matrix &a, const matrix &b, matrix &c)
 substracts 2 matrices C := A-B
long tensprd (const vector &a, const vector &b, matrix &c)
long tranm (matrix &a)
 transposes matrix A := A^T
long tranm (const matrix &a, matrix &at)
 transposes matrix A_t := A^T
long vxm (const vector &u, const matrix &a, vector &v)
 multiplies matrix a from left by row vector u v := u.A
long vxmt (const vector &u, const matrix &a, vector &v)
 multiplies transposed matrix a from left by row vector u v := u.A^T
long vxmxv (const double *v, const double *m, long dim, double &answer)
 multiplies row vector v given by array with symetric matrix m given by array and column vector v, i.e. answer := (v^T).A.v
long vxmxv (const vector &v, const matrix &m, double &answer)
 multiplies row vector v with symetric matrix m and column vector v, i.e. answer := (v^T).A.v
long vxv (const vector &u, const vector &v, matrix &a)
 multiplies column vector u with row vector, i.e. it performs tensor product, A := u * v

Function Documentation

long addm ( const matrix a,
const matrix b,
matrix c 
)

adds 2 matrices C := A+B

The function adds matrix given by a to matrix given by b, the result is stored in c.

Parameters:
a is the structure of the first added matrix
b is the structure of the second added matrix
c is the structure of the result matrix

Requests : a, b and c have to be same dimensions, c has to have allocated memory array for elements which is enough large to hold contents of the result.

Return values:
0 : on succes.
1 : in case incompatibility sizes of a, b and c matrices.

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 631 of file matrix-new.cpp.

long allocm ( long  m,
long  n,
double **&  mat 
)

allocates double array to the dimensions m x n

The function allocates memory from heap to the mat's member array a.

Parameters:
m is the number of rows
n is the number of columns
mat is the allocated double array

created 20.11.2003, Ladislav Svoboda, termit@cml.fsv.cvut.cz

Definition at line 425 of file matrix-new.cpp.

long allocm ( long  m,
long  n,
imatrix mat 
)

allocates imatrix to the dimensions m x n

The function allocates memory from heap to the mat's member array a.

Parameters:
m is the number of rows
n is the number of columns
mat is the structure for allocated imatrix

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 268 of file matrix-new.cpp.

long allocm ( long  m,
long  n,
matrix mat 
)

allocates matrix to the dimensions m x n

The function allocates memory from heap to the mat's member array a.

Parameters:
m is the number of rows
n is the number of columns
mat is the structure for allocated matrix

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 239 of file matrix-new.cpp.

void bdbj ( double *  k,
const double *  b,
const double *  d,
double  jac,
long  m,
long  n 
)

computes matrix product K += B^T . D . B. jac (only upper triangle components are evaluated)

Funkce provadi soucin matic B.D.B.jac vysledek se pricita do matice K pocita se pouze horni trojuhelnik, zbytek se pouze priradi

Parameters:
k - matice K(n,n) = B^T.D.B.j
b - matice B(m,n)
d - matice D(m,m)
jac - jakobian
m -
n - rozmery matice B

created 12.7.1996

Definition at line 2133 of file matrix-new.cpp.

Referenced by trlineart::conductivity_matrix(), trlinaxisym::conductivity_matrix(), quadquadrilattax::conductivity_matrix(), quadquadrilatt::conductivity_matrix(), quadlineart::conductivity_matrix(), quadlinaxisym::conductivity_matrix(), quadhext::conductivity_matrix(), quadbartax::conductivity_matrix(), quadbart::conductivity_matrix(), lintett::conductivity_matrix(), linhext::conductivity_matrix(), linbartax::conductivity_matrix(), linbart::conductivity_matrix(), beamel2d::mass_matrix(), planeelemqq::stiffness_matrix(), planeelemlt::stiffness_matrix(), dktelem::stiffness_matrix(), beamel2d::stiffness_matrix(), barel3d::stiffness_matrix(), and barel2d::stiffness_matrix().

void bdbjac ( matrix d,
const matrix a,
const matrix b,
const matrix c,
double  jac 
)

computes matrix product D += A^T . B . C . jac

function computes D += A^T . B . C . jac

10.5.2002

Definition at line 2187 of file matrix-new.cpp.

Referenced by trlineart::conductivity_matrix(), trlinaxisym::conductivity_matrix(), quadquadrilattax::conductivity_matrix(), quadquadrilatt::conductivity_matrix(), quadlineart::conductivity_matrix(), quadlinaxisym::conductivity_matrix(), quadhext::conductivity_matrix(), quadbartax::conductivity_matrix(), quadbart::conductivity_matrix(), lintett::conductivity_matrix(), linhext::conductivity_matrix(), linbartax::conductivity_matrix(), linbart::conductivity_matrix(), planeelemlq::gl_stiffness_matrix(), linhexrot::gl_stiffness_matrix(), linhex::gl_stiffness_matrix(), planeelemlq::gnl_stiffness_matrix(), linhexrot::gnl_stiffness_matrix(), linhex::gnl_stiffness_matrix(), quadrilatc::lower_cap_coup_matrix(), hexahedc::lower_cap_coup_matrix(), barelc::lower_cap_coup_matrix(), axiquadc::lower_cap_coup_matrix(), quadrilatc::lower_cond_coup_matrix(), hexahedc::lower_cond_coup_matrix(), barelc::lower_cond_coup_matrix(), axiquadc::lower_cond_coup_matrix(), soilplatetr::stiffness_matrix(), soilplateq::stiffness_matrix(), quadwedge::stiffness_matrix(), quadtet::stiffness_matrix(), quadhex::stiffness_matrix(), q4plate::stiffness_matrix(), plquadcontact::stiffness_matrix(), planeelemsubqt::stiffness_matrix(), planeelemrotlt::stiffness_matrix(), planeelemrotlq::stiffness_matrix(), planeelemqt::stiffness_matrix(), linwedge::stiffness_matrix(), lintetrot::stiffness_matrix(), lintet::stiffness_matrix(), linhex::stiffness_matrix(), dstelem::stiffness_matrix(), cctelem::stiffness_matrix(), barelq3d::stiffness_matrix(), barelq2d::stiffness_matrix(), axisymqq::stiffness_matrix(), axisymlt::stiffness_matrix(), axisymlq::stiffness_matrix(), ArgyrisTriangle::stiffness_matrix(), argyrisplate::stiffness_matrix(), axisymlt::stiffness_matrix_block(), axisymlq::stiffness_matrix_blocks(), quadrilatc::upper_cap_coup_matrix(), hexahedc::upper_cap_coup_matrix(), barelc::upper_cap_coup_matrix(), axiquadc::upper_cap_coup_matrix(), quadrilatc::upper_cond_coup_matrix(), hexahedc::upper_cond_coup_matrix(), barelc::upper_cond_coup_matrix(), axiquadc::upper_cond_coup_matrix(), quadrilatc::upper_cond_coup_vector(), hexahedc::upper_cond_coup_vector(), barelc::upper_cond_coup_vector(), and axiquadc::upper_cond_coup_vector().

long cmulm ( double  c,
matrix a 
)

multiplies matrix by constant A := c.A

The function multiplies matrix given by a with constant c, the result is stored in a.

Parameters:
c is the real number
a is the structure of the matrix, from which is multiplied
Returns:
always zero

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 1050 of file matrix-new.cpp.

long cmulm ( const double  c,
const matrix a,
matrix b 
)

multiplies matrix by constant B := c.A

The function multiplies matrix given by a by constant c, the result is stored in b

Parameters:
c is the real number
a is the structure of the matrix, from which is multiplied
b is the structure of the result matrix

Requests : a and b have to be same dimensions, b has to have allocated memory array for elements which is enough large to hold contents of the result.

Return values:
0 : on succes
1 : in case incompatibility sizes of a and b matrices

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 1019 of file matrix-new.cpp.

long condense_matrix ( matrix sm,
ivector cu 
)

performs condesation of selected dofs of the given stiffness matrix

The function does a condensation of stiffness matrix for deformation method

Parameters:
sm - stiffness matrix
cu - vector with nuber one on the place of condensed variable

created 23.5.2012, Jan Zitny, zitny.ja@gmail.com

Definition at line 293 of file matrix-new.cpp.

Referenced by beamel3d::stiffness_matrix(), and beamel2d::stiffness_matrix_expl().

long condense_vector ( matrix sm,
vector nf,
ivector cu 
)

performs condesation of selected dofs of the given load vector nf according to corresponding stiffness matrix sm

The function does a condensation of load vector for deformation method

Parameters:
sm - stiffness matrix
f - load vector
cu - is a vector with nuber one on the position of condensed variable

created 23.5.2012, Jan Zitny, zitny.ja@gmail.com

Definition at line 99 of file matrix-new.cpp.

Referenced by beamel3d::nodeforces(), and beamel2d::nodeforces().

long copym ( const matrix src,
matrix dest 
)

copies contents of matrix from the src to dest

The function copies matrix given by src to dest.

Parameters:
src is the structure of source matrix to copy
dest is the structure of destination matrix to which will be copied contents of src

Requests : dest has to be setuped dimensions and allocated memory array for elements which is enough large to hold all contents of the matrix src.

Return values:
0 : on succes
1 : in case incompatibility sizes of the src and dest matrices

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 457 of file matrix-new.cpp.

long destrm ( long **&  mat,
long  m 
)

deallocates integer matrix given by 2 dimensional array

The function deallocates memory occupied by long array mat.

Parameters:
m - the number of rows
mat - array
Returns:
always zero

created 5.5.2003, Ladislav Svoboda, termit@cml.fsv.cvut.cz

Definition at line 602 of file matrix-new.cpp.

long destrm ( double **&  mat,
long  m 
)

deallocates matrix given by 2 dimensional array

The function deallocates memory occupied by double array mat.

Parameters:
m - the number of rows
mat - array
Returns:
always zero

created 5.5.2003, Ladislav Svoboda, termit@cml.fsv.cvut.cz

Definition at line 580 of file matrix-new.cpp.

long destrm ( matrix mat  ) 

deallocates matrix

The function deallocates memory occupied by mat's member array a.

Parameters:
mat is the structure for the allocated matrix
Returns:
always zero

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 555 of file matrix-new.cpp.

double det2d ( const double *  x,
const double *  y 
)

computes determinant of matrix which equals to double area of triangle given by coordinate vectors x and y

Function computes determinant of the matrix

| 1 x1 y1 |

| 1 x2 y2 |

| 1 x3 y3 |

it is equal to double area of the triangle

Parameters:
x 
y created 24.8.2001

Definition at line 2591 of file matrix-new.cpp.

Referenced by argyrisplate::stiffness_matrix().

double det3d ( const double *  x,
const double *  y,
const double *  z 
)
long detm ( const matrix a,
double &  det 
)

computes determinant of the matrix a, i.e. det(A)

The function solves determinant of the matrix a by the Gauss elimination, the result is stored in the det, contents of the a is not changed

Parameters:
a is the structure of the matrix, whose determinant will being solved
det is the variable type double

Requests : a has to have the same number of the rows and columns

Return values:
0 : on succes
1 : in case incompatibility sizes of the A matrix

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 1976 of file matrix-new.cpp.

void extractblock ( double *  a,
double *  b,
long  n,
long  nr,
long  nc,
long  fri,
long  fci 
)

extracts submatrix b(nr,nc) from matrix a

function picks up submatrix from the original matrix

Parameters:
a - original matrix of type (n,n)
b - selected submatrix (nr,nc)
n - number of columns in matrix a
nr - number of rows in the matrix b
nc - number of columns in the matrix b
fri,fci - first row and column indices of submatrix in the original matrix

JK, 9.12.2004

Definition at line 3264 of file matrix-new.cpp.

void extractm ( matrix a,
matrix b,
long  fi,
long  ncomp 
)

extracts squared matrix b(ncomp,ncomp) from matrix a

function extracts a squared matrix with ncomp components from matrix b and put them into matrix a

Parameters:
a - matrix containing extracted components
b - matrix from where components are extracted
fi - first index
ncomp - number of components

25.2.2004

Definition at line 3239 of file matrix-new.cpp.

Referenced by scaldamcc::damfunction().

long fillcol ( double  c,
long  i,
matrix mat 
)

fills i-th column of matrix with given value c

The function fills mat's column i with the constant c.

Parameters:
c is constant, which will be used for filling entire matrix
i is index of given column
mat is the structure for the allocated matrix
Returns:
always zero

created 22.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 529 of file matrix-new.cpp.

long fillm ( double  c,
matrix mat 
)

fills contents of matrix with given value c

The function fills memory of mat's member array a with constant c.

Parameters:
c is constant, which will be used for filling entire matrix
mat is the structure for the allocated matrix
Returns:
always zero

created 22.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 481 of file matrix-new.cpp.

long fillrow ( double  c,
long  i,
matrix mat 
)

fills i-th row of matrix with given value c

The function fills mat's row i with the constant c.

Parameters:
c is constant, which will be used for filling entire matrix
i is index of given row
mat is the structure for the allocated matrix
Returns:
always zero

created 22.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 502 of file matrix-new.cpp.

long gause ( const matrix a,
matrix b,
vector r,
vector sol,
double  zero 
)

solves system of linear algebraic equations by the Gauss elimination (A.x = r), resulting matrix is b, resulting vector is stored in r

The function carrys out solving equtions by the Gauss elimination on the matrix a, the result eliminated matrix is stored in the matrix b, solution is stored in the vector sol.

Parameters:
a is the structure of the matrix with equtaions (lefthand side)
b is the structure of the result eliminated matrix
r is the structure of the righthand side vector
sol is the structure of the result vector

Requests : a has to have the same number of the rows and columns b has to have same dimensions as the matrix A b has to have allocated memory array for the elements which is enough large to hold contents of the result. r has to have same dimension as number of rows in the matrix a sol has to have same dimension as the vector r sol has to have allocated memory array for the elements which is enough large to hold contents of the result.

Return values:
0 : on succes
1 : in case incompatibility sizes of a and b matrices
2 : in case dimension of the matrix a < 2
3 : in case some diagonal elements is to small or zero the value which is assumed as zero is driven by macro USREPS, which is defined in the matrix.h

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 1672 of file matrix-new.cpp.

long gause ( const matrix a,
matrix b,
vector r,
double  zero 
)

solves system of linear algebraic equations by the Gauss elimination (A.x = r), resulting matrix is b, resulting vector is stored in r

The function carrys out solving equtions by the Gauss elimination on the matrix A, the result eliminated matrix is stored in the matrix B, solution is stored in the vector r

Parameters:
a is the structure of the matrix with equtaions (lefthand side)
b is the structure of the result eliminated matrix
r is the structure of the righthand side vector

Requests : a has to have the same number of the rows and columns b has to have same dimensions as the matrix a b has to have allocated memory array for the elements which is enough large to hold contents of the result. r has to have same dimension as number of rows in the matrix a

Return values:
0 : on succes
1 : in case incompatibility sizes of a and b matrices
2 : in case dimension of the matrix a < 2
3 : in case some diagonal elements is to small or zero the value which is assumed as zero is driven by macro USREPS, which is defined in the matrix.h

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 1561 of file matrix-new.cpp.

long gause ( const matrix a,
matrix b,
double  zero 
)

performs Gauss elimination on the matrix a, result is stored in the matrix b

The function carrys out Gauss elimination on the matrix a, the result is stored in the matrix b.

Parameters:
a is the structure of the elimanted matrix
b is the structure of the result matrix

Requests : a has to have the same number of the rows and columns b has to have same dimensions as the matrix a b has to have allocated memory array for the elements which is enough large to hold contents of the result.

Return values:
0 : on succes
1 : in case incompatibility sizes of a and b matrices
2 : in case dimension of the matrix a < 2
3 : in case some diagonal elements is to small or zero the value which is assumed as zero is driven by macro USREPS, which is defined in the matrix.h

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 1469 of file matrix-new.cpp.

Referenced by detm(), hissplas::nlstresses(), least_square::polynom_coefficients_ae(), patch_averaging::polynom_coefficients_ae(), and least_square::polynom_coefficients_inv_ae().

void gemp ( double *  a,
double *  x,
double *  y,
long  n,
long  m,
double  limit,
long  pivot 
)

solves system of algebraic equations by Gauss method with pivot selection

Function performes Gaussian elimination on matrix a. Matrix is stored as dense matrix. x and y are also dense matrices, stored by rows. right hand side vectors and vectors of unknowns are columns!

Parameters:
a - array containing matrix of the system
x - array containing vectors of unknowns
y - array containing right hand sides
n - order of matrix
m - number of right hand sides
limit - computer zero
pivot=1 - pivot is searched only when there is zero on the diagonal pivot=2 - pivot is searched every time

created 23.7.2001

Definition at line 2786 of file matrix-new.cpp.

Referenced by soilplateq::atd_matrix(), q4plate::atd_matrix(), seqfeti::inverse_matrix_GG(), mohrcoulomb::mc_msurf_cp(), mechmat::mult_surf_cutting_plane(), mechmat::newton_stress_return(), mechmat::newton_stress_return_2(), argyrisplate::shapefunctions(), and feti1::solve_system().

void glmatrixtransf ( matrix a,
const matrix tmat 
)

transforms tensor(matrix) a given in the global coordinate system to the local one (A_l := T^T . A_g . T)

function transforms matrix of element from global problem coordinate system to local element coordinate system A_l = T^T A_g T

the transformation matrix has to be in the form x_g = T x_l

Parameters:
a - matrix of element (will be rewritten)
tmat - transformation matrix

JK, 28.11.2006

Definition at line 2313 of file matrix-new.cpp.

Referenced by mohrcoulomb::cutting_plane(), f_tensor(), beamel3d::initstr_matrix(), beamel2d::initstr_matrix(), beamel2d::initstr_matrix_expl(), beamgen3d::load_matrix(), beamel3d::load_matrix(), beamel3d::mass_matrix(), beamel2d::mass_matrix(), beamel2d::mass_matrix_expl(), beam2dspec::mass_matrix_expl(), mohrcoulomb::mc_msurf_cp(), ortodamrot::nlstresses(), fixortodam::nlstresses(), anisodamrot::nlstresses(), quadtet::res_load_matrix(), quadhex::res_load_matrix(), planeelemqq::res_load_matrix(), planeelemlt::res_load_matrix(), planeelemlq::res_load_matrix(), linhexrot::res_load_matrix(), linhex::res_load_matrix(), barel2d::res_load_matrix(), quadtet::res_mass_matrix(), quadhex::res_mass_matrix(), planeelemqq::res_mass_matrix(), planeelemlt::res_mass_matrix(), planeelemlq::res_mass_matrix(), linhexrot::res_mass_matrix(), linhex::res_mass_matrix(), barel3d::res_mass_matrix(), barel2d::res_mass_matrix(), shelltr::res_stiffness_matrix(), shellq::res_stiffness_matrix(), quadtet::res_stiffness_matrix(), quadhex::res_stiffness_matrix(), q4plate::res_stiffness_matrix(), plquadcontact::res_stiffness_matrix(), planeelemsubqt::res_stiffness_matrix(), planeelemrotlt::res_stiffness_matrix(), planeelemrotlq::res_stiffness_matrix(), planeelemqt::res_stiffness_matrix(), planeelemqq::res_stiffness_matrix(), planeelemlt::res_stiffness_matrix(), planeelemlq::res_stiffness_matrix(), lintetrot::res_stiffness_matrix(), lintet::res_stiffness_matrix(), linhexrot::res_stiffness_matrix(), linhex::res_stiffness_matrix(), dstelem::res_stiffness_matrix(), dktelem::res_stiffness_matrix(), cctelem::res_stiffness_matrix(), barelq3d::res_stiffness_matrix(), barelq2d::res_stiffness_matrix(), barel3d::res_stiffness_matrix(), barel2d::res_stiffness_matrix(), axisymlt::res_stiffness_matrix(), ArgyrisTriangle::res_stiffness_matrix(), soilbeam::stiffness_matrix(), quadwedge::stiffness_matrix(), linwedge::stiffness_matrix(), linhex::stiffness_matrix(), beamgen3d::stiffness_matrix(), beamel3d::stiffness_matrix(), beamel2d::stiffness_matrix(), axisymqq::stiffness_matrix(), axisymlq::stiffness_matrix(), beamel2d::stiffness_matrix_expl(), beam2dspec::stiffness_matrix_expl(), write_gid_elem_type_tensor(), and write_gid_nodtensor().

void globloc ( const double *  gv,
double *  lv,
const long *  cn,
long  n 
)
void glvectortransf ( const vector g,
vector l,
const matrix tmat 
)

transforms vector g given in the global coordinate system to vector l in local coordinate system (l = T^T . g)

function transforms vector of element from global problem coordinate system to local element coordinate system l = T^T g

the transformation matrix has to be in the form x_g = T x_l

Parameters:
g - vector in the global problem coordinate system
l - vector in the local element coordinate system
tmat - transformation matrix

JK, 28.11.2006

Definition at line 2290 of file matrix-new.cpp.

Referenced by beamel3d::nodal_displ(), beamel2d::nodal_displ(), beamel3d::nodal_forces(), beamel2d::nodal_forces(), quadtet::res_eigstrain_forces(), quadhex::res_eigstrain_forces(), planeelemsubqt::res_eigstrain_forces(), planeelemrotlt::res_eigstrain_forces(), planeelemrotlq::res_eigstrain_forces(), planeelemqt::res_eigstrain_forces(), planeelemqq::res_eigstrain_forces(), planeelemlt::res_eigstrain_forces(), planeelemlq::res_eigstrain_forces(), lintetrot::res_eigstrain_forces(), lintet::res_eigstrain_forces(), linhexrot::res_eigstrain_forces(), linhex::res_eigstrain_forces(), cctelem::res_eigstrain_forces(), barelq3d::res_eigstrain_forces(), barelq2d::res_eigstrain_forces(), barel3d::res_eigstrain_forces(), barel2d::res_eigstrain_forces(), axisymqq::res_eigstrain_forces(), axisymlt::res_eigstrain_forces(), axisymlq::res_eigstrain_forces(), ArgyrisTriangle::res_eigstrain_forces(), soilplatetr::res_incr_internal_forces(), quadtet::res_incr_internal_forces(), quadhex::res_incr_internal_forces(), planeelemsubqt::res_incr_internal_forces(), planeelemrotlt::res_incr_internal_forces(), planeelemrotlq::res_incr_internal_forces(), planeelemqt::res_incr_internal_forces(), planeelemqq::res_incr_internal_forces(), planeelemlt::res_incr_internal_forces(), planeelemlq::res_incr_internal_forces(), lintetrot::res_incr_internal_forces(), lintet::res_incr_internal_forces(), linhexrot::res_incr_internal_forces(), linhex::res_incr_internal_forces(), dstelem::res_incr_internal_forces(), dktelem::res_incr_internal_forces(), cctelem::res_incr_internal_forces(), barelq3d::res_incr_internal_forces(), barelq2d::res_incr_internal_forces(), barel3d::res_incr_internal_forces(), barel2d::res_incr_internal_forces(), axisymqq::res_incr_internal_forces(), axisymlt::res_incr_internal_forces(), axisymlq::res_incr_internal_forces(), ArgyrisTriangle::res_incr_internal_forces(), soilplatetr::res_internal_forces(), shelltr::res_internal_forces(), quadtet::res_internal_forces(), quadhex::res_internal_forces(), plquadcontact::res_internal_forces(), planeelemsubqt::res_internal_forces(), planeelemrotlt::res_internal_forces(), planeelemrotlq::res_internal_forces(), planeelemqt::res_internal_forces(), planeelemqq::res_internal_forces(), planeelemlt::res_internal_forces(), planeelemlq::res_internal_forces(), lintetrot::res_internal_forces(), lintet::res_internal_forces(), linhexrot::res_internal_forces(), dstelem::res_internal_forces(), dktelem::res_internal_forces(), cctelem::res_internal_forces(), barelq3d::res_internal_forces(), barelq2d::res_internal_forces(), barel3d::res_internal_forces(), barel2d::res_internal_forces(), axisymqq::res_internal_forces(), axisymlt::res_internal_forces(), ArgyrisTriangle::res_internal_forces(), quadtet::res_nonloc_internal_forces(), quadhex::res_nonloc_internal_forces(), planeelemsubqt::res_nonloc_internal_forces(), planeelemrotlt::res_nonloc_internal_forces(), planeelemrotlq::res_nonloc_internal_forces(), planeelemqt::res_nonloc_internal_forces(), planeelemqq::res_nonloc_internal_forces(), planeelemlt::res_nonloc_internal_forces(), planeelemlq::res_nonloc_internal_forces(), lintetrot::res_nonloc_internal_forces(), lintet::res_nonloc_internal_forces(), linhexrot::res_nonloc_internal_forces(), linhex::res_nonloc_internal_forces(), cctelem::res_nonloc_internal_forces(), barelq3d::res_nonloc_internal_forces(), barelq2d::res_nonloc_internal_forces(), barel3d::res_nonloc_internal_forces(), barel2d::res_nonloc_internal_forces(), axisymqq::res_nonloc_internal_forces(), axisymlt::res_nonloc_internal_forces(), axisymlq::res_nonloc_internal_forces(), ArgyrisTriangle::res_nonloc_internal_forces(), beam2dspec::strains(), and barel3d::tran_mat().

void glvectortransfblock ( vector v,
const matrix t 
)

transforms block vector v given in the global coordinate system to the local one (v_l := T^T . v_g) (number of blocks is given by dimension of T)

function transforms vector expressed in global coordinate system to vector expressed in local coordinate system v_l = T^T * v_g dimension (dim) of the problem is determined from the size of the transformation matrix T vector v may contain several blocks with size (dim)

Parameters:
v - global vector (during input), local vector (during output)
t - transformation matrix

JK,

Definition at line 2411 of file matrix-new.cpp.

Referenced by quadhex::node_forces_surf(), shelltr::res_ip_strains(), and shellq::res_ip_strains().

long invm ( const matrix a,
matrix b,
double  zero 
)

inverts matrix a, i.e. computes A^{-1}

The function carrys out inverting matrix A by the Gauss elimination, the result is stored in the matrix B, contents of the A is not changed

Parameters:
a is the structure of the inverteted matrix
b is the structure of the result matrix

Requests : a has to have the same number of the rows and columns b has to have same dimensions as the matrix a b has to have allocated memory array for the elements which is enough large to hold contents of the result.

Return values:
0 : on succes
1 : in case incompatibility sizes of a and b matrices
2 : in case dimension of the matrix a < 2

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 1776 of file matrix-new.cpp.

Referenced by planeelemqt::compute_error(), planeelemqq::compute_error(), planeelemlt::compute_error(), planeelemlq::compute_error(), lintet::compute_error(), creep_initmaterialmodel(), creep_nlstressesincr(), scaldamcc::damfunction(), HomogData::HerveZaoui(), camclaycoup::matstiff(), camclay::matstiff(), layplate::matstiff(), shefplast::stress_return(), shefplast::tangentstiff(), and anisodam::tmatstiff().

void lgmatrixtransf ( matrix a,
const matrix tmat 
)

transforms tensor(matrix) a given in the local coordinate system to the global one (A_g := T . A_l . T^T)

function transforms matrix of element from local element coordinate system to global problem coordinate system A_g = T A_l T^T

the transformation matrix has to be in the form x_g = T x_l

Parameters:
a - matrix of element (will be rewritten)
tmat - transformation matrix

JK, 28.11.2006

Definition at line 2337 of file matrix-new.cpp.

Referenced by glasgmech::compute_lits(), mohrcoulomb::cutting_plane(), f_tensor(), beamel3d::initstr_matrix(), beamel2d::initstr_matrix(), beamel2d::initstr_matrix_expl(), beamel3d::load_matrix(), beamel3d::mass_matrix(), beamel2d::mass_matrix(), beamel2d::mass_matrix_expl(), beam2dspec::mass_matrix_expl(), mohrcoulomb::mc_msurf_cp(), ortodamrot::nlstresses(), ortodam::nlstresses(), fixortodam::nlstresses(), anisodamrot::nlstresses(), anisodam::nlstresses(), beamel3d::stiffness_matrix(), beamel2d::stiffness_matrix(), beamel2d::stiffness_matrix_expl(), beam2dspec::stiffness_matrix_expl(), and anisodam::tmatstiff().

void lgmatrixtransfblock ( matrix a,
const matrix t 
)

transforms block matrix a given in the local coordinate system to the global one (A_g := T . A_l . T^T) (number of blocks is given by dimension of T)

function transforms matrix expressed in local coordinate system to matrix expressed in global coordinate system A = T * A * T^T dimension (dim) of the problem is determined from the size of the transformation matrix T matrix A may contain several blocks with size (dim,dim)

Parameters:
a - local matrix (during input), global matrix (during output)
t - transformation matrix

JK,

Definition at line 2361 of file matrix-new.cpp.

Referenced by barel2d::res_load_matrix(), shelltr::res_stiffness_matrix(), shellq::res_stiffness_matrix(), and soilbeam::stiffness_matrix().

void lgvectortransf ( vector g,
const vector l,
const matrix tmat 
)

transforms vector l given in the local coordinate system to vector g in global coordinate system (g = T . l)

function transforms vector of element from local element coordinate system to global problem coordinate system g = T l

the transformation matrix has to be in the form x_g = T x_l

Parameters:
g - vector in the global problem coordinate system
l - vector in the local element coordinate system
tmat - transformation matrix

JK, 28.11.2006

Definition at line 2270 of file matrix-new.cpp.

Referenced by beamgen3d::internal_forces(), beamel3d::internal_forces(), beamgen3d::internal_forces1(), lintet::ip_strains(), planeelemsubqt::mainip_strains(), axisymqq::mainip_strains(), quadtet::nod_strains_comp(), quadhex::nod_strains_comp(), planeelemrotlq::nod_strains_comp(), planeelemlt::nod_strains_comp(), planeelemlq::nod_strains_comp(), linhexrot::nod_strains_comp(), linhex::nod_strains_comp(), barelq3d::nod_strains_comp(), barelq2d::nod_strains_comp(), axisymqq::nod_strains_comp(), axisymlt::nod_strains_comp(), axisymqq::nod_stresses_comp(), beamel3d::nodal_displ(), beamel2d::nodal_displ(), beamel3d::nodal_forces(), beamel2d::nodal_forces(), shelltr::res_ip_strains(), shellq::res_ip_strains(), quadtet::res_ip_strains(), quadhex::res_ip_strains(), q4plate::res_ip_strains(), planeelemrotlt::res_ip_strains(), planeelemrotlq::res_ip_strains(), planeelemqq::res_ip_strains(), planeelemlt::res_ip_strains(), planeelemlq::res_ip_strains(), lintetrot::res_ip_strains(), linhexrot::res_ip_strains(), linhex::res_ip_strains(), dstelem::res_ip_strains(), dktelem::res_ip_strains(), cctelem::res_ip_strains(), barel3d::res_ip_strains(), barel2d::res_ip_strains(), ArgyrisTriangle::res_ip_strains(), quadrilatc::res_mainip_strains(), barelc::res_mainip_strains(), soilplatetr::res_mainip_strains(), soilplateq::res_mainip_strains(), plquadcontact::res_mainip_strains(), planeelemrotlt::res_mainip_strains(), planeelemqt::res_mainip_strains(), beam2dspec::res_mainip_strains(), barelq3d::res_mainip_strains(), barelq2d::res_mainip_strains(), axisymlt::res_mainip_strains(), beam2dspec::res_mainip_stresses(), soilbeam::strains(), and beam2dspec::strains().

void lgvectortransfblock ( vector v,
const matrix t 
)

transforms block vector v given in the local coordinate system to the global one (v_g := T^T . v_l) (number of blocks is given by dimension of T)

function transforms vector expressed in local coordinate system to vector expressed in global coordinate system v_g = T * v_l dimension (dim) of the problem is determined from the size of the transformation matrix T vector v may contain several blocks with size (dim)

Parameters:
v - local vector (during input), global vector (during output)
t - transformation matrix

JK,

Definition at line 2466 of file matrix-new.cpp.

Referenced by quadtet::node_forces_surf(), quadhex::node_forces_surf(), lintet::node_forces_surf(), linhex::node_forces_surf(), linhexrot::node_forces_surf_old(), linhex::node_forces_surf_old(), and beamel2d::nodeforces().

void locglob ( double *  gv,
const double *  lv,
const long *  cn,
long  n 
)

localizes components of local(element) vector to the global(problem) vector

function localizes components of local vector lv to the global vector gv.

Parameters:
gv - global vector (vector of the whole problem/structure)
lv - local vector (vector of one element)
cn - array containing code numbers
n - number of components in the local vector

created 25.7.2001

Definition at line 2519 of file matrix-new.cpp.

Referenced by loadcaset::assemble(), loadcase::assemble(), dloadcase::assemble(), assemble_coup(), loadcaset::assemble_flux(), assemble_gradients_contrib(), assemble_init(), assemble_init_coup_upper(), aggregator::boss(), z2_smoothing::compute_ainv(), z2_smoothing::compute_ntdbr(), dpfeti::corner_displ(), schurcompl::gather_bound_vect(), incr_internal_forces(), internal_coup_fluxes(), internal_coup_forces(), internal_fluxes(), loc_internal_forces(), dpfeti::matxvect(), nodal_eigstrain_forces(), nodal_pore_press_forces(), nonloc_internal_forces(), schurcompl::pss_gather_bound_vect(), schurcompl::pss_gather_bound_vect_old(), trlineart::res_boundary_flux(), trlinaxisym::res_boundary_flux(), quadquadrilattax::res_boundary_flux(), quadquadrilatt::res_boundary_flux(), quadlineart::res_boundary_flux(), quadlinaxisym::res_boundary_flux(), quadhext::res_boundary_flux(), quadbartax::res_boundary_flux(), quadbart::res_boundary_flux(), lintett::res_boundary_flux(), linhext::res_boundary_flux(), linbartax::res_boundary_flux(), linbart::res_boundary_flux(), trlineart::res_convection_vector(), trlinaxisym::res_convection_vector(), quadquadrilattax::res_convection_vector(), quadquadrilatt::res_convection_vector(), quadlineart::res_convection_vector(), quadlinaxisym::res_convection_vector(), quadhext::res_convection_vector(), quadbartax::res_convection_vector(), quadbart::res_convection_vector(), lintett::res_convection_vector(), linhext::res_convection_vector(), linbartax::res_convection_vector(), linbart::res_convection_vector(), trlineart::res_internal_fluxes(), trlinaxisym::res_internal_fluxes(), quadquadrilattax::res_internal_fluxes(), quadquadrilatt::res_internal_fluxes(), quadlineart::res_internal_fluxes(), quadlinaxisym::res_internal_fluxes(), quadhext::res_internal_fluxes(), quadbartax::res_internal_fluxes(), quadbart::res_internal_fluxes(), lintett::res_internal_fluxes(), linhext::res_internal_fluxes(), linbartax::res_internal_fluxes(), linbart::res_internal_fluxes(), shelltr::res_internal_forces(), barelc::res_lower_internal_fluxes(), trlineart::res_quantity_source_vector(), trlinaxisym::res_quantity_source_vector(), quadquadrilattax::res_quantity_source_vector(), quadquadrilatt::res_quantity_source_vector(), quadlineart::res_quantity_source_vector(), quadlinaxisym::res_quantity_source_vector(), quadhext::res_quantity_source_vector(), quadbartax::res_quantity_source_vector(), quadbart::res_quantity_source_vector(), lintett::res_quantity_source_vector(), linhext::res_quantity_source_vector(), linbartax::res_quantity_source_vector(), linbart::res_quantity_source_vector(), trlineart::res_transmission_vector(), trlinaxisym::res_transmission_vector(), quadquadrilattax::res_transmission_vector(), quadquadrilatt::res_transmission_vector(), quadlineart::res_transmission_vector(), quadlinaxisym::res_transmission_vector(), quadhext::res_transmission_vector(), quadbartax::res_transmission_vector(), quadbart::res_transmission_vector(), lintett::res_transmission_vector(), linhext::res_transmission_vector(), linbartax::res_transmission_vector(), linbart::res_transmission_vector(), quadlineart::res_volume_rhs_vector(), quadlinaxisym::res_volume_rhs_vector(), quadbart::res_volume_rhs_vector(), linhext::res_volume_rhs_vector(), linbart::res_volume_rhs_vector(), barelc::res_volume_rhs_vector(), right_hand_side(), schurcompl::selected_norm_calculation(), schurcompl::solve_red_sys_fin(), seqschur::solve_red_sys_fin(), schurcompl::solve_red_sys_iter(), loadcaset::source_contrib(), trfel_right_hand_side(), and dpfeti::vectors_br_bm().

void locvecmat ( double *  mat,
const double *  vect,
const long *  cn,
long  ci,
long  m,
long  n 
)

Definition at line 2562 of file matrix-new.cpp.

void lu_full ( double *  a,
double *  x,
double *  y,
long  n,
double  zero,
long  tc 
)

solves system of algebraic equations by LU decomposition

function decomposes matrix A into L.U form

Parameters:
a - matrix
x - left hand side
y - right hand side
n - number of rows/columns of matrix
zero - computer zero
tc - type of computation

tc = 1 - decomposition of matrix and back substitution tc = 2 - decomposition of matrix tc = 3 - back substitution

JK, 6.1.2000

Definition at line 2963 of file matrix-new.cpp.

Referenced by solve_lsm().

void mat_localize ( matrix gm,
matrix lm,
long *  rcn,
long *  ccn 
)

localizes components of local matrix lm to the global one gm

Definition at line 3020 of file matrix-new.cpp.

Referenced by assemble_conductivity_matrix(), assemble_l_matrix(), trlineart::averd_matrix(), quadlineart::averd_matrix(), lintett::averd_matrix(), linhext::averd_matrix(), trlineart::res_capacity_matrix(), trlinaxisym::res_capacity_matrix(), quadquadrilattax::res_capacity_matrix(), quadquadrilatt::res_capacity_matrix(), quadlineart::res_capacity_matrix(), quadlinaxisym::res_capacity_matrix(), quadhext::res_capacity_matrix(), quadbartax::res_capacity_matrix(), quadbart::res_capacity_matrix(), lintett::res_capacity_matrix(), linhext::res_capacity_matrix(), linbartax::res_capacity_matrix(), linbart::res_capacity_matrix(), trlineart::res_conductivity_matrix(), trlinaxisym::res_conductivity_matrix(), quadquadrilattax::res_conductivity_matrix(), quadquadrilatt::res_conductivity_matrix(), quadlineart::res_conductivity_matrix(), quadlinaxisym::res_conductivity_matrix(), quadhext::res_conductivity_matrix(), quadbartax::res_conductivity_matrix(), quadbart::res_conductivity_matrix(), lintett::res_conductivity_matrix(), linhext::res_conductivity_matrix(), linbartax::res_conductivity_matrix(), linbart::res_conductivity_matrix(), trlineart::res_l_matrix(), quadlineart::res_l_matrix(), lintett::res_l_matrix(), linhext::res_l_matrix(), trlineart::res_l_t_matrix(), quadlineart::res_l_t_matrix(), lintett::res_l_t_matrix(), linhext::res_l_t_matrix(), quadrilatc::res_lower_cap_coup_matrix(), hexahedc::res_lower_cap_coup_matrix(), barelc::res_lower_cap_coup_matrix(), axiquadc::res_lower_cap_coup_matrix(), quadrilatc::res_lower_cond_coup_matrix(), hexahedc::res_lower_cond_coup_matrix(), barelc::res_lower_cond_coup_matrix(), axiquadc::res_lower_cond_coup_matrix(), shelltr::res_stiffness_matrix(), shellq::res_stiffness_matrix(), quadrilatc::res_upper_cap_coup_matrix(), hexahedc::res_upper_cap_coup_matrix(), barelc::res_upper_cap_coup_matrix(), axiquadc::res_upper_cap_coup_matrix(), quadrilatc::res_upper_cond_coup_matrix(), hexahedc::res_upper_cond_coup_matrix(), barelc::res_upper_cond_coup_matrix(), and axiquadc::res_upper_cond_coup_matrix().

void matassem_lsm ( double *  lsm,
vector natcoord 
)
long mswapc ( matrix mat,
long  i,
long  j 
)

swaps matrix columns i and j

The function swaps mat's columns i and j

Parameters:
mat is the structure of the matrix
i number of the first column which will be swapped
j number of the second column which will be swapped
Returns:
always zero

created 22.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 2078 of file matrix-new.cpp.

Referenced by princ_val().

long mswapr ( matrix mat,
long  i,
long  j 
)

swaps matrix rows i and j

The function swaps mat's rows i and j

Parameters:
mat is the structure of the matrix
i number of the first row which will be swapped
j number of the second row which will be swapped
Returns:
always zero

created 22.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 2104 of file matrix-new.cpp.

void mtxm ( const double *  a,
const double *  b,
double *  c,
long  l,
long  m,
long  n 
)

multiplies two matrices C := A^T.B given by arrays

The function multiplies transposed matrix given by 1D double array a from right with matrix given by 1D double array b, the result is stored in c A[l,m]^T . B[m,n] = C[l,n]

Parameters:
a is the 1D double array of first matrix, from which is multiplied
b is the 1D double array of the second=multiplicating matrix
c is the 1D double array of the result matrix

Requests : a, b and c have to be following dimensions a (l*m), b (m*n), c (l*n)

Return values:
0 : always

created 13.4.1998 by JK

Definition at line 946 of file matrix-new.cpp.

long mtxm ( const matrix a,
const matrix b,
matrix c 
)

multiplies two matrices C := A^T.B

The function multiplies transposed matrix given by a from right with matrix given by b, the result is stored in c

Parameters:
a is the structure of the matrix, from which is multiplied
b is the structure of the multiplicating matrix
c is the structure of the result matrix

Requests : a, b and c have to be following dimensions a (n,m), b (n,p), c (m,p) c has to have allocated memory array for elements which is enough large to hold contents of the result.

Return values:
0 : on succes
1 : in case incompatibility sizes of a, b and c matrices

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 906 of file matrix-new.cpp.

Referenced by lintet::bd_matrix(), bdbjac(), glmatrixtransf(), glob_loc_tens_trans(), initial_stiffness_matrix(), seqfeti::inverse_matrix_GG(), trlineart::l_t_matrix(), quadlineart::l_t_matrix(), lintett::l_t_matrix(), linhext::l_t_matrix(), lg_tens4transf(), mass_matrix(), nnjac(), feti1::solve_system(), planeelemrotlt::stiffness_matrix(), planeelemrotlq::stiffness_matrix(), and stiffness_matrix().

void mtxmccr ( const double *  a,
const double *  b,
double *  c,
long  l,
long  m,
long  n 
)

multiplies transposed matrix a from right by matrix b, C := A^T . B, matrices are stored by columns

funkce nasobi matice A^T . B = C

matice A a B jsou ulozeny po sloupcich vysledna matice C je ulozena po radcich

vstupy

Parameters:
a - pole obsahujici matici A(m,n)
b - pole obsahujici matici B(m,p)
l,@param m,
n - rozmery matic A, B, C
c - pole obsahujici matici C(n,p)

created 7.12.1998

Definition at line 982 of file matrix-new.cpp.

Referenced by subspace_iter_jac().

void mtxv ( const double *  a,
const double *  b,
double *  c,
long  m,
long  n 
)

multiplies transposed matrix a given by array from right by vector u given by array v := A^T.u

function computes A^T.b = c

Parameters:
a(m,n) - matrix
b(m,1) - vector
c(n,1) - resulting vector
m,n - matrix-vector sizes

JK, 19.2.1997

Definition at line 1361 of file matrix-new.cpp.

long mtxv ( const matrix a,
const vector u,
vector v 
)

multiplies transposed matrix a from right by vector u v := A^T.u

The function multiplies transposed matrix given by a with column vector u, the result is stored in column vector v.

Parameters:
a is the structure of the matrix, which is multiplied
u is the structure of the column vector
v is the structure of the result column vector

Requests : u ,a and v have to be following dimensions u (m), a (n,m), c (n) v has to have allocated memory array for the elements which is enough large to hold contents of the result.

Return values:
0 : on succes
1 : in case incompatibility sizes of the matrix a

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 1330 of file matrix-new.cpp.

Referenced by loadcase::assemble(), dloadcase::assemble(), seqfeti::coarse_local(), soilplateq::compute_nonloc_nlstress(), loadcase::compute_reactions(), dloadcase::compute_reactions(), dpfeti::corner_displ(), lintetrot::eigstrain_forces(), lintet::eigstrain_forces(), linhex::eigstrain_forces(), soilplatetr::elem_integration(), soilplateq::elem_integration(), quadtet::elem_integration(), quadhex::elem_integration(), q4plate::elem_integration(), plquadcontact::elem_integration(), planeelemsubqt::elem_integration(), planeelemrotlt::elem_integration(), planeelemrotlq::elem_integration(), planeelemqt::elem_integration(), planeelemqq::elem_integration(), planeelemlt::elem_integration(), planeelemlq::elem_integration(), lintetrot::elem_integration(), lintet::elem_integration(), linhexrot::elem_integration(), linhex::elem_integration(), dstelem::elem_integration(), dktelem::elem_integration(), cctelem::elem_integration(), barelq3d::elem_integration(), barelq2d::elem_integration(), barel3d::elem_integration(), barel2d::elem_integration(), axisymqq::elem_integration(), axisymlt::elem_integration(), axisymlq::elem_integration(), ArgyrisTriangle::elem_integration(), feti1::feti_projection(), seqfeti::feti_projection(), linhex::gl_internal_forces(), planeelemlq::gnl_internal_forces(), linhexrot::gnl_internal_forces(), linhex::gnl_internal_forces(), incr_internal_forces(), trlineart::internal_fluxes(), trlinaxisym::internal_fluxes(), quadquadrilattax::internal_fluxes(), quadquadrilatt::internal_fluxes(), quadlineart::internal_fluxes(), quadlinaxisym::internal_fluxes(), quadhext::internal_fluxes(), quadbartax::internal_fluxes(), quadbart::internal_fluxes(), lintett::internal_fluxes(), linhext::internal_fluxes(), linbartax::internal_fluxes(), linbart::internal_fluxes(), linhex::internal_forces(), axisymqq::internal_forces(), axisymlq::internal_forces(), linhex::internal_forces2(), feti1::lagrmultdispl(), seqfeti::lagrmultdispl(), seqfeti::lagrmultnodunknowns(), loc_internal_forces(), soilplateq::local_values(), barelc::lower_internal_fluxes(), dpfeti::matxvect(), mohrcoulomb::mc_msurf_cp(), mechmat::mult_surf_cutting_plane(), beamgen3d::nodal_displ(), nodal_eigstrain_forces(), beamgen3d::nodal_forces(), nodal_pore_press_forces(), linhex::nonloc_internal_forces(), nonloc_internal_forces(), mohrcoulomb::tangentstiff(), linhex::temp_forces(), axisymqq::temp_forces(), axisymlq::temp_forces(), and barelc::upper_internal_forces().

void mtxvc ( const double *  a,
const double *  b,
double *  c,
long  m,
long  n 
)

funkce nasobi transponovanou matici a vektor A^T b = c

matice A je ulozena po sloupcich

Parameters:
a - pole obsahujici matici A(m,n)
b - pole obsahujici vektor b(m,1)
m,@param n - rozmery matice A
c - pole obsahujici vektor c(n,1)

created 7.12.1998

Definition at line 1391 of file matrix-new.cpp.

void mxm ( const double *  a,
const double *  b,
double *  c,
long  l,
long  m,
long  n 
)

multiplies two matrices C := A.B given by arrays

The function multiplies matrix given by 1D double array a from right with matrix given by 1D double array b, the result is stored in 1D double array c. A[l,m] . B[m,n] = C[l,n]

Parameters:
a is the 1D double array of first matrix, from which is multiplied
b is the 1D double array of the second=multiplicating matrix
c is the 1D double array of the result matrix

Requests : a, b and c have to be following dimensions a (l*m), b (m*n), c (l*n)

Return values:
0 : always

created 19.2.1997 by JK

Definition at line 782 of file matrix-new.cpp.

long mxm ( const matrix a,
const matrix b,
matrix c 
)

multiplies two matrices C := A.B

The function multiplies matrix given by a from right with matrix given by b, the result is stored in c

Parameters:
a is the structure of the matrix, from which is multiplied
b is the structure of the multiplicating matrix
c is the structure of the result matrix

Requests : a, b and c have to be following dimensions a (m,n), b (n,p), c (m,p) c has to have allocated memory array for elements which is enough large to hold contents of the result.

Return values:
0 : on succes
1 : in case incompatibility sizes of a, b and c matrices

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 742 of file matrix-new.cpp.

void mxmt ( const double *  a,
const double *  b,
double *  c,
long  l,
long  m,
long  n 
)

multiplies two matrices C := A.B^T given by arrays

The function multiplies matrix given by 1D double array a from right with transposed matrix given by 1D double array b, the result is stored in c A[l,m] . B[m,n]^T = C[l,n]

Parameters:
a is the 1D double array of first matrix, from which is multiplied
b is the 1D double array of the second=multiplicating matrix
c is the 1D double array of the result matrix

Requests : a, b and c have to be following dimensions a (l*m), b (m*n), c (l*n)

Return values:
0 : always

created 9.11.1999 by JK

Definition at line 866 of file matrix-new.cpp.

long mxmt ( const matrix a,
const matrix b,
matrix c 
)

multiplies two matrices C := A.B^T

The function multiplies matrix given by a from right with transposed matrix given by b, the result is stored in c

Parameters:
a is the structure of the matrix, from which is multiplied
b is the structure of the multiplicating matrix
c is the structure of the result matrix

Requests : a, b and c have to be following dimensions a (m,n), b (p,n), c (m,p) c has to have allocated memory array for elements which is enough large to hold contents of the result.

Return values:
0 : on succes
1 : in case incompatibility sizes of a, b and c matrices

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 826 of file matrix-new.cpp.

Referenced by lgmatrixtransf(), loc_glob_tens_trans(), mohrcoulomb::mc_msurf_cp(), and mechmat::mult_surf_cutting_plane().

void mxv ( const double *  a,
const double *  b,
double *  c,
long  m,
long  n 
)

multiplies matrix a given by array from right by vector u given by array v := A.u

funkce nasobi matici A(m,n) s vektorem b(n,1) A(m,n).b(n,1)=c(m,1)

Parameters:
c - vysledny vektor
a - matice A
b - vektor b
m 
n - rozmer matice A

created 19.2.1997

Definition at line 1264 of file matrix-new.cpp.

long mxv ( const matrix a,
const vector u,
vector v 
)

multiplies matrix a from right by vector u v := A.u

The function multiplies matrix given by a with column vector u, the result is stored in column vector v.

Parameters:
a is the structure of the matrix, which is multiplied
u is the structure of the column vector
v is the structure of the result column vector

Requests : u ,a and v have to be following dimensions v (m), a (m,n), u (n) v has to have allocated memory array for the elements which is enough large to hold contents of the result.

Return values:
0 : on succes
1 : in case incompatibility sizes of the matrix a

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 1231 of file matrix-new.cpp.

Referenced by soilplatetr::allip_stresses(), soilplateq::allip_stresses(), loadcase::assemble(), dloadcase::assemble(), assemble_gradients_contrib(), assemble_init(), assemble_init_coup_upper(), nonlocplast::average(), trlineart::boundary_flux(), trlinaxisym::boundary_flux(), quadquadrilattax::boundary_flux(), quadquadrilatt::boundary_flux(), quadlineart::boundary_flux(), quadlinaxisym::boundary_flux(), quadhext::boundary_flux(), quadbartax::boundary_flux(), quadbart::boundary_flux(), lintett::boundary_flux(), linhext::boundary_flux(), linbartax::boundary_flux(), linbart::boundary_flux(), dpfeti::compute_displ(), soilplateq::compute_eigstress(), quadtet::compute_eigstress(), quadhex::compute_eigstress(), q4plate::compute_eigstress(), planeelemsubqt::compute_eigstress(), planeelemrotlt::compute_eigstress(), planeelemrotlq::compute_eigstress(), planeelemqt::compute_eigstress(), planeelemqq::compute_eigstress(), planeelemlt::compute_eigstress(), planeelemlq::compute_eigstress(), lintetrot::compute_eigstress(), lintet::compute_eigstress(), linhexrot::compute_eigstress(), linhex::compute_eigstress(), cctelem::compute_eigstress(), barelq3d::compute_eigstress(), barelq2d::compute_eigstress(), barel3d::compute_eigstress(), barel2d::compute_eigstress(), axisymqq::compute_eigstress(), axisymlt::compute_eigstress(), axisymlq::compute_eigstress(), ArgyrisTriangle::compute_eigstress(), fixortodam::compute_eqdispl(), planeelemqt::compute_error(), planeelemqq::compute_error(), planeelemlt::compute_error(), planeelemlq::compute_error(), lintet::compute_error(), trlineart::convection_vector(), trlinaxisym::convection_vector(), quadquadrilattax::convection_vector(), quadquadrilatt::convection_vector(), quadlineart::convection_vector(), quadlinaxisym::convection_vector(), quadhext::convection_vector(), quadbartax::convection_vector(), quadbart::convection_vector(), lintett::convection_vector(), linhext::convection_vector(), linbartax::convection_vector(), linbart::convection_vector(), creep_incrtotstresses(), creep_nlstressesincr(), mohrcoulomb::cutting_plane(), mechmat::cutting_plane(), mechmat::cutting_plane2(), scaldam::damfuncpar(), scaldamcc::damfunction(), richards::darcian_flux(), glasgmech::depseqdepsel(), axisymlt::edgeload(), axisymlq::edgeload(), lintetrot::eigstrain_forces(), lintet::eigstrain_forces(), linhex::eigstrain_forces(), planeelemqt::elchar(), planeelemqq::elchar(), planeelemlt::elchar(), planeelemlq::elchar(), lintet::elchar(), eldispl(), planeelemsubqt::elem_stresses(), planeelemrotlt::elem_stresses(), planeelemqt::elem_stresses(), linhex::elem_stresses(), axisymqq::elem_stresses(), axisymlq::elem_stresses(), elprdispl(), feti1::feti_projection(), seqfeti::feti_projection(), transmat::flux_contributions(), transmat::fluxcomparing(), drprag2::getImportantValues(), planeelemqt::give_sig_roof(), gl_engvectortransf(), linhex::gl_internal_forces(), planeelemlq::gl_ip_strains(), linhexrot::gl_ip_strains(), linhex::gl_ip_strains(), linhex::gl_mainip_strains(), glvectortransf(), HomogData::HerveZaoui(), camclaycoup::initval(), camclay::initval(), normmat::internal_forces(), linhex::internal_forces(), beamgen3d::internal_forces(), beamel2d::internal_forces(), beamgen3d::internal_forces1(), linhext::intpointflux(), trlineart::intpointgrad(), trlinaxisym::intpointgrad(), quadquadrilattax::intpointgrad(), quadquadrilatt::intpointgrad(), quadlineart::intpointgrad(), quadlinaxisym::intpointgrad(), quadhext::intpointgrad(), quadbartax::intpointgrad(), quadbart::intpointgrad(), lintett::intpointgrad(), linhext::intpointgrad(), linbartax::intpointgrad(), linbart::intpointgrad(), quadrilatc::intpointgrad(), barelc::intpointgrad(), quadtet::ip_elast_stresses(), quadhex::ip_elast_stresses(), planeelemlt::ip_elast_stresses(), linhexrot::ip_elast_stresses(), linhex::ip_elast_stresses(), barel3d::ip_elast_stresses(), barel2d::ip_elast_stresses(), quadtet::ip_strains(), quadhex::ip_strains(), q4plate::ip_strains(), planeelemrotlt::ip_strains(), planeelemrotlq::ip_strains(), planeelemqq::ip_strains(), planeelemlt::ip_strains(), lintetrot::ip_strains(), lintet::ip_strains(), dstelem::ip_strains(), dktelem::ip_strains(), cctelem::ip_strains(), barel3d::ip_strains(), barel2d::ip_strains(), axisymlq::ip_strains(), ArgyrisTriangle::ip_strains(), feti1::lagrmultdispl(), seqfeti::lagrmultdispl(), seqfeti::lagrmultnodunknowns(), lg_engvectortransf(), lgvectortransf(), seqfeti::local_coarse(), local_global_displ_transf(), quadtet::locglob_nodeval(), planeelemlt::locglob_nodeval(), lintetrot::locglob_nodeval(), lintet::locglob_nodeval(), linhexrot::locglob_nodeval(), linhex::locglob_nodeval(), quadrilatc::mainip_strains(), barelc::mainip_strains(), soilplatetr::mainip_strains(), soilplateq::mainip_strains(), plquadcontact::mainip_strains(), planeelemsubqt::mainip_strains(), planeelemrotlt::mainip_strains(), planeelemqt::mainip_strains(), linhex::mainip_strains(), barelq3d::mainip_strains(), barelq2d::mainip_strains(), axisymqq::mainip_strains(), axisymlt::mainip_strains(), axisymlq::mainip_strains(), planeelemsubqt::mainip_stresses(), planeelemrotlt::mainip_stresses(), planeelemqt::mainip_stresses(), linhex::mainip_stresses(), barelq3d::mainip_stresses(), barelq2d::mainip_stresses(), axisymqq::mainip_stresses(), axisymlt::mainip_stresses(), axisymlq::mainip_stresses(), splas1d::matstiff(), camclay::matstiff(), dpfeti::matxvect(), mohrcoulomb::mc_msurf_cp(), feti1::mpcg(), seqfeti::mpcg(), seqfeti::mprcg(), mechmat::mult_surf_cutting_plane(), elemmat::mxv_em(), mechmat::newton_stress_return(), mechmat::newton_stress_return_2(), winpast::nlstresses(), visplast::nlstresses(), varelastisomat::nlstresses(), ortodamrot::nlstresses(), ortodam::nlstresses(), hissplas::nlstresses(), glasgownew::nlstresses(), glasgowdam::nlstresses(), glasgmech::nlstresses(), geoelastmat::nlstresses(), fixortodam::nlstresses(), elastortomat::nlstresses(), elastisomat::nlstresses(), elastgmat3d::nlstresses(), creep_effym::nlstresses(), drprag2::nlstresses(), layplate::nlstresses(), shrinkmat::nlstressesincr(), axisymqq::nod_strains(), quadtet::nod_strains_comp(), quadhex::nod_strains_comp(), planeelemrotlq::nod_strains_comp(), planeelemlt::nod_strains_comp(), planeelemlq::nod_strains_comp(), linhexrot::nod_strains_comp(), linhex::nod_strains_comp(), barelq3d::nod_strains_comp(), barelq2d::nod_strains_comp(), barel2d::nod_strains_comp(), axisymqq::nod_strains_comp(), axisymlt::nod_strains_comp(), planeelemsubqt::nod_stresses(), planeelemrotlt::nod_stresses(), planeelemqt::nod_stresses(), linhex::nod_stresses(), axisymlq::nod_stresses(), quadtet::nod_stresses_comp(), quadhex::nod_stresses_comp(), planeelemlq::nod_stresses_comp(), barelq3d::nod_stresses_comp(), barelq2d::nod_stresses_comp(), axisymqq::nod_stresses_old(), beamgen3d::nodal_forces(), beamel3d::nodal_forces(), beamel2d::nodal_forces(), quadtet::node_forces_surf(), quadhex::node_forces_surf(), lintetrot::node_forces_surf(), lintet::node_forces_surf(), linhexrot::node_forces_surf(), linhex::node_forces_surf(), lintetrot::node_forces_surf_old(), lintet::node_forces_surf_old(), linhexrot::node_forces_surf_old(), linhex::node_forces_surf_old(), planeelemsubqt::nodeforces(), planeelemqt::nodeforces(), planeelemqq::nodeforces(), planeelemlt::nodeforces(), planeelemlq::nodeforces(), axisymqq::nodeforces(), axisymlq::nodeforces(), planeelemqt::ntdbr_vector(), planeelemqq::ntdbr_vector(), planeelemlt::ntdbr_vector(), planeelemlq::ntdbr_vector(), lintet::ntdbr_vector(), creepbs::phase2(), creepbbeam::phase2(), creepb::phase2(), splas1d::plasmodscalar(), j2flow2::plasmodscalar(), j2flow::plasmodscalar(), trlineart::quantity_source_vector(), trlinaxisym::quantity_source_vector(), quadquadrilattax::quantity_source_vector(), quadquadrilatt::quantity_source_vector(), quadlineart::quantity_source_vector(), quadlinaxisym::quantity_source_vector(), quadhext::quantity_source_vector(), quadbartax::quantity_source_vector(), quadbart::quantity_source_vector(), lintett::quantity_source_vector(), linhext::quantity_source_vector(), linbartax::quantity_source_vector(), linbart::quantity_source_vector(), trlineart::res_internal_fluxes(), trlinaxisym::res_internal_fluxes(), quadquadrilattax::res_internal_fluxes(), quadquadrilatt::res_internal_fluxes(), quadlineart::res_internal_fluxes(), quadlinaxisym::res_internal_fluxes(), quadhext::res_internal_fluxes(), quadbartax::res_internal_fluxes(), quadbart::res_internal_fluxes(), lintett::res_internal_fluxes(), linhext::res_internal_fluxes(), linbartax::res_internal_fluxes(), linbart::res_internal_fluxes(), beamel3d::res_internal_forces(), beam2dspec::res_mainip_stresses(), dpfeti::rhs_dpfeti(), mechmat::scal_dam_sol(), schurcompl::solve_red_sys_iter(), mechmat::stiff_deps_vispl(), stress_initdispl(), shefplast::stress_return(), springel::stresses(), beam2dspec::stresses(), mohrcoulomb::tangentstiff(), j2flow2::tangentstiff(), j2flow::tangentstiff(), drprag::tangentstiff(), chen::tangentstiff(), drprag2::tangentstiff(), linhex::temp_forces(), axisymqq::temp_forces(), axisymlq::temp_forces(), linhex::tempstrains(), axisymqq::tempstrains(), axisymlq::tempstrains(), trlineart::transmission_vector(), trlinaxisym::transmission_vector(), quadquadrilattax::transmission_vector(), quadquadrilatt::transmission_vector(), quadlineart::transmission_vector(), quadlinaxisym::transmission_vector(), quadhext::transmission_vector(), quadbartax::transmission_vector(), quadbart::transmission_vector(), lintett::transmission_vector(), linhext::transmission_vector(), linbartax::transmission_vector(), linbart::transmission_vector(), splas1d::updateq(), j2flow2::updateq(), j2flow::updateq(), quadrilatc::upper_cond_coup_vector(), hexahedc::upper_cond_coup_vector(), barelc::upper_cond_coup_vector(), axiquadc::upper_cond_coup_vector(), loadel::volumeload(), write_gid_displ(), write_gid_nforces(), and write_nforces().

void mxvc ( const double *  a,
const double *  b,
double *  c,
long  m,
long  n 
)

multiplies matrix a stored by columns from the right by vector b c := A.b

funkce nasobi matici A vektorem b, vysledek je vektor c matice A je ulozena po sloupcich

Parameters:
a - pole obsahujici matici A(m,n)
b - pole obsahujici vektor b(n,1)
m 
n - rozmery matice a vektoru
c - pole obsahujici vysledny vektor c(m,1)

created 15.12.1998

Definition at line 1294 of file matrix-new.cpp.

void nnj ( double *  m,
const double *  n,
double  jac,
long  mm,
long  nn 
)

computes matrix product M += N^T . N . jac

function evaluates matrix product N^T N Jac

Parameters:
m 
n 
jac 
mm 
nn created 9.7.2001

Definition at line 2212 of file matrix-new.cpp.

Referenced by q4plate::areaforces(), quadbartax::boundary_flux(), quadbart::boundary_flux(), linbartax::boundary_flux(), linbart::boundary_flux(), trlineart::capacity_matrix(), trlinaxisym::capacity_matrix(), quadquadrilattax::capacity_matrix(), quadquadrilatt::capacity_matrix(), quadlineart::capacity_matrix(), quadlinaxisym::capacity_matrix(), quadhext::capacity_matrix(), quadbartax::capacity_matrix(), quadbart::capacity_matrix(), lintett::capacity_matrix(), linhext::capacity_matrix(), linbartax::capacity_matrix(), linbart::capacity_matrix(), quadbartax::convection_vector(), quadbart::convection_vector(), linbartax::convection_vector(), linbart::convection_vector(), trlineart::edge_integral(), trlinaxisym::edge_integral(), quadquadrilattax::edge_integral(), quadquadrilatt::edge_integral(), quadlineart::edge_integral(), quadlinaxisym::edge_integral(), planeelemlq::edge_integral(), axisymlt::edge_integral(), axisymlq::edge_integral(), beamel2d::initstr_matrix(), quadtet::load_matrix(), quadhex::load_matrix(), q4plate::load_matrix(), planeelemsubqt::load_matrix(), planeelemrotlt::load_matrix(), planeelemrotlq::load_matrix(), planeelemqt::load_matrix(), planeelemqq::load_matrix(), planeelemlt::load_matrix(), planeelemlq::load_matrix(), lintetrot::load_matrix(), lintet::load_matrix(), linhexrot::load_matrix(), linhex::load_matrix(), cctelem::load_matrix(), beamgen3d::load_matrix(), beamel3d::load_matrix(), axisymqq::load_matrix(), axisymlt::load_matrix(), axisymlq::load_matrix(), ArgyrisTriangle::load_matrix(), quadtet::mass_matrix(), quadhex::mass_matrix(), planeelemsubqt::mass_matrix(), planeelemrotlt::mass_matrix(), planeelemrotlq::mass_matrix(), planeelemqt::mass_matrix(), planeelemqq::mass_matrix(), planeelemlt::mass_matrix(), planeelemlq::mass_matrix(), lintetrot::mass_matrix(), lintet::mass_matrix(), linhexrot::mass_matrix(), linhex::mass_matrix(), cctelem::mass_matrix(), beamel3d::mass_matrix(), axisymqq::mass_matrix(), axisymlt::mass_matrix(), axisymlq::mass_matrix(), ArgyrisTriangle::mass_matrix(), quadtet::node_forces_surf(), quadhex::node_forces_surf(), lintetrot::node_forces_surf(), lintet::node_forces_surf(), linhexrot::node_forces_surf(), linhex::node_forces_surf(), lintetrot::node_forces_surf_old(), lintet::node_forces_surf_old(), linhexrot::node_forces_surf_old(), linhex::node_forces_surf_old(), planeelemsubqt::nodeforces(), planeelemqt::nodeforces(), planeelemqq::nodeforces(), planeelemlt::nodeforces(), planeelemlq::nodeforces(), axisymqq::nodeforces(), axisymlq::nodeforces(), trlineart::quantity_source_vector(), trlinaxisym::quantity_source_vector(), quadquadrilattax::quantity_source_vector(), quadquadrilatt::quantity_source_vector(), quadlineart::quantity_source_vector(), quadlinaxisym::quantity_source_vector(), quadhext::quantity_source_vector(), quadbartax::quantity_source_vector(), quadbart::quantity_source_vector(), lintett::quantity_source_vector(), linhext::quantity_source_vector(), linbartax::quantity_source_vector(), linbart::quantity_source_vector(), quadhext::surface_integral(), lintett::surface_integral(), linhext::surface_integral(), quadbartax::transmission_matrix(), quadbart::transmission_matrix(), linbartax::transmission_matrix(), linbart::transmission_matrix(), quadbartax::transmission_vector(), quadbart::transmission_vector(), linbartax::transmission_vector(), and linbart::transmission_vector().

void nnjac ( matrix d,
const matrix a,
const matrix b,
double  jac 
)

computes matrix product D += A^T . B . jac

function computes D += A^T . B . jac

10.5.2002

Definition at line 2246 of file matrix-new.cpp.

Referenced by quadlineart::volume_rhs_vector(), quadlinaxisym::volume_rhs_vector(), quadbart::volume_rhs_vector(), linhext::volume_rhs_vector(), linbart::volume_rhs_vector(), and barelc::volume_rhs_vector().

void princ_val ( matrix v,
vector pval,
matrix pvect,
long  ni,
double  err,
double  zero,
long  n,
long  normalize 
)

computes eigenvalues(principal values) of the given matrix v by Jacobi method

Function computes principal values and vectors of tensors of 2D and 3D problems .

Parameters:
v - matrix of second or third order tensor
pval - vector of sorted principal values (from min to max)
pvect - matrix of principal direction vectors stored in columns
ni - number of iterations in jacobi method
err - required error of Jacobi method
zero - computer zero for explicit computation method
n - order of problem (only 2 for 2D problem and 3 for 3D problem are supported)
normalize - switch for normalizing of matrix in Jacobi method
Returns:
eigenvectors create columns of the matrix pvect and eigenvalues are stored and sorted in pval vector

created 29.8.2001 modified 17.8.2007 TKo (added normalizing in Jacobi method)

Definition at line 2673 of file matrix-new.cpp.

Referenced by glasgmech::compute_lits(), mohrcoulomb::cutting_plane(), scaldamcc::damfuncpar(), scaldam::damfuncpar(), glasgowdam::damfuncpar(), glasgmech::damfuncpar(), scaldamcc::damfunction(), f_tensor(), mohrcoulomb::mc_msurf_cp(), ortodamrot::nlstresses(), ortodam::nlstresses(), anisodamrot::nlstresses(), anisodam::nlstresses(), nodeoutm::print_stra(), nodeoutm::print_stre(), mohrcoulomb::tangentstiff(), and anisodam::tmatstiff().

long printm ( const matrix a,
FILE *  out = stdout,
int  prec = 3,
int  width = 11 
)

prints the matrix to the file with the given width and precision

The function prints out the contents of the matrix a to the stdout file, in precision 3 digits, width of the number is 11 optionally, can be specified file to print, precision and the field width.

Parameters:
a is the structure of the matrix which is printed

Optionally :

Parameters:
out is the structure with opened file for matrix output
prec is desired precision of the matrix elements
width is desired width of the matrix elements on the output
Returns:
always zero.

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 2052 of file matrix-new.cpp.

Referenced by elastortomat::print(), stochdrivert::writetable(), and stochdriver::writetable().

long readm ( FILE *  in,
matrix a 
)

The function prints out the contents of the matrix a to the stdout file, in precision 3 digits, width of the number is 11 optionally, can be specified file to print, precision and the field width.

Parameters:
a is the structure of the matrix which is printed

Optionally :

Parameters:
out is the structure with opened file for matrix output
prec is desired precision of the matrix elements
width is desired width of the matrix elements on the output
Returns:
always zero.

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 2021 of file matrix-new.cpp.

References matrix::m, and matrix::n.

Referenced by outdriverm::read(), elastortomat::read(), stochdrivert::readtable(), and stochdriver::readtable().

long reallocm ( long  m,
long  n,
imatrix mat 
)

reallocates imatrix to the dimensions m x n

The function reallocates memory for the member array a. If the memory requirements are less or equal to the allocated one, the memory is not reallocated and the matrix dimensions are changed only.

Parameters:
m is the number of rows
n is the number of columns
mat is the structure for allocated imatrix

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 390 of file matrix-new.cpp.

long reallocm ( long  m,
long  n,
matrix mat 
)

reallocates matrix to the dimensions m x n

The function reallocates memory for the member array a. If the memory requirements are less or equal to the allocated one, the memory is not reallocated and the matrix dimensions are changed only.

Parameters:
m is the number of rows
n is the number of columns
mat is the structure for allocated matrix

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 352 of file matrix-new.cpp.

Referenced by approx_slip_surf(), loadcase::assemble(), dloadcase::assemble(), trlineart::conductivity_matrix(), trlinaxisym::conductivity_matrix(), quadquadrilattax::conductivity_matrix(), quadquadrilatt::conductivity_matrix(), quadlineart::conductivity_matrix(), quadlinaxisym::conductivity_matrix(), quadhext::conductivity_matrix(), quadbartax::conductivity_matrix(), quadbart::conductivity_matrix(), linhext::conductivity_matrix(), linbartax::conductivity_matrix(), initial_stiffness_matrix(), quadlineart::l_matrix(), linhext::l_matrix(), quadlineart::l_t_matrix(), linhext::l_t_matrix(), mass_matrix(), trlineart::res_capacity_matrix(), trlinaxisym::res_capacity_matrix(), quadquadrilattax::res_capacity_matrix(), quadquadrilatt::res_capacity_matrix(), quadlineart::res_capacity_matrix(), quadlinaxisym::res_capacity_matrix(), quadhext::res_capacity_matrix(), quadbartax::res_capacity_matrix(), quadbart::res_capacity_matrix(), lintett::res_capacity_matrix(), linhext::res_capacity_matrix(), linbartax::res_capacity_matrix(), trlineart::res_conductivity_matrix(), trlinaxisym::res_conductivity_matrix(), quadquadrilattax::res_conductivity_matrix(), quadquadrilatt::res_conductivity_matrix(), quadlineart::res_conductivity_matrix(), quadlinaxisym::res_conductivity_matrix(), quadhext::res_conductivity_matrix(), quadbartax::res_conductivity_matrix(), quadbart::res_conductivity_matrix(), lintett::res_conductivity_matrix(), linhext::res_conductivity_matrix(), linbartax::res_conductivity_matrix(), trlineart::res_internal_fluxes(), trlinaxisym::res_internal_fluxes(), quadquadrilattax::res_internal_fluxes(), quadquadrilatt::res_internal_fluxes(), quadlineart::res_internal_fluxes(), quadlinaxisym::res_internal_fluxes(), quadhext::res_internal_fluxes(), quadbartax::res_internal_fluxes(), quadbart::res_internal_fluxes(), lintett::res_internal_fluxes(), linhext::res_internal_fluxes(), linbartax::res_internal_fluxes(), trlineart::res_l_matrix(), quadlineart::res_l_matrix(), lintett::res_l_matrix(), linhext::res_l_matrix(), trlineart::res_l_t_matrix(), quadlineart::res_l_t_matrix(), lintett::res_l_t_matrix(), linhext::res_l_t_matrix(), mechtop::searching_hanging_nodes(), stiffness_matrix(), stress_initdispl(), quadlineart::volume_rhs_vector(), quadlinaxisym::volume_rhs_vector(), quadbart::volume_rhs_vector(), linhext::volume_rhs_vector(), linbart::volume_rhs_vector(), write_gid_displ(), and write_gid_nforces().

void rhsassem_lsm ( double *  rhs,
vector natcoord,
vector values 
)

assembles right hand side vector of least square problem for extrapolation of nodal values from integration point values

function assembles right hand side of least square problems it is used in extrapolation of values from integration points to nodes

Parameters:
lsm - array containing matrix
natcoord - array containing natural coordinates of integration points
values - values in integration point

10.5.2002

Definition at line 3078 of file matrix-new.cpp.

Referenced by soilplateq::elem_strains(), planeelemsubqt::elem_strains(), planeelemrotlt::elem_strains(), planeelemqt::elem_strains(), linhex::elem_strains(), axisymqq::elem_strains(), axisymlq::elem_strains(), planeelemsubqt::elem_stresses(), planeelemrotlt::elem_stresses(), planeelemqt::elem_stresses(), linhex::elem_stresses(), axisymqq::elem_stresses(), axisymlq::elem_stresses(), planeelemrotlt::nod_others(), planeelemlt::nod_others(), linhex::nod_others(), soilplateq::nod_strains(), planeelemsubqt::nod_strains(), planeelemrotlt::nod_strains(), planeelemqt::nod_strains(), linhex::nod_strains(), axisymlq::nod_strains(), axisymqq::nod_strains_old(), planeelemsubqt::nod_stresses(), planeelemrotlt::nod_stresses(), planeelemqt::nod_stresses(), linhex::nod_stresses(), axisymlq::nod_stresses(), and axisymqq::nod_stresses_old().

void solve_lsm ( double *  lsm,
double *  lhs,
double *  rhs,
double  zero,
long  n,
long  m 
)

solves system of equation given by least square problem for extrapolation of nodal values from integration point values

function solves least square problems it is used in extrapolation of values from integration points to nodes

Parameters:
lsm - matrix of least square problem
lhs - left hand side (contains unknown coefficients)
rhs - right hand side
n - number of rows/columns of matrix
m - number of values

10.5.2002

Definition at line 3118 of file matrix-new.cpp.

Referenced by soilplateq::elem_strains(), planeelemsubqt::elem_strains(), planeelemrotlt::elem_strains(), planeelemqt::elem_strains(), linhex::elem_strains(), axisymqq::elem_strains(), axisymlq::elem_strains(), planeelemsubqt::elem_stresses(), planeelemrotlt::elem_stresses(), planeelemqt::elem_stresses(), linhex::elem_stresses(), axisymqq::elem_stresses(), axisymlq::elem_stresses(), planeelemrotlt::nod_others(), planeelemlt::nod_others(), linhex::nod_others(), soilplateq::nod_strains(), planeelemsubqt::nod_strains(), planeelemrotlt::nod_strains(), planeelemqt::nod_strains(), linhex::nod_strains(), axisymlq::nod_strains(), axisymqq::nod_strains_old(), planeelemsubqt::nod_stresses(), planeelemrotlt::nod_stresses(), planeelemqt::nod_stresses(), linhex::nod_stresses(), axisymlq::nod_stresses(), and axisymqq::nod_stresses_old().

long subm ( const matrix a,
const matrix b,
matrix c 
)

substracts 2 matrices C := A-B

The function subtracts matrix given by b from matrix given by a, the result is stored in the c

Parameters:
a is the structure of the matrix, from which is subtracted
b is the structure of subtracted matrix
c is the structure of the result matrix

Requests : a, b and c have to be same dimensions, c has to have allocated memory array for elements which is enough large to hold contents of the result.

Return values:
0 : on succes
1 : in case incompatibility sizes of a, b and c matrices

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 667 of file matrix-new.cpp.

long tensprd ( const vector a,
const vector b,
matrix c 
)

The function performs tensor product of two vectors.

Parameters:
a is the structure of the first vector
b is the structure of the second vector
c is the structure of the result matrix

Requests : c has to have allocated memory array for elements which is enough large to hold contents of the result.

Return values:
0 : on succes
1 : in case incompatibility sizes of a, b and c matrices

created

Definition at line 703 of file matrix-new.cpp.

References matrix::m, matrix::n, vector::n, and print_err().

long tranm ( matrix a  ) 

transposes matrix A := A^T

The function transposes matrix given by a, the result is stored in a.

Parameters:
a is the structure of the matrix, from which is transposed
Return values:
always zero

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 1110 of file matrix-new.cpp.

long tranm ( const matrix a,
matrix at 
)

transposes matrix A_t := A^T

The function transposes matrix given by a, the result is stored in at

Parameters:
a is the structure of the matrix, from which is transposed
at is the structure of the result matrix

Requests : a and at have to be same dimensions, at has to have allocated memory array for elements which is enough large to hold contents of the result.

Return values:
0 : on succes
1 : in case incompatibility sizes of a and at matrices

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 1080 of file matrix-new.cpp.

Referenced by glvectortransf(), and stiffness_matrix().

long vxm ( const vector u,
const matrix a,
vector v 
)

multiplies matrix a from left by row vector u v := u.A

The function multiplies row vector given by u with matrix given by a, the result is stored in row vector v

Parameters:
u is the structure of the row vector
a is the structure of the matrix, which is multiplied
v is the structure of the result row vector

Requests : u ,a and v have to be following dimensions u (m), a (m,n), c (n) v has to have allocated memory array for elements which is enough large to hold contents of the result.

Return values:
0 : on succes
1 : in case incompatibility sizes of the matrix a

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 1148 of file matrix-new.cpp.

Referenced by scaldam::damfuncpar(), argyrisplate::geom_matrix(), planeelemlq::gngeom_matrix(), camclay::matstiff(), shefplast::stress_return(), and shefplast::tangentstiff().

long vxmt ( const vector u,
const matrix a,
vector v 
)

multiplies transposed matrix a from left by row vector u v := u.A^T

The function multiplies row vector given by u with transposed matrix given by a, the result is stored in row vector v.

Parameters:
u is the structure of the row vector
a is the structure of the matrix, which is multiplied
v is the structure of the result row vector

Requests : u ,a and v have to be following dimensions u (m), a (n,m), c (n) v has to have allocated memory array for elements which is enough large to hold contents of the result.

Return values:
0 : on succes
1 : in case incompatibility sizes of the matrix a

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 1189 of file matrix-new.cpp.

long vxmxv ( const double *  v,
const double *  m,
long  dim,
double &  answer 
)

multiplies row vector v given by array with symetric matrix m given by array and column vector v, i.e. answer := (v^T).A.v

The function multiplies row vector given by "v" with symetric matrix given by "m" with column vector given by "v" -> v.m.v , the result is stored in answer.

Parameters:
v is pointer on double array
m is pointer on double array
dim is size of "v" & "m"
answer is the real number

Requests : "v" and "m" have to be following dimensions: v (dim), m (dim,dim)

Return values:
0 : always

created 25.10.2002, Ladislav Svoboda, termit@cml.fsv.cvut.cz

Definition at line 3210 of file matrix-new.cpp.

long vxmxv ( const vector v,
const matrix m,
double &  answer 
)

multiplies row vector v with symetric matrix m and column vector v, i.e. answer := (v^T).A.v

The function multiplies row vector given by "v" with symetric matrix given by "m" with column vector given by "v" -> v.m.v , the result is stored in answer.

Parameters:
v is the structure of the row vector
m is the structure of the matrix
answer is the real number

Requests : "v" and "m" have to be following dimensions: v (n), m (n,n)

Return values:
0 : on succes
1 : in case incompatibility sizes of the matrix a

created 25.10.2002, Ladislav Svoboda, termit@cml.fsv.cvut.cz

Definition at line 3170 of file matrix-new.cpp.

Referenced by trlineart::compute_error(), quadlineart::compute_error(), planeelemqt::compute_error(), planeelemqq::compute_error(), planeelemlt::compute_error(), planeelemlq::compute_error(), and lintet::compute_error().

long vxv ( const vector u,
const vector v,
matrix a 
)

multiplies column vector u with row vector, i.e. it performs tensor product, A := u * v

The function multiplies column vector given by u with row vector given by v, the result is stored in matrix a.

Parameters:
u is the structure of the column vector
v is the structure of the row vector
a is the structure of the result matrix

Requests : u ,a and v have to be following dimensions u (m), v(n), a(m,n) a has to have allocated memory array for elements which is enough large to hold contents of the result.

Return values:
0 : on succes
1 : in case incompatibility sizes of the matrix a

created 29.5.2000, Tomas Koudelka, koudelka@cml.fsv.cvut.cz modified 9.5.2001, Tomas Koudelka, koudelka@cml.fsv.cvut.cz

Definition at line 1427 of file matrix-new.cpp.

Referenced by planeelemlq::gngeom_matrix(), splas1d::matstiff(), camclay::matstiff(), least_square::polynom_coefficients_ae(), patch_averaging::polynom_coefficients_ae(), least_square::polynom_coefficients_inv_ae(), shefplast::tangentstiff(), mohrcoulomb::tangentstiff(), j2flow2::tangentstiff(), j2flow::tangentstiff(), drprag::tangentstiff(), chen::tangentstiff(), and drprag2::tangentstiff().


Generated by  doxygen 1.6.2