Exemplo n.º 1
0
inline _3dArray<T> &_3dArray<T>::operator+=(const _3dArray<T> &other) {
  if ((this->extent(0) != other.extent(0)) ||
      (this->extent(1) != other.extent(1)) ||
      (this->extent(2) != other.extent(2)))
    std::runtime_error("_3dArray<T> operator+=: Array sizes don't agree.");
  for (size_t i = 0; i < this->extent(2); ++i)
    for (size_t j = 0; j < this->extent(1); ++j)
      for (size_t k = 0; k < this->extent(0); ++k)
        (*this)(k, j, i) += other(k, j, i);
  return *this;
}
Exemplo n.º 2
0
 /** \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));
 }
Exemplo n.º 3
0
 /** \brief Return number of shape functions. */
 int functionCount() const {
     return std::max<int>(values.extent(1), derivatives.extent(2));
 }
Exemplo n.º 4
0
 /** \brief Return number of components of shape functions. */
 int componentCount() const {
     return std::max<int>(values.extent(0), derivatives.extent(0));
 }