267 if (row_data.getIndices().size() == 0)
269 if (col_data.getIndices().size() == 0)
272 const auto &dof_ptr = row_data.getFieldDofs()[0];
273 int rank = dof_ptr->getNbOfCoeffs();
274 int nb_row_dofs = row_data.getIndices().size() / rank;
275 int nb_col_dofs = col_data.getIndices().size() / rank;
276 NN.resize(nb_row_dofs, nb_col_dofs,
false);
278 unsigned int nb_gauss_pts = row_data.getN().size1();
279 for (
unsigned int gg = 0; gg != nb_gauss_pts; gg++) {
280 double w = getGaussPts()(2, gg);
281 if (getNormalsAtGaussPts().size1()) {
282 w *= 0.5 * cblas_dnrm2(3, &getNormalsAtGaussPts()(gg, 0), 1);
287 cblas_dger(CblasRowMajor, nb_row_dofs, nb_col_dofs,
w,
288 &row_data.getN()(gg, 0), 1, &col_data.getN()(gg, 0), 1,
289 &*
NN.data().begin(), nb_col_dofs);
292 if ((row_type != col_type) || (row_side != col_side)) {
293 transNN.resize(nb_col_dofs, nb_row_dofs,
false);
297 double *data = &*
NN.data().begin();
298 double *trans_data = &*
transNN.data().begin();
300 row_indices.resize(nb_row_dofs);
301 col_indices.resize(nb_col_dofs);
302 for (
int rr = 0; rr < rank; rr++) {
303 if ((row_data.getIndices().size() % rank) != 0) {
305 "data inconsistency");
307 if ((col_data.getIndices().size() % rank) != 0) {
309 "data inconsistency");
311 unsigned int nb_rows;
312 unsigned int nb_cols;
316 ublas::noalias(row_indices) = ublas::vector_slice<VectorInt>(
317 row_data.getIndices(),
318 ublas::slice(rr, rank, row_data.getIndices().size() / rank));
319 ublas::noalias(col_indices) = ublas::vector_slice<VectorInt>(
320 col_data.getIndices(),
321 ublas::slice(rr, rank, col_data.getIndices().size() / rank));
322 nb_rows = row_indices.size();
323 nb_cols = col_indices.size();
324 rows = &*row_indices.data().begin();
325 cols = &*col_indices.data().begin();
327 nb_rows = row_data.getIndices().size();
328 nb_cols = col_data.getIndices().size();
329 rows = &*row_data.getIndices().data().begin();
330 cols = &*col_data.getIndices().data().begin();
332 if (nb_rows !=
NN.size1()) {
334 "data inconsistency");
336 if (nb_cols !=
NN.size2()) {
338 "data inconsistency");
341 if ((row_type != col_type) || (row_side != col_side)) {
342 if (nb_rows !=
transNN.size2()) {
344 "data inconsistency");
346 if (nb_cols !=
transNN.size1()) {
348 "data inconsistency");