* Computes mInvJInvPhisAtSources[i] = |J|^-1 * M_ii^-1 * phi_i(xi, eta, zeta), * where xi, eta, zeta is the point in the reference tetrahedron corresponding to x, y, z. */
| 130 | * where xi, eta, zeta is the point in the reference tetrahedron corresponding to x, y, z. |
| 131 | */ |
| 132 | void computeMInvJInvPhisAtSources( |
| 133 | const Eigen::Vector3d& centre, |
| 134 | seissol::memory::AlignedArray<real, tensor::mInvJInvPhisAtSources::size()>& |
| 135 | mInvJInvPhisAtSources, |
| 136 | unsigned meshId, |
| 137 | const seissol::geometry::MeshReader& mesh) { |
| 138 | const auto& elements = mesh.getElements(); |
| 139 | const auto& vertices = mesh.getVertices(); |
| 140 | |
| 141 | const double* coords[4]; |
| 142 | for (unsigned v = 0; v < 4; ++v) { |
| 143 | coords[v] = vertices[elements[meshId].vertices[v]].coords; |
| 144 | } |
| 145 | const auto xiEtaZeta = transformations::tetrahedronGlobalToReference( |
| 146 | coords[0], coords[1], coords[2], coords[3], centre); |
| 147 | const auto basisFunctionsAtPoint = basisFunction::SampledBasisFunctions<real>( |
| 148 | ConvergenceOrder, xiEtaZeta(0), xiEtaZeta(1), xiEtaZeta(2)); |
| 149 | |
| 150 | const double volume = MeshTools::volume(elements[meshId], vertices); |
| 151 | const double jInv = 1.0 / (6.0 * volume); |
| 152 | |
| 153 | kernel::computeMInvJInvPhisAtSources krnl; |
| 154 | krnl.basisFunctionsAtPoint = basisFunctionsAtPoint.m_data.data(); |
| 155 | krnl.M3inv = init::M3inv::Values; |
| 156 | krnl.mInvJInvPhisAtSources = mInvJInvPhisAtSources.data(); |
| 157 | krnl.JInv = jInv; |
| 158 | krnl.execute(); |
| 159 | } |
| 160 | |
| 161 | void transformNRFSourceToInternalSource(const Eigen::Vector3d& centre, |
| 162 | unsigned meshId, |
no test coverage detected