partitioned.reserve(n_blocks);
types::global_dof_index start = 0;
- types::global_dof_index sum = 0;
for (const auto n_block_indices : n_indices_per_block)
{
partitioned.push_back(this->get_view(start, start + n_block_indices));
start += n_block_indices;
- sum += partitioned.back().size();
+ }
+
+#ifdef DEBUG
+ types::global_dof_index sum = 0;
+ for (const auto &partition : partitioned)
+ {
+ sum += partition.size();
}
AssertDimension(sum, this->size());
+#endif
+
return partitioned;
}
}
}
+#ifdef DEBUG
// make sure that the row sum of each of the matrices is 1 at this
// point. this must be so since the shape functions sum up to 1
for (unsigned int j = 0; j < source_fe->n_dofs_per_face(face_no); ++j)
Assert(std::fabs(sum - 1) < eps, ExcInternalError());
}
+#endif
}
else
{
if (std::fabs(interpolation_matrix(i, j)) < 1e-15)
interpolation_matrix(i, j) = 0.;
+#ifdef DEBUG
// make sure that the row sum of
// each of the matrices is 1 at
// this point. this must be so
Assert(std::fabs(sum - 1) < 5e-14 * std::max(this->degree, 1U) * dim,
ExcInternalError());
}
+#endif
}
}
}
+#ifdef DEBUG
// make sure that the row sum of each of the matrices is 1 at this
// point. this must be so since the shape functions sum up to 1
for (unsigned int j = 0; j < source_fe->n_dofs_per_face(face_no); ++j)
Assert(std::fabs(sum - 1) < eps, ExcInternalError());
}
+#endif
}
else if (dynamic_cast<const FE_Nothing<dim> *>(&x_source_fe) != nullptr)
{
if (std::fabs(interpolation_matrix(i, j)) < eps)
interpolation_matrix(i, j) = 0.;
+#ifdef DEBUG
// make sure that the row sum of each of the matrices is 1 at this
// point. this must be so since the shape functions sum up to 1
for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
Assert(std::fabs(sum - 1) < eps, ExcInternalError());
}
+#endif
}
else if (dynamic_cast<const FE_Nothing<dim> *>(&x_source_fe))
{
}
}
+#ifdef DEBUG
// make sure that the row sum of each of the matrices is 1 at this
// point. this must be so since the shape functions sum up to 1
for (unsigned int j = 0; j < source_fe.n_dofs_per_face(face_no); ++j)
Assert(std::fabs(sum - 1) < 2e-13 * this->degree * (dim - 1),
ExcInternalError());
}
+#endif
}
}
}
+#ifdef DEBUG
// make sure that the row sum of each of the matrices is 1 at this
// point. this must be so since the shape functions sum up to 1
for (unsigned int j = 0; j < source_fe.n_dofs_per_face(face_no); ++j)
Assert(std::fabs(sum - 1) < 2e-13 * this->degree * (dim - 1),
ExcInternalError());
}
+#endif
}
Assert(spacing.size() == 2, ExcInvalidRepetitionsDimension(2));
std::vector<unsigned int> repetitions(2);
- unsigned int n_cells = 1;
- double delta = std::numeric_limits<double>::max();
+ double delta = std::numeric_limits<double>::max();
for (unsigned int i = 0; i < 2; i++)
{
repetitions[i] = spacing[i].size();
- n_cells *= repetitions[i];
for (unsigned int j = 0; j < repetitions[i]; j++)
{
Assert(spacing[i][j] >= 0, ExcInvalidRepetitions(-1));
Assert(spacing.size() == dim, ExcInvalidRepetitionsDimension(dim));
std::vector<unsigned int> repetitions(dim);
- unsigned int n_cells = 1;
- double delta = std::numeric_limits<double>::max();
+ double delta = std::numeric_limits<double>::max();
for (unsigned int i = 0; i < dim; i++)
{
repetitions[i] = spacing[i].size();
- n_cells *= repetitions[i];
for (unsigned int j = 0; j < repetitions[i]; j++)
{
Assert(spacing[i][j] >= 0, ExcInvalidRepetitions(-1));