| 65 | namespace seissol::kernels { |
| 66 | |
| 67 | void TimeCommon::computeIntegrals(Time& time, |
| 68 | unsigned short ltsSetup, |
| 69 | const FaceType faceTypes[4], |
| 70 | const double currentTime[5], |
| 71 | double timeStepWidth, |
| 72 | real* const timeDofs[4], |
| 73 | real integrationBuffer[4][tensor::I::size()], |
| 74 | real* timeIntegrated[4]) { |
| 75 | /* |
| 76 | * assert valid input. |
| 77 | */ |
| 78 | // only lower 10 bits are used for lts encoding |
| 79 | assert(ltsSetup < 2048); |
| 80 | |
| 81 | #ifndef NDEBUG |
| 82 | // alignment of the time derivatives/integrated dofs and the buffer |
| 83 | for (int dofneighbor = 0; dofneighbor < 4; dofneighbor++) { |
| 84 | assert(reinterpret_cast<uintptr_t>(timeDofs[dofneighbor]) % Alignment == 0); |
| 85 | assert(reinterpret_cast<uintptr_t>(integrationBuffer[dofneighbor]) % Alignment == 0); |
| 86 | } |
| 87 | #endif |
| 88 | |
| 89 | /* |
| 90 | * set/compute time integrated DOFs. |
| 91 | */ |
| 92 | for (int dofneighbor = 0; dofneighbor < 4; ++dofneighbor) { |
| 93 | // collect information only in the case that neighboring element contributions are required |
| 94 | if (faceTypes[dofneighbor] != FaceType::Outflow && |
| 95 | faceTypes[dofneighbor] != FaceType::DynamicRupture) { |
| 96 | // check if the time integration is already done (-> copy pointer) |
| 97 | if ((ltsSetup >> dofneighbor) % 2 == 0) { |
| 98 | timeIntegrated[dofneighbor] = timeDofs[dofneighbor]; |
| 99 | } |
| 100 | // integrate the DOFs in time via the derivatives and set pointer to local buffer |
| 101 | else { |
| 102 | time.computeIntegral(currentTime[dofneighbor + 1], |
| 103 | currentTime[0], |
| 104 | currentTime[0] + timeStepWidth, |
| 105 | timeDofs[dofneighbor], |
| 106 | integrationBuffer[dofneighbor]); |
| 107 | |
| 108 | timeIntegrated[dofneighbor] = integrationBuffer[dofneighbor]; |
| 109 | } |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | void TimeCommon::computeIntegrals(Time& time, |
| 115 | unsigned short ltsSetup, |
nothing calls this directly
no test coverage detected