// Number of quadrature points on this cell
unsigned int nq = qpoints[i].size();
// Construct a quadrature formula
- std::vector<double> ww(nq, 1. / ((double)nq));
+ std::vector<double> ww(nq, 1. / nq);
quadrature_collection.push_back(Quadrature<dim>(qpoints[i], ww));
}
// Number of quadrature points on this cell
unsigned int nq = qpoints[i].size();
// Construct a quadrature formula
- std::vector<double> ww(nq, 1. / ((double)nq));
+ std::vector<double> ww(nq, 1. / nq);
quadrature_collection.push_back(Quadrature<dim>(qpoints[i], ww));
}
// Number of quadrature points on this cell
unsigned int nq = qpoints[i].size();
// Construct a quadrature formula
- std::vector<double> ww(nq, 1. / ((double)nq));
+ std::vector<double> ww(nq, 1. / nq);
quadrature_collection.push_back(Quadrature<dim>(qpoints[i], ww));
}
copy_local_to_global<number, SparseMatrix<number>, Vector<number>>,
std::placeholders::_1,
&matrix,
- (Vector<number> *)nullptr),
+ static_cast<Vector<number> *>(nullptr)),
assembler_data,
copy_data);
}
copy_local_to_global<number, SparseMatrix<number>, Vector<number>>,
std::placeholders::_1,
&matrix,
- (Vector<number> *)nullptr),
+ static_cast<Vector<number> *>(nullptr)),
assembler_data,
copy_data);
}
copy_local_to_global<double, SparseMatrix<double>, Vector<double>>,
std::placeholders::_1,
&matrix,
- (Vector<double> *)(nullptr)),
+ static_cast<Vector<double> *>(nullptr)),
assembler_data,
copy_data);
}
copy_local_to_global<double, SparseMatrix<double>, Vector<double>>,
std::placeholders::_1,
&matrix,
- (Vector<double> *)nullptr),
+ static_cast<Vector<double> *>(nullptr)),
assembler_data,
copy_data);
}
boundary_functions,
rhs,
dof_to_boundary_mapping,
- (const Function<spacedim, number> *)nullptr,
+ static_cast<const Function<spacedim, number> *>(nullptr),
component_mapping);
// For certain weird elements,
if (n_indep != 0) // hopefully this will get optimized, can't test
// independent_values[0] unless n_indep > 0
{
- Assert(std::abs((int)dataset_key.size() -
- (int)independent_values[0].size()) < 2,
+ Assert(std::abs(static_cast<int>(dataset_key.size()) -
+ static_cast<int>(independent_values[0].size())) < 2,
ExcDataLostSync());
}
// Look up the field name and get an
if (n_indep != 0) // hopefully this will get optimized, can't test
// independent_values[0] unless n_indep > 0
{
- Assert(std::abs((int)dataset_key.size() -
- (int)independent_values[0].size()) < 2,
+ Assert(std::abs(static_cast<int>(dataset_key.size()) -
+ static_cast<int>(independent_values[0].size())) < 2,
ExcDataLostSync());
}
if (n_indep != 0) // hopefully this will get optimized, can't test
// independent_values[0] unless n_indep > 0
{
- Assert(std::abs((int)dataset_key.size() -
- (int)independent_values[0].size()) < 2,
+ Assert(std::abs(static_cast<int>(dataset_key.size()) -
+ static_cast<int>(independent_values[0].size())) < 2,
ExcDataLostSync());
}
// Look up the field name and get an
Assert(indep_values.size() == n_indep,
ExcDimensionMismatch(indep_values.size(), n_indep));
Assert(n_indep != 0, ExcNoIndependent());
- Assert(std::abs((int)dataset_key.size() - (int)independent_values[0].size()) <
- 2,
+ Assert(std::abs(static_cast<int>(dataset_key.size()) -
+ static_cast<int>(independent_values[0].size())) < 2,
ExcDataLostSync());
for (unsigned int component = 0; component < n_indep; component++)
}
if (n_indep != 0)
{
- if (std::abs((int)dataset_key.size() -
- (int)independent_values[0].size()) >= 2)
+ if (std::abs(static_cast<int>(dataset_key.size()) -
+ static_cast<int>(independent_values[0].size())) >= 2)
{
return false;
}
{
Assert(data_store_begin->second.size() > 0, ExcInternalError());
- if (std::abs((int)(data_store_begin->second)[0].size() -
- (int)dataset_key.size()) >= 2)
+ if (std::abs(static_cast<int>((data_store_begin->second)[0].size()) -
+ static_cast<int>(dataset_key.size())) >= 2)
return false;
// this loop only tests one member
// for each name, i.e. checks the
if (cell->refine_flag_set())
previous_cells += (GeometryInfo<dim>::max_children_per_cell - 1);
else if (cell->coarsen_flag_set())
- previous_cells -=
- (double)(GeometryInfo<dim>::max_children_per_cell - 1) /
- GeometryInfo<dim>::max_children_per_cell;
+ previous_cells -= static_cast<double>(
+ GeometryInfo<dim>::max_children_per_cell - 1) /
+ GeometryInfo<dim>::max_children_per_cell;
// @p{previous_cells} now gives the
// number of cells which would result
if (cell->refine_flag_set())
estimated_cells += (GeometryInfo<dim>::max_children_per_cell - 1);
else if (cell->coarsen_flag_set())
- estimated_cells -=
- (double)(GeometryInfo<dim>::max_children_per_cell - 1) /
- GeometryInfo<dim>::max_children_per_cell;
+ estimated_cells -= static_cast<double>(
+ GeometryInfo<dim>::max_children_per_cell - 1) /
+ GeometryInfo<dim>::max_children_per_cell;
// calculate the allowed delta in
// cell numbers; be more lenient