DoFTools::extract_constant_modes (stokes_dof_handler, velocity_components,
null_space);
Amg_preconditioner->initialize(stokes_preconditioner_matrix.block(0,0),
- true, true, null_space, false);
+ true, true, 5e-2, null_space, false);
// TODO: we could throw away the (0,0)
// block here since things have been
SolverGMRES<TrilinosWrappers::BlockVector> gmres(solver_control,
SolverGMRES<TrilinosWrappers::BlockVector >::AdditionalData(100));
- //stokes_solution = 0;
gmres.solve(stokes_matrix, stokes_solution, stokes_rhs, preconditioner);
std::cout << " "
cell != triangulation.end(); ++cell)
cell->clear_refine_flag ();
- std::vector<TrilinosWrappers::Vector> x_solution (2);
- x_solution[0].reinit (temperature_solution);
- x_solution[0] = temperature_solution;
- x_solution[1].reinit (temperature_solution);
- x_solution[1] = old_temperature_solution;
+ std::vector<TrilinosWrappers::Vector> x_temperature (2);
+ x_temperature[0].reinit (temperature_solution);
+ x_temperature[0] = temperature_solution;
+ x_temperature[1].reinit (temperature_solution);
+ x_temperature[1] = old_temperature_solution;
+ TrilinosWrappers::BlockVector x_stokes(2);
+ x_stokes = stokes_solution;
- SolutionTransfer<dim,TrilinosWrappers::Vector> soltrans(temperature_dof_handler);
+ SolutionTransfer<dim,TrilinosWrappers::Vector> temperature_trans(temperature_dof_handler);
+ SolutionTransfer<dim,TrilinosWrappers::BlockVector> stokes_trans(stokes_dof_handler);
triangulation.prepare_coarsening_and_refinement();
- soltrans.prepare_for_coarsening_and_refinement(x_solution);
+ temperature_trans.prepare_for_coarsening_and_refinement(x_temperature);
+ stokes_trans.prepare_for_coarsening_and_refinement(x_stokes);
triangulation.execute_coarsening_and_refinement ();
setup_dofs ();
std::vector<TrilinosWrappers::Vector> tmp (2);
tmp[0].reinit (temperature_solution);
tmp[1].reinit (temperature_solution);
- soltrans.interpolate(x_solution, tmp);
+ temperature_trans.interpolate(x_temperature, tmp);
temperature_solution = tmp[0];
old_temperature_solution = tmp[1];
+
+ stokes_trans.interpolate (x_stokes, stokes_solution);
rebuild_stokes_matrix = true;
rebuild_temperature_matrices = true;
void initialize (const SparseMatrix &matrix,
const bool elliptic = true,
const bool higher_order_elements = false,
+ const double aggregation_threshold = 1e-4,
const std::vector<std::vector<bool> > &null_space = std::vector<std::vector<bool> > (),
const bool output_details = false);
void initialize (const ::dealii::SparseMatrix<double> &deal_ii_sparse_matrix,
const bool elliptic = true,
const bool higher_order_elements = false,
+ const double aggregation_threshold = 1e-4,
const std::vector<std::vector<bool> > &null_space = std::vector<std::vector<bool> > (),
const bool output_details = false);
initialize (const SparseMatrix &matrix,
const bool elliptic,
const bool higher_order_elements,
+ const double aggregation_threshold,
const std::vector<std::vector<bool> > &null_space,
const bool output_details)
{
parameter_list.set("aggregation: block scaling", true);
}
- parameter_list.set("aggregation: threshold", 1e-8);
+ parameter_list.set("aggregation: threshold", aggregation_threshold);
if (output_details)
parameter_list.set("ML output", 10);
initialize (const ::dealii::SparseMatrix<double> &deal_ii_sparse_matrix,
const bool elliptic,
const bool higher_order_elements,
+ const double aggregation_threshold,
const std::vector<std::vector<bool> > &null_space,
const bool output_details)
{
Matrix->reinit (*Map, deal_ii_sparse_matrix);
Matrix->compress();
- initialize (*Matrix, elliptic, higher_order_elements, null_space,
- output_details);
+ initialize (*Matrix, elliptic, higher_order_elements,
+ aggregation_threshold, null_space, output_details);
}