void
check_this(const DoFHandler<dim> &dof_handler)
{
- std::vector<bool> component_select(dof_handler.get_fe().n_components(), true);
- IndexSet boundary_dofs(dof_handler.n_dofs());
+ ComponentMask component_select(dof_handler.get_fe().n_components(), true);
+ IndexSet boundary_dofs(dof_handler.n_dofs());
// first with all components
{
// next with only every second
// component
for (unsigned int i = 1; i < component_select.size(); i += 2)
- component_select[i] = false;
+ component_select.set(i, false);
{
boundary_dofs =
DoFTools::extract_boundary_dofs(dof_handler, component_select);
void
check_this(const DoFHandler<dim> &dof_handler)
{
- std::vector<bool> component_select(dof_handler.get_fe().n_components(), true);
+ ComponentMask component_select(dof_handler.get_fe().n_components(), true);
std::vector<bool> boundary_dofs(dof_handler.n_dofs());
// first with all components
// next with only every second
// component
for (unsigned int i = 1; i < component_select.size(); i += 2)
- component_select[i] = false;
+ component_select.set(i, false);
{
DoFTools::extract_dofs_with_support_on_boundary(dof_handler,
component_select,
for (unsigned int int_mask = 0; int_mask < (1U << fe.n_components());
++int_mask)
{
- std::vector<bool> component_mask(fe.n_components());
+ ComponentMask component_mask(fe.n_components(), false);
for (unsigned int c = 0; c < fe.n_components(); ++c)
- component_mask[c] = (int_mask & (1 << c));
+ component_mask.set(c, (int_mask & (1 << c)));
// make sure that the round-trip works
Assert(ComponentMask(component_mask) ==
for (unsigned int int_mask = 0; int_mask < (1U << fe.n_components());
++int_mask)
{
- std::vector<bool> component_mask(fe.n_components());
+ ComponentMask component_mask(fe.n_components(), false);
for (unsigned int c = 0; c < fe.n_components(); ++c)
- component_mask[c] = (int_mask & (1 << c));
+ component_mask.set(c, (int_mask & (1 << c)));
// now try to convert to a block
// mask. this should not always
node_monitor.add_component_names("Solution", solution_names);
node_monitor.add_field_name(
"Post Processed Vector"); // not sensitive to spaces
- std::vector<bool> component_mask(3, false);
- component_mask[2] = true;
+ ComponentMask component_mask(3, false);
+ component_mask.set(2, true);
node_monitor.add_field_name("Pressure", component_mask);
- component_mask = std::vector<bool>(3, false);
- component_mask[1] = true;
+ component_mask = ComponentMask(3, false);
+ component_mask.set(1, true);
node_monitor.add_field_name("Req_sol", component_mask);
- component_mask = std::vector<bool>(4, true);
- component_mask[3] = false;
+ component_mask = ComponentMask(4, true);
+ component_mask.set(3, false);
node_monitor.add_field_name("Vector_out", component_mask);
- component_mask = std::vector<bool>(4, false);
- component_mask[3] = true;
+ component_mask = ComponentMask(4, false);
+ component_mask.set(3, true);
node_monitor.add_field_name("Scalar_out", component_mask);
std::vector<std::string> indep_names;
node_monitor.add_field_name(
"Post Processed Vector"); // not sensitive to spaces
node_monitor.add_field_name("Pressure", 1);
- std::vector<bool> component_mask(1, true);
+ ComponentMask component_mask(1, true);
node_monitor.add_field_name("Req_sol", component_mask);
- component_mask = std::vector<bool>(2, false);
- component_mask[0] = true;
+ component_mask = ComponentMask(2, false);
+ component_mask.set(0, true);
node_monitor.add_field_name("X_gradient", component_mask);
- component_mask = std::vector<bool>(2, false);
- component_mask[1] = true;
+ component_mask = ComponentMask(2, false);
+ component_mask.set(1, true);
node_monitor.add_field_name("X_hessian", component_mask);
std::vector<std::string> indep_names;
indep_names.push_back("Input");