From: koecher Date: Fri, 10 Aug 2012 17:31:58 +0000 (+0000) Subject: convert some unsigned ints to types::global_dof_index X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=264df4453398e9a6db2df06d138bdfda4c8e57e5;p=dealii-svn.git convert some unsigned ints to types::global_dof_index git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_3@25891 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/files b/deal.II/files index ee78a24577..01cb86101f 100644 --- a/deal.II/files +++ b/deal.II/files @@ -191,13 +191,13 @@ UWE source/numerics/fe_field_function.cc UWE source/numerics/histogram.cc UWE source/numerics/matrix_free.cc UWE source/numerics/matrix_tools.cc -source/numerics/mesh_worker.cc -source/numerics/mesh_worker_info.cc -source/numerics/mesh_worker_vector_selector.cc -source/numerics/point_value_history.cc -source/numerics/solution_transfer.cc -source/numerics/time_dependent.cc -source/numerics/vector_tools.cc +UWE source/numerics/mesh_worker.cc +UWE source/numerics/mesh_worker_info.cc +UWE source/numerics/mesh_worker_vector_selector.cc +UWE source/numerics/point_value_history.cc +UWE source/numerics/solution_transfer.cc +UWE source/numerics/time_dependent.cc +UWE source/numerics/vector_tools.cc include/deal.II/algorithms/newton.h include/deal.II/algorithms/newton.templates.h include/deal.II/algorithms/operator.h @@ -503,33 +503,35 @@ include/deal.II/multigrid/mg_transfer.h include/deal.II/multigrid/mg_transfer.templates.h include/deal.II/multigrid/multigrid.h include/deal.II/multigrid/multigrid.templates.h -include/deal.II/numerics/data_component_interpretation.h -include/deal.II/numerics/data_out_faces.h -include/deal.II/numerics/data_out.h -include/deal.II/numerics/data_out_rotation.h -include/deal.II/numerics/data_out_stack.h -include/deal.II/numerics/data_postprocessor.h -include/deal.II/numerics/derivative_approximation.h -include/deal.II/numerics/dof_output_operator.h -include/deal.II/numerics/dof_output_operator.templates.h -include/deal.II/numerics/dof_print_solver_step.h -include/deal.II/numerics/error_estimator.h -include/deal.II/numerics/fe_field_function.h -include/deal.II/numerics/fe_field_function.templates.h -include/deal.II/numerics/histogram.h -include/deal.II/numerics/matrix_tools.h -include/deal.II/numerics/mesh_worker_assembler.h -include/deal.II/numerics/mesh_worker.h -include/deal.II/numerics/mesh_worker_info.h -include/deal.II/numerics/mesh_worker_loop.h -include/deal.II/numerics/mesh_worker_output.h -include/deal.II/numerics/mesh_worker_vector_selector.h -include/deal.II/numerics/newton.h -include/deal.II/numerics/operator.h -include/deal.II/numerics/point_value_history.h -include/deal.II/numerics/solution_transfer.h -include/deal.II/numerics/theta_timestepping.h -include/deal.II/numerics/time_dependent.h -include/deal.II/numerics/timestep_control.h -include/deal.II/numerics/vector_tools.h -include/deal.II/numerics/vector_tools.templates.h +UWE include/deal.II/numerics/data_component_interpretation.h +UWE include/deal.II/numerics/data_out_faces.h +UWE include/deal.II/numerics/data_out.h +UWE include/deal.II/numerics/data_out_rotation.h +UWE include/deal.II/numerics/data_out_stack.h +UWE include/deal.II/numerics/data_postprocessor.h +UWE include/deal.II/numerics/derivative_approximation.h +UWE include/deal.II/numerics/dof_output_operator.h +UWE include/deal.II/numerics/dof_output_operator.templates.h +UWE include/deal.II/numerics/dof_print_solver_step.h +UWE include/deal.II/numerics/error_estimator.h +UWE include/deal.II/numerics/fe_field_function.h +UWE include/deal.II/numerics/fe_field_function.templates.h +UWE include/deal.II/numerics/histogram.h +UWE include/deal.II/numerics/matrix_tools.h +UWE include/deal.II/numerics/mesh_worker_assembler.h +UWE include/deal.II/numerics/mesh_worker.h +UWE include/deal.II/numerics/mesh_worker_info.h +UWE include/deal.II/numerics/mesh_worker_loop.h +UWE include/deal.II/numerics/mesh_worker_output.h +UWE include/deal.II/numerics/mesh_worker_vector_selector.h +UWE include/deal.II/numerics/newton.h +UWE include/deal.II/numerics/operator.h +UWE include/deal.II/numerics/point_value_history.h +UWE include/deal.II/numerics/solution_transfer.h +UWE include/deal.II/numerics/theta_timestepping.h +UWE include/deal.II/numerics/time_dependent.h +UWE include/deal.II/numerics/timestep_control.h +UWE include/deal.II/numerics/vectors.h +UWE include/deal.II/numerics/vectors.templates.h +UWE include/deal.II/numerics/vector_tools.h +UWE include/deal.II/numerics/vector_tools.templates.h diff --git a/deal.II/include/deal.II/numerics/solution_transfer.h b/deal.II/include/deal.II/numerics/solution_transfer.h index 8c5e354db4..b240a9634f 100644 --- a/deal.II/include/deal.II/numerics/solution_transfer.h +++ b/deal.II/include/deal.II/numerics/solution_transfer.h @@ -407,7 +407,7 @@ class SolutionTransfer * and stores all dof indices * of the cells that'll be refined */ - std::vector > indices_on_cell; + std::vector > indices_on_cell; /** * All cell data (the dof indices and diff --git a/deal.II/include/deal.II/numerics/vector_tools.h b/deal.II/include/deal.II/numerics/vector_tools.h index 048ad135e9..0b962ce803 100644 --- a/deal.II/include/deal.II/numerics/vector_tools.h +++ b/deal.II/include/deal.II/numerics/vector_tools.h @@ -747,7 +747,7 @@ namespace VectorTools interpolate_boundary_values (const Mapping &mapping, const DH &dof, const typename FunctionMap::type &function_map, - std::map &boundary_values, + std::map &boundary_values, const std::vector &component_mask = std::vector()); /** @@ -769,7 +769,7 @@ namespace VectorTools const DH &dof, const types::boundary_id_t boundary_component, const Function &boundary_function, - std::map &boundary_values, + std::map &boundary_values, const std::vector &component_mask = std::vector()); /** @@ -783,7 +783,7 @@ namespace VectorTools interpolate_boundary_values (const DH &dof, const types::boundary_id_t boundary_component, const Function &boundary_function, - std::map &boundary_values, + std::map &boundary_values, const std::vector &component_mask = std::vector()); @@ -797,7 +797,7 @@ namespace VectorTools void interpolate_boundary_values (const DH &dof, const typename FunctionMap::type &function_map, - std::map &boundary_values, + std::map &boundary_values, const std::vector &component_mask = std::vector()); @@ -995,7 +995,7 @@ namespace VectorTools const DoFHandler &dof, const typename FunctionMap::type &boundary_functions, const Quadrature &q, - std::map &boundary_values, + std::map &boundary_values, std::vector component_mapping = std::vector()); /** @@ -1007,7 +1007,7 @@ namespace VectorTools void project_boundary_values (const DoFHandler &dof, const typename FunctionMap::type &boundary_function, const Quadrature &q, - std::map &boundary_values, + std::map &boundary_values, std::vector component_mapping = std::vector()); /** diff --git a/deal.II/include/deal.II/numerics/vector_tools.templates.h b/deal.II/include/deal.II/numerics/vector_tools.templates.h index 190b8866e7..09c182635e 100644 --- a/deal.II/include/deal.II/numerics/vector_tools.templates.h +++ b/deal.II/include/deal.II/numerics/vector_tools.templates.h @@ -127,10 +127,10 @@ namespace VectorTools // the following vector collects all rep dofs. // the position of a rep dof within this vector // is called rep index. - std::vector > dofs_of_rep_points(fe.size()); + std::vector > dofs_of_rep_points(fe.size()); // the following table converts a dof i // to the rep index. - std::vector > dof_to_rep_index_table(fe.size()); + std::vector > dof_to_rep_index_table(fe.size()); std::vector n_rep_points (fe.size(), 0); @@ -172,7 +172,7 @@ namespace VectorTools const unsigned int max_rep_points = *std::max_element (n_rep_points.begin(), n_rep_points.end()); - std::vector dofs_on_cell (fe.max_dofs_per_cell()); + std::vector dofs_on_cell (fe.max_dofs_per_cell()); std::vector > rep_points (max_rep_points); // get space for the values of the @@ -286,8 +286,8 @@ namespace VectorTools Vector cell_data_1(dof_1.get_fe().dofs_per_cell); Vector cell_data_2(dof_2.get_fe().dofs_per_cell); - std::vector touch_count (dof_2.n_dofs(), 0); - std::vector local_dof_indices (dof_2.get_fe().dofs_per_cell); + std::vector touch_count (dof_2.n_dofs(), 0); //TODO: check on datatype... kinda strange (UK) + std::vector local_dof_indices (dof_2.get_fe().dofs_per_cell); typename DoFHandler::active_cell_iterator h = dof_1.begin_active(); typename DoFHandler::active_cell_iterator l = dof_2.begin_active(); @@ -330,7 +330,7 @@ namespace VectorTools { void interpolate_zero_boundary_values (const dealii::DoFHandler<1> &dof_handler, - std::map &boundary_values) + std::map &boundary_values) { // we only need to find the // left-most and right-most @@ -353,7 +353,7 @@ namespace VectorTools // codimension 1 void interpolate_zero_boundary_values (const dealii::DoFHandler<1,2> &dof_handler, - std::map &boundary_values) + std::map &boundary_values) { // we only need to find the // left-most and right-most @@ -376,7 +376,7 @@ namespace VectorTools template void interpolate_zero_boundary_values (const dealii::DoFHandler &dof_handler, - std::map &boundary_values) + std::map &boundary_values) { const FiniteElement &fe = dof_handler.get_fe(); @@ -404,7 +404,7 @@ namespace VectorTools typename dealii::DoFHandler::active_face_iterator face = dof_handler.begin_active_face(), endf = dof_handler.end_face(); - std::vector face_dof_indices (fe.dofs_per_face); + std::vector face_dof_indices (fe.dofs_per_face); for (; face!=endf; ++face) if (face->at_boundary()) { @@ -548,7 +548,7 @@ namespace VectorTools ExcDimensionMismatch (vec_result.size(), dof.n_dofs())); // make up boundary values - std::map boundary_values; + std::map boundary_values; if (enforce_zero_boundary == true) // no need to project boundary @@ -674,7 +674,7 @@ namespace VectorTools n_q_points = fe_values.n_quadrature_points, n_components = fe.n_components(); - std::vector dofs (dofs_per_cell); + std::vector dofs (dofs_per_cell); Vector cell_vector (dofs_per_cell); typename DoFHandler::active_cell_iterator @@ -797,7 +797,7 @@ namespace VectorTools const unsigned int n_components = fe.n_components(); - std::vector dofs (fe.max_dofs_per_cell()); + std::vector dofs (fe.max_dofs_per_cell()); Vector cell_vector (fe.max_dofs_per_cell()); typename hp::DoFHandler::active_cell_iterator @@ -941,7 +941,7 @@ namespace VectorTools const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell; - std::vector local_dof_indices (dofs_per_cell); + std::vector local_dof_indices (dofs_per_cell); cell_point.first->get_dof_indices (local_dof_indices); for(unsigned int i=0; iget_fe().dofs_per_cell; - std::vector local_dof_indices (dofs_per_cell); + std::vector local_dof_indices (dofs_per_cell); cell_point.first->get_dof_indices (local_dof_indices); for(unsigned int i=0; i local_dof_indices (dofs_per_cell); + std::vector local_dof_indices (dofs_per_cell); cell_point.first->get_dof_indices (local_dof_indices); for(unsigned int i=0; iget_fe().dofs_per_cell; - std::vector local_dof_indices (dofs_per_cell); + std::vector local_dof_indices (dofs_per_cell); cell_point.first->get_dof_indices (local_dof_indices); for(unsigned int i=0; i dofs (dofs_per_cell); + std::vector dofs (dofs_per_cell); Vector cell_vector (dofs_per_cell); typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), @@ -1332,7 +1332,7 @@ namespace VectorTools const unsigned int n_components = fe.n_components(); - std::vector dofs (fe.max_dofs_per_cell()); + std::vector dofs (fe.max_dofs_per_cell()); Vector cell_vector (fe.max_dofs_per_cell()); typename hp::DoFHandler::active_cell_iterator @@ -1476,7 +1476,7 @@ namespace VectorTools void interpolate_boundary_values (const Mapping &, const DH &dof, const typename FunctionMap::type &function_map, - std::map &boundary_values, + std::map &boundary_values, const std::vector &component_mask_, const dealii::internal::int2type<1>) { @@ -1567,7 +1567,7 @@ namespace VectorTools interpolate_boundary_values (const Mapping &mapping, const DH &dof, const typename FunctionMap::type &function_map, - std::map &boundary_values, + std::map &boundary_values, const std::vector &component_mask_, const dealii::internal::int2type) { @@ -1608,7 +1608,7 @@ namespace VectorTools ExcNoComponentSelected()); // field to store the indices - std::vector face_dofs; + std::vector face_dofs; face_dofs.reserve (DoFTools::max_dofs_per_face(dof)); std::vector > dof_locations; @@ -1926,7 +1926,7 @@ namespace VectorTools interpolate_boundary_values (const Mapping &mapping, const DH &dof, const typename FunctionMap::type &function_map, - std::map &boundary_values, + std::map &boundary_values, const std::vector &component_mask_) { internal:: @@ -1943,7 +1943,7 @@ namespace VectorTools const DH &dof, const types::boundary_id_t boundary_component, const Function &boundary_function, - std::map &boundary_values, + std::map &boundary_values, const std::vector &component_mask) { typename FunctionMap::type function_map; @@ -1959,7 +1959,7 @@ namespace VectorTools interpolate_boundary_values (const DH &dof, const types::boundary_id_t boundary_component, const Function &boundary_function, - std::map &boundary_values, + std::map &boundary_values, const std::vector &component_mask) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); @@ -1974,7 +1974,7 @@ namespace VectorTools void interpolate_boundary_values (const DH &dof, const typename FunctionMap::type &function_map, - std::map &boundary_values, + std::map &boundary_values, const std::vector &component_mask) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); @@ -1999,10 +1999,10 @@ namespace VectorTools ConstraintMatrix &constraints, const std::vector &component_mask_) { - std::map boundary_values; + std::map boundary_values; interpolate_boundary_values (mapping, dof, function_map, boundary_values, component_mask_); - std::map::const_iterator boundary_value = + std::map::const_iterator boundary_value = boundary_values.begin(); for ( ; boundary_value !=boundary_values.end(); ++boundary_value) { @@ -2081,7 +2081,7 @@ namespace VectorTools const DoFHandler<1,1> &dof, const FunctionMap<1>::type &boundary_functions, const Quadrature<0> &, - std::map &boundary_values, + std::map &boundary_values, std::vector component_mapping) { Assert (component_mapping.size() == 0, ExcNotImplemented()); @@ -2099,7 +2099,7 @@ namespace VectorTools const DoFHandler<1,2> &dof, const FunctionMap<2>::type &boundary_functions, const Quadrature<0> &, - std::map &boundary_values, + std::map &boundary_values, std::vector component_mapping) { Assert (component_mapping.size() == 0, ExcNotImplemented()); @@ -2118,7 +2118,7 @@ namespace VectorTools const DoFHandler&dof, const typename FunctionMap::type &boundary_functions, const Quadrature &q, - std::map &boundary_values, + std::map &boundary_values, std::vector component_mapping) { //TODO:[?] In project_boundary_values, no condensation of sparsity @@ -2140,7 +2140,7 @@ namespace VectorTools else AssertDimension (dof.get_fe().n_components(), component_mapping.size()); - std::vector dof_to_boundary_mapping; + std::vector dof_to_boundary_mapping; std::set selected_boundary_components; for (typename FunctionMap::type::const_iterator i=boundary_functions.begin(); i!=boundary_functions.end(); ++i) @@ -2283,7 +2283,7 @@ namespace VectorTools project_boundary_values (const DoFHandler &dof, const typename FunctionMap::type &boundary_functions, const Quadrature &q, - std::map &boundary_values, + std::map &boundary_values, std::vector component_mapping) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); @@ -2306,10 +2306,10 @@ namespace VectorTools ConstraintMatrix &constraints, std::vector component_mapping) { - std::map boundary_values; + std::map boundary_values; project_boundary_values (mapping, dof, boundary_functions, q, boundary_values, component_mapping); - std::map::const_iterator boundary_value = + std::map::const_iterator boundary_value = boundary_values.begin(); for ( ; boundary_value !=boundary_values.end(); ++boundary_value) { @@ -2351,7 +2351,7 @@ namespace VectorTools template struct VectorDoFTuple { - unsigned int dof_indices[dim]; + types::global_dof_index dof_indices[dim]; VectorDoFTuple () { @@ -2622,7 +2622,7 @@ namespace VectorTools // vector t is largest by // magnitude, then // x1=t[1]/t[0]*x_0, etc. - unsigned int largest_component = 0; + types::global_dof_index largest_component = 0; for (unsigned int d=1; d std::fabs(tangent_vector[largest_component]) + 1e-10) largest_component = d; @@ -3547,7 +3547,7 @@ namespace VectorTools update_quadrature_points | update_values); std::vector dof_values; - std::vector face_dof_indices; + std::vector face_dof_indices; typename hp::DoFHandler::active_cell_iterator cell = dof_handler.begin_active (); switch (dim) @@ -3803,7 +3803,7 @@ namespace VectorTools * fe_values[vec].value (fe.face_to_cell_index (i, face), q_point)); } - std::vector face_dof_indices (fe.dofs_per_face); + std::vector face_dof_indices (fe.dofs_per_face); cell->face (face)->get_dof_indices (face_dof_indices, cell->active_fe_index ()); @@ -3850,7 +3850,7 @@ namespace VectorTools const Function<3>& boundary_function, const std::vector >& jacobians, std::vector& dof_values, - std::vector& projected_dofs) + std::vector& projected_dofs) { // Compute the intergral over // the product of the normal @@ -3906,7 +3906,7 @@ namespace VectorTools * fe_values[vec].value (fe.face_to_cell_index (i, face), q_point)); } - std::vector face_dof_indices (fe.dofs_per_face); + std::vector face_dof_indices (fe.dofs_per_face); cell->face (face)->get_dof_indices (face_dof_indices, cell->active_fe_index ()); @@ -4045,7 +4045,7 @@ namespace VectorTools // compute a second one. const unsigned int& n_dofs = dof_handler.n_dofs (); std::vector dof_values (n_dofs); - std::vector projected_dofs (n_dofs); + std::vector projected_dofs (n_dofs); for (unsigned int dof = 0; dof < n_dofs; ++dof) projected_dofs[dof] = 0; @@ -4182,7 +4182,7 @@ namespace VectorTools { const unsigned int& n_dofs = dof_handler.n_dofs (); std::vector dof_values (n_dofs); - std::vector projected_dofs (n_dofs); + std::vector projected_dofs (n_dofs); for (unsigned int dof = 0; dof < n_dofs; ++dof) projected_dofs[dof] = 0; @@ -4254,7 +4254,7 @@ namespace VectorTools "to imposing Dirichlet values on the vector-valued " "quantity.")); - std::vector face_dofs; + std::vector face_dofs; // create FE and mapping // collections for all elements in diff --git a/deal.II/source/numerics/point_value_history.cc b/deal.II/source/numerics/point_value_history.cc index daab651e37..812b048bb8 100644 --- a/deal.II/source/numerics/point_value_history.cc +++ b/deal.II/source/numerics/point_value_history.cc @@ -268,7 +268,7 @@ void PointValueHistory } - std::vector + std::vector local_dof_indices (dof_handler->get_fe ().dofs_per_cell); std::vector new_solution_indices; current_cell->get_dof_indices (local_dof_indices); diff --git a/deal.II/source/numerics/solution_transfer.cc b/deal.II/source/numerics/solution_transfer.cc index c449e9384b..341dc3092f 100644 --- a/deal.II/source/numerics/solution_transfer.cc +++ b/deal.II/source/numerics/solution_transfer.cc @@ -497,7 +497,7 @@ interpolate (const std::vector &all_in, " at the same time!")); Vector local_values; - std::vector dofs; + std::vector dofs; typename std::map, Pointerstruct>::const_iterator pointerstruct,