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

Method addTimeIntegratedPointSourceNRF

src/Kernels/PointSourceClusterOnDevice.cpp:109–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107constexpr std::size_t MInvJInvPhisAtSourcesSpan = tensor::mInvJInvPhisAtSources::Shape[0];
108
109void PointSourceClusterOnDevice::addTimeIntegratedPointSourceNRF(const std::array<real, 3>& slip,
110 const real* mInvJInvPhisAtSources,
111 const real* tensor,
112 real a,
113 const real* stiffnessTensor,
114 double from,
115 double to,
116 real dofs[tensor::Q::size()]) {
117 real rotatedSlip[3] = {real(0.0)};
118 for (unsigned i = 0; i < 3; ++i) {
119 for (unsigned j = 0; j < 3; ++j) {
120 rotatedSlip[j] += tensor[j + i * 3] * slip[i];
121 }
122 }
123
124 auto mom = [&](unsigned p, unsigned q) {
125 real m = 0.0;
126 for (unsigned i = 0; i < 3; ++i) {
127 for (unsigned j = 0; j < 3; ++j) {
128 m += -a * stiffnessTensor[p + 3 * q + 9 * i + 27 * j] * rotatedSlip[i] * tensor[6 + j];
129 }
130 }
131 return m;
132 };
133
134 const real moment[6] = {mom(0, 0), mom(1, 1), mom(2, 2), mom(0, 1), mom(1, 2), mom(0, 2)};
135 for (unsigned t = 0; t < 6; ++t) {
136 for (unsigned k = 0; k < MInvJInvPhisAtSourcesSpan; ++k) {
137 dofs[k + t * QSpan] += mInvJInvPhisAtSources[k] * moment[t];
138 }
139 }
140}
141
142void PointSourceClusterOnDevice::addTimeIntegratedPointSourceFSRM(real slip,
143 const real* mInvJInvPhisAtSources,

Callers

nothing calls this directly

Calls 1

sizeFunction · 0.85

Tested by

no test coverage detected