MCPcopy Create free account
hub / github.com/SeisSol/SeisSol / extractMatrix

Function extractMatrix

src/Initializer/CellLocalMatrices.cpp:441–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439
440constexpr int N = tensor::Zminus::Shape[0];
441Eigen::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
459void seissol::initializer::initializeDynamicRuptureMatrices( seissol::geometry::MeshReader const& i_meshReader,
460 LTSTree* io_ltsTree,

Callers 1

Calls 1

getVectorsAsMatrixMethod · 0.80

Tested by

no test coverage detected