From 2acc233313ba8915e111c54b6b0d5ae90134b019 Mon Sep 17 00:00:00 2001 From: guido Date: Mon, 3 Jul 2000 15:14:58 +0000 Subject: [PATCH] new preconditioners and new libraries git-svn-id: https://svn.dealii.org/trunk@3124 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-1/Makefile | 2 +- deal.II/examples/step-2/Makefile | 2 +- deal.II/examples/step-3/Makefile | 2 +- deal.II/examples/step-4/Makefile | 2 +- deal.II/examples/step-5/Makefile | 2 +- deal.II/examples/step-5/step-5.cc | 6 ++---- deal.II/examples/step-6/Makefile | 2 +- deal.II/examples/step-6/step-6.cc | 6 ++---- deal.II/examples/step-7/Makefile | 2 +- deal.II/examples/step-7/step-7.cc | 6 ++---- deal.II/examples/step-8/Makefile | 2 +- deal.II/examples/step-8/step-8.cc | 6 ++---- deal.II/examples/step-9/Makefile | 2 +- deal.II/examples/step-9/step-9.cc | 6 ++---- 14 files changed, 19 insertions(+), 29 deletions(-) diff --git a/deal.II/examples/step-1/Makefile b/deal.II/examples/step-1/Makefile index e24b9541e7..94838e216e 100644 --- a/deal.II/examples/step-1/Makefile +++ b/deal.II/examples/step-1/Makefile @@ -94,7 +94,7 @@ endif # if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ - @$(CXX) $(flags) -o $@ $^ + @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) # To make running the application somewhat independent of the actual diff --git a/deal.II/examples/step-2/Makefile b/deal.II/examples/step-2/Makefile index 2cb2fb4821..9fc71a38a0 100644 --- a/deal.II/examples/step-2/Makefile +++ b/deal.II/examples/step-2/Makefile @@ -94,7 +94,7 @@ endif # if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ - @$(CXX) $(flags) -o $@ $^ + @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) # To make running the application somewhat independent of the actual diff --git a/deal.II/examples/step-3/Makefile b/deal.II/examples/step-3/Makefile index e24b9541e7..94838e216e 100644 --- a/deal.II/examples/step-3/Makefile +++ b/deal.II/examples/step-3/Makefile @@ -94,7 +94,7 @@ endif # if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ - @$(CXX) $(flags) -o $@ $^ + @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) # To make running the application somewhat independent of the actual diff --git a/deal.II/examples/step-4/Makefile b/deal.II/examples/step-4/Makefile index 17634e57dd..56b00989a5 100644 --- a/deal.II/examples/step-4/Makefile +++ b/deal.II/examples/step-4/Makefile @@ -96,7 +96,7 @@ endif # if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ - @$(CXX) $(flags) -o $@ $^ + @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) # To make running the application somewhat independent of the actual diff --git a/deal.II/examples/step-5/Makefile b/deal.II/examples/step-5/Makefile index e24b9541e7..94838e216e 100644 --- a/deal.II/examples/step-5/Makefile +++ b/deal.II/examples/step-5/Makefile @@ -94,7 +94,7 @@ endif # if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ - @$(CXX) $(flags) -o $@ $^ + @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) # To make running the application somewhat independent of the actual diff --git a/deal.II/examples/step-5/step-5.cc b/deal.II/examples/step-5/step-5.cc index 326afd4e09..f816291b52 100644 --- a/deal.II/examples/step-5/step-5.cc +++ b/deal.II/examples/step-5/step-5.cc @@ -600,10 +600,8 @@ void LaplaceProblem::solve () // inverted) and the relaxation // factor into one object. This can // be done like this: - PreconditionRelaxation<> - preconditioner(system_matrix, - &SparseMatrix::template precondition_SSOR, - 1.2); + PreconditionSSOR<> preconditioner; + preconditioner.initialize(system_matrix, 1.2); // The default template parameters // of the PreconditionRelaxation // class are the matrix and the diff --git a/deal.II/examples/step-6/Makefile b/deal.II/examples/step-6/Makefile index e24b9541e7..94838e216e 100644 --- a/deal.II/examples/step-6/Makefile +++ b/deal.II/examples/step-6/Makefile @@ -94,7 +94,7 @@ endif # if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ - @$(CXX) $(flags) -o $@ $^ + @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) # To make running the application somewhat independent of the actual diff --git a/deal.II/examples/step-6/step-6.cc b/deal.II/examples/step-6/step-6.cc index b4b3b8635a..26f74bccfb 100644 --- a/deal.II/examples/step-6/step-6.cc +++ b/deal.II/examples/step-6/step-6.cc @@ -575,10 +575,8 @@ void LaplaceProblem::solve () PrimitiveVectorMemory<> vector_memory; SolverCG<> cg (solver_control, vector_memory); - PreconditionRelaxation<> - preconditioner(system_matrix, - &SparseMatrix::template precondition_SSOR, - 1.2); + PreconditionSSOR<> preconditioner; + preconditioner.initialize(system_matrix, 1.2); cg.solve (system_matrix, solution, system_rhs, preconditioner); diff --git a/deal.II/examples/step-7/Makefile b/deal.II/examples/step-7/Makefile index 15aca89fad..f0fa14d3ff 100644 --- a/deal.II/examples/step-7/Makefile +++ b/deal.II/examples/step-7/Makefile @@ -94,7 +94,7 @@ endif # if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ - @$(CXX) $(flags) -o $@ $^ + @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) # To make running the application somewhat independent of the actual diff --git a/deal.II/examples/step-7/step-7.cc b/deal.II/examples/step-7/step-7.cc index 7ca5cee26b..2d7ab36dbd 100644 --- a/deal.II/examples/step-7/step-7.cc +++ b/deal.II/examples/step-7/step-7.cc @@ -1027,10 +1027,8 @@ void LaplaceProblem::solve () PrimitiveVectorMemory<> vector_memory; SolverCG<> cg (solver_control, vector_memory); - PreconditionRelaxation<> - preconditioner(system_matrix, - &SparseMatrix::template precondition_SSOR, - 1.2); + PreconditionSSOR<> preconditioner; + preconditioner.initialize(system_matrix, 1.2); cg.solve (system_matrix, solution, system_rhs, preconditioner); diff --git a/deal.II/examples/step-8/Makefile b/deal.II/examples/step-8/Makefile index e24b9541e7..94838e216e 100644 --- a/deal.II/examples/step-8/Makefile +++ b/deal.II/examples/step-8/Makefile @@ -94,7 +94,7 @@ endif # if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ - @$(CXX) $(flags) -o $@ $^ + @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) # To make running the application somewhat independent of the actual diff --git a/deal.II/examples/step-8/step-8.cc b/deal.II/examples/step-8/step-8.cc index bbd6d87c4c..f98660de16 100644 --- a/deal.II/examples/step-8/step-8.cc +++ b/deal.II/examples/step-8/step-8.cc @@ -757,10 +757,8 @@ void ElasticProblem::solve () PrimitiveVectorMemory<> vector_memory; SolverCG<> cg (solver_control, vector_memory); - PreconditionRelaxation<> - preconditioner(system_matrix, - &SparseMatrix::template precondition_SSOR, - 1.2); + PreconditionSSOR<> preconditioner; + preconditioner.initialize(system_matrix, 1.2); cg.solve (system_matrix, solution, system_rhs, preconditioner); diff --git a/deal.II/examples/step-9/Makefile b/deal.II/examples/step-9/Makefile index e24b9541e7..94838e216e 100644 --- a/deal.II/examples/step-9/Makefile +++ b/deal.II/examples/step-9/Makefile @@ -94,7 +94,7 @@ endif # if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ - @$(CXX) $(flags) -o $@ $^ + @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) # To make running the application somewhat independent of the actual diff --git a/deal.II/examples/step-9/step-9.cc b/deal.II/examples/step-9/step-9.cc index 12b95372cd..c54d30f79a 100644 --- a/deal.II/examples/step-9/step-9.cc +++ b/deal.II/examples/step-9/step-9.cc @@ -452,10 +452,8 @@ void AdvectionProblem::solve () PrimitiveVectorMemory<> vector_memory; SolverBicgstab<> bicgstab (solver_control, vector_memory); - PreconditionRelaxation<> - preconditioner(system_matrix, - &SparseMatrix::template precondition_Jacobi, - 1.0); + PreconditionJacobi<> preconditioner; + preconditioner.initialize(system_matrix, 1.0); bicgstab.solve (system_matrix, solution, system_rhs, preconditioner); -- 2.39.5