From e23dceb5f00d45c5237efa954d457c70b6ae58ac Mon Sep 17 00:00:00 2001 From: kronbichler Date: Fri, 9 Jan 2009 17:04:59 +0000 Subject: [PATCH] Some minor changes in AMG preconditioner to make it more stable in parallel. git-svn-id: https://svn.dealii.org/trunk@18152 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/source/trilinos_precondition.cc | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/deal.II/lac/source/trilinos_precondition.cc b/deal.II/lac/source/trilinos_precondition.cc index 5df4665db0..0ca4a33cbe 100755 --- a/deal.II/lac/source/trilinos_precondition.cc +++ b/deal.II/lac/source/trilinos_precondition.cc @@ -567,6 +567,8 @@ namespace TrilinosWrappers { ML_Epetra::SetDefaults("SA",parameter_list); parameter_list.set("smoother: type", "Chebyshev"); + if (additional_data.higher_order_elements) + parameter_list.set("aggregation: type", "MIS-Uncoupled"); } else { @@ -585,14 +587,11 @@ namespace TrilinosWrappers if (additional_data.output_details) parameter_list.set("ML output", 10); else - parameter_list.set("ML output", 0); - - if (additional_data.higher_order_elements) - parameter_list.set("aggregation: type", "MIS"); + parameter_list.set("ML output", 0); - const Epetra_Map * domain_map = &(matrix.matrix->DomainMap()); + const Epetra_Map & domain_map = matrix.matrix->DomainMap(); - Epetra_MultiVector distributed_constant_modes (*domain_map, + Epetra_MultiVector distributed_constant_modes (domain_map, constant_modes_dimension); if (constant_modes_dimension > 1) @@ -604,9 +603,9 @@ namespace TrilinosWrappers ExcDimensionMismatch(n_rows, distributed_constant_modes.GlobalLength())); - const unsigned int my_size = domain_map->NumMyElements(); - Assert (my_size == (unsigned int)domain_map->MaxLID()+1, - ExcDimensionMismatch (my_size, domain_map->MaxLID()+1)); + const unsigned int my_size = domain_map.NumMyElements(); + Assert (my_size == (unsigned int)domain_map.MaxLID()+1, + ExcDimensionMismatch (my_size, domain_map.MaxLID()+1)); // Reshape null space as a // contiguous vector of @@ -615,7 +614,7 @@ namespace TrilinosWrappers for (unsigned int d=0; dGID(row); + int global_row_id = domain_map.GID(row); distributed_constant_modes.ReplaceMyValue(row, d, (double)additional_data.constant_modes[d][global_row_id]); } -- 2.39.5