fixed RK4 integration

This commit is contained in:
robin committed 2024-04-29 17:20:58 +02:00
1 parent ccac46ff40
commit 37d0593f65
3 files changed
+36 -27

No files matched your search

+5
View File
@@ -34,6 +34,11 @@ UVGrid::UVGrid() {
}
const Vel &UVGrid::operator[](size_t timeIndex, size_t latIndex, size_t lonIndex) const {
if(timeIndex < 0 or timeIndex >= timeSize
or latIndex < 0 or latIndex >= latSize
or lonIndex < 0 or lonIndex >= lonSize) {
throw std::out_of_range("Index out of bounds");
}
size_t index = timeIndex * (latSize * lonSize) + latIndex * lonIndex + lonIndex;
return uvData[index];
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.