deallog << "Computation of Pi by the area:" << std::endl
<< "==============================" << std::endl;
- const hp::QCollection<dim> quadrature(QGauss<dim>(4));
+ const QGauss<dim> quadrature (4);
for (unsigned int degree=1; degree<5; ++degree)
{
static const HyperBallBoundary<dim> boundary;
triangulation.set_boundary (0, boundary);
- MappingQ<dim> m(degree);
- const hp::MappingCollection<dim> mapping (m);
+ MappingQ<dim> mapping(degree);
- const hp::FECollection<dim> dummy_fe (FE_Q<dim>(1));
+ const FE_Q<dim> dummy_fe (1);
- hp::DoFHandler<dim> dof_handler (triangulation);
+ DoFHandler<dim> dof_handler (triangulation);
- hp::FEValues<dim> x_fe_values (mapping, dummy_fe, quadrature,
+ FEValues<dim> x_fe_values (mapping, dummy_fe, quadrature,
update_JxW_values);
ConvergenceTable table;
long double area = 0;
- typename hp::DoFHandler<dim>::active_cell_iterator
+ typename DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
for (; cell!=endc; ++cell)
deallog << "Computation of Pi by the perimeter:" << std::endl
<< "===================================" << std::endl;
- const hp::QCollection<dim-1> quadrature(QGauss<dim-1>(4));
+ const QGauss<dim-1> quadrature (4);
for (unsigned int degree=1; degree<5; ++degree)
{
static const HyperBallBoundary<dim> boundary;
triangulation.set_boundary (0, boundary);
- const MappingQ<dim> m (degree);
- const hp::MappingCollection<dim> mapping(m);
- const hp::FECollection<dim> fe (FE_Q<dim>(1));
+ const MappingQ<dim> mapping (degree);
+ const FE_Q<dim> fe (1);
- hp::DoFHandler<dim> dof_handler (triangulation);
+ DoFHandler<dim> dof_handler (triangulation);
- hp::FEFaceValues<dim> x_fe_face_values (mapping, fe, quadrature,
+ FEFaceValues<dim> x_fe_face_values (mapping, fe, quadrature,
update_JxW_values);
ConvergenceTable table;
dof_handler.distribute_dofs (fe);
- typename hp::DoFHandler<dim>::active_cell_iterator
+ typename DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
long double perimeter = 0;
}
-void distribute_dofs (hp::DoFHandler<2> &dof_handler)
+void distribute_dofs (DoFHandler<2> &dof_handler)
{
- static const hp::FECollection<2> finite_element(FE_Q<2>(1));
+ static const FE_Q<2> finite_element(1);
dof_handler.distribute_dofs (finite_element);
SparsityPattern sparsity_pattern (dof_handler.n_dofs(),
-void renumber_dofs (hp::DoFHandler<2> &dof_handler)
+void renumber_dofs (DoFHandler<2> &dof_handler)
{
DoFRenumbering::Cuthill_McKee (dof_handler);
SparsityPattern sparsity_pattern (dof_handler.n_dofs(),
Triangulation<2> triangulation;
make_grid (triangulation);
- hp::DoFHandler<2> dof_handler (triangulation);
+ DoFHandler<2> dof_handler (triangulation);
distribute_dofs (dof_handler);
renumber_dofs (dof_handler);
void output_results () const;
Triangulation<2> triangulation;
- hp::FECollection<2> fe;
- hp::DoFHandler<2> dof_handler;
+ FE_Q<2> fe;
+ DoFHandler<2> dof_handler;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
LaplaceProblem::LaplaceProblem () :
- fe (FE_Q<2>(1)),
+ fe (1),
dof_handler (triangulation)
{}
void LaplaceProblem::assemble_system ()
{
- hp::QCollection<2> quadrature_formula(QGauss<2>(2));
- hp::FEValues<2> x_fe_values (fe, quadrature_formula,
+ QGauss<2> quadrature_formula(2);
+ FEValues<2> x_fe_values (fe, quadrature_formula,
update_values | update_gradients | update_JxW_values);
- const unsigned int dofs_per_cell = fe[0].dofs_per_cell;
- const unsigned int n_q_points = quadrature_formula[0].n_quadrature_points;
+ const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int n_q_points = quadrature_formula.n_quadrature_points;
FullMatrix<double> cell_matrix (dofs_per_cell, dofs_per_cell);
Vector<double> cell_rhs (dofs_per_cell);
std::vector<unsigned int> local_dof_indices (dofs_per_cell);
- hp::DoFHandler<2>::active_cell_iterator
+ DoFHandler<2>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
for (; cell!=endc; ++cell)
void LaplaceProblem::output_results () const
{
- DataOut<2,hp::DoFHandler<2> > data_out;
+ DataOut<2,DoFHandler<2> > data_out;
data_out.attach_dof_handler (dof_handler);
data_out.add_data_vector (solution, "solution");
data_out.build_patches ();
Triangulation<2> triangulation;
hp::FECollection<2> fe;
- hp::DoFHandler<2> dof_handler;
+ DoFHandler<2> dof_handler;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
<< triangulation.n_cells()
<< std::endl;
- hp::DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (),
+ DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (),
endc = dof_handler.end ();
unsigned int cell_no = 0;
void LaplaceProblem::assemble_system ()
{
hp::QCollection<2> quadrature_formula(QGauss<2>(6));
- hp::FEValues<2> x_fe_values (fe, quadrature_formula,
+ FEValues<2> x_fe_values (fe, quadrature_formula,
update_values | update_gradients | update_JxW_values);
const unsigned int max_dofs_per_cell = fe.max_dofs_per_cell ();
std::vector<unsigned int> local_dof_indices (max_dofs_per_cell);
- hp::DoFHandler<2>::active_cell_iterator
+ DoFHandler<2>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
for (; cell!=endc; ++cell)
void LaplaceProblem::output_results () const
{
- DataOut<2,hp::DoFHandler<2> > data_out;
+ DataOut<2,DoFHandler<2> > data_out;
data_out.attach_dof_handler (dof_handler);
data_out.add_data_vector (solution, "solution");
data_out.build_patches ();
Triangulation<2> triangulation;
hp::FECollection<2> fe;
- hp::DoFHandler<2> dof_handler;
+ DoFHandler<2> dof_handler;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
<< triangulation.n_cells()
<< std::endl;
- hp::DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (),
+ DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (),
endc = dof_handler.end ();
unsigned int cell_no = 0;
void LaplaceProblem::assemble_system ()
{
hp::QCollection<2> quadrature_formula(QGauss<2>(6));
- hp::FEValues<2> x_fe_values (fe, quadrature_formula,
+ FEValues<2> x_fe_values (fe, quadrature_formula,
update_values | update_gradients | update_JxW_values);
const unsigned int max_dofs_per_cell = fe.max_dofs_per_cell ();
std::vector<unsigned int> local_dof_indices (max_dofs_per_cell);
- hp::DoFHandler<2>::active_cell_iterator
+ DoFHandler<2>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
for (; cell!=endc; ++cell)
void LaplaceProblem::output_results () const
{
- DataOut<2,hp::DoFHandler<2> > data_out;
+ DataOut<2,DoFHandler<2> > data_out;
data_out.attach_dof_handler (dof_handler);
data_out.add_data_vector (solution, "solution");
data_out.build_patches ();
Triangulation<2> triangulation;
hp::FECollection<2> fe;
- hp::DoFHandler<2> dof_handler;
+ DoFHandler<2> dof_handler;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
<< triangulation.n_cells()
<< std::endl;
- hp::DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (),
+ DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active (),
endc = dof_handler.end ();
unsigned int cell_no = 0;
for (unsigned int p = 0; p < fe.size (); ++p)
quadrature_formula.push_back (QGauss<2> (p + 2));
- hp::FEValues<2> x_fe_values (fe, quadrature_formula,
+ FEValues<2> x_fe_values (fe, quadrature_formula,
update_values | update_gradients | update_JxW_values);
const unsigned int max_dofs_per_cell = fe.max_dofs_per_cell ();
std::vector<unsigned int> local_dof_indices (max_dofs_per_cell);
- hp::DoFHandler<2>::active_cell_iterator
+ DoFHandler<2>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
for (; cell!=endc; ++cell)
void LaplaceProblem::output_results () const
{
- DataOut<2,hp::DoFHandler<2> > data_out;
+ DataOut<2,DoFHandler<2> > data_out;
data_out.attach_dof_handler (dof_handler);
data_out.add_data_vector (solution, "solution");
data_out.build_patches ();
void output_results () const;
Triangulation<dim> triangulation;
- hp::FECollection<dim> fe;
- hp::DoFHandler<dim> dof_handler;
+ FE_Q<dim> fe;
+ DoFHandler<dim> dof_handler;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
template <int dim>
LaplaceProblem<dim>::LaplaceProblem () :
- fe (FE_Q<dim>(1)),
+ fe (1),
dof_handler (triangulation)
{}
template <int dim>
void LaplaceProblem<dim>::assemble_system ()
{
- hp::QCollection<dim> quadrature_formula(QGauss<dim>(2));
+ QGauss<dim> quadrature_formula (2);
const RightHandSide<dim> right_hand_side;
- hp::FEValues<dim> x_fe_values (fe, quadrature_formula,
+ FEValues<dim> x_fe_values (fe, quadrature_formula,
update_values | update_gradients |
update_q_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe[0].dofs_per_cell;
- const unsigned int n_q_points = quadrature_formula[0].n_quadrature_points;
+ const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int n_q_points = quadrature_formula.n_quadrature_points;
FullMatrix<double> cell_matrix (dofs_per_cell, dofs_per_cell);
Vector<double> cell_rhs (dofs_per_cell);
std::vector<unsigned int> local_dof_indices (dofs_per_cell);
- typename hp::DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active(),
+ typename DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active(),
endc = dof_handler.end();
for (; cell!=endc; ++cell)
{
template <int dim>
void LaplaceProblem<dim>::output_results () const
{
- DataOut<dim,hp::DoFHandler<dim> > data_out;
+ DataOut<dim,DoFHandler<dim> > data_out;
data_out.attach_dof_handler (dof_handler);
data_out.add_data_vector (solution, "solution");
void output_results (const unsigned int cycle) const;
Triangulation<dim> triangulation;
- hp::FECollection<dim> fe;
- hp::DoFHandler<dim> dof_handler;
+ FE_Q<dim> fe;
+ DoFHandler<dim> dof_handler;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
template <int dim>
LaplaceProblem<dim>::LaplaceProblem () :
- fe (FE_Q<dim>(1)),
+ fe (1),
dof_handler (triangulation)
{}
template <int dim>
void LaplaceProblem<dim>::assemble_system ()
{
- hp::QCollection<dim> quadrature_formula(QGauss<dim>(2));
+ QGauss<dim> quadrature_formula (2);
- hp::FEValues<dim> x_fe_values (fe, quadrature_formula,
+ FEValues<dim> x_fe_values (fe, quadrature_formula,
update_values | update_gradients |
update_q_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe[0].dofs_per_cell;
- const unsigned int n_q_points = quadrature_formula[0].n_quadrature_points;
+ const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int n_q_points = quadrature_formula.n_quadrature_points;
FullMatrix<double> cell_matrix (dofs_per_cell, dofs_per_cell);
Vector<double> cell_rhs (dofs_per_cell);
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values (n_q_points);
- typename hp::DoFHandler<dim>::active_cell_iterator
+ typename DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
for (; cell!=endc; ++cell)
if (cycle >= 2)
return;
- DataOut<dim,hp::DoFHandler<dim> > data_out;
+ DataOut<dim,DoFHandler<dim> > data_out;
data_out.attach_dof_handler (dof_handler);
data_out.add_data_vector (solution, "solution");
Triangulation<dim> triangulation;
- hp::DoFHandler<dim> dof_handler;
- hp::FECollection<dim> fe;
+ DoFHandler<dim> dof_handler;
+ FE_Q<dim> fe;
ConstraintMatrix hanging_node_constraints;
template <int dim>
LaplaceProblem<dim>::LaplaceProblem () :
dof_handler (triangulation),
- fe (FE_Q<dim>(2))
+ fe (2)
{}
template <int dim>
void LaplaceProblem<dim>::assemble_system ()
{
- const hp::QCollection<dim> quadrature_formula(QGauss<dim>(3));
+ const QGauss<dim> quadrature_formula (3);
- hp::FEValues<dim> x_fe_values (fe, quadrature_formula,
+ FEValues<dim> x_fe_values (fe, quadrature_formula,
update_values | update_gradients |
update_q_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe[0].dofs_per_cell;
- const unsigned int n_q_points = quadrature_formula[0].n_quadrature_points;
+ const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int n_q_points = quadrature_formula.n_quadrature_points;
FullMatrix<double> cell_matrix (dofs_per_cell, dofs_per_cell);
Vector<double> cell_rhs (dofs_per_cell);
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values (n_q_points);
- typename hp::DoFHandler<dim>::active_cell_iterator
+ typename DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
for (; cell!=endc; ++cell)
DataOutBase::EpsFlags eps_flags;
eps_flags.z_scaling = 4;
- DataOut<dim,hp::DoFHandler<dim> > data_out;
+ DataOut<dim,DoFHandler<dim> > data_out;
data_out.set_flags (eps_flags);
data_out.attach_dof_handler (dof_handler);
global_refinement, adaptive_refinement
};
- HelmholtzProblem (const hp::FECollection<dim> &fe,
+ HelmholtzProblem (const FiniteElement<dim> &fe,
const RefinementMode refinement_mode);
~HelmholtzProblem ();
void process_solution (const unsigned int cycle);
Triangulation<dim> triangulation;
- hp::DoFHandler<dim> dof_handler;
+ DoFHandler<dim> dof_handler;
- SmartPointer<const hp::FECollection<dim> > fe;
+ SmartPointer<const FiniteElement<dim> > fe;
ConstraintMatrix hanging_node_constraints;
template <int dim>
-HelmholtzProblem<dim>::HelmholtzProblem (const hp::FECollection<dim> &fe,
+HelmholtzProblem<dim>::HelmholtzProblem (const FiniteElement<dim> &fe,
const RefinementMode refinement_mode) :
dof_handler (triangulation),
fe (&fe),
template <int dim>
void HelmholtzProblem<dim>::assemble_system ()
{
- hp::QCollection<dim> quadrature_formula(QGauss<dim>(3));
- hp::QCollection<dim-1> face_quadrature_formula(QGauss<dim-1>(3));
+ QGauss<dim> quadrature_formula (3);
+ QGauss<dim-1> face_quadrature_formula (3);
- const unsigned int n_q_points = quadrature_formula[0].n_quadrature_points;
- const unsigned int n_face_q_points = face_quadrature_formula[0].n_quadrature_points;
+ const unsigned int n_q_points = quadrature_formula.n_quadrature_points;
+ const unsigned int n_face_q_points = face_quadrature_formula.n_quadrature_points;
- const unsigned int dofs_per_cell = (*fe)[0].dofs_per_cell;
+ const unsigned int dofs_per_cell = (*fe).dofs_per_cell;
FullMatrix<double> cell_matrix (dofs_per_cell, dofs_per_cell);
Vector<double> cell_rhs (dofs_per_cell);
std::vector<unsigned int> local_dof_indices (dofs_per_cell);
- hp::FEValues<dim> x_fe_values (*fe, quadrature_formula,
+ FEValues<dim> x_fe_values (*fe, quadrature_formula,
update_values | update_gradients |
update_q_points | update_JxW_values);
- hp::FEFaceValues<dim> x_fe_face_values (*fe, face_quadrature_formula,
+ FEFaceValues<dim> x_fe_face_values (*fe, face_quadrature_formula,
update_values | update_q_points |
update_normal_vectors | update_JxW_values);
const Solution<dim> exact_solution;
- typename hp::DoFHandler<dim>::active_cell_iterator
+ typename DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
for (; cell!=endc; ++cell)
solution,
Solution<dim>(),
difference_per_cell,
- hp::QCollection<dim>(QGauss<dim>(3)),
+ QGauss<dim>(3),
VectorTools::L2_norm);
const double L2_error = difference_per_cell.l2_norm();
solution,
Solution<dim>(),
difference_per_cell,
- hp::QCollection<dim>(QGauss<dim>(3)),
+ QGauss<dim>(3),
VectorTools::H1_seminorm);
const double H1_error = difference_per_cell.l2_norm();
solution,
Solution<dim>(),
difference_per_cell,
- hp::QCollection<dim>(q_iterated),
+ q_iterated,
VectorTools::Linfty_norm);
const double Linfty_error = difference_per_cell.linfty_norm();
Assert (false, ExcNotImplemented());
}
- switch ((*fe)[0].degree)
+ switch ((*fe).degree)
{
case 1:
gmv_filename += "-q1";
gmv_filename += ".gmv";
- DataOut<dim,hp::DoFHandler<dim> > data_out;
+ DataOut<dim,DoFHandler<dim> > data_out;
data_out.attach_dof_handler (dof_handler);
data_out.add_data_vector (solution, "solution");
- data_out.build_patches ((*fe)[0].degree);
+ data_out.build_patches ((*fe).degree);
data_out.write_gmv (deallog.get_file_stream());
}
Assert (false, ExcNotImplemented());
}
- switch ((*fe)[0].degree)
+ switch ((*fe).degree)
{
case 1:
error_filename += "-q1";
default:
Assert (false, ExcNotImplemented());
}
- switch ((*fe)[0].degree)
+ switch ((*fe).degree)
{
case 1:
conv_filename += "-q1";
<< "=============================================" << std::endl
<< std::endl;
- hp::FECollection<dim> fe(FE_Q<dim>(1));
+ FE_Q<dim> fe(1);
HelmholtzProblem<dim>
helmholtz_problem_2d (fe, HelmholtzProblem<dim>::adaptive_refinement);
<< "===========================================" << std::endl
<< std::endl;
- hp::FECollection<dim> fe(FE_Q<dim>(1));
+ FE_Q<dim> fe(1);
HelmholtzProblem<dim>
helmholtz_problem_2d (fe, HelmholtzProblem<dim>::global_refinement);
<< "===========================================" << std::endl
<< std::endl;
- hp::FECollection<dim> fe(FE_Q<dim>(2));
+ FE_Q<dim> fe(2);
HelmholtzProblem<dim>
helmholtz_problem_2d (fe, HelmholtzProblem<dim>::global_refinement);
void output_results (const unsigned int cycle) const;
Triangulation<dim> triangulation;
- hp::DoFHandler<dim> dof_handler;
+ DoFHandler<dim> dof_handler;
- hp::FECollection<dim> fe;
+ FESystem<dim> fe;
ConstraintMatrix hanging_node_constraints;
ElasticProblem<dim>::ElasticProblem ()
:
dof_handler (triangulation),
- fe (FESystem<dim>(FE_Q<dim>(1), dim))
+ fe (FE_Q<dim>(1), dim)
{}
template <int dim>
void ElasticProblem<dim>::assemble_system ()
{
- hp::QCollection<dim> quadrature_formula(QGauss<dim>(2));
+ QGauss<dim> quadrature_formula (2);
- hp::FEValues<dim> x_fe_values (fe, quadrature_formula,
+ FEValues<dim> x_fe_values (fe, quadrature_formula,
update_values | update_gradients |
update_q_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe[0].dofs_per_cell;
- const unsigned int n_q_points = quadrature_formula[0].n_quadrature_points;
+ const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int n_q_points = quadrature_formula.n_quadrature_points;
FullMatrix<double> cell_matrix (dofs_per_cell, dofs_per_cell);
Vector<double> cell_rhs (dofs_per_cell);
Vector<double>(dim));
- typename hp::DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active(),
+ typename DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active(),
endc = dof_handler.end();
for (; cell!=endc; ++cell)
{
for (unsigned int i=0; i<dofs_per_cell; ++i)
{
const unsigned int
- component_i = fe[0].system_to_component_index(i).first;
+ component_i = fe.system_to_component_index(i).first;
for (unsigned int j=0; j<dofs_per_cell; ++j)
{
const unsigned int
- component_j = fe[0].system_to_component_index(j).first;
+ component_j = fe.system_to_component_index(j).first;
for (unsigned int q_point=0; q_point<n_q_points;
++q_point)
for (unsigned int i=0; i<dofs_per_cell; ++i)
{
const unsigned int
- component_i = fe[0].system_to_component_index(i).first;
+ component_i = fe.system_to_component_index(i).first;
for (unsigned int q_point=0; q_point<n_q_points; ++q_point)
cell_rhs(i) += fe_values.shape_value(i,q_point) *
filename += ".gmv";
- DataOut<dim,hp::DoFHandler<dim> > data_out;
+ DataOut<dim,DoFHandler<dim> > data_out;
data_out.attach_dof_handler (dof_handler);
private:
void setup_system ();
void assemble_system ();
- void assemble_system_interval (const typename hp::DoFHandler<dim>::active_cell_iterator &begin,
- const typename hp::DoFHandler<dim>::active_cell_iterator &end);
+ void assemble_system_interval (const typename DoFHandler<dim>::active_cell_iterator &begin,
+ const typename DoFHandler<dim>::active_cell_iterator &end);
void solve ();
void refine_grid ();
void output_results (const unsigned int cycle) const;
Triangulation<dim> triangulation;
- hp::DoFHandler<dim> dof_handler;
+ DoFHandler<dim> dof_handler;
- hp::FECollection<dim> fe;
+ FE_Q<dim> fe;
ConstraintMatrix hanging_node_constraints;
{
public:
template <int dim>
- static void estimate (const hp::DoFHandler<dim> &dof,
+ static void estimate (const DoFHandler<dim> &dof,
const Vector<double> &solution,
Vector<float> &error_per_cell);
typedef std::pair<unsigned int,unsigned int> IndexInterval;
template <int dim>
- static void estimate_interval (const hp::DoFHandler<dim> &dof,
+ static void estimate_interval (const DoFHandler<dim> &dof,
const Vector<double> &solution,
const IndexInterval &index_interval,
Vector<float> &error_per_cell);
template <int dim>
AdvectionProblem<dim>::AdvectionProblem () :
dof_handler (triangulation),
- fe(FE_Q<dim>(1))
+ fe(1)
{}
const unsigned int n_threads = multithread_info.n_default_threads;
Threads::ThreadGroup<> threads;
- typedef typename hp::DoFHandler<dim>::active_cell_iterator active_cell_iterator;
+ typedef typename DoFHandler<dim>::active_cell_iterator active_cell_iterator;
std::vector<std::pair<active_cell_iterator,active_cell_iterator> >
thread_ranges
= Threads::split_range<active_cell_iterator> (dof_handler.begin_active (),
template <int dim>
void
AdvectionProblem<dim>::
-assemble_system_interval (const typename hp::DoFHandler<dim>::active_cell_iterator &begin,
- const typename hp::DoFHandler<dim>::active_cell_iterator &end)
+assemble_system_interval (const typename DoFHandler<dim>::active_cell_iterator &begin,
+ const typename DoFHandler<dim>::active_cell_iterator &end)
{
const AdvectionField<dim> advection_field;
const RightHandSide<dim> right_hand_side;
const BoundaryValues<dim> boundary_values;
- hp::QCollection<dim> quadrature_formula(QGauss<dim>(2));
- hp::QCollection<dim-1> face_quadrature_formula(QGauss<dim-1>(2));
+ QGauss<dim> quadrature_formula (2);
+ QGauss<dim-1> face_quadrature_formula (2);
- hp::FEValues<dim> x_fe_values (fe, quadrature_formula,
+ FEValues<dim> x_fe_values (fe, quadrature_formula,
update_values | update_gradients |
update_q_points | update_JxW_values);
- hp::FEFaceValues<dim> x_fe_face_values (fe, face_quadrature_formula,
+ FEFaceValues<dim> x_fe_face_values (fe, face_quadrature_formula,
update_values | update_q_points |
update_JxW_values | update_normal_vectors);
const unsigned int dofs_per_cell = fe[0].dofs_per_cell;
- const unsigned int n_q_points = quadrature_formula[0].n_quadrature_points;
- const unsigned int n_face_q_points = face_quadrature_formula[0].n_quadrature_points;
+ const unsigned int n_q_points = quadrature_formula.n_quadrature_points;
+ const unsigned int n_face_q_points = face_quadrature_formula.n_quadrature_points;
FullMatrix<double> cell_matrix (dofs_per_cell, dofs_per_cell);
Vector<double> cell_rhs (dofs_per_cell);
std::vector<double> face_boundary_values (n_face_q_points);
std::vector<Tensor<1,dim> > face_advection_directions (n_face_q_points);
- typename hp::DoFHandler<dim>::active_cell_iterator cell;
+ typename DoFHandler<dim>::active_cell_iterator cell;
for (cell=begin; cell!=end; ++cell)
{
cell_matrix = 0;
output_results (cycle);
};
- DataOut<dim,hp::DoFHandler<dim> > data_out;
+ DataOut<dim,DoFHandler<dim> > data_out;
data_out.attach_dof_handler (dof_handler);
data_out.add_data_vector (solution, "solution");
data_out.build_patches ();
template <int dim>
void
-GradientEstimation::estimate (const hp::DoFHandler<dim> &dof_handler,
+GradientEstimation::estimate (const DoFHandler<dim> &dof_handler,
const Vector<double> &solution,
Vector<float> &error_per_cell)
{
n_threads);
Threads::ThreadGroup<> threads;
- void (*estimate_interval_ptr) (const hp::DoFHandler<dim> &,
+ void (*estimate_interval_ptr) (const DoFHandler<dim> &,
const Vector<double> &,
const IndexInterval &,
Vector<float> &)
template <int dim>
void
-GradientEstimation::estimate_interval (const hp::DoFHandler<dim> &dof_handler,
+GradientEstimation::estimate_interval (const DoFHandler<dim> &dof_handler,
const Vector<double> &solution,
const IndexInterval &index_interval,
Vector<float> &error_per_cell)
{
- QMidpoint<dim> xmidpoint;
- hp::QCollection<dim> midpoint_rule (xmidpoint);
- hp::FEValues<dim> x_fe_midpoint_value (dof_handler.get_fe(),
+ QMidpoint<dim> midpoint_rule;
+ FEValues<dim> x_fe_midpoint_value (dof_handler.get_fe(),
midpoint_rule,
update_values | update_q_points);
Tensor<2,dim> Y;
- typename hp::DoFHandler<dim>::active_cell_iterator cell, endc;
+ typename DoFHandler<dim>::active_cell_iterator cell, endc;
cell = dof_handler.begin_active();
advance (cell, static_cast<signed int>(index_interval.first));
error_on_this_cell = error_per_cell.begin() + index_interval.first;
- std::vector<typename hp::DoFHandler<dim>::active_cell_iterator> active_neighbors;
+ std::vector<typename DoFHandler<dim>::active_cell_iterator> active_neighbors;
active_neighbors.reserve (GeometryInfo<dim>::faces_per_cell *
GeometryInfo<dim>::subfaces_per_face);
for (unsigned int face_no=0; face_no<GeometryInfo<dim>::faces_per_cell; ++face_no)
if (! cell->at_boundary(face_no))
{
- const typename hp::DoFHandler<dim>::face_iterator
+ const typename DoFHandler<dim>::face_iterator
face = cell->face(face_no);
- const typename hp::DoFHandler<dim>::cell_iterator
+ const typename DoFHandler<dim>::cell_iterator
neighbor = cell->neighbor(face_no);
if (neighbor->active())
{
if (dim == 1)
{
- typename hp::DoFHandler<dim>::cell_iterator
+ typename DoFHandler<dim>::cell_iterator
neighbor_child = neighbor;
while (neighbor_child->has_children())
neighbor_child = neighbor_child->child (face_no==0 ? 1 : 0);
std::vector<double> neighbor_midpoint_value(1);
- typename std::vector<typename hp::DoFHandler<dim>::active_cell_iterator>::const_iterator
+ typename std::vector<typename DoFHandler<dim>::active_cell_iterator>::const_iterator
neighbor_ptr = active_neighbors.begin();
for (; neighbor_ptr!=active_neighbors.end(); ++neighbor_ptr)
{
- const typename hp::DoFHandler<dim>::active_cell_iterator
+ const typename DoFHandler<dim>::active_cell_iterator
neighbor = *neighbor_ptr;
x_fe_midpoint_value.reinit (neighbor);
DEAL:: Number of active cells: 643
DEAL:: Number of degrees of freedom: 793
DEAL:Bicgstab::Starting value 0.26
-DEAL:Bicgstab::Convergence step 85 value 0
+DEAL:Bicgstab::Convergence step 88 value 0
%!PS-Adobe-2.0 EPSF-1.2
%%Title: deal.II Output
%%Creator: the deal.II library
DEAL:: Number of active cells: 1663
DEAL:: Number of degrees of freedom: 1946
DEAL:Bicgstab::Starting value 0.20
-DEAL:Bicgstab::Convergence step 117 value 0
+DEAL:Bicgstab::Convergence step 116 value 0
%!PS-Adobe-2.0 EPSF-1.2
%%Title: deal.II Output
%%Creator: the deal.II library