19 for (
int i=0; i<size; i++) {
20 norma += vetor[i]*vetor[i];
29 for(i=0; i<3; i++) vetor[i] = vetor[i]/norma;
37 for(i=0; i< n; i++) vetor[i] = vetor[i]/norma;
50 for(i=0; i<3; i++) vetor[i]=
fabs(array[i]);
52 if (vetor[0] >= vetor[1]) {
53 if (vetor[1] >= vetor[2]) {
58 else if (vetor[2] >= vetor[0]) {
70 if (vetor[0] >= vetor[2]) {
75 else if (vetor[2] >= vetor[1]) {
91 sort(&array[0], &array[size], greater<Tvar>());
100 aux[i]= u[(i+1)%3]*v[(i+2)%3] - u[(i+2)%3]*v[(i+1)%3];
108 void TPZNumeric::SortArray3<REAL>(
const TPZVec<REAL> &array,
int ordem[3]);
114 void TPZNumeric::NormalizeVetor3<REAL>(
TPZVec<REAL> &vetor);
116 void TPZNumeric::NormalizeVetor<REAL>(
TPZVec<REAL> &vetor);
123 void TPZNumeric::SortArray3<Fad<REAL>>(
const TPZVec<Fad<REAL>> &array,
int ordem[3]);
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ fabs
This class implements a simple vector storage scheme for a templated class T. Utility.
static void NormalizeVetor3(TPZVec< Tvar > &vetor)
Normalizes the vector with 3 elements.
static void ProdVetorial(TPZVec< Tvar > &u, TPZVec< Tvar > &v, TPZVec< Tvar > &result)
Computes the vectorial product u x v.
static void SortArray3(const TPZVec< Tvar > &array, int ordem[3])
Sorts in descending order, in absolute value and stores the indexes in ordem.
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ sqrt
static Tvar Norm(const TPZVec< Tvar > &vetor)
Returns the L2-norm of the vector.
int64_t NElements() const
Returns the number of elements of the vector.
static void NormalizeVetor(TPZVec< Tvar > &vetor)
Normalizes the vector.
Contains declaration of the TPZNumeric class which implements several methods to calculation.