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

Method updateStoragesAndSizes

src/Numerical/ODEVector.cpp:35–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void ODEVector::updateStoragesAndSizes(std::vector<real*> newStorages,
36 std::vector<std::size_t> newSizes) {
37 storages = std::move(newStorages);
38 sizes = std::move(newSizes);
39 offsets.clear();
40 std::size_t curOffset = 0;
41 for (const unsigned long size : this->sizes) {
42 offsets.push_back(curOffset);
43 curOffset += size;
44 }
45}
46
47std::pair<real*, size_t> ODEVector::getSubvector(size_t storageIdx) {
48 return {storages[storageIdx], sizes[storageIdx]};

Callers 1

RungeKuttaODESolverMethod · 0.80

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected