SLIDE  3.0.0
A simulator for lithium-ion battery pack degradation
Loading...
Searching...
No Matches
VecState.hpp
Go to the documentation of this file.
1/*
2 * VecState.hpp
3 *
4 * A small class for allocating states.
5 * It stores a pointer and an interval.
6 * Created on: 05 Apr 2022
7 * Author(s): Jorn Reniers, Volkan Kumtepeli
8 */
9
10#pragma once
11
12#include <vector>
13#include <array>
14#include <cstdlib>
15#include <algorithm>
16
17namespace slide {
19{
20 static std::vector<double> st, dst, bst;
21 static std::vector<std::array<int, 2>> locs{ { 0, 0 } };
22 static size_t current_id{ 0 };
23
24 size_t id{ 0 };
25
26public:
27 VecStates(int n) : id{ current_id++ }
28 {
29 if (locs.empty()) {
30 locs.emplace_back(0, n);
31 std::fill_n(std::back_inserter(st), n, 0);
32 } else {
33 }
34 };
35
37
40
43};
44} // namespace slide
Definition: VecState.hpp:19
VecStates(int n)
Definition: VecState.hpp:27
VecStates()
Definition: VecState.hpp:36
Slide namespace contains all the types, classes, and functions for the simulation framework.
Definition: Cell.hpp:27