From: kanschat Date: Tue, 12 Oct 2010 21:53:08 +0000 (+0000) Subject: add target for creation of plain files and rename cg to solver to make changes easier X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c2a363c3fff3ad172f2fd380e1f7e259909284a;p=dealii-svn.git add target for creation of plain files and rename cg to solver to make changes easier git-svn-id: https://svn.dealii.org/trunk@22321 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/Makefile b/deal.II/examples/Makefile index 9dbca34e0c..14655af659 100644 --- a/deal.II/examples/Makefile +++ b/deal.II/examples/Makefile @@ -22,6 +22,9 @@ clean: $(addsuffix $(EXEEXT),$(basename $(shell echo step-*/step-*.cc))) \ doxygen/*.o doxygen/*.exe */Makefile.dep +# Create plain.cc in each subdirectory +plain: $(steps) + for step in $(steps) ; do cd $$step; perl $D/doc/doxygen/tutorial/program2plain $$step.cc > plain.cc ; cd .. ; done # for each build/run/clean target: strip the build- prefix of the # target and build in that directory diff --git a/deal.II/examples/step-3/step-3.cc b/deal.II/examples/step-3/step-3.cc index de0da46ba6..bfc890ae36 100644 --- a/deal.II/examples/step-3/step-3.cc +++ b/deal.II/examples/step-3/step-3.cc @@ -769,7 +769,7 @@ void LaplaceProblem::solve () // the default arguments (which are // SparseMatrix@ and // Vector@): - SolverCG<> cg (solver_control); + SolverCG<> solver (solver_control); // Now solve the system of equations. The // CG solver takes a preconditioner as its @@ -777,7 +777,7 @@ void LaplaceProblem::solve () // delve into this yet, so we tell it to // use the identity operation as // preconditioner: - cg.solve (system_matrix, solution, system_rhs, + solver.solve (system_matrix, solution, system_rhs, PreconditionIdentity()); // Now that the solver has done its // job, the solution variable diff --git a/deal.II/examples/step-4/step-4.cc b/deal.II/examples/step-4/step-4.cc index 8c49529ef2..ab57c37cf9 100644 --- a/deal.II/examples/step-4/step-4.cc +++ b/deal.II/examples/step-4/step-4.cc @@ -572,9 +572,9 @@ template void LaplaceProblem::solve () { SolverControl solver_control (1000, 1e-12); - SolverCG<> cg (solver_control); - cg.solve (system_matrix, solution, system_rhs, - PreconditionIdentity()); + SolverCG<> solver (solver_control); + solver.solve (system_matrix, solution, system_rhs, + PreconditionIdentity()); // We have made one addition, // though: since we suppress output diff --git a/deal.II/examples/step-5/step-5.cc b/deal.II/examples/step-5/step-5.cc index d140d0a654..fd6d95adbf 100644 --- a/deal.II/examples/step-5/step-5.cc +++ b/deal.II/examples/step-5/step-5.cc @@ -636,13 +636,13 @@ template void LaplaceProblem::solve () { SolverControl solver_control (1000, 1e-12); - SolverCG<> cg (solver_control); + SolverCG<> solver (solver_control); PreconditionSSOR<> preconditioner; preconditioner.initialize(system_matrix, 1.2); - cg.solve (system_matrix, solution, system_rhs, - preconditioner); + solver.solve (system_matrix, solution, system_rhs, + preconditioner); std::cout << " " << solver_control.last_step() << " CG iterations needed to obtain convergence." diff --git a/deal.II/examples/step-6/step-6.cc b/deal.II/examples/step-6/step-6.cc index 3d149a2329..3a81e2f4de 100644 --- a/deal.II/examples/step-6/step-6.cc +++ b/deal.II/examples/step-6/step-6.cc @@ -696,13 +696,13 @@ template void LaplaceProblem::solve () { SolverControl solver_control (1000, 1e-12); - SolverCG<> cg (solver_control); + SolverCG<> solver (solver_control); PreconditionSSOR<> preconditioner; preconditioner.initialize(system_matrix, 1.2); - cg.solve (system_matrix, solution, system_rhs, - preconditioner); + solver.solve (system_matrix, solution, system_rhs, + preconditioner); hanging_node_constraints.distribute (solution); }