// this is a handy shortcut. It
// receives all the stuff we
// created so far.
- MeshWorker::IntegrationInfoBox<dim> info_box(dof_handler);
+ MeshWorker::IntegrationInfoBox<dim> info_box;
+ MeshWorker::DoFInfo<dim> dof_info(dof_handler);
info_box.initialize(integration_worker, fe, mapping);
// Finally, the integration loop
// result of std::bind if the local
// integrators were, for example,
// non-static member functions.
- MeshWorker::integration_loop<CellInfo, FaceInfo, dim>
+ MeshWorker::loop<MeshWorker::DoFInfo<dim>, MeshWorker::IntegrationInfoBox<dim> >
(dof_handler.begin_active(), dof_handler.end(),
- info_box,
+ dof_info, info_box,
&Step12<dim>::integrate_cell_term,
&Step12<dim>::integrate_boundary_term,
&Step12<dim>::integrate_face_term,
template <int dim>
void Step12<dim>::solve (Vector<double> &solution)
{
- SolverControl solver_control (1000, 1e-12, false, false);
+ SolverControl solver_control (1000, 1e-12);
SolverRichardson<> solver (solver_control);
// Here we create the
Assert (cycle < 10, ExcInternalError());
filename += ".eps";
- std::cout << "Writing grid to <" << filename << ">..." << std::endl;
+ deallog << "Writing grid to <" << filename << ">" << std::endl;
std::ofstream eps_output (filename.c_str());
GridOut grid_out;
Assert (cycle < 10, ExcInternalError());
filename += ".gnuplot";
- std::cout << "Writing solution to <" << filename << ">..."
- << std::endl << std::endl;
+ deallog << "Writing solution to <" << filename << ">" << std::endl;
std::ofstream gnuplot_output (filename.c_str());
DataOut<dim> data_out;
{
for (unsigned int cycle=0; cycle<6; ++cycle)
{
- std::cout << "Cycle " << cycle << ':' << std::endl;
+ deallog << "Cycle " << cycle << std::endl;
if (cycle == 0)
{
refine_grid ();
- std::cout << " Number of active cells: "
- << triangulation.n_active_cells()
- << std::endl;
+ deallog << "Number of active cells: "
+ << triangulation.n_active_cells()
+ << std::endl;
setup_system ();
- std::cout << " Number of degrees of freedom: "
- << dof_handler.n_dofs()
- << std::endl;
+ deallog << "Number of degrees of freedom: "
+ << dof_handler.n_dofs()
+ << std::endl;
assemble_system ();
solve (solution);
integration_worker.add_update_flags(update_flags, true, true, true, true);
assembler.initialize(matrix);
- MeshWorker::IntegrationInfoBox<dim> info_box(dof_handler);
+ MeshWorker::IntegrationInfoBox<dim> info_box;
+ MeshWorker::DoFInfo<dim> dof_info(dof_handler);
info_box.initialize(integration_worker, fe, mapping);
- MeshWorker::integration_loop<CellInfo, FaceInfo, dim>(
+ MeshWorker::loop<MeshWorker::DoFInfo<dim>, MeshWorker::IntegrationInfoBox<dim> >(
dof_handler.begin_active(), dof_handler.end(),
- info_box,
+ dof_info, info_box,
&MatrixIntegrator<dim>::cell,
&MatrixIntegrator<dim>::bdry,
&MatrixIntegrator<dim>::face,
assembler.initialize(mg_matrix);
assembler.initialize_fluxes(mg_matrix_dg_up, mg_matrix_dg_down);
- MeshWorker::IntegrationInfoBox<dim> info_box(mg_dof_handler);
+ MeshWorker::IntegrationInfoBox<dim> info_box;
+ MeshWorker::DoFInfo<dim> dof_info(mg_dof_handler);
info_box.initialize(integration_worker, fe, mapping);
- MeshWorker::integration_loop<CellInfo, FaceInfo, dim>(
+ MeshWorker::loop<MeshWorker::DoFInfo<dim>, MeshWorker::IntegrationInfoBox<dim> > (
mg_dof_handler.begin(), mg_dof_handler.end(),
- info_box,
+ dof_info, info_box,
&MatrixIntegrator<dim>::cell,
&MatrixIntegrator<dim>::bdry,
&MatrixIntegrator<dim>::face,
Vector<double>* rhs = &right_hand_side;
data.add(rhs, "RHS");
assembler.initialize(data);
- MeshWorker::IntegrationInfoBox<dim> info_box(dof_handler);
+ MeshWorker::IntegrationInfoBox<dim> info_box;
+ MeshWorker::DoFInfo<dim> dof_info(dof_handler);
info_box.initialize(integration_worker, fe, mapping);
- MeshWorker::integration_loop<CellInfo, FaceInfo, dim>(
+ MeshWorker::loop<MeshWorker::DoFInfo<dim>, MeshWorker::IntegrationInfoBox<dim> >(
dof_handler.begin_active(), dof_handler.end(),
- info_box,
+ dof_info, info_box,
&RHSIntegrator<dim>::cell,
&RHSIntegrator<dim>::bdry,
&RHSIntegrator<dim>::face,
BlockVector<double>* est = &estimates;
out_data.add(est, "cells");
assembler.initialize(out_data, false);
- MeshWorker::IntegrationInfoBox<dim> info_box(dof_handler);
+ MeshWorker::IntegrationInfoBox<dim> info_box;
+ MeshWorker::DoFInfo<dim> dof_info(dof_handler);
info_box.initialize(integration_worker, fe, mapping, solution_data);
- MeshWorker::integration_loop<CellInfo, FaceInfo, dim> (
+ MeshWorker::loop<MeshWorker::DoFInfo<dim>, MeshWorker::IntegrationInfoBox<dim> > (
dof_handler.begin_active(), dof_handler.end(),
- info_box,
+ dof_info, info_box,
&Estimator<dim>::cell,
&Estimator<dim>::bdry,
&Estimator<dim>::face,