]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix Affineconstraints deprecations by initializing with `(locally_relevant_dofs,... 18626/head
authorMarc Fehling <mafehling.git@gmail.com>
Fri, 4 Jul 2025 15:41:21 +0000 (17:41 +0200)
committerMarc Fehling <mafehling.git@gmail.com>
Mon, 7 Jul 2025 18:09:13 +0000 (20:09 +0200)
13 files changed:
tests/dofs/dof_constraints_13.cc
tests/lac/constraints_01.cc
tests/lac/constraints_merge_08.cc
tests/lac/constraints_merge_09.cc
tests/lac/constraints_merge_10.cc
tests/lac/constraints_merge_11.cc
tests/lac/constraints_merge_12.cc
tests/lac/constraints_shift_01.cc
tests/mpi/constraint_matrix_set_zero_01.cc
tests/mpi/constraint_matrix_set_zero_02.cc
tests/mpi/constraints_crash_01.cc
tests/mpi/petsc_distribute_01_block.cc
tests/mpi/trilinos_distribute_01_block.cc

index 4c196f1b46c6bc94a88e953eedadf16394d76116..5dad082c4026445158734dd0235e12248a8bc1f8 100644 (file)
@@ -33,9 +33,9 @@ main()
   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);
@@ -56,7 +56,7 @@ main()
   // 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;
index 31368822e7413f923919bd050a9b4b5c5e5f71bb..19efcdfad80a66887d97317b00832be18ef03d84 100644 (file)
@@ -32,7 +32,7 @@ test()
 
   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,
index b1a1b9fa03570f14769f78930be95c3dc5ac2790..42453f1d30b49c5523e619ad09ccaef35ec9caae 100644 (file)
@@ -61,7 +61,8 @@ merge_check()
 
       // 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);
index 3f2a3f303c1192e5246f313f347e2756cc632f36..f573c90b5dc6719c5c0162736bbf2a09866a1472 100644 (file)
@@ -59,7 +59,8 @@ merge_check()
 
       // 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);
index c78bff39698615ed2e66651b819d66de685295d0..4ca1c6a17108b32ee602d494a6cb46273141d378 100644 (file)
@@ -65,7 +65,8 @@ merge_check()
 
       // 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);
index 62b0cd4f5bc19358b115a66b4ea09480bc6f7b76..7c992fc34fdf940ecbc311077c1cbfa456e4a35c 100644 (file)
@@ -45,7 +45,8 @@ merge_check()
   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
index 8797e9d17470c64149b6c5867e7d9086dae88079..ea9d33b003f161dff0d40acf74ce7a61146d48a2 100644 (file)
@@ -37,7 +37,8 @@ merge_check()
   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);
index 105eb943fc23370b41dd7c679989a1edd78f1c75..b7de39d269ac5a000400eadd863af98b29e31f06 100644 (file)
@@ -40,7 +40,7 @@ test()
   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);
index 4c85cee170d0eba3950187e550b6bfcbed8f37cc..6f65695163f2660f795edce0ae19eca5b2154fa0 100644 (file)
@@ -57,7 +57,8 @@ test()
   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();
 
index 5f76c406040417dc3bdf28977cd42199c2f469cf..2867d9676edb3926041fc7c179fcf6cc7ebaab5c 100644 (file)
@@ -61,7 +61,7 @@ test()
   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();
 
index e9c8d354115f0033534a58147ae53f8cf2824821..d75ecb064e6cad43987f4f7a31cab8df925a6cc6 100644 (file)
@@ -38,7 +38,7 @@ test()
   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;
index 3cd9381dfdda372f9fd7f43fd58a54843453316e..278637b1b3f65cabd39f564b1064172300c7cd09 100644 (file)
@@ -84,7 +84,8 @@ test()
     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
index 8fcae80580f35f3b413a252dafe65bd3545dcdbb..81b12198190267cf43b8c37c7f13ae82e8780f95 100644 (file)
@@ -85,7 +85,7 @@ test()
     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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.