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

Method scaleMesh

src/Geometry/MeshReader.cpp:58–68  ·  view source on GitHub ↗

TODO: Test proper scaling scalingMatrix is stored column-major, i.e. scalingMatrix_ij = scalingMatrix[j][i]

Source from the content-addressed store, hash-verified

56// scalingMatrix is stored column-major, i.e.
57// scalingMatrix_ij = scalingMatrix[j][i]
58void 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

Callers 1

postMeshreadFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected