Skip to content
Snippets Groups Projects
matrices.hh 540 B
Newer Older
#ifndef SRC_MATRICES_HH
#define SRC_MATRICES_HH

podlesny's avatar
.  
podlesny committed
template <class Matrix> class Matrices {
public:
  std::vector<std::shared_ptr<Matrix>> elasticity;
  std::vector<std::shared_ptr<Matrix>> damping;
  std::vector<std::shared_ptr<Matrix>> mass;

  Matrices(size_t n) {
podlesny's avatar
.  
podlesny committed
    elasticity.resize(n);
    damping.resize(n);
    mass.resize(n);

      for (size_t i=0; i<n; i++) {
        elasticity[i] = std::make_shared<Matrix>();
        damping[i] = std::make_shared<Matrix>();
        mass[i] = std::make_shared<Matrix>();
      }
podlesny's avatar
.  
podlesny committed
  }