NLMech  0.1.0
util Namespace Reference

Collection of methods useful in simulation. More...

Namespaces

 compare
 Provides comparison of floating point values

 
 function
 Provides geometrical methods such as point inside rectangle.
 
 geometry
 Provides geometrical methods such as point inside rectangle.
 
 io
 Provides geometrical methods such as point inside rectangle.
 
 methods
 Provides fast methods to add/subtract list of data, to find maximum/minimum from list of data.
 
 transformation
 Provides geometrical methods such rotation of a vector.
 

Data Structures

struct  Matrix3
 A structure to represent 3d matrices. More...
 
struct  Point3
 A structure to represent 3d vectors. More...
 
class  StateBasedHelperFunctions
 A class for global methods of state-based material models. More...
 
struct  SymMatrix3
 A structure to represent 3d matrices. More...
 

Typedefs

typedef blaze::IdentityMatrix< double > IdentityMatrix
 Blaze: Identity matrix.
 
typedef blaze::IdentityMatrix< float > IdentityMatrixF
 Blaze: Identity matrix.
 
typedef blaze::StaticMatrix< double, 3UL, 3UL > Matrix33
 Blaze: Definition of 3 x 3 matrix.
 
typedef blaze::StaticMatrix< float, 3UL, 3UL > MatrixF33
 Blaze: Definition of 3 x 3 matrix.
 
typedef blaze::DynamicMatrix< float > MatrixFij
 Blaze: Definition of n x m matrix.
 
typedef blaze::DynamicMatrix< double > Matrixij
 Blaze: Definition of n x m matrix.
 
typedef blaze::SymmetricMatrix< blaze::StaticMatrix< double, 3UL, 3UL > > SymMatrix33
 Blaze: Definition of 3 x 3 symmetric matrix.
 
typedef blaze::SymmetricMatrix< blaze::StaticMatrix< float, 3UL, 3UL > > SymMatrixF33
 Blaze: Definition of 3 x 3 symmetric matrix.
 
typedef blaze::SymmetricMatrix< blaze::DynamicMatrix< float > > SymMatrixFij
 Blaze: Definition of n x n symmetric matrix.
 
typedef blaze::SymmetricMatrix< blaze::DynamicMatrix< double > > SymMatrixij
 Blaze: Definition of n x n symmetric matrix.
 
typedef blaze::StaticVector< double, 3UL > Vector3
 Blaze: Definition of 3D vector.
 
typedef blaze::StaticVector< float, 3UL > VectorF3
 Blaze: Definition of 3D vector.
 
typedef blaze::DynamicVector< float, blaze::columnVector > VectorFXi
 Blaze: Definition of vector.
 
typedef blaze::DynamicVector< double, blaze::columnVector > VectorXi
 Blaze: Definition of vector.
 

Functions

bool checkMatrix (const std::vector< std::vector< double >> &m)
 Checks matrix. More...
 
double det (const std::vector< std::vector< double >> &m)
 Computes the determinant of matrix. More...
 
std::vector< double > dot (const std::vector< std::vector< double >> &m, const std::vector< double > &v)
 Computes the dot product between matrix and vector. More...
 
std::vector< std::vector< double > > inv (const std::vector< std::vector< double >> &m)
 Computes the determinant of matrix. More...
 
double l2Norm (util::VectorXi vec)
 
std::ostream & operator<< (std::ostream &os, const Point3 p)
 
std::vector< std::vector< double > > transpose (const std::vector< std::vector< double >> &m)
 Computes the transpose of matrix. More...
 

Variables

VTK Element types
static const int vtk_type_vertex = 1
 Element type (for vtk)

 
static const int vtk_type_poly_vertex = 2
 
static const int vtk_type_line = 3
 
static const int vtk_type_poly_line = 4
 
static const int vtk_type_triangle = 5
 
static const int vtk_type_triangle_strip = 6
 
static const int vtk_type_polygon = 7
 
static const int vtk_type_pixel = 8
 
static const int vtk_type_quad = 9
 
static const int vtk_type_tetra = 10
 
static const int vtk_type_voxel = 11
 
static const int vtk_type_hexahedron = 12
 
static const int vtk_type_wedge = 13
 
static const int vtk_type_pyramid = 14
 
static int vtk_map_element_to_num_nodes [16]
 Map from element type to number of nodes (for vtk) More...
 
static int vtk_to_msh_element_type_map [16]
 Map from vtk element type to msh element type. More...
 
Gmsh Element types
static const int msh_type_line = 1
 Element type (for gmsh)

 
static const int msh_type_triangle = 2
 
static const int msh_type_quadrangle = 3
 
static const int msh_type_tetrahedron = 4
 
static const int msh_type_hexahedron = 5
 
static const int msh_type_prism = 6
 
static const int msh_type_pyramid = 7
 
static const int msh_type_line_second_order = 8
 
static const int msh_type_traingle_second_order = 9
 
static const int msh_type_quadrangle_second_order = 10
 
static const int msh_type_vertex = 15
 
static int msh_map_element_to_num_nodes [16]
 Map from element type to number of nodes (for msh) More...
 

Detailed Description

Collection of methods useful in simulation.

This namespace provides number of useful functions and struct definition.

See also
Point3, Matrix3, SymMatrix3, compare, transformation

Function Documentation

◆ checkMatrix()

bool util::checkMatrix ( const std::vector< std::vector< double >> &  m)

Checks matrix.

Parameters
mMatrix
Returns
true If matrix is okay

Referenced by det(), dot(), inv(), and transpose().

Here is the caller graph for this function:

◆ det()

double util::det ( const std::vector< std::vector< double >> &  m)

Computes the determinant of matrix.

Parameters
mMatrix
Returns
det Determinant

Referenced by fe::TetElem::getJacobian(), and inv().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dot()

std::vector< double > util::dot ( const std::vector< std::vector< double >> &  m,
const std::vector< double > &  v 
)

Computes the dot product between matrix and vector.

Parameters
mMatrix
vvector
Returns
vector Dot product

Referenced by util::geometry::angle(), fe::TetElem::getDerShapes(), fe::TetElem::getQuadDatas(), and fe::TetElem::mapPointToRefElem().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ inv()

std::vector< std::vector< double > > util::inv ( const std::vector< std::vector< double >> &  m)

Computes the determinant of matrix.

Parameters
mMatrix
Returns
inv Inverse of m

Referenced by fe::TetElem::getDerShapes(), fe::TetElem::getQuadDatas(), and fe::TetElem::mapPointToRefElem().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ l2Norm()

double util::l2Norm ( util::VectorXi  vec)
inline

Computes the l2 norm of a vector

Parameters
vecVector
Returns
The l2 norm of the vector

Referenced by model::QuasiStaticModel< T >::solver().

Here is the caller graph for this function:

◆ operator<<()

std::ostream& util::operator<< ( std::ostream &  os,
const Point3  p 
)
inline
Parameters
osStandard output stream
pPoint
Returns
The standard out stream

◆ transpose()

std::vector< std::vector< double > > util::transpose ( const std::vector< std::vector< double >> &  m)

Computes the transpose of matrix.

Parameters
mMatrix
Returns
Matrix Transpose of m

Referenced by fe::TetElem::mapPointToRefElem().

Here is the call graph for this function:
Here is the caller graph for this function: