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

Method weightedAddInplace

src/Numerical/ODEVector.cpp:90–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90void ODEVector::weightedAddInplace(real weight, const ODEVector& rhs) {
91 if (weight == 0.0) {
92 return;
93 }
94 for (std::size_t i = 0; i < storages.size(); ++i) {
95 assert(sizes[i] == rhs.sizes[i]);
96#pragma omp simd
97 for (std::size_t j = 0; j < sizes[i]; ++j) {
98 storages[i][j] += weight * rhs.storages[i][j];
99 }
100 }
101}
102
103real ODEVector::normDifferenceTo(ODEVector& other, bool useLInfNorm) {
104 // Computes the L2 or LInf norm of the difference between two vectors.

Callers 1

solveMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected