auto local_lines = complete_index_set(n1 + n2);
// Fake two independent constraints on two independent dofs.
- AffineConstraints<double> constraints1(local_lines1);
- AffineConstraints<double> constraints2(local_lines2);
- AffineConstraints<double> constraints(local_lines);
+ AffineConstraints<double> constraints1(local_lines1, local_lines1);
+ AffineConstraints<double> constraints2(local_lines2, local_lines2);
+ AffineConstraints<double> constraints(local_lines, local_lines);
constraints1.add_line(1);
constraints1.add_entry(1, 2, 1.0);
// Since in applications you usually need also the second constraints,
// do this on a copy.
{
- AffineConstraints<double> tmp(local_lines2);
+ AffineConstraints<double> tmp(local_lines2, local_lines2);
tmp.merge(constraints2);
tmp.shift(n1);
deallog << "constraints2 shifted:" << std::endl;
AffineConstraints<double> cm;
cm.clear();
- cm.reinit(rel);
+ cm.reinit(rel, rel);
unsigned int inhoms[] = {8385, 8386, 8391, 17886, 17892, 17895, 18066,
18069, 18072, 18075, 18086, 18089, 18092, 18095,
// check that the `merge' function
// works correctly
- AffineConstraints<double> c1(local_lines), c2(local_lines);
+ AffineConstraints<double> c1(local_lines, local_lines),
+ c2(local_lines, local_lines);
// enter simple line
c1.add_line(index_0);
// check that the `merge' function
// works correctly
- AffineConstraints<double> c1(local_lines), c2(local_lines);
+ AffineConstraints<double> c1(local_lines, local_lines),
+ c2(local_lines, local_lines);
// enter simple line
c1.add_line(index_0);
// check that the `merge' function
// works correctly
- AffineConstraints<double> c1(local_lines1), c2(local_lines2);
+ AffineConstraints<double> c1(local_lines1, local_lines1),
+ c2(local_lines2, local_lines2);
// enter simple line
c1.add_line(index_0);
local_lines2.print(deallog.get_file_stream());
// works correctly
- AffineConstraints<double> c1(local_lines1), c2(local_lines2);
+ AffineConstraints<double> c1(local_lines1, local_lines1),
+ c2(local_lines2, local_lines2);
// now merge the two and print the
// results
local_lines.compress();
// works correctly
- AffineConstraints<double> c1(local_lines), c2(local_lines);
+ AffineConstraints<double> c1(local_lines, local_lines),
+ c2(local_lines, local_lines);
for (types::global_dof_index i = 99999800; i < local_lines.size(); ++i)
if (i % 2 == 1)
c1.constrain_dof_to_zero(i);
deallog
<< "Create AffineConstraints<double> with constraints u(2)=.5*u(5), u(5)=.7*u(8)"
<< std::endl;
- dealii::AffineConstraints<double> constraints1(index_set);
+ dealii::AffineConstraints<double> constraints1(index_set, index_set);
constraints1.add_line(5);
constraints1.add_entry(5, 8, .7);
constraints1.add_line(2);
local_active_together.add_range(myid, myid + 1);
local_active_together.add_range(numproc + myid * 2, numproc + myid * 2 + 2);
- AffineConstraints<PetscScalar> cm(local_active_together);
+ AffineConstraints<PetscScalar> cm(local_active_together,
+ local_active_together);
cm.constrain_dof_to_zero(numproc + myid * 2);
cm.close();
local_active_together.add_range(myid, myid + 1);
local_active_together.add_range(numproc + myid * 2, numproc + myid * 2 + 2);
- AffineConstraints<double> cm(local_active_together);
+ AffineConstraints<double> cm(local_active_together, local_active_together);
cm.constrain_dof_to_zero(numproc + myid * 2);
cm.close();
local_active_together.add_range(0, 3);
// local_active_together.compress();
- AffineConstraints<double> cm(local_active_together);
+ AffineConstraints<double> cm(local_active_together, local_active_together);
cm.constrain_dof_to_zero(1);
cm.close();
deallog << "OK" << std::endl;
vec.block(0).size() +
std::min(static_cast<types::global_dof_index>(100 * myid + 150),
vec.block(0).size()));
- AffineConstraints<PetscScalar> cm(locally_relevant_range);
+ AffineConstraints<PetscScalar> cm(locally_relevant_range,
+ locally_relevant_range);
// add constraints that constrain an element in the middle of the
// local range of each processor against an element outside, both in
vec.block(0).size() +
std::min(static_cast<types::global_dof_index>(100 * myid + 150),
vec.block(0).size()));
- AffineConstraints<double> cm(locally_relevant_range);
+ AffineConstraints<double> cm(locally_relevant_range, locally_relevant_range);
// add constraints that constrain an element in the middle of the
// local range of each processor against an element outside, both in