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

Method computeIntegrals

src/Kernels/TimeCommon.cpp:67–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65namespace seissol::kernels {
66
67void 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
114void TimeCommon::computeIntegrals(Time& time,
115 unsigned short ltsSetup,

Callers

nothing calls this directly

Calls 2

sizeFunction · 0.85
computeIntegralMethod · 0.45

Tested by

no test coverage detected