| 170 | } |
| 171 | |
| 172 | void SolutionArray::resize(int size) |
| 173 | { |
| 174 | if (apiNdim() > 1) { |
| 175 | throw CanteraError("SolutionArray::resize", |
| 176 | "Resize is ambiguous for multi-dimensional arrays; use setApiShape " |
| 177 | "instead."); |
| 178 | } |
| 179 | if (m_data.use_count() > 1) { |
| 180 | throw CanteraError("SolutionArray::resize", |
| 181 | "Unable to resize as data are shared by multiple objects."); |
| 182 | } |
| 183 | _resize(static_cast<size_t>(size)); |
| 184 | m_apiShape[0] = static_cast<long>(size); |
| 185 | } |
| 186 | |
| 187 | void SolutionArray::setApiShape(const vector<long int>& shape) |
| 188 | { |
no test coverage detected