https://mooseframework.inl.gov
Functions
RankTwoScalarToolsTest.C File Reference

Go to the source code of this file.

Functions

 TEST (RankTwoScalarToolsTest, ErrorComputingEV)
 

Function Documentation

◆ TEST()

TEST ( RankTwoScalarToolsTest  ,
ErrorComputingEV   
)

Definition at line 15 of file RankTwoScalarToolsTest.C.

16 {
17  // generate tensor that does not allow computation of eigenvectors
18  // and fails because of nan entries
19 
21  a(0, 0) = a(0, 1) = a(0, 2) = std::numeric_limits<double>::quiet_NaN();
22  a(1, 0) = a(1, 1) = a(1, 2) = a(0, 0);
23  a(2, 0) = a(2, 1) = a(2, 2) = a(0, 0);
24 
25  try
26  {
27  Point p(1, 0, 0);
29  FAIL();
30  }
31  catch (const std::exception & err)
32  {
33  std::size_t pos = std::string(err.what()).find("In computing the eigenvalues and eigenvectors");
34  ASSERT_TRUE(pos != std::string::npos);
35  }
36 }
OStreamProxy err
T calcEigenValuesEigenVectors(const RankTwoTensorTempl< T > &r2tensor, unsigned int index, Point &eigenvec)