ComputeDiagonalHelper()
: phi(nullptr)
+ , dofs_per_component(0)
{}
ComputeDiagonalHelper(const ComputeDiagonalHelper &)
: phi(nullptr)
+ , dofs_per_component(0)
{}
void
{
// if we are in hp mode and the number of unknowns changed, we must
// clear the map of entries
- if (this->phi != nullptr &&
- this->phi->dofs_per_component != phi.dofs_per_component)
- locally_relevant_constraints_hn_map.clear();
+ if (dofs_per_component != phi.dofs_per_component)
+ {
+ locally_relevant_constraints_hn_map.clear();
+ dofs_per_component = phi.dofs_per_component;
+ }
this->phi = φ
}
// STEP 1: get relevant information from FEEvaluation
const auto & dof_info = phi->get_dof_info();
const unsigned int n_fe_components = dof_info.start_components.back();
- const unsigned int dofs_per_component = phi->dofs_per_component;
- const auto & matrix_free = phi->get_matrix_free();
+ const auto & matrix_free = phi->get_matrix_free();
// if we have a block vector with components with the same DoFHandler,
// each component is described with same set of constraints and
// first guess
const unsigned int degree =
phi->get_shape_info().data.front().fe_degree;
- const unsigned int dofs_per_component = phi->dofs_per_component;
constraints_hn.reserve(Utilities::pow(degree + 1, dim - 1));
// 1) collect hanging-node constraints for cell assuming
const unsigned int n_fe_components =
phi->get_dof_info().start_components.back();
const unsigned int comp =
- n_fe_components == 1 ? i / phi->dofs_per_component : 0;
+ n_fe_components == 1 ? i / dofs_per_component : 0;
const unsigned int i_comp =
- n_fe_components == 1 ? (i % phi->dofs_per_component) : i;
+ n_fe_components == 1 ? (i % dofs_per_component) : i;
// apply local constraint matrix from left and from right:
// loop over all rows of transposed constrained matrix
// apply constraint matrix from the left
Number temp = 0.0;
for (unsigned int k = c_pool.row[j]; k < c_pool.row[j + 1]; ++k)
- temp +=
- c_pool.val[k] *
- phi->begin_dof_values()[comp * phi->dofs_per_component +
- c_pool.col[k]][v];
+ temp += c_pool.val[k] *
+ phi->begin_dof_values()[comp * dofs_per_component +
+ c_pool.col[k]][v];
// apply constraint matrix from the right
diagonals_local_constrained
Number,
VectorizedArrayType> *phi;
+ unsigned int dofs_per_component;
+
unsigned int i;
std::array<internal::LocalCSR<Number>, n_lanes> c_pools;