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

Method index

src/Numerical/ODEVector.cpp:14–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12
13namespace seissol::ode {
14std::pair<std::size_t, std::size_t> ODEVector::index(std::size_t idx) const {
15 for (std::size_t i = 0; i < storages.size(); ++i) {
16 const auto begin = offsets[i];
17 const auto end = begin + sizes[i];
18 assert(begin <= idx);
19 if (idx < end) {
20 return {i, idx - begin};
21 }
22 }
23 std::abort(); // Unreachable!
24}
25
26ODEVector::ODEVector(std::vector<real*> storages, std::vector<std::size_t> sizes)
27 : storages(std::move(storages)), sizes(std::move(sizes)) {

Callers 4

readFolderMethod · 0.80
selectWaveformAtMethod · 0.80
readFunction · 0.80
replaceFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected