15 std::vector<Real> & eigvals,
16 std::vector<Real> & a)
const 22 PetscBLASInt nd =
Ndim;
23 PetscBLASInt lwork = 66 * nd;
25 std::vector<PetscScalar> work(lwork);
32 a[i *
Ndim + j] = A(i, j);
37 LAPACKsyev_(calculation_type,
"U", &nd, &a[0], &nd, &eigvals[0], &work[0], &lwork, &
info);
40 mooseError(
"In computing the eigenvalues and eigenvectors for the symmetric rank-2 tensor (",
42 "), the PETSC LAPACK syev routine returned error code ",
51 syev(
"N", eigvals, a);
60 syev(
"V", eigvals, a);
64 eigvecs(j, i) = a[i *
Ndim + j];
RankTwoTensorTempl< Real > RankTwoTensor
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
void symmetricEigenvaluesEigenvectors(std::vector< T > &eigvals, RankTwoTensorTempl< T > &eigvecs) const
computes eigenvalues and eigenvectors, assuming tens is symmetric, and places them in ascending order...
static constexpr unsigned int Ndim
tensor dimension and Mandel vector length
std::string stringify(const T &t)
conversion to string
void symmetricEigenvalues(std::vector< T > &eigvals) const
computes eigenvalues, assuming tens is symmetric, and places them in ascending order in eigvals ...
RankTwoTensorTempl is designed to handle the Stress or Strain Tensor for a fully anisotropic material...
IntRange< T > make_range(T beg, T end)
void syev(const char *calculation_type, std::vector< T > &eigvals, std::vector< T > &a) const
Uses the petscblaslapack.h LAPACKsyev_ routine to find, for symmetric _vals: (1) the eigenvalues (if ...