155 {
156 cache.clear();
157
158 auto const* const iv =
160
161 if (iv == nullptr)
162 {
163
164
165
166 return cache;
167 }
168
169 auto const& fct = iv->getter;
170
171 const unsigned num_int_pts = loc_asm.getNumberOfIntegrationPoints();
172 assert(num_int_pts > 0);
173
175 double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>>(
177
178
179 std::vector<double> cache_column(num_int_pts);
180
181 for (unsigned i = 0; i < num_int_pts; ++i)
182 {
183 auto const& state = loc_asm.getMaterialStateVariablesAt(i);
184
185 auto const& int_pt_values = fct(state, cache_column);
186 assert(int_pt_values.size() ==
187 static_cast<std::size_t>(
190
191 cache_mat.col(i).noalias() = int_pt_values_vec;
192 }
193
194 return cache;
195 }
Eigen::Map< const Vector > toVector(std::vector< double > const &data, Eigen::VectorXd::Index size)
Creates an Eigen mapped vector from the given data vector.
Eigen::Map< Matrix > createZeroedMatrix(std::vector< double > &data, Eigen::MatrixXd::Index rows, Eigen::MatrixXd::Index cols)