From aa69d01fd767be8f5a67bd6efa981224bf8ce521 Mon Sep 17 00:00:00 2001 From: wolf Date: Mon, 3 Jan 2000 13:00:03 +0000 Subject: [PATCH] Remove one of the DoFHandler constructors in favor of the other. git-svn-id: https://svn.dealii.org/trunk@2149 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/Attic/examples/convergence/convergence.cc | 2 +- deal.II/deal.II/Attic/examples/dof/dof_test.cc | 2 +- .../examples/error-estimation/error-estimation.cc | 2 +- deal.II/deal.II/Attic/examples/multigrid/multigrid.cc | 2 +- deal.II/deal.II/Attic/examples/poisson/problem.cc | 2 +- deal.II/deal.II/include/dofs/dof_handler.h | 11 ----------- deal.II/deal.II/include/dofs/mg_dof_handler.h | 2 +- deal.II/deal.II/include/multigrid/mg_dof_handler.h | 2 +- deal.II/deal.II/source/dofs/dof_handler.cc | 9 --------- deal.II/deal.II/source/dofs/mg_dof_handler.cc | 2 +- deal.II/deal.II/source/multigrid/mg_dof_handler.cc | 2 +- deal.II/doc/tutorial/chapter-1.elements/dofs.html | 2 +- tests/big-tests/convergence/convergence.cc | 2 +- tests/big-tests/dof/dof_test.cc | 2 +- tests/big-tests/error-estimation/error-estimation.cc | 2 +- tests/big-tests/multigrid/multigrid.cc | 2 +- tests/big-tests/poisson/problem.cc | 2 +- tests/deal.II/constraints.cc | 2 +- tests/deal.II/dof_test.cc | 2 +- tests/deal.II/fe_tables.cc | 2 +- tests/deal.II/gradients.cc | 2 +- tests/deal.II/mg.cc | 2 +- tests/deal.II/mglocal.cc | 2 +- tests/deal.II/second_derivatives.cc | 2 +- tests/deal.II/wave-test-3.cc | 2 +- 25 files changed, 23 insertions(+), 43 deletions(-) diff --git a/deal.II/deal.II/Attic/examples/convergence/convergence.cc b/deal.II/deal.II/Attic/examples/convergence/convergence.cc index d972b01fbd..c45bb62542 100644 --- a/deal.II/deal.II/Attic/examples/convergence/convergence.cc +++ b/deal.II/deal.II/Attic/examples/convergence/convergence.cc @@ -257,7 +257,7 @@ void PoissonProblem::create_new () { clear (); tria = new Triangulation(); - dof = new DoFHandler (tria); + dof = new DoFHandler (*tria); set_tria_and_dof (tria, dof); }; diff --git a/deal.II/deal.II/Attic/examples/dof/dof_test.cc b/deal.II/deal.II/Attic/examples/dof/dof_test.cc index 5fe5ecf078..4c46d77b3f 100644 --- a/deal.II/deal.II/Attic/examples/dof/dof_test.cc +++ b/deal.II/deal.II/Attic/examples/dof/dof_test.cc @@ -204,7 +204,7 @@ void TestCases::create_new (const unsigned int) { tria = new Triangulation(); GridGenerator::hyper_cube(*tria); - dof = new DoFHandler (tria); + dof = new DoFHandler (*tria); }; diff --git a/deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc b/deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc index bde0cea6a5..5354514775 100644 --- a/deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc +++ b/deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc @@ -369,7 +369,7 @@ void PoissonProblem::create_new (const unsigned int) { clear (); tria = new Triangulation(); - dof = new DoFHandler (tria); + dof = new DoFHandler (*tria); set_tria_and_dof (tria, dof); boundary = new HyperBallBoundary (); }; diff --git a/deal.II/deal.II/Attic/examples/multigrid/multigrid.cc b/deal.II/deal.II/Attic/examples/multigrid/multigrid.cc index bdc538b84a..86d512190e 100644 --- a/deal.II/deal.II/Attic/examples/multigrid/multigrid.cc +++ b/deal.II/deal.II/Attic/examples/multigrid/multigrid.cc @@ -340,7 +340,7 @@ void PoissonProblem::create_new () { clear (); tria = new Triangulation(); - dof = new MGDoFHandler (tria); + dof = new MGDoFHandler (*tria); }; diff --git a/deal.II/deal.II/Attic/examples/poisson/problem.cc b/deal.II/deal.II/Attic/examples/poisson/problem.cc index 309a056b64..b5de827b16 100644 --- a/deal.II/deal.II/Attic/examples/poisson/problem.cc +++ b/deal.II/deal.II/Attic/examples/poisson/problem.cc @@ -323,7 +323,7 @@ void PoissonProblem::create_new (const unsigned int) { clear (); tria = new Triangulation(); - dof = new DoFHandler (tria); + dof = new DoFHandler (*tria); set_tria_and_dof (tria, dof); }; diff --git a/deal.II/deal.II/include/dofs/dof_handler.h b/deal.II/deal.II/include/dofs/dof_handler.h index 2fbf020ec6..e0c7e59111 100644 --- a/deal.II/deal.II/include/dofs/dof_handler.h +++ b/deal.II/deal.II/include/dofs/dof_handler.h @@ -305,17 +305,6 @@ class DoFHandler : public Subscriptor, * Constructor. Take #tria# as the * triangulation to work on. */ - DoFHandler (Triangulation *tria); - - /** - * Constructor. Does the same - * thing as the one above, but - * takes a reference instead of a - * pointer. The pointer form is - * the older one, but the one - * encouraged for use now is this - * one. - */ DoFHandler (Triangulation &tria); /** diff --git a/deal.II/deal.II/include/dofs/mg_dof_handler.h b/deal.II/deal.II/include/dofs/mg_dof_handler.h index 2315512e68..5dda5971b8 100644 --- a/deal.II/deal.II/include/dofs/mg_dof_handler.h +++ b/deal.II/deal.II/include/dofs/mg_dof_handler.h @@ -160,7 +160,7 @@ class MGDoFHandler : public DoFHandler * Constructor. Take #tria# as the * triangulation to work on. */ - MGDoFHandler (Triangulation *tria); + MGDoFHandler (Triangulation &tria); /** * Destructor diff --git a/deal.II/deal.II/include/multigrid/mg_dof_handler.h b/deal.II/deal.II/include/multigrid/mg_dof_handler.h index 2315512e68..5dda5971b8 100644 --- a/deal.II/deal.II/include/multigrid/mg_dof_handler.h +++ b/deal.II/deal.II/include/multigrid/mg_dof_handler.h @@ -160,7 +160,7 @@ class MGDoFHandler : public DoFHandler * Constructor. Take #tria# as the * triangulation to work on. */ - MGDoFHandler (Triangulation *tria); + MGDoFHandler (Triangulation &tria); /** * Destructor diff --git a/deal.II/deal.II/source/dofs/dof_handler.cc b/deal.II/deal.II/source/dofs/dof_handler.cc index edc8009d4d..484cba9128 100644 --- a/deal.II/deal.II/source/dofs/dof_handler.cc +++ b/deal.II/deal.II/source/dofs/dof_handler.cc @@ -17,15 +17,6 @@ -template -DoFHandler::DoFHandler (Triangulation *tria) : - tria(tria), - used_dofs (0) -{ - Assert (tria != 0, ExcInvalidTriangulation()); -}; - - template DoFHandler::DoFHandler (Triangulation &tria) : tria(&tria), diff --git a/deal.II/deal.II/source/dofs/mg_dof_handler.cc b/deal.II/deal.II/source/dofs/mg_dof_handler.cc index d615123b84..db54f243d7 100644 --- a/deal.II/deal.II/source/dofs/mg_dof_handler.cc +++ b/deal.II/deal.II/source/dofs/mg_dof_handler.cc @@ -78,7 +78,7 @@ unsigned int MGDoFHandler::MGVertexDoFs::get_finest_level () const { /* ------------------------ MGDoFHandler ------------------------------------- */ template -MGDoFHandler::MGDoFHandler (Triangulation *tria) : +MGDoFHandler::MGDoFHandler (Triangulation &tria) : DoFHandler (tria) {}; diff --git a/deal.II/deal.II/source/multigrid/mg_dof_handler.cc b/deal.II/deal.II/source/multigrid/mg_dof_handler.cc index d615123b84..db54f243d7 100644 --- a/deal.II/deal.II/source/multigrid/mg_dof_handler.cc +++ b/deal.II/deal.II/source/multigrid/mg_dof_handler.cc @@ -78,7 +78,7 @@ unsigned int MGDoFHandler::MGVertexDoFs::get_finest_level () const { /* ------------------------ MGDoFHandler ------------------------------------- */ template -MGDoFHandler::MGDoFHandler (Triangulation *tria) : +MGDoFHandler::MGDoFHandler (Triangulation &tria) : DoFHandler (tria) {}; diff --git a/deal.II/doc/tutorial/chapter-1.elements/dofs.html b/deal.II/doc/tutorial/chapter-1.elements/dofs.html index a3512fb051..9b500def2e 100644 --- a/deal.II/doc/tutorial/chapter-1.elements/dofs.html +++ b/deal.II/doc/tutorial/chapter-1.elements/dofs.html @@ -85,7 +85,7 @@ GridGenerator::hyper_cube (triangulation,-1,1); ... // then associate a DoFHandler object with this triangulation... -DoFHandler<dim> dof_handler (&tria); +DoFHandler<dim> dof_handler (tria); // ...and distribute degrees of freedom for linear elements FEQ1<dim> fe; diff --git a/tests/big-tests/convergence/convergence.cc b/tests/big-tests/convergence/convergence.cc index d972b01fbd..c45bb62542 100644 --- a/tests/big-tests/convergence/convergence.cc +++ b/tests/big-tests/convergence/convergence.cc @@ -257,7 +257,7 @@ void PoissonProblem::create_new () { clear (); tria = new Triangulation(); - dof = new DoFHandler (tria); + dof = new DoFHandler (*tria); set_tria_and_dof (tria, dof); }; diff --git a/tests/big-tests/dof/dof_test.cc b/tests/big-tests/dof/dof_test.cc index 5fe5ecf078..4c46d77b3f 100644 --- a/tests/big-tests/dof/dof_test.cc +++ b/tests/big-tests/dof/dof_test.cc @@ -204,7 +204,7 @@ void TestCases::create_new (const unsigned int) { tria = new Triangulation(); GridGenerator::hyper_cube(*tria); - dof = new DoFHandler (tria); + dof = new DoFHandler (*tria); }; diff --git a/tests/big-tests/error-estimation/error-estimation.cc b/tests/big-tests/error-estimation/error-estimation.cc index bde0cea6a5..5354514775 100644 --- a/tests/big-tests/error-estimation/error-estimation.cc +++ b/tests/big-tests/error-estimation/error-estimation.cc @@ -369,7 +369,7 @@ void PoissonProblem::create_new (const unsigned int) { clear (); tria = new Triangulation(); - dof = new DoFHandler (tria); + dof = new DoFHandler (*tria); set_tria_and_dof (tria, dof); boundary = new HyperBallBoundary (); }; diff --git a/tests/big-tests/multigrid/multigrid.cc b/tests/big-tests/multigrid/multigrid.cc index bdc538b84a..86d512190e 100644 --- a/tests/big-tests/multigrid/multigrid.cc +++ b/tests/big-tests/multigrid/multigrid.cc @@ -340,7 +340,7 @@ void PoissonProblem::create_new () { clear (); tria = new Triangulation(); - dof = new MGDoFHandler (tria); + dof = new MGDoFHandler (*tria); }; diff --git a/tests/big-tests/poisson/problem.cc b/tests/big-tests/poisson/problem.cc index 309a056b64..b5de827b16 100644 --- a/tests/big-tests/poisson/problem.cc +++ b/tests/big-tests/poisson/problem.cc @@ -323,7 +323,7 @@ void PoissonProblem::create_new (const unsigned int) { clear (); tria = new Triangulation(); - dof = new DoFHandler (tria); + dof = new DoFHandler (*tria); set_tria_and_dof (tria, dof); }; diff --git a/tests/deal.II/constraints.cc b/tests/deal.II/constraints.cc index 9c3362f0e9..af5a96f63a 100644 --- a/tests/deal.II/constraints.cc +++ b/tests/deal.II/constraints.cc @@ -264,7 +264,7 @@ int main () make_tria (tria, step); GridOut().write_gnuplot (tria, logfile); - DoFHandler<3> dof (&tria); + DoFHandler<3> dof (tria); dof.distribute_dofs (*fe); ConstraintMatrix constraints; diff --git a/tests/deal.II/dof_test.cc b/tests/deal.II/dof_test.cc index fcf5b1d58a..1939908acb 100644 --- a/tests/deal.II/dof_test.cc +++ b/tests/deal.II/dof_test.cc @@ -211,7 +211,7 @@ void TestCases::create_new () tria = new Triangulation(); GridGenerator::hyper_cube(*tria); - dof = new DoFHandler (tria); + dof = new DoFHandler (*tria); }; diff --git a/tests/deal.II/fe_tables.cc b/tests/deal.II/fe_tables.cc index d9696c6963..82adfb17c2 100644 --- a/tests/deal.II/fe_tables.cc +++ b/tests/deal.II/fe_tables.cc @@ -40,7 +40,7 @@ print_fe_statistics(const FiniteElement& fe) { Triangulation tr; GridGenerator::hyper_cube(tr,-1,1); - DoFHandler dof(&tr); + DoFHandler dof(tr); dof.distribute_dofs(fe); StraightBoundary boundary; DoFHandler::active_cell_iterator cell = dof.begin_active(); diff --git a/tests/deal.II/gradients.cc b/tests/deal.II/gradients.cc index d6539c759a..5c4197a136 100644 --- a/tests/deal.II/gradients.cc +++ b/tests/deal.II/gradients.cc @@ -38,7 +38,7 @@ int main () tria.begin_active()->vertex(2)(0) = 2; FEQ1<2> fe; - DoFHandler<2> dof(&tria); + DoFHandler<2> dof(tria); dof.distribute_dofs(fe); QTrapez<2> q; diff --git a/tests/deal.II/mg.cc b/tests/deal.II/mg.cc index b5993d549f..eac08ddf67 100644 --- a/tests/deal.II/mg.cc +++ b/tests/deal.II/mg.cc @@ -69,7 +69,7 @@ int main() for (unsigned int degree=1;degree<=3;degree++) { Triangulation<2> tr; - MGDoFHandler<2> mgdof(&tr); + MGDoFHandler<2> mgdof(tr); DoFHandler<2>& dof(mgdof); GridGenerator::hyper_cube(tr,-1.,1.); diff --git a/tests/deal.II/mglocal.cc b/tests/deal.II/mglocal.cc index 2ce1219d35..065230e143 100644 --- a/tests/deal.II/mglocal.cc +++ b/tests/deal.II/mglocal.cc @@ -77,7 +77,7 @@ int main() for (unsigned int degree=1;degree<=1;degree++) { Triangulation<2> tr; - MGDoFHandler<2> mgdof(&tr); + MGDoFHandler<2> mgdof(tr); DoFHandler<2>& dof(mgdof); GridGenerator::hyper_cube(tr,-M_PI_2,M_PI_2); diff --git a/tests/deal.II/second_derivatives.cc b/tests/deal.II/second_derivatives.cc index a9083c0327..1f02d3d688 100644 --- a/tests/deal.II/second_derivatives.cc +++ b/tests/deal.II/second_derivatives.cc @@ -29,7 +29,7 @@ int main () GridGenerator::hyper_cube (tria,0,1); FEQ1<2> fe; - DoFHandler<2> dof(&tria); + DoFHandler<2> dof(tria); dof.distribute_dofs(fe); StraightBoundary<2> b; diff --git a/tests/deal.II/wave-test-3.cc b/tests/deal.II/wave-test-3.cc index ef53aef2c3..8d208b454c 100644 --- a/tests/deal.II/wave-test-3.cc +++ b/tests/deal.II/wave-test-3.cc @@ -5336,7 +5336,7 @@ void TimeStep_Wave::wake_up (const unsigned int wakeup_level) sweep_info->get_timers().grid_generation.start(); - dof_handler = new DoFHandler(tria); + dof_handler = new DoFHandler(*tria); dof_handler->distribute_dofs (fe); if (parameters.renumber_dofs) -- 2.39.5