* based on which writes are actually forwarded. Per default the condition
* of an object is active.
*/
- ConditionalOStream(std::ostream &stream, const bool active = true);
+ explicit ConditionalOStream(std::ostream &stream, const bool active = true);
/**
* Depending on the <tt>active</tt> flag set the condition of this stream to
* <code>t</code>.
*/
template <typename T>
- TableEntry(const T &t);
+ explicit TableEntry(const T &t);
/**
* Return the value stored by this object. The template type T must be one
/**
* Constructor.
*/
- Column(const std::string &tex_caption);
+ explicit Column(const std::string &tex_caption);
/**
* Pad this column with default constructed elements to the number of rows
* the given vector is zero, then this interpreted as the case where
* <i>every</i> block is selected.
*/
- BlockMask(const std::vector<bool> &block_mask);
+ explicit BlockMask(const std::vector<bool> &block_mask);
/**
* Initialize the block mask with a number of elements that are either all
for (unsigned int i = 0; i < block_mask.size(); ++i)
new_mask[i] = (block_mask[i] || mask.block_mask[i]);
- return new_mask;
+ return BlockMask(new_mask);
}
}
for (unsigned int i = 0; i < block_mask.size(); ++i)
new_mask[i] = (block_mask[i] && mask.block_mask[i]);
- return new_mask;
+ return BlockMask(new_mask);
}
}
* length of the given vector is zero, then this interpreted as the case
* where <i>every</i> component is selected.
*/
- ComponentMask(const std::vector<bool> &component_mask);
+ explicit ComponentMask(const std::vector<bool> &component_mask);
/**
* Initialize the component mask with a number of elements that are either
for (unsigned int i = 0; i < component_mask.size(); ++i)
new_mask[i] = (component_mask[i] || mask.component_mask[i]);
- return new_mask;
+ return ComponentMask(new_mask);
}
}
for (unsigned int i = 0; i < component_mask.size(); ++i)
new_mask[i] = (component_mask[i] && mask.component_mask[i]);
- return new_mask;
+ return ComponentMask(new_mask);
}
}
* computations are parallelized. By default, this carries the same
* behavior as the PETScWrappers, but you can change that.
*/
- SolverKrylovSchur(SolverControl & cn,
- const MPI_Comm mpi_communicator = PETSC_COMM_SELF,
- const AdditionalData &data = AdditionalData());
+ explicit SolverKrylovSchur(
+ SolverControl & cn,
+ const MPI_Comm mpi_communicator = PETSC_COMM_SELF,
+ const AdditionalData &data = AdditionalData());
protected:
/**
* Constructor. By default, set the option of delayed
* reorthogonalization to false, i.e. don't do it.
*/
- AdditionalData(const bool delayed_reorthogonalization = false);
+ explicit AdditionalData(const bool delayed_reorthogonalization = false);
/**
* Flag for delayed reorthogonalization.
* computations are parallelized. By default, this carries the same
* behavior as the PETScWrappers, but you can change that.
*/
- SolverArnoldi(SolverControl & cn,
- const MPI_Comm mpi_communicator = PETSC_COMM_SELF,
- const AdditionalData &data = AdditionalData());
+ explicit SolverArnoldi(SolverControl &cn,
+ const MPI_Comm mpi_communicator = PETSC_COMM_SELF,
+ const AdditionalData &data = AdditionalData());
protected:
/**
* Constructor. By default sets the type of reorthogonalization used
* during the Lanczos iteration to full.
*/
- AdditionalData(
+ explicit AdditionalData(
const EPSLanczosReorthogType r = EPS_LANCZOS_REORTHOG_FULL);
};
* computations are parallelized. By default, this carries the same
* behavior as the PETScWrappers, but you can change that.
*/
- SolverLanczos(SolverControl & cn,
- const MPI_Comm mpi_communicator = PETSC_COMM_SELF,
- const AdditionalData &data = AdditionalData());
+ explicit SolverLanczos(SolverControl &cn,
+ const MPI_Comm mpi_communicator = PETSC_COMM_SELF,
+ const AdditionalData &data = AdditionalData());
protected:
/**
* computations are parallelized. By default, this carries the same
* behavior as the PETScWrappers, but you can change that.
*/
- SolverPower(SolverControl & cn,
- const MPI_Comm mpi_communicator = PETSC_COMM_SELF,
- const AdditionalData &data = AdditionalData());
+ explicit SolverPower(SolverControl &cn,
+ const MPI_Comm mpi_communicator = PETSC_COMM_SELF,
+ const AdditionalData &data = AdditionalData());
protected:
/**
/**
* Constructor. By default set double_expansion to false.
*/
- AdditionalData(bool double_expansion = false);
+ explicit AdditionalData(bool double_expansion = false);
};
/**
* computations are parallelized. By default, this carries the same
* behavior as the PETScWrappers, but you can change that.
*/
- SolverGeneralizedDavidson(SolverControl &cn,
- const MPI_Comm mpi_communicator = PETSC_COMM_SELF,
- const AdditionalData &data = AdditionalData());
+ explicit SolverGeneralizedDavidson(
+ SolverControl & cn,
+ const MPI_Comm mpi_communicator = PETSC_COMM_SELF,
+ const AdditionalData &data = AdditionalData());
protected:
/**
* computations are parallelized. By default, this carries the same
* behavior as the PETScWrappers, but you can change that.
*/
- SolverJacobiDavidson(SolverControl &cn,
- const MPI_Comm mpi_communicator = PETSC_COMM_SELF,
- const AdditionalData &data = AdditionalData());
+ explicit SolverJacobiDavidson(
+ SolverControl & cn,
+ const MPI_Comm mpi_communicator = PETSC_COMM_SELF,
+ const AdditionalData &data = AdditionalData());
protected:
/**
* computations are parallelized. By default, this carries the same
* behavior as the PETScWrappers, but you can change that.
*/
- SolverLAPACK(SolverControl & cn,
- const MPI_Comm mpi_communicator = PETSC_COMM_SELF,
- const AdditionalData &data = AdditionalData());
+ explicit SolverLAPACK(SolverControl &cn,
+ const MPI_Comm mpi_communicator = PETSC_COMM_SELF,
+ const AdditionalData &data = AdditionalData());
protected:
/**
/**
* Constructor.
*/
- TransformationBase(const MPI_Comm mpi_communicator);
+ explicit TransformationBase(const MPI_Comm mpi_communicator);
public:
/**
/**
* Constructor. By default, set the shift parameter to zero.
*/
- AdditionalData(const double shift_parameter = 0);
+ explicit AdditionalData(const double shift_parameter = 0);
/**
* Shift parameter.
/**
* Constructor.
*/
- TransformationShift(const MPI_Comm mpi_communicator,
- const AdditionalData &data = AdditionalData());
+ explicit TransformationShift(const MPI_Comm mpi_communicator,
+ const AdditionalData &data = AdditionalData());
protected:
/**
* Constructor. By default, set the shift parameter to zero.
*/
- AdditionalData(const double shift_parameter = 0);
+ explicit AdditionalData(const double shift_parameter = 0);
/**
* Shift parameter.
/**
* Constructor.
*/
- TransformationShiftInvert(const MPI_Comm mpi_communicator,
- const AdditionalData &data = AdditionalData());
+ explicit TransformationShiftInvert(
+ const MPI_Comm mpi_communicator,
+ const AdditionalData &data = AdditionalData());
protected:
/**
/**
* Constructor. By default, set the shift parameter to zero.
*/
- AdditionalData(const double shift_parameter = 0);
+ explicit AdditionalData(const double shift_parameter = 0);
/**
* Shift parameter.
/**
* Constructor.
*/
- TransformationSpectrumFolding(
+ explicit TransformationSpectrumFolding(
const MPI_Comm mpi_communicator,
const AdditionalData &data = AdditionalData());
/**
* Constructor. Requires two shift parameters
*/
- AdditionalData(const double shift_parameter = 0,
- const double antishift_parameter = 0);
+ explicit AdditionalData(const double shift_parameter = 0,
+ const double antishift_parameter = 0);
/**
* Shift parameter.
/**
* Constructor.
*/
- TransformationCayley(const MPI_Comm mpi_communicator,
- const AdditionalData &data = AdditionalData());
+ explicit TransformationCayley(
+ const MPI_Comm mpi_communicator,
+ const AdditionalData &data = AdditionalData());
protected:
/**
* Initialize with a SolverControl object. The result will emulate
* SolverControl by setting @p reduce to zero.
*/
- ReductionControl(const SolverControl &c);
+ explicit ReductionControl(const SolverControl &c);
/**
* Assign a SolverControl object to ReductionControl. The result of the
* Initialize with a SolverControl object. The result will emulate
* SolverControl by setting the reduction target to zero.
*/
- IterationNumberControl(const SolverControl &c);
+ explicit IterationNumberControl(const SolverControl &c);
/**
* Assign a SolverControl object to ReductionControl. The result of the
* Initialize with a SolverControl object. The result will emulate
* SolverControl by setting @p n_consecutive_iterations to one.
*/
- ConsecutiveControl(const SolverControl &c);
+ explicit ConsecutiveControl(const SolverControl &c);
/**
* Assign a SolverControl object to ConsecutiveControl. The result of the
std::vector<unsigned char> component_association(dof_handler.n_dofs());
internal::get_component_association(dof_handler,
- std::vector<bool>(),
+ ComponentMask(std::vector<bool>()),
component_association);
for (unsigned int c = 0; c < dof_handler.get_fe(0).n_components(); ++c)
std::vector<bool> mask(this->n_components(), false);
mask[scalar.component] = true;
- return mask;
+ return ComponentMask(mask);
}
c < vector.first_vector_component + dim;
++c)
mask[c] = true;
- return mask;
+ return ComponentMask(mask);
}
SymmetricTensor<2, dim>::n_independent_components;
++c)
mask[c] = true;
- return mask;
+ return ComponentMask(mask);
}
if (block_mask[component_to_block_index(c)] == true)
component_mask[c] = true;
- return component_mask;
+ return ComponentMask(component_mask);
}
}
- return block_mask;
+ return BlockMask(block_mask);
}
FiniteElementData<dim>::Hdiv),
std::vector<bool>(PolynomialsABF<dim>::n_polynomials(deg), true),
std::vector<ComponentMask>(PolynomialsABF<dim>::n_polynomials(deg),
- std::vector<bool>(dim, true)))
+ ComponentMask(std::vector<bool>(dim, true))))
, rt_order(deg)
{
Assert(dim >= 2, ExcImpossibleInDim(dim));
FiniteElementData<dim>::Hdiv),
get_ria_vector(deg),
std::vector<ComponentMask>(PolynomialsBDM<dim>::n_polynomials(deg),
- std::vector<bool>(dim, true)))
+ ComponentMask(std::vector<bool>(dim, true))))
{
Assert(dim >= 2, ExcImpossibleInDim(dim));
Assert(
std::vector<bool>(PolynomialsBernardiRaugel<dim>::n_polynomials(p), true),
std::vector<ComponentMask>(PolynomialsBernardiRaugel<dim>::n_polynomials(
p),
- std::vector<bool>(dim, true)))
+ ComponentMask(std::vector<bool>(dim, true))))
{
Assert(dim == 2 || dim == 3, ExcImpossibleInDim(dim));
Assert(p == 1, ExcMessage("Only BR1 elements are available"));
std::vector<ComponentMask>(
FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
.n_dofs_per_cell(),
- std::vector<bool>(1, true)))
+ ComponentMask(std::vector<bool>(1, true))))
{
// Reinit the vectors of restriction and prolongation matrices to the right
// sizes
std::vector<ComponentMask>(
FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
.n_dofs_per_cell(),
- std::vector<bool>(1, true)))
+ ComponentMask(std::vector<bool>(1, true))))
{
Assert(this->poly_space->n() == this->n_dofs_per_cell(), ExcInternalError());
Assert(this->poly_space->degree() == this->degree, ExcInternalError());
std::vector<ComponentMask>(
FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
.n_dofs_per_cell(),
- std::vector<bool>(1, true)))
+ ComponentMask(std::vector<bool>(1, true))))
, polynomial_space(Polynomials::Legendre::generate_complete_basis(degree))
{
const unsigned int n_dofs = this->n_dofs_per_cell();
std::vector<ComponentMask>(
FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
.n_dofs_per_cell(),
- std::vector<bool>(1, true)))
+ ComponentMask(std::vector<bool>(1, true))))
{
// Compute support points, which are the tensor product of the Lagrange
// interpolation points in the constructor.
1,
polynomials.size() - 1)
.n_dofs_per_cell(),
- std::vector<bool>(1, true)))
+ ComponentMask(std::vector<bool>(1, true))))
{
// No support points can be defined in general. Derived classes might define
// support points like the class FE_DGQArbitraryNodes
FiniteElementData<dim>::Hcurl),
std::vector<bool>(PolynomialsNedelec<dim>::n_polynomials(order), true),
std::vector<ComponentMask>(PolynomialsNedelec<dim>::n_polynomials(order),
- std::vector<bool>(dim, true)))
+ ComponentMask(std::vector<bool>(dim, true))))
{
#ifdef DEBUG_NEDELEC
deallog << get_name() << std::endl;
FiniteElementData<dim>::Hcurl),
std::vector<bool>(compute_num_dofs(order), true),
std::vector<ComponentMask>(compute_num_dofs(order),
- std::vector<bool>(dim, true)))
+ ComponentMask(std::vector<bool>(dim, true))))
{
Assert(dim >= 2, ExcImpossibleInDim(dim));
std::vector<ComponentMask>(
FiniteElementData<dim>(dpos, ReferenceCells::Pyramid, 1, degree)
.dofs_per_cell,
- std::vector<bool>(1, true)))
+ ComponentMask(std::vector<bool>(1, true))))
{
AssertDimension(dim, 3);
poly_space,
fe_data,
restriction_is_additive_flags,
- std::vector<ComponentMask>(1, std::vector<bool>(1, true)))
+ std::vector<ComponentMask>(1, ComponentMask(std::vector<bool>(1, true))))
, q_degree(dynamic_cast<const TensorProductPolynomialsBubbles<dim> *>(
&poly_space) != nullptr ?
this->degree - 1 :
std::vector<ComponentMask>(
FiniteElementData<dim>(get_dpo_vector(degree), 1, degree)
.n_dofs_per_cell(),
- std::vector<bool>(1, true)))
+ ComponentMask(std::vector<bool>(1, true))))
, face_renumber(face_fe_q_hierarchical_to_hierarchic_numbering(degree))
{
TensorProductPolynomials<dim> *poly_space_derived_ptr =
FE_RannacherTurek<dim>::FE_RannacherTurek(
const unsigned int order,
const unsigned int n_face_support_points)
- : FE_Poly<dim>(PolynomialsRannacherTurek<dim>(),
- FiniteElementData<dim>(this->get_dpo_vector(),
- 1,
- 2,
- FiniteElementData<dim>::L2),
- std::vector<bool>(4, false), // restriction not implemented
- std::vector<ComponentMask>(4, std::vector<bool>(1, true)))
+ : FE_Poly<dim>(
+ PolynomialsRannacherTurek<dim>(),
+ FiniteElementData<dim>(this->get_dpo_vector(),
+ 1,
+ 2,
+ FiniteElementData<dim>::L2),
+ std::vector<bool>(4, false), // restriction not implemented
+ std::vector<ComponentMask>(4, ComponentMask(std::vector<bool>(1, true))))
, order(order)
, n_face_support_points(n_face_support_points)
{
true),
std::vector<ComponentMask>(
PolynomialsRaviartThomas<dim>::n_polynomials(deg + 1, deg),
- std::vector<bool>(dim, true)))
+ ComponentMask(std::vector<bool>(dim, true))))
{
Assert(dim >= 2, ExcImpossibleInDim(dim));
const unsigned int n_dofs = this->n_dofs_per_cell();
std::vector<bool>(1, false),
std::vector<ComponentMask>(
PolynomialsRaviartThomas<dim>::n_polynomials(degree + 1, degree),
- std::vector<bool>(dim, true)))
+ ComponentMask(std::vector<bool>(dim, true))))
{
Assert(dim >= 2, ExcImpossibleInDim(dim));
FiniteElementData<dim>::Hdiv),
get_ria_vector(deg),
std::vector<ComponentMask>(PolynomialsRT_Bubbles<dim>::n_polynomials(deg),
- std::vector<bool>(dim, true)))
+ ComponentMask(std::vector<bool>(dim, true))))
{
Assert(dim >= 2, ExcImpossibleInDim(dim));
Assert(
fe_data,
std::vector<bool>(fe_data.dofs_per_cell),
std::vector<ComponentMask>(fe_data.dofs_per_cell,
- std::vector<bool>(1, true)))
+ ComponentMask(std::vector<bool>(1, true))))
{
this->unit_support_points = unit_support_points;
this->unit_face_support_points = unit_face_support_points;
std::vector<ComponentMask>(
FiniteElementData<dim>(dpos, ReferenceCells::Wedge, 1, degree)
.dofs_per_cell,
- std::vector<bool>(1, true)))
+ ComponentMask(std::vector<bool>(1, true))))
{
AssertDimension(dim, 3);
std::vector<bool> tmp(n_blocks, false);
tmp[i] = true;
- block_select[i] = tmp;
+ block_select[i] = BlockMask(tmp);
tasks += Threads::new_task(
fun_ptr, l, dof_handler, block_select[i], dofs_in_block[i]);
PointValueHistory<dim>::add_field_name(const std::string &vector_name,
const unsigned int n_components)
{
- std::vector<bool> temp_mask(n_components, true);
+ ComponentMask temp_mask(std::vector<bool>(n_components, true));
add_field_name(vector_name, temp_mask);
}