| 439 | |
| 440 | constexpr int N = tensor::Zminus::Shape[0]; |
| 441 | Eigen::Matrix<real, N, N> extractMatrix(eigenvalues::Eigenpair<std::complex<double>, seissol::model::MaterialT::NumQuantities> eigenpair) { |
| 442 | #ifdef USE_POROELASTIC |
| 443 | constexpr std::array<int, 4> tractionIndices = {0,3,5,9}; |
| 444 | constexpr std::array<int, 4> velocityIndices = {6,7,8,10}; |
| 445 | constexpr std::array<int, 4> columnIndices = {0,1,2,3}; |
| 446 | #else |
| 447 | constexpr std::array<int, 3> tractionIndices = {0,3,5}; |
| 448 | constexpr std::array<int, 3> velocityIndices = {6,7,8}; |
| 449 | constexpr std::array<int, 3> columnIndices = {0,1,2}; |
| 450 | #endif |
| 451 | auto matrix = eigenpair.getVectorsAsMatrix(); |
| 452 | Eigen::Matrix<double, N, N> RT = matrix(tractionIndices, columnIndices).real(); |
| 453 | Eigen::Matrix<double, N, N> RT_inv = RT.inverse(); |
| 454 | Eigen::Matrix<double, N, N> RU = matrix(velocityIndices, columnIndices).real(); |
| 455 | Eigen::Matrix<double, N, N> M = RU * RT_inv; |
| 456 | return M.cast<real>(); |
| 457 | }; |
| 458 | |
| 459 | void seissol::initializer::initializeDynamicRuptureMatrices( seissol::geometry::MeshReader const& i_meshReader, |
| 460 | LTSTree* io_ltsTree, |
no test coverage detected