inline _4dArray<T> &_4dArray<T>::operator+=(const _4dArray<T> &other) { if ((this->extent(0) != other.extent(0)) || (this->extent(1) != other.extent(1)) || (this->extent(2) != other.extent(2)) || (this->extent(3) != other.extent(3))) std::runtime_error("_4dArray<T> operator+=: Array sizes don't agree."); for (size_t i = 0; i < this->extent(3); ++i) for (size_t j = 0; j < this->extent(2); ++j) for (size_t k = 0; k < this->extent(1); ++k) for (size_t l = 0; l < this->extent(0); ++l) (*this)(l, k, j, i) += other(l, k, j, i); return *this; }
/** \brief Return number of shape functions. */ int functionCount() const { return std::max<int>(values.extent(1), derivatives.extent(2)); }
/** \brief Return number of points at which the shape functions have been * calculated. */ int pointCount() const { return std::max<int>(values.extent(2), derivatives.extent(3)); }
/** \brief Return number of components of shape functions. */ int componentCount() const { return std::max<int>(values.extent(0), derivatives.extent(0)); }