#include <dofs/dof_accessor.h>
#include <dofs/dof_tools.h>
#include <fe/fe_q.h>
-#include <fe/mapping_q.h>
#include <numerics/matrices.h>
#include <numerics/error_estimator.h>
#include <numerics/data_out.h>
Point<2>(-0.5, -0.5),
Point<2>(+0.5, -0.5) };
- // ...and finally for 3d:
-template <>
-const Point<3>
-SolutionBase<3>::source_centers[SolutionBase<3>::n_source_centers]
-= { Point<3>(-0.5, +0.5, -0.5),
- Point<3>(-0.5, -0.5, +0.5),
- Point<3>(+0.5, -0.5, 0.0) };
-
// There remains to assign a value to
// the half-width of the
// exponentials. We would like to use
// cell (rather than on the unit
// cell) to evaluate the right hand
// side function.
- MappingQ<dim> mapping(3);
- FEValues<dim> fe_values (mapping, *fe, quadrature_formula,
+ FEValues<dim> fe_values (*fe, quadrature_formula,
UpdateFlags(update_values |
update_gradients |
update_q_points |
template <int dim>
void LaplaceProblem<dim>::solve ()
{
- SolverControl solver_control (30, 1e-4);
+ SolverControl solver_control (1000, 1e-12);
PrimitiveVectorMemory<> vector_memory;
SolverCG<> cg (solver_control, vector_memory);
PreconditionSSOR<> preconditioner;
preconditioner.initialize(system_matrix, 1.2);
- try
- {
- cg.solve (system_matrix, solution, system_rhs,
- preconditioner);
- }
- catch (...)
- {
- };
+ cg.solve (system_matrix, solution, system_rhs,
+ preconditioner);
hanging_node_constraints.distribute (solution);
};
template <int dim>
void LaplaceProblem<dim>::run ()
{
- const unsigned int n_cycles = (refinement_mode == global_refinement ?
- (dim == 2 ? 7 : 3)
- :
- (dim == 2 ? 12 : 7));
- for (unsigned int cycle=0; cycle<n_cycles; ++cycle)
+ for (unsigned int cycle=0; cycle<7; ++cycle)
{
// The first action in each
// iteration of the outer loop