TODO: Test proper scaling scalingMatrix is stored column-major, i.e. scalingMatrix_ij = scalingMatrix[j][i]
| 56 | // scalingMatrix is stored column-major, i.e. |
| 57 | // scalingMatrix_ij = scalingMatrix[j][i] |
| 58 | void MeshReader::scaleMesh(const Eigen::Matrix3d& scalingMatrix) { |
| 59 | for (unsigned vertexNo = 0; vertexNo < m_vertices.size(); ++vertexNo) { |
| 60 | Eigen::Vector3d point; |
| 61 | point << m_vertices[vertexNo].coords[0], m_vertices[vertexNo].coords[1], |
| 62 | m_vertices[vertexNo].coords[2]; |
| 63 | const auto result = scalingMatrix * point; |
| 64 | for (unsigned i = 0; i < 3; ++i) { |
| 65 | m_vertices[vertexNo].coords[i] = result[i]; |
| 66 | } |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * Reconstruct the fault information from the boundary conditions |