From: Tobias Leicht Date: Mon, 7 Apr 2008 12:29:15 +0000 (+0000) Subject: Instantiate some functions in FETools for hp::DoFHandler. Perhaps we should do that... X-Git-Tag: v8.0.0~9226 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd7ed9c6e097cc8a47e6e4655e96ba5fdda4b052;p=dealii.git Instantiate some functions in FETools for hp::DoFHandler. Perhaps we should do that with all those functions which are templated on the dof handler type. On the other hand this is quite a lot of code, and since obviously no one needed these functions so far... git-svn-id: https://svn.dealii.org/trunk@15986 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/fe_tools.cc b/deal.II/deal.II/source/fe/fe_tools.cc index 9cd57969fc..8aecda9030 100644 --- a/deal.II/deal.II/source/fe/fe_tools.cc +++ b/deal.II/deal.II/source/fe/fe_tools.cc @@ -40,6 +40,8 @@ #include #include #include +#include +#include #include @@ -148,32 +150,6 @@ namespace namespace { - template - inline - unsigned int - max_dofs_per_cell (const DoFHandler &dh) - { - return dh.get_fe().dofs_per_cell; - } - - - template - inline - unsigned int - max_dofs_per_face (const DoFHandler &dh) - { - return dh.get_fe().dofs_per_face; - } - - - template - inline - unsigned int - n_components (const DoFHandler &dh) - { - return dh.get_fe().n_components(); - } - // forwarder function for // FE::get_interpolation_matrix. we @@ -1016,8 +992,8 @@ FETools::interpolate (const DH1 &dof1, // cell, but Vector makes sure that // this does not lead to // reallocation of memory - Vector u1_local(max_dofs_per_cell(dof1)); - Vector u2_local(max_dofs_per_cell(dof2)); + Vector u1_local(DoFTools::max_dofs_per_cell(dof1)); + Vector u2_local(DoFTools::max_dofs_per_cell(dof2)); // have a map for interpolation // matrices. shared_ptr make sure @@ -1034,7 +1010,7 @@ FETools::interpolate (const DH1 &dof1, std::vector touch_count(dof2.n_dofs(),0); std::vector dofs; - dofs.reserve (max_dofs_per_cell (dof2)); + dofs.reserve (DoFTools::max_dofs_per_cell (dof2)); u2 = 0; for (; cell1!=endc1; ++cell1, ++cell2) @@ -1179,8 +1155,8 @@ FETools::back_interpolate(const DH &dof1, Assert(u1_interpolated.size() == dof1.n_dofs(), ExcDimensionMismatch(u1_interpolated.size(), dof1.n_dofs())); - Vector u1_local(max_dofs_per_cell(dof1)); - Vector u1_int_local(max_dofs_per_cell(dof1)); + Vector u1_local(DoFTools::max_dofs_per_cell(dof1)); + Vector u1_int_local(DoFTools::max_dofs_per_cell(dof1)); typename DH::active_cell_iterator cell = dof1.begin_active(), endc = dof1.end(); @@ -2103,6 +2079,25 @@ void FETools::extrapolate const DoFHandler &, const ConstraintMatrix &, Vector &); +template +void FETools::interpolate +(const hp::DoFHandler &, const Vector &, + const hp::DoFHandler &, Vector &); +template +void FETools::interpolate +(const hp::DoFHandler &, const Vector &, + const hp::DoFHandler &, const ConstraintMatrix &, + Vector &); +template +void FETools::interpolate +(const hp::DoFHandler &, const Vector &, + const hp::DoFHandler &, Vector &); +template +void FETools::interpolate +(const hp::DoFHandler &, const Vector &, + const hp::DoFHandler &, const ConstraintMatrix &, + Vector &); + template FiniteElement * FETools::get_fe_from_name (const std::string &); template void