NeoPZ
pznumeric.h
Go to the documentation of this file.
1 
6 #ifndef TPZNUMERIC_H
7 #define TPZNUMERIC_H
8 
9 #include "pzvec.h"
10 #ifdef _AUTODIFF
11 #include "fad.h"
12 #endif
13 
19 class TPZNumeric {
20 
21 public:
22 
23  TPZNumeric();
24  ~TPZNumeric();
27  static void MatrixDet(REAL matrix[3][3], REAL &det);
30  static REAL MatrixDet(REAL matrix[3][3]);
33  template <class Tvar>
34  static void SortArray3(const TPZVec<Tvar> &array, int ordem[3]);
37  template <class Tvar>
38  static void SortArray3(TPZVec<Tvar> &array);
41  template <class Tvar>
42  static void ProdVetorial(TPZVec<Tvar> &u, TPZVec<Tvar> &v, TPZVec<Tvar> &result);
44  template <class Tvar>
45  static void NormalizeVetor3(TPZVec<Tvar> &vetor);
47  template <class Tvar>
48  static void NormalizeVetor(TPZVec<Tvar> &vetor);
50  template <class Tvar>
51  static Tvar Norm(const TPZVec<Tvar> &vetor);
52 };
53 
54 #endif
Templated vector implementation.
This class implements a simple vector storage scheme for a templated class T. Utility.
Definition: pzgeopoint.h:19
static void NormalizeVetor3(TPZVec< Tvar > &vetor)
Normalizes the vector with 3 elements.
Definition: pznumeric.cpp:26
TPZSkylMatrix< REAL > matrix
Definition: numatst.cpp:255
static void ProdVetorial(TPZVec< Tvar > &u, TPZVec< Tvar > &v, TPZVec< Tvar > &result)
Computes the vectorial product u x v.
Definition: pznumeric.cpp:96
Implements several methods to calculation. Utility.
Definition: pznumeric.h:19
static void SortArray3(const TPZVec< Tvar > &array, int ordem[3])
Sorts in descending order, in absolute value and stores the indexes in ordem.
Definition: pznumeric.cpp:47
static Tvar Norm(const TPZVec< Tvar > &vetor)
Returns the L2-norm of the vector.
Definition: pznumeric.cpp:16
static void MatrixDet(REAL matrix[3][3], REAL &det)
Compute the 3x3-matrix determinant.
static void NormalizeVetor(TPZVec< Tvar > &vetor)
Normalizes the vector.
Definition: pznumeric.cpp:33