36 #ifndef NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_NEK_LIN_ALG_ALGORITHMS_HPP
37 #define NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_NEK_LIN_ALG_ALGORITHMS_HPP
52 template<
typename DataType>
53 std::vector<NekVector<DataType> >
60 unsigned int dim = x[0].GetDimension();
61 std::vector<VectorType> q(x.size(), VectorType());
66 MatrixType r(dim, dim);
67 r(0,0) = x[0].L2Norm();
69 if( r(0,0) == DataType(0) )
76 for(
unsigned int j = 1; j < x.size(); ++j)
78 for(
unsigned int i = 0; i <= j-1; ++i)
80 r(i,j) = q[i].Dot(x[j]);
84 for(
unsigned int i = 0; i <= j-1; ++i)
90 if( r(j,j) == DataType(0) )
102 #endif //NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_NEK_LIN_ALG_ALGORITHMS_HPP