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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
BodyForce<dim> body_force;
std::vector<Vector<double> > body_force_values (n_q_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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
// Next, we again have to loop over all cells and assemble local
// contributions. Note, that a cell is a quadrilateral in two space
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
typename DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active(),
endc = dof_handler.end();
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
// Here is one difference: for this program, we will again use a constant
// right hand side function and zero boundary values, but a variable
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values (n_q_points);
--- /dev/null
+TH: things to check:
+1. std::accumulate with different data types
+2. numbers::invalid_unsigned_int
+
+UWE source/base/auto_derivative_function.cc
+UWE source/base/boost_serialization.cc
+UWE source/base/boost_threads.cc
+UWE source/base/conditional_ostream.cc
+UWE source/base/config.cc
+UWE source/base/convergence_table.cc
+UWE source/base/data_out_base.cc
+UWE source/base/event.cc
+UWE source/base/exceptions.cc
+UWE source/base/flow_function.cc
+UWE source/base/function.cc
+UWE source/base/function_derivative.cc
+UWE source/base/function_lib.cc
+UWE source/base/function_lib_cutoff.cc
+UWE source/base/function_parser.cc
+UWE source/base/function_time.cc
+UWE source/base/geometry_info.cc
+NATASHA source/base/index_set.cc
+GK source/base/job_identifier.cc
+GK source/base/logstream.cc
+BRUNO source/base/memory_consumption.cc
+BRUNO source/base/mpi.cc
+BRUNO source/base/multithread_info.cc
+BRUNO source/base/parallel.cc
+BRUNO source/base/parameter_handler.cc
+BRUNO source/base/parsed_function.cc
+BRUNO source/base/partitioner.cc
+BRUNO source/base/path_search.cc
+BRUNO source/base/polynomial.cc
+BRUNO source/base/polynomials_abf.cc
+BRUNO source/base/polynomials_adini.cc
+BRUNO source/base/polynomials_bdm.cc
+BRUNO source/base/polynomials_nedelec.cc
+BRUNO source/base/polynomial_space.cc
+BRUNO source/base/polynomials_p.cc
+BRUNO source/base/polynomials_raviart_thomas.cc
+BRUNO source/base/quadrature.cc
+BRUNO source/base/quadrature_lib.cc
+BRUNO source/base/quadrature_selector.cc
+BRUNO source/base/subscriptor.cc
+BRUNO source/base/symmetric_tensor.cc
+BRUNO source/base/table_handler.cc
+BRUNO source/base/tensor_function.cc
+BRUNO source/base/tensor_product_polynomials.cc
+BRUNO source/base/thread_management.cc
+BRUNO source/base/timer.cc
+BRUNO source/base/utilities.cc
+TIMO source/distributed/grid_refinement.cc
+TIMO source/distributed/solution_transfer.cc
+TIMO source/distributed/tria.cc
+MARKUS source/dofs/block_info.cc
+TIMO source/dofs/dof_accessor.cc
+UWE source/dofs/dof_faces.cc
+MARKUS source/dofs/dof_handler.cc
+TIMO source/dofs/dof_handler_policy.cc
+UWE source/dofs/dof_levels.cc
+UWE source/dofs/dof_objects.cc
+HELENE source/dofs/dof_renumbering.cc
+UWE source/dofs/dof_tools.cc
+TIMO source/dofs/number_cache.cc
+BRUNO source/fe/fe_abf.cc
+BRUNO source/fe/fe_bdm.cc
+GK source/fe/fe.cc
+KAINAN source/fe/fe_data.cc
+BRUNO source/fe/fe_dgp.cc
+BRUNO source/fe/fe_dgp_monomial.cc
+BRUNO source/fe/fe_dgp_nonparametric.cc
+BRUNO source/fe/fe_dgq.cc
+BRUNO source/fe/fe_dg_vector.cc
+KAINAN source/fe/fe_face.cc
+KAINAN source/fe/fe_nedelec.cc
+KAINAN source/fe/fe_nothing.cc
+KAINAN source/fe/fe_poly.cc
+KAINAN source/fe/fe_poly_tensor.cc
+KAINAN source/fe/fe_q.cc
+KAINAN source/fe/fe_q_hierarchical.cc
+KAINAN source/fe/fe_raviart_thomas.cc
+KAINAN source/fe/fe_raviart_thomas_nodal.cc
+KAINAN source/fe/fe_system.cc
+GK source/fe/fe_tools.cc
+GK source/fe/fe_values.cc
+KAINAN source/fe/mapping_c1.cc
+KAINAN source/fe/mapping_cartesian.cc
+KAINAN source/fe/mapping.cc
+KAINAN source/fe/mapping_q1.cc
+KAINAN source/fe/mapping_q1_eulerian.cc
+KAINAN source/fe/mapping_q.cc
+KAINAN source/fe/mapping_q_eulerian.cc
+source/grid/grid_generator.cc
+source/grid/grid_in.cc
+source/grid/grid_out.cc
+source/grid/grid_refinement.cc
+source/grid/grid_reordering.cc
+source/grid/grid_tools.cc
+source/grid/intergrid_map.cc
+source/grid/persistent_tria.cc
+source/grid/tria_accessor.cc
+source/grid/tria_boundary.cc
+source/grid/tria_boundary_lib.cc
+BRUNO source/grid/tria.cc
+BRUNO source/grid/tria_faces.cc
+BRUNO source/grid/tria_levels.cc
+BRUNO source/grid/tria_objects.cc
+MARKUS source/hp/dof_faces.cc
+MARKUS source/hp/dof_handler.cc
+NATASHA source/hp/dof_levels.cc
+NATASHA source/hp/dof_objects.cc
+BRUNO source/hp/fe_collection.cc
+MARKUS source/hp/fe_values.cc
+BRUNO source/hp/mapping_collection.cc
+source/lac/block_matrix_array.cc
+MARKUS source/lac/block_sparse_matrix.cc
+MARKUS source/lac/block_sparse_matrix_ez.cc
+MARKUS source/lac/block_sparsity_pattern.cc
+MARKUS source/lac/block_vector.cc
+MARKUS source/lac/chunk_sparse_matrix.cc
+MARKUS source/lac/chunk_sparsity_pattern.cc
+MARKUS source/lac/compressed_set_sparsity_pattern.cc
+MARKUS source/lac/compressed_simple_sparsity_pattern.cc
+MARKUS source/lac/compressed_sparsity_pattern.cc
+WOLFGANG source/lac/constraint_matrix.cc
+source/lac/full_matrix.cc
+source/lac/lapack_full_matrix.cc
+source/lac/matrix_lib.cc
+source/lac/matrix_out.cc
+source/lac/operator.cc
+MARKUS source/lac/parallel_vector.cc
+source/lac/petsc_block_sparse_matrix.cc
+source/lac/petsc_full_matrix.cc
+source/lac/petsc_matrix_base.cc
+source/lac/petsc_parallel_block_sparse_matrix.cc
+source/lac/petsc_parallel_block_vector.cc
+source/lac/petsc_parallel_sparse_matrix.cc
+source/lac/petsc_parallel_vector.cc
+source/lac/petsc_precondition.cc
+source/lac/petsc_solver.cc
+source/lac/petsc_sparse_matrix.cc
+source/lac/petsc_vector_base.cc
+source/lac/petsc_vector.cc
+source/lac/precondition_block.cc
+source/lac/precondition_block_ez.cc
+source/lac/relaxation_block.cc
+source/lac/slepc_solver.cc
+source/lac/slepc_spectral_transformation.cc
+source/lac/solver.cc
+source/lac/solver_control.cc
+source/lac/sparse_decomposition.cc
+source/lac/sparse_direct.cc
+source/lac/sparse_ilu.cc
+source/lac/sparse_matrix.cc
+source/lac/sparse_matrix_ez.cc
+source/lac/sparse_mic.cc
+source/lac/sparse_vanka.cc
+source/lac/sparsity_pattern.cc
+source/lac/sparsity_tools.cc
+source/lac/swappable_vector.cc
+source/lac/timestep_control.cc
+source/lac/tridiagonal_matrix.cc
+source/lac/trilinos_block_sparse_matrix.cc
+source/lac/trilinos_block_vector.cc
+source/lac/trilinos_precondition.cc
+source/lac/trilinos_solver.cc
+source/lac/trilinos_sparse_matrix.cc
+source/lac/trilinos_sparsity_pattern.cc
+source/lac/trilinos_vector_base.cc
+source/lac/trilinos_vector.cc
+source/lac/vector.cc
+source/lac/vector_memory.cc
+source/lac/vector_view.cc
+source/multigrid/mg_base.cc
+source/multigrid/mg_dof_accessor.cc
+source/multigrid/mg_dof_handler.cc
+source/multigrid/mg_tools.cc
+source/multigrid/mg_transfer_block.cc
+source/multigrid/mg_transfer_component.cc
+source/multigrid/mg_transfer_prebuilt.cc
+source/multigrid/multigrid.cc
+UWE source/numerics/data_out.cc
+UWE source/numerics/data_out_faces.cc
+UWE source/numerics/data_out_rotation.cc
+UWE source/numerics/data_out_stack.cc
+UWE source/numerics/data_postprocessor.cc
+UWE source/numerics/derivative_approximation.cc
+UWE source/numerics/dof_output_operator.cc
+UWE source/numerics/error_estimator.cc
+UWE source/numerics/fe_field_function.cc
+UWE source/numerics/histogram.cc
+UWE source/numerics/matrix_free.cc
+UWE source/numerics/matrix_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
+UWE include/deal.II/algorithms/newton.h
+UWE include/deal.II/algorithms/newton.templates.h
+UWE include/deal.II/algorithms/operator.h
+UWE include/deal.II/algorithms/operator.templates.h
+UWE include/deal.II/algorithms/theta_timestepping.h
+UWE include/deal.II/algorithms/theta_timestepping.templates.h
+UWE include/deal.II/algorithms/timestep_control.h
+UWE include/deal.II/base/auto_derivative_function.h
+UWE include/deal.II/base/conditional_ostream.h
+UWE include/deal.II/base/convergence_table.h
+UWE include/deal.II/base/data_out_base.h
+UWE include/deal.II/base/derivative_form.h
+UWE include/deal.II/base/event.h
+UWE include/deal.II/base/exceptions.h
+UWE include/deal.II/base/flow_function.h
+UWE include/deal.II/base/function_bessel.h
+UWE include/deal.II/base/function_derivative.h
+UWE include/deal.II/base/function.h
+UWE include/deal.II/base/function_lib.h
+UWE include/deal.II/base/function_parser.h
+UWE include/deal.II/base/function_time.h
+UWE include/deal.II/base/geometry_info.h
+NATASHA include/deal.II/base/index_set.h
+GK include/deal.II/base/job_identifier.h
+GK include/deal.II/base/logstream.h
+BRUNO include/deal.II/base/memory_consumption.h
+BRUNO include/deal.II/base/mg_level_object.h
+BRUNO include/deal.II/base/mpi.h
+BRUNO include/deal.II/base/multithread_info.h
+BRUNO include/deal.II/base/named_data.h
+BRUNO include/deal.II/base/numbers.h
+BRUNO include/deal.II/base/parallel.h
+BRUNO include/deal.II/base/parameter_handler.h
+BRUNO include/deal.II/base/parsed_function.h
+BRUNO include/deal.II/base/partitioner.h
+BRUNO include/deal.II/base/path_search.h
+BRUNO include/deal.II/base/point.h
+BRUNO include/deal.II/base/polynomial.h
+BRUNO include/deal.II/base/polynomials_abf.h
+BRUNO include/deal.II/base/polynomials_adini.h
+BRUNO include/deal.II/base/polynomials_bdm.h
+BRUNO include/deal.II/base/polynomials_nedelec.h
+BRUNO include/deal.II/base/polynomial_space.h
+BRUNO include/deal.II/base/polynomials_p.h
+BRUNO include/deal.II/base/polynomials_raviart_thomas.h
+BRUNO include/deal.II/base/qprojector.h
+BRUNO include/deal.II/base/quadrature.h
+BRUNO include/deal.II/base/quadrature_lib.h
+BRUNO include/deal.II/base/quadrature_selector.h
+BRUNO include/deal.II/base/smartpointer.h
+BRUNO include/deal.II/base/subscriptor.h
+BRUNO include/deal.II/base/symmetric_tensor.h
+BRUNO include/deal.II/base/synchronous_iterator.h
+BRUNO include/deal.II/base/table.h
+BRUNO include/deal.II/base/table_handler.h
+BRUNO include/deal.II/base/table_indices.h
+BRUNO include/deal.II/base/template_constraints.h
+BRUNO include/deal.II/base/tensor_base.h
+BRUNO include/deal.II/base/tensor_function.h
+BRUNO include/deal.II/base/tensor.h
+BRUNO include/deal.II/base/tensor_product_polynomials.h
+BRUNO include/deal.II/base/thread_local_storage.h
+BRUNO include/deal.II/base/thread_management.h
+BRUNO include/deal.II/base/timer.h
+BRUNO include/deal.II/base/types.h
+BRUNO include/deal.II/base/utilities.h
+BRUNO include/deal.II/base/vectorization.h
+BRUNO include/deal.II/base/vector_slice.h
+BRUNO include/deal.II/base/work_stream.h
+TIMO include/deal.II/distributed/grid_refinement.h
+TIMO include/deal.II/distributed/solution_transfer.h
+TIMO include/deal.II/distributed/tria.h
+MARKUS include/deal.II/dofs/block_info.h
+TIMO include/deal.II/dofs/dof_accessor.h
+TIMO include/deal.II/dofs/dof_accessor.templates.h
+include/deal.II/dofs/dof_constraints.h
+UWE include/deal.II/dofs/dof_faces.h
+MARKUS include/deal.II/dofs/dof_handler.h
+TIMO include/deal.II/dofs/dof_handler_policy.h
+include/deal.II/dofs/dof_iterator_selector.h
+UWE include/deal.II/dofs/dof_levels.h
+UWE include/deal.II/dofs/dof_objects.h
+HELENE include/deal.II/dofs/dof_renumbering.h
+UWE include/deal.II/dofs/dof_tools.h
+include/deal.II/dofs/function_map.h
+TIMO include/deal.II/dofs/number_cache.h
+GK include/deal.II/fe/fe_abf.h
+GK include/deal.II/fe/fe_base.h
+GK include/deal.II/fe/fe_bdm.h
+GK include/deal.II/fe/fe_dgp.h
+GK include/deal.II/fe/fe_dgp_monomial.h
+GK include/deal.II/fe/fe_dgp_nonparametric.h
+GK include/deal.II/fe/fe_dgq.h
+GK include/deal.II/fe/fe_dg_vector.h
+GK include/deal.II/fe/fe_dg_vector.templates.h
+GK include/deal.II/fe/fe_face.h
+GK include/deal.II/fe/fe.h
+GK include/deal.II/fe/fe_nedelec.h
+GK include/deal.II/fe/fe_nothing.h
+GK include/deal.II/fe/fe_poly_face.h
+GK include/deal.II/fe/fe_poly_face.templates.h
+KAINAN include/deal.II/fe/fe_poly.h
+KAINAN include/deal.II/fe/fe_poly.templates.h
+KAINAN include/deal.II/fe/fe_poly_tensor.h
+KAINAN include/deal.II/fe/fe_q.h
+KAINAN include/deal.II/fe/fe_q_hierarchical.h
+KAINAN include/deal.II/fe/fe_raviart_thomas.h
+KAINAN include/deal.II/fe/fe_system.h
+GK include/deal.II/fe/fe_tools.h
+KAINAN include/deal.II/fe/fe_update_flags.h
+GK include/deal.II/fe/fe_values.h
+KAINAN include/deal.II/fe/mapping_c1.h
+KAINAN include/deal.II/fe/mapping_cartesian.h
+KAINAN include/deal.II/fe/mapping.h
+KAINAN include/deal.II/fe/mapping_q1_eulerian.h
+KAINAN include/deal.II/fe/mapping_q1.h
+KAINAN include/deal.II/fe/mapping_q_eulerian.h
+KAINAN include/deal.II/fe/mapping_q.h
+include/deal.II/grid/filtered_iterator.h
+include/deal.II/grid/geometry_info.h
+include/deal.II/grid/grid_generator.h
+include/deal.II/grid/grid_in.h
+include/deal.II/grid/grid_out.h
+include/deal.II/grid/grid_refinement.h
+include/deal.II/grid/grid_reordering.h
+include/deal.II/grid/grid_reordering_internal.h
+include/deal.II/grid/grid_tools.h
+include/deal.II/grid/intergrid_map.h
+include/deal.II/grid/magic_numbers.h
+include/deal.II/grid/persistent_tria.h
+include/deal.II/grid/tria_accessor.h
+include/deal.II/grid/tria_accessor.templates.h
+include/deal.II/grid/tria_boundary.h
+include/deal.II/grid/tria_boundary_lib.h
+BRUNO include/deal.II/grid/tria_faces.h
+BRUNO include/deal.II/grid/tria.h
+BRUNO include/deal.II/grid/tria_iterator_base.h
+BRUNO include/deal.II/grid/tria_iterator.h
+BRUNO include/deal.II/grid/tria_iterator_selector.h
+BRUNO include/deal.II/grid/tria_iterator.templates.h
+BRUNO include/deal.II/grid/tria_levels.h
+BRUNO include/deal.II/grid/tria_object.h
+BRUNO include/deal.II/grid/tria_objects.h
+MARKUS include/deal.II/hp/dof_faces.h
+MARKUS include/deal.II/hp/dof_handler.h
+NATASHA include/deal.II/hp/dof_levels.h
+NATASHA include/deal.II/hp/dof_objects.h
+BRUNO include/deal.II/hp/fe_collection.h
+MARKUS include/deal.II/hp/fe_values.h
+BRUNO include/deal.II/hp/mapping_collection.h
+BRUNO include/deal.II/hp/q_collection.h
+BRUNO include/deal.II/integrators/divergence.h
+BRUNO include/deal.II/integrators/elasticity.h
+BRUNO include/deal.II/integrators/l2.h
+BRUNO include/deal.II/integrators/laplace.h
+BRUNO include/deal.II/integrators/local_integrators.h
+BRUNO include/deal.II/integrators/maxwell.h
+BRUNO include/deal.II/integrators/patches.h
+include/deal.II/lac/arpack_solver.h
+include/deal.II/lac/block_indices.h
+include/deal.II/lac/block_list.h
+include/deal.II/lac/block_matrix_array.h
+include/deal.II/lac/block_matrix_base.h
+include/deal.II/lac/block_matrix.h
+MARKUS include/deal.II/lac/block_sparse_matrix_ez.h
+MARKUS include/deal.II/lac/block_sparse_matrix_ez.templates.h
+MARKUS include/deal.II/lac/block_sparse_matrix.h
+MARKUS include/deal.II/lac/block_sparse_matrix.templates.h
+MARKUS include/deal.II/lac/block_sparsity_pattern.h
+MARKUS include/deal.II/lac/block_vector_base.h
+MARKUS include/deal.II/lac/block_vector.h
+MARKUS include/deal.II/lac/block_vector.templates.h
+MARKUS include/deal.II/lac/chunk_sparse_matrix.h
+MARKUS include/deal.II/lac/chunk_sparse_matrix.templates.h
+MARKUS include/deal.II/lac/chunk_sparsity_pattern.h
+MARKUS include/deal.II/lac/compressed_set_sparsity_pattern.h
+MARKUS include/deal.II/lac/compressed_simple_sparsity_pattern.h
+MARKUS include/deal.II/lac/compressed_sparsity_pattern.h
+WOLFGANG include/deal.II/lac/constraint_matrix.h
+WOLFGANG include/deal.II/lac/constraint_matrix.templates.h
+include/deal.II/lac/eigen.h
+include/deal.II/lac/exceptions.h
+include/deal.II/lac/filtered_matrix.h
+include/deal.II/lac/full_matrix.h
+include/deal.II/lac/full_matrix.templates.h
+include/deal.II/lac/householder.h
+include/deal.II/lac/identity_matrix.h
+include/deal.II/lac/iterative_inverse.h
+include/deal.II/lac/lapack_full_matrix.h
+include/deal.II/lac/lapack_support.h
+include/deal.II/lac/matrix_block.h
+include/deal.II/lac/matrix_iterator.h
+include/deal.II/lac/matrix_lib.h
+include/deal.II/lac/matrix_lib.templates.h
+include/deal.II/lac/matrix_out.h
+MARKUS include/deal.II/lac/parallel_block_vector.h
+MARKUS include/deal.II/lac/parallel_vector.h
+MARKUS include/deal.II/lac/parallel_vector.templates.h
+include/deal.II/lac/petsc_block_sparse_matrix.h
+include/deal.II/lac/petsc_block_vector.h
+include/deal.II/lac/petsc_full_matrix.h
+include/deal.II/lac/petsc_matrix_base.h
+include/deal.II/lac/petsc_parallel_block_sparse_matrix.h
+include/deal.II/lac/petsc_parallel_block_vector.h
+include/deal.II/lac/petsc_parallel_sparse_matrix.h
+include/deal.II/lac/petsc_parallel_vector.h
+include/deal.II/lac/petsc_precondition.h
+include/deal.II/lac/petsc_solver.h
+include/deal.II/lac/petsc_sparse_matrix.h
+include/deal.II/lac/petsc_vector_base.h
+include/deal.II/lac/petsc_vector.h
+include/deal.II/lac/pointer_matrix.h
+include/deal.II/lac/precondition_block_base.h
+include/deal.II/lac/precondition_block.h
+include/deal.II/lac/precondition_block.templates.h
+include/deal.II/lac/precondition.h
+include/deal.II/lac/precondition_selector.h
+include/deal.II/lac/relaxation_block.h
+include/deal.II/lac/relaxation_block.templates.h
+include/deal.II/lac/schur_matrix.h
+include/deal.II/lac/shifted_matrix.h
+include/deal.II/lac/slepc_solver.h
+include/deal.II/lac/slepc_spectral_transformation.h
+include/deal.II/lac/solver_bicgstab.h
+include/deal.II/lac/solver_cg.h
+include/deal.II/lac/solver_control.h
+include/deal.II/lac/solver_gmres.h
+include/deal.II/lac/solver.h
+include/deal.II/lac/solver_minres.h
+include/deal.II/lac/solver_qmrs.h
+include/deal.II/lac/solver_relaxation.h
+include/deal.II/lac/solver_richardson.h
+include/deal.II/lac/solver_selector.h
+include/deal.II/lac/sparse_decomposition.h
+include/deal.II/lac/sparse_decomposition.templates.h
+include/deal.II/lac/sparse_direct.h
+include/deal.II/lac/sparse_ilu.h
+include/deal.II/lac/sparse_ilu.templates.h
+include/deal.II/lac/sparse_matrix_ez.h
+include/deal.II/lac/sparse_matrix_ez.templates.h
+include/deal.II/lac/sparse_matrix.h
+include/deal.II/lac/sparse_matrix.templates.h
+include/deal.II/lac/sparse_mic.h
+include/deal.II/lac/sparse_mic.templates.h
+include/deal.II/lac/sparse_vanka.h
+include/deal.II/lac/sparse_vanka.templates.h
+include/deal.II/lac/sparsity_pattern.h
+include/deal.II/lac/sparsity_tools.h
+include/deal.II/lac/swappable_vector.h
+include/deal.II/lac/swappable_vector.templates.h
+include/deal.II/lac/transpose_matrix.h
+include/deal.II/lac/tridiagonal_matrix.h
+include/deal.II/lac/trilinos_block_sparse_matrix.h
+include/deal.II/lac/trilinos_block_vector.h
+include/deal.II/lac/trilinos_parallel_block_vector.h
+include/deal.II/lac/trilinos_precondition.h
+include/deal.II/lac/trilinos_solver.h
+include/deal.II/lac/trilinos_sparse_matrix.h
+include/deal.II/lac/trilinos_sparsity_pattern.h
+include/deal.II/lac/trilinos_vector_base.h
+include/deal.II/lac/trilinos_vector.h
+include/deal.II/lac/vector.h
+include/deal.II/lac/vector_memory.h
+include/deal.II/lac/vector.templates.h
+include/deal.II/lac/vector_view.h
+KAINAN include/deal.II/matrix_free/dof_info.h
+KAINAN include/deal.II/matrix_free/dof_info.templates.h
+BRUNO include/deal.II/matrix_free/fe_evaluation.h
+BRUNO include/deal.II/matrix_free/helper_functions.h
+BRUNO include/deal.II/matrix_free/mapping_info.h
+BRUNO include/deal.II/matrix_free/mapping_info.templates.h
+BRUNO include/deal.II/matrix_free/matrix_free.h
+BRUNO include/deal.II/matrix_free/matrix_free.templates.h
+BRUNO include/deal.II/matrix_free/shape_info.h
+BRUNO include/deal.II/matrix_free/shape_info.templates.h
+WOLFGANG include/deal.II/meshworker/assembler.h
+WOLFGANG include/deal.II/meshworker/dof_info.h
+WOLFGANG include/deal.II/meshworker/dof_info.templates.h
+WOLFGANG include/deal.II/meshworker/functional.h
+BRUNO include/deal.II/meshworker/integration_info.h
+BRUNO include/deal.II/meshworker/integration_info.templates.h
+BRUNO include/deal.II/meshworker/local_results.h
+WOLFGANG include/deal.II/meshworker/loop.h
+WOLFGANG include/deal.II/meshworker/output.h
+BRUNO include/deal.II/meshworker/simple.h
+BRUNO include/deal.II/meshworker/vector_selector.h
+BRUNO include/deal.II/meshworker/vector_selector.templates.h
+include/deal.II/multigrid/mg_base.h
+include/deal.II/multigrid/mg_block_smoother.h
+include/deal.II/multigrid/mg_coarse.h
+include/deal.II/multigrid/mg_constrained_dofs.h
+include/deal.II/multigrid/mg_dof_accessor.h
+include/deal.II/multigrid/mg_dof_handler.h
+include/deal.II/multigrid/mg_dof_iterator_selector.h
+include/deal.II/multigrid/mg_matrix.h
+include/deal.II/multigrid/mg_smoother.h
+include/deal.II/multigrid/mg_tools.h
+include/deal.II/multigrid/mg_transfer_block.h
+include/deal.II/multigrid/mg_transfer_block.templates.h
+include/deal.II/multigrid/mg_transfer_component.h
+include/deal.II/multigrid/mg_transfer_component.templates.h
+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
+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
* overall size of the index
* range.
*/
- explicit IndexSet (const unsigned int size);
+ explicit IndexSet (const types::global_dof_index size);
/**
* Remove all indices from this
* index is an element of the
* index set.
*/
- bool is_element (const unsigned int index) const;
+ bool is_element (const types::global_dof_index index) const;
/**
* Return whether the index set
* Return the number of elements
* stored in this index set.
*/
- unsigned int n_elements () const;
+ types::global_dof_index n_elements () const;
/**
* Return the global index of the local
* local_index obviously needs to be less
* than n_elements().
*/
- unsigned int nth_index_in_set (const unsigned int local_index) const;
+ types::global_dof_index nth_index_in_set (const unsigned int local_index) const;
/**
* Return the how-manyth element of this
* a member of this index set, i.e. if
* is_element(global_index) is false.
*/
- unsigned int index_within_set (const unsigned int global_index) const;
+ unsigned int index_within_set (const types::global_dof_index global_index) const;
/**
* Each index set can be
* to the range <tt>[0,
* end-begin)</tt>.
*/
- IndexSet get_view (const unsigned int begin,
- const unsigned int end) const;
+ IndexSet get_view (const types::global_dof_index begin,
+ const types::global_dof_index end) const;
/**
* Fills the given vector with all
* indices contained in this IndexSet.
*/
- void fill_index_vector(std::vector<unsigned int> &indices) const;
+ void fill_index_vector(std::vector<types::global_dof_index> &indices) const;
/**
* Fill the given vector with either
*/
struct Range
{
- unsigned int begin;
- unsigned int end;
+ types::global_dof_index begin;
+ types::global_dof_index end;
- unsigned int nth_index_in_set;
+ types::global_dof_index nth_index_in_set;
/**
* Default constructor. Since there is no useful choice for
* @param i1 Left end point of the interval.
* @param i2 First index greater than the last index of the indicated range.
**/
- Range (const unsigned int i1,
- const unsigned int i2);
+ Range (const types::global_dof_index i1,
+ const types::global_dof_index i2);
friend
inline bool operator< (const Range &range_1,
inline
-IndexSet::Range::Range (const unsigned int i1,
- const unsigned int i2)
+IndexSet::Range::Range (const types::global_dof_index i1,
+ const types::global_dof_index i2)
:
begin(i1),
end(i2)
inline
-IndexSet::IndexSet (const unsigned int size)
+IndexSet::IndexSet (const types::global_dof_index size)
:
is_compressed (true),
index_space_size (size),
inline
void
-IndexSet::add_range (const unsigned int begin,
- const unsigned int end)
+IndexSet::add_range (const types::global_dof_index begin,
+ const types::global_dof_index end)
{
Assert ((begin < index_space_size)
||
inline
void
-IndexSet::add_index (const unsigned int index)
+IndexSet::add_index (const types::global_dof_index index)
{
Assert (index < index_space_size,
ExcIndexRange (index, 0, index_space_size));
// range
for (ForwardIterator p=begin; p!=end;)
{
- const unsigned int begin_index = *p;
- unsigned int end_index = begin_index + 1;
+ const types::global_dof_index begin_index = *p;
+ types::global_dof_index end_index = begin_index + 1;
ForwardIterator q = p;
++q;
while ((q != end) && (*q == end_index))
inline
bool
-IndexSet::is_element (const unsigned int index) const
+IndexSet::is_element (const types::global_dof_index index) const
{
if (ranges.empty() == false)
{
inline
-unsigned int
+types::global_dof_index
IndexSet::n_elements () const
{
// make sure we have
inline
unsigned int
-IndexSet::nth_index_in_set (const unsigned int n) const
+IndexSet::nth_index_in_set (const types::global_dof_index n) const
{
// to make this call thread-safe, compress()
// must not be called through this function
inline
-unsigned int
+types::global_dof_index
IndexSet::index_within_set (const unsigned int n) const
{
// to make this call thread-safe, compress()
* set_numbering() function.
*
* The standard ordering of polynomials is that indices for the first
- * space dimension vasry fastest and the last space dimension is
+ * space dimension vary fastest and the last space dimension is
* slowest. In particular, if we take for simplicity the vector of
* monomials <i>x<sup>0</sup>, x<sup>1</sup>, x<sup>2</sup>,...,
* x<sup>n</sup></i>, we get
};
//TODO: Remove the default arguments and trickery below and put all
-//the constructors into the class demplate
+//the constructors into the class template
/**
* Array of indices of fixed size used for the TableBase
//---------------------------------------------------------------------------
// $Id$
//
-// Copyright (C) 2009, 2012 by the deal.II authors
+// Copyright (C) 2009, 2012, 2013 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
#include <deal.II/base/config.h>
-
DEAL_II_NAMESPACE_OPEN
/**
*/
const unsigned int artificial_subdomain_id DEAL_II_DEPRECATED = static_cast<subdomain_id>(-2);
+//#define DEAL_II_USE_LARGE_INDEX_TYPE
+#ifdef DEAL_II_USE_LARGE_INDEX_TYPE
+ /**
+ * The type used for global indices of
+ * degrees of freedom. While in sequential
+ * computations the 4 billion indices of
+ * 32-bit unsigned integers is plenty,
+ * parallel computations using the
+ * parallel::distributed::Triangulation
+ * class can overflow this number and we
+ * need a bigger index space.
+ *
+ * The data type always indicates an
+ * unsigned integer type.
+ */
+ // TODO: we should check that unsigned long long int
+ // has the same size as uint64_t
+ typedef unsigned long long int global_dof_index;
+
+ /**
+ * An identifier that denotes the MPI type
+ * associated with types::global_dof_index.
+ */
+# define DEAL_II_DOF_INDEX_MPI_TYPE MPI_UNSIGNED_LONG_LONG
+#else
/**
- * The type used to denote global dof
- * indices.
+ * The type used for global indices of
+ * degrees of freedom. While in sequential
+ * computations the 4 billion indices of
+ * 32-bit unsigned integers is plenty,
+ * parallel computations using the
+ * parallel::distributed::Triangulation
+ * class can overflow this number and we
+ * need a bigger index space.
+ *
+ * The data type always indicates an
+ * unsigned integer type.
*/
- typedef unsigned int global_dof_index;
+ typedef unsigned int global_dof_index;
+
+ /**
+ * An identifier that denotes the MPI type
+ * associated with types::global_dof_index.
+ */
+# define DEAL_II_DOF_INDEX_MPI_TYPE MPI_UNSIGNED
+#endif
+
/**
- * @deprecated Use numbers::invalid_dof_index
+ * @deprecated Use numbers::invalid_dof_index
*/
const global_dof_index invalid_dof_index DEAL_II_DEPRECATED = static_cast<global_dof_index>(-1);
}
+
// this part of the namespace numbers got moved to the bottom types.h file,
// because otherwise we get a circular inclusion of config.h, types.h, and
// numbers.h
* more information.
*/
const types::subdomain_id artificial_subdomain_id = static_cast<types::subdomain_id>(-2);
-
}
* shared memory. However, some other part of this work may need to be
* synchronised and be done in order. In the example of assembling a matrix,
* the computation of local contributions can be done entirely in parallel,
- * but copying the the local contributions into the global matrix requires
+ * but copying the local contributions into the global matrix requires
* some care: First, several threads can't write at the same time, but need to
* synchronise writing using a mutex; secondly, we want the order in which
* local contributions are added to the global matrix to be always the same
//---------------------------------------------------------------------------
// $Id$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
* <code>cell-@>active_fe_index</code>
* as last argument.
*/
- void get_dof_indices (std::vector<unsigned int> &dof_indices,
+ void get_dof_indices (std::vector<types::global_dof_index> &dof_indices,
const unsigned int fe_index = DH::default_fe_index) const;
- void get_mg_dof_indices (const int level, std::vector<unsigned int> &dof_indices, const unsigned int fe_index = DH::default_fe_index) const;
- void set_mg_dof_indices (const int level, const std::vector<unsigned int> &dof_indices, const unsigned int fe_index = DH::default_fe_index);
+ void get_mg_dof_indices (const int level, std::vector<types::global_dof_index> &dof_indices, const unsigned int fe_index = DH::default_fe_index) const;
+ void set_mg_dof_indices (const int level, const std::vector<types::global_dof_index> &dof_indices, const unsigned int fe_index = DH::default_fe_index);
/**
* Global DoF index of the <i>i</i>
* match the result of
* active_fe_index().
*/
- unsigned int vertex_dof_index (const unsigned int vertex,
- const unsigned int i,
- const unsigned int fe_index = DH::default_fe_index) const;
+ types::global_dof_index vertex_dof_index (const unsigned int vertex,
+ const unsigned int i,
+ const unsigned int fe_index = DH::default_fe_index) const;
- unsigned int mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const unsigned int fe_index = DH::default_fe_index) const;
+ types::global_dof_index mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const unsigned int fe_index = DH::default_fe_index) const;
/**
* Index of the <i>i</i>th degree
* degrees are defined in the interior of
* the face.
*/
- unsigned int dof_index (const unsigned int i,
- const unsigned int fe_index = DH::default_fe_index) const;
+ types::global_dof_index dof_index (const unsigned int i,
+ const unsigned int fe_index = DH::default_fe_index) const;
- unsigned int mg_dof_index (const int level, const unsigned int i) const;
+ types::global_dof_index mg_dof_index (const int level, const unsigned int i) const;
/**
* @}
* active_fe_index().
*/
void set_dof_index (const unsigned int i,
- const unsigned int index,
+ const types::global_dof_index index,
const unsigned int fe_index = DH::default_fe_index) const;
- void set_mg_dof_index (const int level, const unsigned int i, const unsigned int index) const;
+ void set_mg_dof_index (const int level, const unsigned int i, const types::global_dof_index index) const;
/**
* Set the global index of the <i>i</i>
*/
void set_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
- const unsigned int index,
+ const types::global_dof_index index,
const unsigned int fe_index = DH::default_fe_index) const;
- void set_mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const unsigned int index, const unsigned int fe_index = DH::default_fe_index) const;
+ void set_mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const types::global_dof_index index, const unsigned int fe_index = DH::default_fe_index) const;
/**
* Iterator classes need to be friends
* <code>cell-@>active_fe_index</code>
* as last argument.
*/
- void get_dof_indices (std::vector<unsigned int> &dof_indices,
+ void get_dof_indices (std::vector<types::global_dof_index> &dof_indices,
const unsigned int fe_index = AccessorData::default_fe_index) const;
/**
* match the result of
* active_fe_index().
*/
- unsigned int vertex_dof_index (const unsigned int vertex,
- const unsigned int i,
- const unsigned int fe_index = AccessorData::default_fe_index) const;
+ types::global_dof_index vertex_dof_index (const unsigned int vertex,
+ const unsigned int i,
+ const unsigned int fe_index = AccessorData::default_fe_index) const;
/**
* Index of the <i>i</i>th degree
* degrees are defined in the interior of
* the face.
*/
- unsigned int dof_index (const unsigned int i,
- const unsigned int fe_index = AccessorData::default_fe_index) const;
+ types::global_dof_index dof_index (const unsigned int i,
+ const unsigned int fe_index = AccessorData::default_fe_index) const;
/**
* @}
* active_fe_index().
*/
void set_dof_index (const unsigned int i,
- const unsigned int index,
+ const types::global_dof_index index,
const unsigned int fe_index = AccessorData::default_fe_index) const;
/**
*/
void set_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
- const unsigned int index,
+ const types::global_dof_index index,
const unsigned int fe_index = AccessorData::default_fe_index) const;
/**
*
* Examples for this use are in the implementation of DoFRenumbering.
*/
- void dof_indices (std::vector<unsigned int> &dof_indices) const;
+ void dof_indices (std::vector<types::global_dof_index> &dof_indices) const;
/**
* @deprecated Use dof_indices() instead.
*
* @deprecated Currently, this function can also be called for non-active cells, if all degrees of freedom of the FiniteElement are located in vertices. This functionality will vanish in a future release.
*/
- void get_dof_indices (std::vector<unsigned int> &dof_indices) const;
+ void get_dof_indices (std::vector<types::global_dof_index> &dof_indices) const;
/**
* @deprecated Use dof_indices() with level_cell_iterator returned from begin_mg().
*
* Retrieve the global indices of the degrees of freedom on this cell in the level vector associated to the level of the cell.
*/
- void get_mg_dof_indices (std::vector<unsigned int> &dof_indices) const;
+ void get_mg_dof_indices (std::vector<types::global_dof_index> &dof_indices) const;
/**
* @}
* cache, if one exists for the
* given DoF handler class.
*/
- void set_dof_indices (const std::vector<unsigned int> &dof_indices);
- void set_mg_dof_indices (const std::vector<unsigned int> &dof_indices);
+ void set_dof_indices (const std::vector<types::global_dof_index> &dof_indices);
+ void set_mg_dof_indices (const std::vector<types::global_dof_index> &dof_indices);
/**
* Update the cache in which we
//---------------------------------------------------------------------------
// $Id$
//
-// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
#include <deal.II/base/config.h>
+#include <deal.II/base/types.h>
#include <deal.II/lac/constraint_matrix.h>
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_levels.h>
#include <deal.II/grid/tria_iterator.templates.h>
#include <vector>
+#include <limits>
DEAL_II_NAMESPACE_OPEN
*/
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
get_dof_index (const dealii::DoFHandler<1,spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
dealii::internal::int2type<1>,
- const unsigned int global_index)
+ const types::global_dof_index global_index)
{
dof_handler.levels[obj_level]->dof_object.
set_dof_index (dof_handler,
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
get_dof_index (const dealii::DoFHandler<2,spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
dealii::internal::int2type<1>,
- const unsigned int global_index)
+ const types::global_dof_index global_index)
{
// faces have no levels
Assert (obj_level == 0, ExcInternalError());
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
get_dof_index (const dealii::DoFHandler<2,spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
dealii::internal::int2type<2>,
- const unsigned int global_index)
+ const types::global_dof_index global_index)
{
dof_handler.levels[obj_level]->dof_object.
set_dof_index (dof_handler,
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
get_dof_index (const dealii::DoFHandler<3,spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
dealii::internal::int2type<1>,
- const unsigned int global_index)
+ const types::global_dof_index global_index)
{
// faces have no levels
Assert (obj_level == 0, ExcInternalError());
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
get_dof_index (const dealii::DoFHandler<3,spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
dealii::internal::int2type<2>,
- const unsigned int global_index)
+ const types::global_dof_index global_index)
{
// faces have no levels
Assert (obj_level == 0, ExcInternalError());
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
get_dof_index (const dealii::DoFHandler<3,spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
dealii::internal::int2type<3>,
- const unsigned int global_index)
+ const types::global_dof_index global_index)
{
dof_handler.levels[obj_level]->dof_object.
set_dof_index (dof_handler,
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
get_dof_index (const dealii::hp::DoFHandler<1,spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
const dealii::internal::int2type<1> &,
- const unsigned int global_index)
+ const types::global_dof_index global_index)
{
dof_handler.levels[obj_level]->dof_object.
set_dof_index (dof_handler,
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
get_dof_index (const dealii::hp::DoFHandler<2,spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
const dealii::internal::int2type<1> &,
- const unsigned int global_index)
+ const types::global_dof_index global_index)
{
dof_handler.faces->lines.
set_dof_index (dof_handler,
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
get_dof_index (const dealii::hp::DoFHandler<2,spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
const dealii::internal::int2type<2> &,
- const unsigned int global_index)
+ const types::global_dof_index global_index)
{
dof_handler.levels[obj_level]->dof_object.
set_dof_index (dof_handler,
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
get_dof_index (const dealii::hp::DoFHandler<3,spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
const dealii::internal::int2type<1> &,
- const unsigned int global_index)
+ const types::global_dof_index global_index)
{
dof_handler.faces->lines.
set_dof_index (dof_handler,
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
get_dof_index (const dealii::hp::DoFHandler<3,spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
const dealii::internal::int2type<2> &,
- const unsigned int global_index)
+ const types::global_dof_index global_index)
{
dof_handler.faces->quads.
set_dof_index (dof_handler,
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
get_dof_index (const dealii::hp::DoFHandler<3,spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
const dealii::internal::int2type<3> &,
- const unsigned int global_index)
+ const types::global_dof_index global_index)
{
dof_handler.levels[obj_level]->dof_object.
set_dof_index (dof_handler,
const unsigned int vertex_index,
const unsigned int fe_index,
const unsigned int local_index,
- const unsigned int global_index)
+ const types::global_dof_index global_index)
{
Assert ((fe_index == dealii::DoFHandler<dim,spacedim>::default_fe_index),
ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
const unsigned int vertex_index,
const unsigned int fe_index,
const unsigned int local_index,
- const unsigned int global_index)
+ const types::global_dof_index global_index)
{
Assert ( (fe_index != dealii::hp::DoFHandler<dim,spacedim>::default_fe_index),
ExcMessage ("You need to specify a FE index when working "
// we can't find a set for this
// particular fe_index
const unsigned int starting_offset = dof_handler.vertex_dofs_offsets[vertex_index];
- unsigned int *pointer = &dof_handler.vertex_dofs[starting_offset];
+ types::global_dof_index *pointer = &dof_handler.vertex_dofs[starting_offset];
while (true)
{
Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
- const unsigned int this_fe_index = *pointer;
+ // a fe index is always small
+ Assert((*pointer)<std::numeric_limits<unsigned int>::max(), ExcInternalError());
+ const unsigned int this_fe_index = static_cast<unsigned int>(*pointer);
Assert (this_fe_index != numbers::invalid_unsigned_int,
ExcInternalError());
// we can't find a set for this
// particular fe_index
const unsigned int starting_offset = dof_handler.vertex_dofs_offsets[vertex_index];
- const unsigned int *pointer = &dof_handler.vertex_dofs[starting_offset];
+ const types::global_dof_index *pointer = &dof_handler.vertex_dofs[starting_offset];
while (true)
{
Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
- const unsigned int this_fe_index = *pointer;
+ Assert((*pointer)<std::numeric_limits<unsigned int>::max(), ExcInternalError());
+ const unsigned int this_fe_index = static_cast<unsigned int>(*pointer);
Assert (this_fe_index != numbers::invalid_unsigned_int,
ExcInternalError());
// sets and count the number of
// hops
const unsigned int starting_offset = dof_handler.vertex_dofs_offsets[vertex_index];
- const unsigned int *pointer = &dof_handler.vertex_dofs[starting_offset];
+ const types::global_dof_index *pointer = &dof_handler.vertex_dofs[starting_offset];
Assert (*pointer != numbers::invalid_unsigned_int,
ExcInternalError());
{
Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
- const unsigned int this_fe_index = *pointer;
+ Assert((*pointer)<std::numeric_limits<unsigned int>::max(), ExcInternalError());
+ const unsigned int this_fe_index = static_cast<unsigned int>(*pointer);
if (this_fe_index == numbers::invalid_unsigned_int)
return counter;
// sets and count the number of
// hops
const unsigned int starting_offset = dof_handler.vertex_dofs_offsets[vertex_index];
- const unsigned int *pointer = &dof_handler.vertex_dofs[starting_offset];
+ const types::global_dof_index *pointer = &dof_handler.vertex_dofs[starting_offset];
Assert (*pointer != numbers::invalid_unsigned_int,
ExcInternalError());
{
Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
- const unsigned int this_fe_index = *pointer;
+ Assert((*pointer)<std::numeric_limits<unsigned int>::max(), ExcInternalError());
+ const unsigned int this_fe_index = static_cast<unsigned int>(*pointer);
Assert (this_fe_index < dof_handler.finite_elements->size(),
ExcInternalError());
// sets and see whether we find
// the given index
const unsigned int starting_offset = dof_handler.vertex_dofs_offsets[vertex_index];
- const unsigned int *pointer = &dof_handler.vertex_dofs[starting_offset];
+ const types::global_dof_index *pointer = &dof_handler.vertex_dofs[starting_offset];
Assert (*pointer != numbers::invalid_unsigned_int,
ExcInternalError());
{
Assert (pointer <= &dof_handler.vertex_dofs.back(), ExcInternalError());
- const unsigned int this_fe_index = *pointer;
+ Assert((*pointer)<std::numeric_limits<unsigned int>::max(), ExcInternalError());
+ const unsigned int this_fe_index = static_cast<unsigned int>(*pointer);
Assert (this_fe_index < dof_handler.finite_elements->size(),
ExcInternalError());
template <int dim, class DH, bool lda>
inline
-unsigned int
+types::global_dof_index
DoFAccessor<dim,DH,lda>::dof_index (const unsigned int i,
const unsigned int fe_index) const
{
template<int structdim, class DH, bool lda>
inline
-unsigned int DoFAccessor<structdim, DH,lda>::mg_dof_index (const int level, const unsigned int i) const
+types::global_dof_index
+DoFAccessor<structdim, DH,lda>::mg_dof_index (const int level,
+ const unsigned int i) const
{
return this->dof_handler->template get_dof_index<structdim> (level, this->present_index, 0, i);
}
inline
void
DoFAccessor<dim,DH,lda>::set_dof_index (const unsigned int i,
- const unsigned int index,
+ const types::global_dof_index index,
const unsigned int fe_index) const
{
// access the respective DoF
template <int structdim, class DH, bool lda>
inline
-unsigned int
+types::global_dof_index
DoFAccessor<structdim, DH,lda>::vertex_dof_index (const unsigned int vertex,
const unsigned int i,
const unsigned int fe_index) const
template<int structdim, class DH, bool lda>
inline
-unsigned
-DoFAccessor<structdim, DH,lda>::mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const unsigned int fe_index) const
+types::global_dof_index
+DoFAccessor<structdim, DH,lda>::mg_vertex_dof_index (const int level,
+ const unsigned int vertex,
+ const unsigned int i,
+ const unsigned int fe_index) const
{
Assert (this->dof_handler != 0, ExcInvalidObject ());
Assert (&this->dof_handler->get_fe () != 0, ExcInvalidObject ());
void
DoFAccessor<structdim, DH,lda>::set_vertex_dof_index (const unsigned int vertex,
const unsigned int i,
- const unsigned int index,
+ const types::global_dof_index index,
const unsigned int fe_index) const
{
dealii::internal::DoFAccessor::Implementation::set_vertex_dof_index
template<int structdim, class DH, bool lda>
inline
void
-DoFAccessor<structdim, DH,lda>::set_mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const unsigned int index, const unsigned int fe_index) const
+DoFAccessor<structdim, DH,lda>::set_mg_vertex_dof_index (const int level,
+ const unsigned int vertex,
+ const unsigned int i,
+ const types::global_dof_index index,
+ const unsigned int fe_index) const
{
Assert (this->dof_handler != 0, ExcInvalidObject ());
Assert (&this->dof_handler->get_fe () != 0, ExcInvalidObject ());
template<int structdim, class DH, bool lda>
inline
void
-DoFAccessor<structdim, DH,lda>::set_mg_dof_index (const int level, const unsigned int i, const unsigned int index) const
+DoFAccessor<structdim, DH,lda>::set_mg_dof_index (const int level,
+ const unsigned int i,
+ const types::global_dof_index index) const
{
this->dof_handler->template set_dof_index<structdim> (level, this->present_index, 0, i, index);
}
{
template <class DH, bool lda>
void get_dof_indices (const dealii::DoFAccessor<1,DH,lda> &accessor,
- std::vector<unsigned int> &dof_indices,
+ std::vector<types::global_dof_index> &dof_indices,
const unsigned int fe_index)
{
const unsigned int dofs_per_vertex = accessor.get_fe(fe_index).dofs_per_vertex,
dofs_per_line = accessor.get_fe(fe_index).dofs_per_line;
- std::vector<unsigned int>::iterator next = dof_indices.begin();
+ std::vector<types::global_dof_index>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<2; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
*next++ = accessor.vertex_dof_index(vertex,d,fe_index);
template <class DH, bool lda>
void get_dof_indices (const dealii::DoFAccessor<2,DH,lda> &accessor,
- std::vector<unsigned int> &dof_indices,
+ std::vector<types::global_dof_index> &dof_indices,
const unsigned int fe_index)
{
const unsigned int dofs_per_vertex = accessor.get_fe(fe_index).dofs_per_vertex,
dofs_per_line = accessor.get_fe(fe_index).dofs_per_line,
dofs_per_quad = accessor.get_fe(fe_index).dofs_per_quad;
- std::vector<unsigned int>::iterator next = dof_indices.begin();
+ std::vector<types::global_dof_index>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<4; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
*next++ = accessor.vertex_dof_index(vertex,d,fe_index);
template <class DH, bool lda>
void get_dof_indices (const dealii::DoFAccessor<3,DH,lda> &accessor,
- std::vector<unsigned int> &dof_indices,
+ std::vector<types::global_dof_index> &dof_indices,
const unsigned int fe_index)
{
const unsigned int dofs_per_vertex = accessor.get_fe(fe_index).dofs_per_vertex,
dofs_per_line = accessor.get_fe(fe_index).dofs_per_line,
dofs_per_quad = accessor.get_fe(fe_index).dofs_per_quad,
dofs_per_hex = accessor.get_fe(fe_index).dofs_per_hex;
- std::vector<unsigned int>::iterator next = dof_indices.begin();
+ std::vector<types::global_dof_index>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<8; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
*next++ = accessor.vertex_dof_index(vertex,d,fe_index);
template<class DH, bool lda>
void get_mg_dof_indices (const dealii::DoFAccessor<1, DH,lda> &accessor,
const int level,
- std::vector<unsigned int> &dof_indices,
+ std::vector<types::global_dof_index> &dof_indices,
const unsigned int fe_index)
{
const DH &handler = accessor.get_dof_handler();
const FiniteElement<DH::dimension, DH::space_dimension> &fe
= handler.get_fe ()[fe_index];
- std::vector<unsigned int>::iterator next = dof_indices.begin ();
+ std::vector<types::global_dof_index>::iterator next = dof_indices.begin ();
for (unsigned int vertex = 0; vertex < GeometryInfo<1>::vertices_per_cell; ++vertex)
for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
template<class DH, bool lda>
void get_mg_dof_indices (const dealii::DoFAccessor<2, DH,lda> &accessor,
const int level,
- std::vector<unsigned int> &dof_indices,
+ std::vector<types::global_dof_index> &dof_indices,
const unsigned int fe_index)
{
const DH &handler = accessor.get_dof_handler();
ExcNotInitialized());
const FiniteElement<DH::dimension, DH::space_dimension> &fe = handler.get_fe ()[fe_index];
- std::vector<unsigned int>::iterator next = dof_indices.begin ();
+ std::vector<types::global_dof_index>::iterator next = dof_indices.begin ();
for (unsigned int vertex = 0; vertex < GeometryInfo<2>::vertices_per_cell; ++vertex)
for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
template<class DH, bool lda>
void get_mg_dof_indices (const dealii::DoFAccessor<3, DH,lda> &accessor,
const int level,
- std::vector<unsigned int> &dof_indices,
+ std::vector<types::global_dof_index> &dof_indices,
const unsigned int fe_index)
{
const DH &handler = accessor.get_dof_handler();
ExcNotInitialized());
const FiniteElement<DH::dimension, DH::space_dimension> &fe = handler.get_fe ()[fe_index];
- std::vector<unsigned int>::iterator next = dof_indices.begin ();
+ std::vector<types::global_dof_index>::iterator next = dof_indices.begin ();
for (unsigned int vertex = 0; vertex < GeometryInfo<3>::vertices_per_cell; ++vertex)
for (unsigned int dof = 0; dof < fe.dofs_per_vertex; ++dof)
template <int structdim, class DH, bool lda>
inline
void
-DoFAccessor<structdim,DH,lda>::get_dof_indices (std::vector<unsigned int> &dof_indices,
+DoFAccessor<structdim,DH,lda>::get_dof_indices (std::vector<types::global_dof_index> &dof_indices,
const unsigned int fe_index) const
{
Assert (this->dof_handler != 0, ExcNotInitialized());
template<int structdim, class DH, bool lda>
inline
void DoFAccessor<structdim, DH,lda>::get_mg_dof_indices (const int level,
- std::vector<unsigned int> &dof_indices,
+ std::vector<types::global_dof_index> &dof_indices,
const unsigned int fe_index) const
{
Assert (this->dof_handler != 0, ExcInvalidObject ());
template<int structdim, class DH, bool lda>
inline
void DoFAccessor<structdim, DH,lda>::set_mg_dof_indices (const int level,
- const std::vector<unsigned int> &dof_indices,
+ const std::vector<types::global_dof_index> &dof_indices,
const unsigned int fe_index)
{
Assert (this->dof_handler != 0, ExcInvalidObject ());
inline
typename dealii::internal::DoFHandler::Iterators<DH>::line_iterator
get_line(const dealii::Triangulation<DH::dimension, DH::space_dimension> *tria,
- unsigned int index,
+ const unsigned int index,
DH *dof_handler)
{
return typename dealii::internal::DoFHandler::Iterators<DH>::line_iterator
inline
void
DoFAccessor<0,DH<1,spacedim>, lda>::get_dof_indices (
- std::vector<unsigned int> &dof_indices,
+ std::vector<types::global_dof_index> &dof_indices,
const unsigned int fe_index) const
{
for (unsigned int i=0; i<dof_indices.size(); ++i)
template <template <int, int> class DH, int spacedim, bool lda>
inline
-unsigned int
+types::global_dof_index
DoFAccessor<0,DH<1,spacedim>, lda>::
vertex_dof_index (const unsigned int vertex,
const unsigned int i,
->cell_dof_indices_cache.size(),
ExcInternalError());
- std::vector<unsigned int>::iterator next
+ std::vector<types::global_dof_index>::iterator next
= (accessor.dof_handler->levels[accessor.present_level]
->cell_dof_indices_cache.begin() + accessor.present_index * dofs_per_cell);
->cell_dof_indices_cache.size(),
ExcInternalError());
- std::vector<unsigned int>::iterator next
+ std::vector<types::global_dof_index>::iterator next
= (accessor.dof_handler->levels[accessor.present_level]
->cell_dof_indices_cache.begin() + accessor.present_index * dofs_per_cell);
->cell_dof_indices_cache.size(),
ExcInternalError());
- std::vector<unsigned int>::iterator next
+ std::vector<types::global_dof_index>::iterator next
= (accessor.dof_handler->levels[accessor.present_level]
->cell_dof_indices_cache.begin() + accessor.present_index * dofs_per_cell);
static
void
set_dof_indices (DoFCellAccessor<DoFHandler<1,spacedim>, lda> &accessor,
- const std::vector<unsigned int> &local_dof_indices)
+ const std::vector<types::global_dof_index> &local_dof_indices)
{
Assert (accessor.has_children() == false,
ExcInternalError());
dofs_per_line = accessor.get_fe().dofs_per_line,
dofs_per_cell = accessor.get_fe().dofs_per_cell;
- Assert (local_dof_indices.size() == dofs_per_cell,
+ Assert (dof_indices.size() == dofs_per_cell,
ExcInternalError());
unsigned int index = 0;
for (unsigned int vertex=0; vertex<2; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d, ++index)
accessor.set_vertex_dof_index(vertex,d,
- local_dof_indices[index]);
+ dof_indices[index]);
for (unsigned int d=0; d<dofs_per_line; ++d, ++index)
- accessor.dof_index(d, local_dof_indices[index]);
+ accessor.dof_index(d, dof_indices[index]);
Assert (index == dofs_per_cell,
ExcInternalError());
static
void
set_dof_indices (DoFCellAccessor<DoFHandler<2,spacedim>, lda> &accessor,
- const std::vector<unsigned int> &local_dof_indices)
+ const std::vector<types::global_dof_index> &local_dof_indices)
{
Assert (accessor.has_children() == false,
ExcInternalError());
static
void
set_dof_indices (DoFCellAccessor<DoFHandler<3,spacedim>, lda> &accessor,
- const std::vector<unsigned int> &local_dof_indices)
+ const std::vector<types::global_dof_index> &local_dof_indices)
{
Assert (accessor.has_children() == false,
ExcInternalError());
dofs_per_hex = accessor.get_fe().dofs_per_hex,
dofs_per_cell = accessor.get_fe().dofs_per_cell;
- Assert (local_dof_indices.size() == dofs_per_cell,
+ Assert (dof_indices.size() == dofs_per_cell,
ExcInternalError());
unsigned int index = 0;
for (unsigned int vertex=0; vertex<8; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d, ++index)
accessor.set_vertex_dof_index(vertex,d,
- local_dof_indices[index]);
+ dof_indices[index]);
// now copy dof numbers into the line. for
// lines with the wrong orientation, we have
// already made sure that we're ok by picking
accessor.line(line)->set_dof_index(accessor.dof_handler->get_fe().
adjust_line_dof_index_for_line_orientation(d,
accessor.line_orientation(line)),
- local_dof_indices[index]);
+ dof_indices[index]);
// now copy dof numbers into the face. for
// faces with the wrong orientation, we
// have already made sure that we're ok by
accessor.face_orientation(quad),
accessor.face_flip(quad),
accessor.face_rotation(quad)),
- local_dof_indices[index]);
+ dof_indices[index]);
for (unsigned int d=0; d<dofs_per_hex; ++d, ++index)
- accessor.set_dof_index(d, local_dof_indices[index]);
+ accessor.set_dof_index(d, dof_indices[index]);
Assert (index == dofs_per_cell,
ExcInternalError());
static
void
set_dof_indices (const DoFCellAccessor<dealii::hp::DoFHandler<dim,spacedim>, lda> &,
- const std::vector<unsigned int> &)
+ const std::vector<types::global_dof_index> &)
{
Assert (false, ExcNotImplemented());
}
static
void
get_dof_indices (const DoFCellAccessor<DoFHandler<dim,spacedim>, lda> &accessor,
- std::vector<unsigned int> &dof_indices)
+ std::vector<types::global_dof_index> &dof_indices)
{
AssertDimension (dof_indices.size(), accessor.get_fe().dofs_per_cell);
accessor.get_fe().dofs_per_vertex * GeometryInfo<dim>::vertices_per_cell),
ExcMessage ("Cell must either be active, or all DoFs must be in vertices"));
- unsigned int *cache = &accessor.dof_handler->levels[accessor.level()]
- ->cell_dof_indices_cache[accessor.present_index * accessor.get_fe().dofs_per_cell];
+ types::global_dof_index *cache = &accessor.dof_handler->levels[accessor.level()]
+ ->cell_dof_indices_cache[accessor.present_index * accessor.get_fe().dofs_per_cell];
for (unsigned int i=0; i<accessor.get_fe().dofs_per_cell; ++i, ++cache)
dof_indices[i] = *cache;
}
static
void
get_dof_indices (const DoFCellAccessor<dealii::hp::DoFHandler<dim,spacedim>, lda> &accessor,
- std::vector<unsigned int> &dof_indices)
+ std::vector<types::global_dof_index> &dof_indices)
{
// no caching for
// hp::DoFHandler
accessor.get_fe().dofs_per_vertex * GeometryInfo<dim>::vertices_per_cell),
ExcMessage ("Cell must either be active, or all DoFs must be in vertices"));
- unsigned int *cache = &accessor.dof_handler->levels[accessor.level()]
- ->cell_dof_indices_cache[accessor.present_index *
- accessor.get_fe().dofs_per_cell];
+ types::global_dof_index *cache = &accessor.dof_handler->levels[accessor.level()]
+ ->cell_dof_indices_cache[accessor.present_index *
+ accessor.get_fe().dofs_per_cell];
for ( ; local_values_begin != local_values_end; ++local_values_begin, ++cache)
*local_values_begin = values(*cache);
}
typename BaseClass::ExcVectorDoesNotMatch());
const unsigned int dofs_per_cell = accessor.get_fe().dofs_per_cell;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
get_dof_indices (accessor, local_dof_indices);
for (unsigned int i=0; i<dofs_per_cell; ++i, ++local_values_begin)
accessor.get_fe().dofs_per_vertex * GeometryInfo<dim>::vertices_per_cell),
ExcMessage ("Cell must either be active, or all DoFs must be in vertices"));
- unsigned int *cache = &accessor.dof_handler->levels[accessor.level()]
- ->cell_dof_indices_cache[accessor.present_index *
- accessor.get_fe().dofs_per_cell];
+ types::global_dof_index *cache = &accessor.dof_handler->levels[accessor.level()]
+ ->cell_dof_indices_cache[accessor.present_index *
+ accessor.get_fe().dofs_per_cell];
constraints.get_dof_values(values, *cache, local_values_begin,
local_values_end);
}
typename BaseClass::ExcVectorDoesNotMatch());
const unsigned int dofs_per_cell = accessor.get_fe().dofs_per_cell;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
get_dof_indices (accessor, local_dof_indices);
constraints.get_dof_values (values, local_dof_indices.begin(),
accessor.get_fe().dofs_per_vertex * GeometryInfo<dim>::vertices_per_cell),
ExcMessage ("Cell must either be active, or all DoFs must be in vertices"));
- unsigned int *cache = &accessor.dof_handler->levels[accessor.level()]
- ->cell_dof_indices_cache[accessor.present_index * accessor.get_fe().dofs_per_cell];
+ types::global_dof_index *cache = &accessor.dof_handler->levels[accessor.level()]
+ ->cell_dof_indices_cache[accessor.present_index * accessor.get_fe().dofs_per_cell];
for (unsigned int i=0; i<accessor.get_fe().dofs_per_cell; ++i, ++cache)
values(*cache) = local_values(i);
}
// implemented
const unsigned int dofs_per_cell = accessor.get_fe().dofs_per_cell;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
get_dof_indices (accessor, local_dof_indices);
for (unsigned int i=0; i<dofs_per_cell; ++i)
const unsigned int n_dofs = local_source_end - local_source_begin;
- unsigned int *dofs = &accessor.dof_handler->levels[accessor.level()]
- ->cell_dof_indices_cache[accessor.present_index * n_dofs];
+ types::global_dof_index *dofs = &accessor.dof_handler->levels[accessor.level()]
+ ->cell_dof_indices_cache[accessor.present_index * n_dofs];
// distribute cell vector
global_destination.add(n_dofs, dofs, local_source_begin);
//TODO[WB/MK]: This function could me made more efficient because it allocates memory, which could be avoided by passing in another argument as a scratch array. This should be fixed eventually
// get indices of dofs
- std::vector<unsigned int> dofs (n_dofs);
+ std::vector<types::global_dof_index> dofs (n_dofs);
accessor.get_dof_indices (dofs);
// distribute cell vector
const unsigned int n_dofs = local_source_end - local_source_begin;
- unsigned int *dofs = &accessor.dof_handler->levels[accessor.level()]
- ->cell_dof_indices_cache[accessor.present_index * n_dofs];
+ types::global_dof_index *dofs = &accessor.dof_handler->levels[accessor.level()]
+ ->cell_dof_indices_cache[accessor.present_index * n_dofs];
// distribute cell vector
constraints.distribute_local_to_global (local_source_begin, local_source_end,
//TODO[WB/MK]: This function could me made more efficient because it allocates memory, which could be avoided by passing in another argument as a scratch array. This should be fixed eventually
// get indices of dofs
- std::vector<unsigned int> dofs (n_dofs);
+ std::vector<types::global_dof_index> dofs (n_dofs);
accessor.get_dof_indices (dofs);
// distribute cell vector
const unsigned int n_dofs = local_source.m();
- unsigned int *dofs = &accessor.dof_handler->levels[accessor.level()]
- ->cell_dof_indices_cache[accessor.present_index * n_dofs];
+ types::global_dof_index *dofs = &accessor.dof_handler->levels[accessor.level()]
+ ->cell_dof_indices_cache[accessor.present_index * n_dofs];
// distribute cell matrix
for (unsigned int i=0; i<n_dofs; ++i)
//TODO[WB/MK]: This function could me made more efficient because it allocates memory, which could be avoided by passing in another argument as a scratch array.
// get indices of dofs
- std::vector<unsigned int> dofs (n_dofs);
+ std::vector<types::global_dof_index> dofs (n_dofs);
accessor.get_dof_indices (dofs);
// distribute cell matrix
ExcMessage ("Cell must either be active, or all DoFs must be in vertices"));
const unsigned int n_dofs = accessor.get_fe().dofs_per_cell;
- unsigned int *dofs = &accessor.dof_handler->levels[accessor.level()]
- ->cell_dof_indices_cache[accessor.present_index *n_dofs];
+ types::global_dof_index *dofs = &accessor.dof_handler->levels[accessor.level()]
+ ->cell_dof_indices_cache[accessor.present_index *n_dofs];
// distribute cell matrices
for (unsigned int i=0; i<n_dofs; ++i)
//to ConstraintMatrix or MeshWorker::Assembler
// get indices of dofs
- std::vector<unsigned int> dofs (n_dofs);
+ std::vector<types::global_dof_index> dofs (n_dofs);
accessor.get_dof_indices (dofs);
// distribute cell matrix and vector
template<class DH, bool lda>
inline
-void DoFCellAccessor<DH,lda>::get_mg_dof_indices (std::vector<unsigned int> &dof_indices) const
+void DoFCellAccessor<DH,lda>::get_mg_dof_indices (std::vector<types::global_dof_index> &dof_indices) const
{
DoFAccessor<dim, DH,lda>::get_mg_dof_indices (this->level (), dof_indices);
}
template<class DH, bool lda>
inline
-void DoFCellAccessor<DH,lda>::set_mg_dof_indices (const std::vector<unsigned int> &dof_indices)
+void DoFCellAccessor<DH,lda>::set_mg_dof_indices (const std::vector<types::global_dof_index> &dof_indices)
{
DoFAccessor<dim, DH,lda>::set_mg_dof_indices (this->level (), dof_indices);
}
template<class DH, bool lda>
inline
-void DoFCellAccessor<DH,lda>::dof_indices (std::vector<unsigned int> &dof_indices) const
+void DoFCellAccessor<DH,lda>::dof_indices (std::vector<types::global_dof_index> &dof_indices) const
{
if (lda)
get_mg_dof_indices (dof_indices);
* respective degree of freedom shall be assigned. This number may, for
* example, be obtained by sorting the support points of the degrees of
* freedom in downwind direction. Then call the
- * <tt>renumber_dofs(vector<unsigned int>)</tt> function with the array, which
+ * <tt>renumber_dofs(vector<types::global_dof_index>)</tt> function with the array, which
* converts old into new degree of freedom indices.
*
*
*/
virtual void distribute_dofs (const FiniteElement<dim,spacedim> &fe);
+ virtual void distribute_mg_dofs (const FiniteElement<dim, spacedim> &fe, const types::global_dof_index offset = 0);
+
/**
* Distribute multigrid degrees of freedom similar
* to distribute_dofs() but on each level.
* case that only one processor
* participates in the mesh.
*/
- void renumber_dofs (const std::vector<unsigned int> &new_numbers);
+ void renumber_dofs (const std::vector<types::global_dof_index> &new_numbers);
/**
* The same function as above, but
* single level of a multigrid hierarchy.
*/
void renumber_dofs (const unsigned int level,
- const std::vector<unsigned int> &new_numbers);
+ const std::vector<types::global_dof_index> &new_numbers);
/**
* Return the maximum number of
* DoFs which are constrained by
* hanging nodes, see @ref constraints.
*/
- unsigned int n_dofs () const;
+ types::global_dof_index n_dofs () const;
/**
* The (global) number of multilevel
* returns the number of
* degrees of freedom on this level.
*/
- unsigned int n_dofs (const unsigned int level) const;
+ types::global_dof_index n_dofs (const unsigned int level) const;
/**
* Return the number of degrees of freedom
* located on the boundary.
*/
- unsigned int n_boundary_dofs () const;
+ types::global_dof_index n_boundary_dofs () const;
/**
* Return the number of degrees
* @p make_boundary_sparsity_pattern
* function.
*/
- unsigned int
+ types::global_dof_index
n_boundary_dofs (const FunctionMap &boundary_indicators) const;
/**
* indicators under
* consideration.
*/
- unsigned int
+ types::global_dof_index
n_boundary_dofs (const std::set<types::boundary_id> &boundary_indicators) const;
/**
* then the vector has a single
* element equal to n_dofs().
*/
- const std::vector<unsigned int> &
+ const std::vector<types::global_dof_index> &
n_locally_owned_dofs_per_processor () const;
/**
* degrees of freedom located at
* vertices.
*/
- std::vector<unsigned int> vertex_dofs;
+ std::vector<types::global_dof_index> vertex_dofs;
private:
unsigned int coarsest_level;
unsigned int finest_level;
- unsigned int *indices;
- unsigned int *indices_offset;
+ types::global_dof_index *indices;
+ types::global_dof_index *indices_offset;
public:
DeclException0 (ExcNoMemory);
~MGVertexDoFs ();
unsigned int get_coarsest_level () const;
unsigned int get_finest_level () const;
- unsigned int get_index (const unsigned int level, const unsigned int dof_number) const;
+ types::global_dof_index get_index (const unsigned int level, const unsigned int dof_number) const;
void init (const unsigned int coarsest_level, const unsigned int finest_level, const unsigned int dofs_per_vertex);
- void set_index (const unsigned int level, const unsigned int dof_number, const unsigned int index);
+ void set_index (const unsigned int level, const unsigned int dof_number, const types::global_dof_index index);
};
void clear_mg_space ();
void reserve_space ();
template <int structdim>
- unsigned int get_dof_index (const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index) const;
+ types::global_dof_index get_dof_index (const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index) const;
template<int structdim>
- void set_dof_index (const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const unsigned int global_index) const;
+ void set_dof_index (const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index) const;
/**
* Space to store the DoF numbers
#ifndef DOXYGEN
-template <> unsigned int DoFHandler<1>::n_boundary_dofs () const;
-template <> unsigned int DoFHandler<1>::n_boundary_dofs (const FunctionMap &) const;
-template <> unsigned int DoFHandler<1>::n_boundary_dofs (const std::set<types::boundary_id> &) const;
+template <> types::global_dof_index DoFHandler<1>::n_boundary_dofs () const;
+template <> types::global_dof_index DoFHandler<1>::n_boundary_dofs (const FunctionMap &) const;
+template <> types::global_dof_index DoFHandler<1>::n_boundary_dofs (const std::set<types::boundary_id> &) const;
-template <> void DoFHandler<1>::renumber_dofs(unsigned int,const std::vector<unsigned int> &new_numbers);
-template <> void DoFHandler<2>::renumber_dofs(unsigned int,const std::vector<unsigned int> &new_numbers);
-template <> void DoFHandler<3>::renumber_dofs(unsigned int,const std::vector<unsigned int> &new_numbers);
+template <> void DoFHandler<1>::renumber_dofs(unsigned int,const std::vector<types::global_dof_index> &new_numbers);
+template <> void DoFHandler<2>::renumber_dofs(unsigned int,const std::vector<types::global_dof_index> &new_numbers);
+template <> void DoFHandler<3>::renumber_dofs(unsigned int,const std::vector<types::global_dof_index> &new_numbers);
/* ----------------------- Inline functions ---------------------------------- */
template <int dim, int spacedim>
inline
-unsigned int
+types::global_dof_index
DoFHandler<dim,spacedim>::n_dofs () const
{
return number_cache.n_global_dofs;
}
template <int dim, int spacedim>
-const std::vector<unsigned int> &
+const std::vector<types::global_dof_index> &
DoFHandler<dim, spacedim>::n_locally_owned_dofs_per_processor() const
{
return number_cache.n_locally_owned_dofs_per_processor;
*/
virtual
NumberCache
- renumber_dofs (const std::vector<unsigned int> &new_numbers,
+ renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
dealii::DoFHandler<dim,spacedim> &dof_handler) const = 0;
};
*/
virtual
NumberCache
- renumber_dofs (const std::vector<unsigned int> &new_numbers,
+ renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
dealii::DoFHandler<dim,spacedim> &dof_handler) const;
};
*/
virtual
NumberCache
- renumber_dofs (const std::vector<unsigned int> &new_numbers,
+ renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
dealii::DoFHandler<dim,spacedim> &dof_handler) const;
};
}
* times
* selected_fe.dofs_per_cell.
*/
- std::vector<unsigned int> cell_dof_indices_cache;
+ std::vector<types::global_dof_index> cell_dof_indices_cache;
/**
* The object containing dof-indices
* Store the global indices of
* the degrees of freedom.
*/
- std::vector<unsigned int> dofs;
+ std::vector<types::global_dof_index> dofs;
public:
/**
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const unsigned int global_index);
+ const types::global_dof_index global_index);
/**
* Return the global index of
* and non-hp classes.
*/
template <int dh_dim, int spacedim>
- unsigned int
+ types::global_dof_index
get_dof_index (const dealii::DoFHandler<dh_dim,spacedim> &dof_handler,
const unsigned int obj_index,
const unsigned int fe_index,
template <int dh_dim, int spacedim>
unsigned int
n_active_fe_indices (const dealii::DoFHandler<dh_dim,spacedim> &dof_handler,
- const unsigned int index) const;
+ const types::global_dof_index index) const;
/**
* Similar to the function
template <int dh_dim, int spacedim>
bool
fe_index_is_active (const dealii::DoFHandler<dh_dim,spacedim> &dof_handler,
- const unsigned int index,
+ const types::global_dof_index index,
const unsigned int fe_index) const;
/**
inline
bool
DoFObjects<dim>::fe_index_is_active (const dealii::DoFHandler<dh_dim,spacedim> &,
- const unsigned int,
+ const types::global_dof_index,
const unsigned int fe_index) const
{
Assert (fe_index == 0,
template <int dim>
template <int dh_dim, int spacedim>
inline
- unsigned int
+ types::global_dof_index
DoFObjects<dim>::
get_dof_index (const dealii::DoFHandler<dh_dim,spacedim> &dof_handler,
const unsigned int obj_index,
/**
* Return true if c1 less c2.
*/
- bool operator () (const std::pair<Point<dim>,unsigned int> &c1,
- const std::pair<Point<dim>,unsigned int> &c2) const
+ bool operator () (const std::pair<Point<dim>,types::global_dof_index> &c1,
+ const std::pair<Point<dim>,types::global_dof_index> &c2) const
{
const Point<dim> diff = c2.first-c1.first;
return (diff*dir > 0 || (diff*dir==0 && c1.second<c2.second));
*/
template <class DH>
void
- compute_Cuthill_McKee (std::vector<unsigned int> &new_dof_indices,
+ compute_Cuthill_McKee (std::vector<types::global_dof_index> &new_dof_indices,
const DH &,
const bool reversed_numbering = false,
const bool use_constraints = false);
*/
template <class DH>
void
- compute_king_ordering (std::vector<unsigned int> &new_dof_indices,
+ compute_king_ordering (std::vector<types::global_dof_index> &new_dof_indices,
const DH &,
const bool reversed_numbering = false,
const bool use_constraints = false);
*/
template <class DH>
void
- compute_minimum_degree (std::vector<unsigned int> &new_dof_indices,
+ compute_minimum_degree (std::vector<types::global_dof_index> &new_dof_indices,
const DH &,
const bool reversed_numbering = false,
const bool use_constraints = false);
Cuthill_McKee (DH &dof_handler,
const bool reversed_numbering = false,
const bool use_constraints = false,
- const std::vector<unsigned int> &starting_indices = std::vector<unsigned int>());
+ const std::vector<types::global_dof_index> &starting_indices = std::vector<types::global_dof_index>());
/**
* Computes the renumbering
*/
template <class DH>
void
- compute_Cuthill_McKee (std::vector<unsigned int> &new_dof_indices,
+ compute_Cuthill_McKee (std::vector<types::global_dof_index> &new_dof_indices,
const DH &,
const bool reversed_numbering = false,
const bool use_constraints = false,
- const std::vector<unsigned int> &starting_indices = std::vector<unsigned int>());
+ const std::vector<types::global_dof_index> &starting_indices = std::vector<types::global_dof_index>());
/**
* Renumber the degrees of
Cuthill_McKee (DH &dof_handler,
const unsigned int level,
const bool reversed_numbering = false,
- const std::vector<unsigned int> &starting_indices = std::vector<unsigned int> ());
+ const std::vector<types::global_dof_index> &starting_indices = std::vector<types::global_dof_index> ());
/**
* @name Component-wise numberings
* the renumbering vector.
*/
template <int dim, int spacedim, class ITERATOR, class ENDITERATOR>
- unsigned int
- compute_component_wise (std::vector<unsigned int> &new_dof_indices,
+ types::global_dof_index
+ compute_component_wise (std::vector<types::global_dof_index> &new_dof_indices,
const ITERATOR &start,
const ENDITERATOR &end,
const std::vector<unsigned int> &target_component);
*/
template <class DH>
void
- compute_cell_wise (std::vector<unsigned int> &renumbering,
- std::vector<unsigned int> &inverse_renumbering,
+ compute_cell_wise (std::vector<types::global_dof_index> &renumbering,
+ std::vector<types::global_dof_index> &inverse_renumbering,
const DH &dof_handler,
const std::vector<typename DH::active_cell_iterator> &cell_order);
*/
template <class DH>
void
- compute_cell_wise (std::vector<unsigned int> &renumbering,
- std::vector<unsigned int> &inverse_renumbering,
+ compute_cell_wise (std::vector<types::global_dof_index> &renumbering,
+ std::vector<types::global_dof_index> &inverse_renumbering,
const DH &dof_handler,
const unsigned int level,
const std::vector<typename DH::level_cell_iterator> &cell_order);
*/
template <class DH>
void
- compute_downstream (std::vector<unsigned int> &new_dof_indices,
- std::vector<unsigned int> &reverse,
+ compute_downstream (std::vector<types::global_dof_index> &new_dof_indices,
+ std::vector<types::global_dof_index> &reverse,
const DH &dof_handler,
const Point<DH::space_dimension> &direction,
const bool dof_wise_renumbering);
*/
template <class DH>
void
- compute_downstream (std::vector<unsigned int> &new_dof_indices,
- std::vector<unsigned int> &reverse,
+ compute_downstream (std::vector<types::global_dof_index> &new_dof_indices,
+ std::vector<types::global_dof_index> &reverse,
const DH &dof_handler,
const unsigned int level,
const Point<DH::space_dimension> &direction,
*/
template <class DH>
void
- compute_clockwise_dg (std::vector<unsigned int> &new_dof_indices,
+ compute_clockwise_dg (std::vector<types::global_dof_index> &new_dof_indices,
const DH &dof_handler,
const Point<DH::space_dimension> ¢er,
const bool counter);
*/
template <class DH>
void
- compute_sort_selected_dofs_back (std::vector<unsigned int> &new_dof_indices,
+ compute_sort_selected_dofs_back (std::vector<types::global_dof_index> &new_dof_indices,
const DH &dof_handler,
const std::vector<bool> &selected_dofs);
*/
template <class DH>
void
- compute_sort_selected_dofs_back (std::vector<unsigned int> &new_dof_indices,
+ compute_sort_selected_dofs_back (std::vector<types::global_dof_index> &new_dof_indices,
const DH &dof_handler,
const std::vector<bool> &selected_dofs,
const unsigned int level);
*/
template <class DH>
void
- compute_random (std::vector<unsigned int> &new_dof_indices,
+ compute_random (std::vector<types::global_dof_index> &new_dof_indices,
const DH &dof_handler);
/**
*/
template <class DH>
void
- compute_subdomain_wise (std::vector<unsigned int> &new_dof_indices,
+ compute_subdomain_wise (std::vector<types::global_dof_index> &new_dof_indices,
const DH &dof_handler);
/**
//---------------------------------------------------------------------------
// $Id$
//
-// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
template <class DH, class SparsityPattern>
void
make_boundary_sparsity_pattern (const DH &dof,
- const std::vector<unsigned int> &dof_to_boundary_mapping,
+ const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SparsityPattern &sparsity_pattern);
/**
void
make_boundary_sparsity_pattern (const DH &dof,
const typename FunctionMap<DH::space_dimension>::type &boundary_indicators,
- const std::vector<unsigned int> &dof_to_boundary_mapping,
+ const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SparsityPattern &sparsity);
/**
template <class DH>
void
count_dofs_per_component (const DH &dof_handler,
- std::vector<unsigned int> &dofs_per_component,
+ std::vector<types::global_dof_index> &dofs_per_component,
const bool vector_valued_once = false,
- std::vector<unsigned int> target_component
- = std::vector<unsigned int>());
+ std::vector<types::global_dof_index> target_component
+ = std::vector<types::global_dof_index>());
/**
* Count the degrees of freedom
template <class DH>
void
count_dofs_per_block (const DH &dof,
- std::vector<unsigned int> &dofs_per_block,
- const std::vector<unsigned int> &target_block
- = std::vector<unsigned int>());
+ std::vector<types::global_dof_index> &dofs_per_block,
+ const std::vector<types::global_dof_index> &target_block
+ = std::vector<types::global_dof_index>());
/**
* @deprecated See the previous
template <int dim, int spacedim>
void
count_dofs_per_component (const DoFHandler<dim,spacedim> &dof_handler,
- std::vector<unsigned int> &dofs_per_component,
- std::vector<unsigned int> target_component) DEAL_II_DEPRECATED;
+ std::vector<types::global_dof_index> &dofs_per_component,
+ std::vector<types::global_dof_index> target_component) DEAL_II_DEPRECATED;
/**
* This function can be used when
template <class DH>
void
map_dof_to_boundary_indices (const DH &dof_handler,
- std::vector<unsigned int> &mapping);
+ std::vector<types::global_dof_index> &mapping);
/**
* Same as the previous function,
void
map_dof_to_boundary_indices (const DH &dof_handler,
const std::set<types::boundary_id> &boundary_indicators,
- std::vector<unsigned int> &mapping);
+ std::vector<types::global_dof_index> &mapping);
/**
* Return a list of support
void
map_support_points_to_dofs (const Mapping<DH::dimension, DH::space_dimension> &mapping,
const DH &dof_handler,
- std::map<Point<DH::space_dimension>, unsigned int, Comp> &point_to_index_map);
+ std::map<Point<DH::space_dimension>, types::global_dof_index, Comp> &point_to_index_map);
/**
* Map a coupling table from the
map_support_points_to_dofs (
const Mapping<DH::dimension,DH::space_dimension> &mapping,
const DH &dof_handler,
- std::map<Point<DH::space_dimension>, unsigned int, Comp> &point_to_index_map)
+ std::map<Point<DH::space_dimension>, types::global_dof_index, Comp> &point_to_index_map)
{
// let the checking of arguments be
// done by the function first
* processors that may
* participate on this mesh.
*/
- unsigned int n_global_dofs;
+ types::global_dof_index n_global_dofs;
/**
* Number of dofs owned by
* computation, then this
* equals n_global_dofs.
*/
- unsigned int n_locally_owned_dofs;
+ types::global_dof_index n_locally_owned_dofs;
/**
* An index set denoting the
* element equal to
* n_global_dofs.
*/
- std::vector<unsigned int> n_locally_owned_dofs_per_processor;
+ std::vector<types::global_dof_index> n_locally_owned_dofs_per_processor;
/**
* The dofs owned by each of
* component in the local block
* vector.
*
- * The second vector is organized
- * such that there is a vector
- * for each base element
- * containing the start index for
- * each component served by this
- * base element.
+ * @param fe: The finite element
+ * used, typically an FESystem.
+ *
+ * @param renumbering: A vector
+ * with as many entries as
+ * <tt>fe</tt> has dofs per
+ * cell. The indices reference the
+ * local dofs on the cell, not the
+ * global dofs.
+ *
+ * @param <tt>start_indice</tt>:
+ * This vector is organized such
+ * that there is a vector for each
+ * base element containing the
+ * start index for each component
+ * served by this base element.
*
* While the first vector is
* checked to have the correct
void compute_block_renumbering (
const FiniteElement<dim,spacedim> &fe,
std::vector<unsigned int> &renumbering,
- std::vector<unsigned int> &block_data,
+ std::vector<types::global_dof_index> &block_data,
bool return_start_indices = true);
/**
//---------------------------------------------------------------------------
// $Id$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
*/
template <class InputVector, typename number>
void get_function_values (const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
std::vector<number> &values) const;
/**
*/
template <class InputVector, typename number>
void get_function_values (const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
std::vector<Vector<number> > &values) const;
*/
template <class InputVector>
void get_function_values (const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
VectorSlice<std::vector<std::vector<double> > > values,
const bool quadrature_points_fastest) const;
*/
template <class InputVector>
void get_function_gradients (const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
std::vector<Tensor<1,spacedim> > &gradients) const;
/**
*/
template <class InputVector>
void get_function_gradients (const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
VectorSlice<std::vector<std::vector<Tensor<1,spacedim> > > > gradients,
bool quadrature_points_fastest = false) const;
*/
template <class InputVector>
void get_function_grads (const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
std::vector<Tensor<1,spacedim> > &gradients) const DEAL_II_DEPRECATED;
/**
*/
template <class InputVector>
void get_function_grads (const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
std::vector<std::vector<Tensor<1,spacedim> > > &gradients,
bool quadrature_points_fastest = false) const DEAL_II_DEPRECATED;
template <class InputVector>
void get_function_hessians (
const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
std::vector<Tensor<2,spacedim> > &hessians) const;
/**
template <class InputVector>
void get_function_hessians (
const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
VectorSlice<std::vector<std::vector<Tensor<2,spacedim> > > > hessians,
bool quadrature_points_fastest = false) const;
template <class InputVector, typename number>
void get_function_laplacians (
const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
std::vector<number> &laplacians) const;
/**
template <class InputVector, typename number>
void get_function_laplacians (
const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
std::vector<Vector<number> > &laplacians) const;
/**
template <class InputVector, typename number>
void get_function_laplacians (
const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
std::vector<std::vector<number> > &laplacians,
bool quadrature_points_fastest = false) const;
//@}
// as discussed in the documentation, do
// not store the signals as well as
- // boundary and manifold descrption
+ // boundary and manifold description
// but everything else
ar &smooth_grid;
ar &levels;
* number of the degree of
* freedom referenced.
*/
- void renumber_dofs (const std::vector<unsigned int> &new_numbers);
+ void renumber_dofs (const std::vector<types::global_dof_index> &new_numbers);
/**
* Return the maximum number of
* DoFs which are constrained by
* hanging nodes, see @ref constraints.
*/
- unsigned int n_dofs () const;
+ types::global_dof_index n_dofs () const;
/**
* The number of multilevel
* numbers::invalid_unsigned
* int independent of its argument.
*/
- unsigned int n_dofs(const unsigned int level) const;
+ types::global_dof_index int n_dofs(const unsigned int level) const;
/**
* Return the number of degrees of freedom
* @p make_boundary_sparsity_pattern
* function.
*/
- unsigned int
+ types::global_dof_index
n_boundary_dofs (const FunctionMap &boundary_indicators) const;
/**
* indicators under
* consideration.
*/
- unsigned int
+ types::global_dof_index
n_boundary_dofs (const std::set<types::boundary_id> &boundary_indicators) const;
/**
public:
MGVertexDoFs ();
~MGVertexDoFs ();
- unsigned int get_index (const unsigned int level, const unsigned int dof_number) const;
- void set_index (const unsigned int level, const unsigned int dof_number, const unsigned int index);
+ types::global_dof_index get_index (const unsigned int level, const unsigned int dof_number) const;
+ void set_index (const unsigned int level, const unsigned int dof_number, const types::global_dof_index index);
};
/**
void clear_space ();
template<int structdim>
- unsigned int get_dof_index (const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index) const;
+ types::global_dof_index get_dof_index (const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index) const;
template<int structdim>
- void set_dof_index (const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const unsigned int global_index) const;
+ void set_dof_index (const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index) const;
/**
* Create default tables for
* distribute_dofs().
*/
void
- compute_vertex_dof_identities (std::vector<unsigned int> &new_dof_indices) const;
+ compute_vertex_dof_identities (std::vector<types::global_dof_index> &new_dof_indices) const;
/**
* Compute identities between
* distribute_dofs().
*/
void
- compute_line_dof_identities (std::vector<unsigned int> &new_dof_indices) const;
+ compute_line_dof_identities (std::vector<types::global_dof_index> &new_dof_indices) const;
/**
* Compute identities between
* distribute_dofs().
*/
void
- compute_quad_dof_identities (std::vector<unsigned int> &new_dof_indices) const;
+ compute_quad_dof_identities (std::vector<types::global_dof_index> &new_dof_indices) const;
/**
* Renumber the objects with
* co-located on the same
* entity.
*/
- void renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+ void renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
dealii::internal::int2type<0>);
- void renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+ void renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
dealii::internal::int2type<1>);
- void renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+ void renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
dealii::internal::int2type<2>);
- void renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+ void renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
dealii::internal::int2type<3>);
/**
* actual data format used to
* the present class.
*/
- std::vector<unsigned int> vertex_dofs;
+ std::vector<types::global_dof_index> vertex_dofs;
/**
* For each vertex in the
template <int dim, int spacedim>
inline
- unsigned int
+ types::global_dof_index
DoFHandler<dim,spacedim>::n_dofs () const
{
return number_cache.n_global_dofs;
template<int dim, int spacedim>
inline
- unsigned int DoFHandler<dim, spacedim>::MGVertexDoFs::get_index (const unsigned int,
+ types::global_dof_index DoFHandler<dim, spacedim>::MGVertexDoFs::get_index (const unsigned int,
const unsigned int) const
{
Assert (false, ExcNotImplemented ());
inline
void DoFHandler<dim, spacedim>::MGVertexDoFs::set_index (const unsigned int,
const unsigned int,
- const unsigned int)
+ types::global_dof_index)
{
Assert (false, ExcNotImplemented ());
}
* the degrees of freedom of each
* hex in the @p hex_dofs array.
*/
- std::vector<unsigned int> dof_offsets;
+ std::vector<types::global_dof_index> dof_offsets;
/**
* Store the global indices of
* DoFLevel() for detailed
* information.
*/
- std::vector<unsigned int> dofs;
+ std::vector<types::global_dof_index > dofs;
/**
* Set the global index of
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const unsigned int global_index,
+ const types::global_dof_index global_index,
const unsigned int obj_level);
/**
* information.
*/
template <int dimm, int spacedim>
- unsigned int
+ types::global_dof_index
get_dof_index (const dealii::hp::DoFHandler<dimm,spacedim> &dof_handler,
const unsigned int obj_index,
const unsigned int fe_index,
template <int dim>
template <int dimm, int spacedim>
inline
- unsigned int
+ types::global_dof_index
DoFObjects<dim>::
get_dof_index (const dealii::hp::DoFHandler<dimm,spacedim> &dof_handler,
const unsigned int obj_index,
// an exception if we can't
// find a set for this
// particular fe_index
- const unsigned int starting_offset = dof_offsets[obj_index];
+ const types::global_dof_index starting_offset = dof_offsets[obj_index];
const unsigned int *pointer = &dofs[starting_offset];
while (true)
{
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const unsigned int global_index,
+ const types::global_dof_index global_index,
const unsigned int obj_level)
{
Assert ((fe_index != dealii::hp::DoFHandler<dimm,spacedim>::default_fe_index),
// an exception if we can't
// find a set for this
// particular fe_index
- const unsigned int starting_offset = dof_offsets[obj_index];
+ const types::global_dof_index starting_offset = dof_offsets[obj_index];
unsigned int *pointer = &dofs[starting_offset];
while (true)
{
// find a set for this
// particular fe_index
const unsigned int starting_offset = dof_offsets[obj_index];
- const unsigned int *pointer = &dofs[starting_offset];
+ const types::global_dof_index *pointer = &dofs[starting_offset];
unsigned int counter = 0;
while (true)
{
template <int dim>
template <int dimm, int spacedim>
inline
- unsigned int
+ types::global_dof_index
DoFObjects<dim>::
nth_active_fe_index (const dealii::hp::DoFHandler<dimm,spacedim> &dof_handler,
const unsigned int obj_level,
// find a set for this
// particular fe_index
const unsigned int starting_offset = dof_offsets[obj_index];
- const unsigned int *pointer = &dofs[starting_offset];
+ const types::global_dof_index *pointer = &dofs[starting_offset];
unsigned int counter = 0;
while (true)
{
// find a set for this
// particular fe_index
const unsigned int starting_offset = dof_offsets[obj_index];
- const unsigned int *pointer = &dofs[starting_offset];
+ const types::global_dof_index *pointer = &dofs[starting_offset];
while (true)
{
if (*pointer == numbers::invalid_unsigned_int)
* Return the number of entries
* in a specific row.
*/
- unsigned int get_row_length (const unsigned int row) const;
+ unsigned int get_row_length (const types::global_dof_index row) const;
/**
* Return the number of nonzero
template <typename number>
unsigned int
-BlockSparseMatrix<number>::get_row_length (const unsigned int row) const
+BlockSparseMatrix<number>::get_row_length (const types::global_dof_index row) const
{
return sparsity_pattern->row_length(row);
}
* space. It is the sum of rows
* of the rows of sub-matrices.
*/
- unsigned int n_rows () const;
+ types::global_dof_index n_rows () const;
/**
* Return number of columns of
* columns of the columns of
* sub-matrices.
*/
- unsigned int n_cols () const;
+ types::global_dof_index n_cols () const;
/**
* Return the dimension of the
* matrix is of dimension
* $m \times n$.
*/
- unsigned int m () const;
+ types::global_dof_index m () const;
/**
* Return the dimension of the
* matrix is of dimension
* $m \times n$.
*/
- unsigned int n () const;
+ types::global_dof_index n () const;
/**
* Set the element <tt>(i,j)</tt>
* allowed to store zero values
* in non-existent fields.
*/
- void set (const unsigned int i,
- const unsigned int j,
+ void set (const types::global_dof_index i,
+ const types::global_dof_index j,
const Number value);
/**
* is allowed to store zero
* values in non-existent fields.
*/
- void add (const unsigned int i, const unsigned int j,
+ void add (const types::global_dof_index i, const types::global_dof_index j,
const Number value);
template <typename Number>
inline
-unsigned int
+types::global_dof_index
BlockSparseMatrixEZ<Number>::m () const
{
return n_rows();
template <typename Number>
inline
-unsigned int
+types::global_dof_index
BlockSparseMatrixEZ<Number>::n () const
{
return n_cols();
template <typename Number>
inline
void
-BlockSparseMatrixEZ<Number>::set (const unsigned int i,
- const unsigned int j,
+BlockSparseMatrixEZ<Number>::set (const types::global_dof_index i,
+ const types::global_dof_index j,
const Number value)
{
Assert (numbers::is_finite(value), ExcNumberNotFinite());
- const std::pair<unsigned int,unsigned int>
+ const std::pair<unsigned int,types::global_dof_index>
row_index = row_indices.global_to_local (i),
col_index = column_indices.global_to_local (j);
block(row_index.first,col_index.first).set (row_index.second,
template <typename Number>
inline
void
-BlockSparseMatrixEZ<Number>::add (const unsigned int i,
- const unsigned int j,
+BlockSparseMatrixEZ<Number>::add (const types::global_dof_index i,
+ const types::global_dof_index j,
const Number value)
{
Assert (numbers::is_finite(value), ExcNumberNotFinite());
- const std::pair<unsigned int,unsigned int>
+ const std::pair<unsigned int,types::global_dof_index>
row_index = row_indices.global_to_local (i),
col_index = column_indices.global_to_local (j);
block(row_index.first,col_index.first).add (row_index.second,
{
const unsigned int rows = n_block_rows();
const unsigned int columns = n_block_cols();
- std::vector<unsigned int> row_sizes (rows);
- std::vector<unsigned int> col_sizes (columns);
+ std::vector<types::global_dof_index> row_sizes (rows);
+ std::vector<types::global_dof_index> col_sizes (columns);
// first find out the row sizes
// from the first block column
* to which block <tt>(i,j)</tt> belongs
* and then relays to that block.
*/
- void add (const unsigned int i, const unsigned int j);
+ void add (const types::global_dof_index i, const types::global_dof_index j);
/**
* Add several nonzero entries to the
* of the (block-)rows of
* sub-matrices.
*/
- unsigned int n_rows () const;
+ types::global_dof_index n_rows () const;
/**
* Return number of columns of
* columns of the (block-)columns
* of sub-matrices.
*/
- unsigned int n_cols () const;
+ types::global_dof_index n_cols () const;
/**
* Check if a value at a certain
* position may be non-zero.
*/
- bool exists (const unsigned int i, const unsigned int j) const;
+ bool exists (const types::global_dof_index i, const types::global_dof_index j) const;
/**
* Number of entries in a
* all the blocks that form this
* row.
*/
- unsigned int row_length (const unsigned int row) const;
+ unsigned int row_length (const types::global_dof_index row) const;
/**
* Return the number of nonzero
*/
void reinit (const BlockIndices &row_indices,
const BlockIndices &col_indices,
- const std::vector<std::vector<unsigned int> > &row_lengths);
+ const std::vector<std::vector<types::global_dof_index> > &row_lengths);
/**
* and then entering the index
* values.
*/
- BlockCompressedSparsityPattern (const std::vector<unsigned int> &row_block_sizes,
- const std::vector<unsigned int> &col_block_sizes);
+ BlockCompressedSparsityPattern (const std::vector<types::global_dof_index> &row_block_sizes,
+ const std::vector<types::global_dof_index> &col_block_sizes);
/**
* Initialize the pattern with
* <tt>row_block_sizes[i]</tt>
* times <tt>col_block_sizes[j]</tt>.
*/
- void reinit (const std::vector< unsigned int > &row_block_sizes,
- const std::vector< unsigned int > &col_block_sizes);
+ void reinit (const std::vector< types::global_dof_index > &row_block_sizes,
+ const std::vector< types::global_dof_index > &col_block_sizes);
/**
* Resize the matrix to a tensor
* and then entering the index
* values.
*/
- BlockCompressedSetSparsityPattern (const std::vector<unsigned int> &row_block_sizes,
- const std::vector<unsigned int> &col_block_sizes);
+ BlockCompressedSetSparsityPattern (const std::vector<types::global_dof_index> &row_block_sizes,
+ const std::vector<types::global_dof_index> &col_block_sizes);
/**
* Initialize the pattern with
* <tt>row_block_sizes[i]</tt>
* times <tt>col_block_sizes[j]</tt>.
*/
- void reinit (const std::vector< unsigned int > &row_block_sizes,
- const std::vector< unsigned int > &col_block_sizes);
+ void reinit (const std::vector< types::global_dof_index > &row_block_sizes,
+ const std::vector< types::global_dof_index > &col_block_sizes);
/**
* Resize the matrix to a tensor
* and then entering the index
* values.
*/
- BlockCompressedSimpleSparsityPattern (const std::vector<unsigned int> &row_block_sizes,
- const std::vector<unsigned int> &col_block_sizes);
+ BlockCompressedSimpleSparsityPattern (const std::vector<types::global_dof_index> &row_block_sizes,
+ const std::vector<types::global_dof_index> &col_block_sizes);
/**
* Initialize the pattern with symmetric
* <tt>row_block_sizes[i]</tt>
* times <tt>col_block_sizes[j]</tt>.
*/
- void reinit (const std::vector< unsigned int > &row_block_sizes,
- const std::vector< unsigned int > &col_block_sizes);
+ void reinit (const std::vector< types::global_dof_index > &row_block_sizes,
+ const std::vector< types::global_dof_index > &col_block_sizes);
/**
* Resize the pattern with symmetric
* and then entering the index
* values.
*/
- BlockSparsityPattern (const std::vector<unsigned int> &row_block_sizes,
- const std::vector<unsigned int> &col_block_sizes);
+ BlockSparsityPattern (const std::vector<types::global_dof_index> &row_block_sizes,
+ const std::vector<types::global_dof_index> &col_block_sizes);
/**
* Initialize the pattern with an array
* <tt>row_block_sizes[i]</tt>
* times <tt>col_block_sizes[j]</tt>.
*/
- void reinit (const std::vector< unsigned int > &row_block_sizes,
- const std::vector< unsigned int > &col_block_sizes);
+ void reinit (const std::vector< types::global_dof_index > &row_block_sizes,
+ const std::vector< types::global_dof_index > &col_block_sizes);
/**
* Resize the matrix to a square tensor
template <class SparsityPatternBase>
inline
void
-BlockSparsityPatternBase<SparsityPatternBase>::add (const unsigned int i,
- const unsigned int j)
+BlockSparsityPatternBase<SparsityPatternBase>::add (const types::global_dof_index i,
+ const types::global_dof_index j)
{
// if you get an error here, are
// you sure you called
// <tt>collect_sizes()</tt> before?
- const std::pair<unsigned int,unsigned int>
+ const std::pair<unsigned int,types::global_dof_index>
row_index = row_indices.global_to_local (i),
col_index = column_indices.global_to_local (j);
sub_objects[row_index.first][col_index.first]->add (row_index.second,
template <class SparsityPatternBase>
template <typename ForwardIterator>
void
-BlockSparsityPatternBase<SparsityPatternBase>::add_entries (const unsigned int row,
+BlockSparsityPatternBase<SparsityPatternBase>::add_entries (const types::global_dof_index row,
ForwardIterator begin,
ForwardIterator end,
const bool indices_are_sorted)
counter_within_block.resize (this->n_block_cols());
}
- const unsigned int n_cols = static_cast<unsigned int>(end - begin);
+ const types::global_dof_index n_cols = static_cast<types::global_dof_index>(end - begin);
// Resize sub-arrays to n_cols. This
// is a bit wasteful, but we resize
// comes from an element matrix).
for (ForwardIterator it = begin; it != end; ++it)
{
- const unsigned int col = *it;
+ const types::global_dof_index col = *it;
- const std::pair<unsigned int, unsigned int>
+ const std::pair<unsigned int, types::global_dof_index>
col_index = this->column_indices.global_to_local(col);
const unsigned int local_index = counter_within_block[col_index.first]++;
// where we should start reading out
// data. Now let's write the data into
// the individual blocks!
- const std::pair<unsigned int,unsigned int>
+ const std::pair<unsigned int,types::global_dof_index>
row_index = this->row_indices.global_to_local (row);
for (unsigned int block_col=0; block_col<n_block_cols(); ++block_col)
{
template <class SparsityPatternBase>
inline
bool
-BlockSparsityPatternBase<SparsityPatternBase>::exists (const unsigned int i,
- const unsigned int j) const
+BlockSparsityPatternBase<SparsityPatternBase>::exists (const types::global_dof_index i,
+ const types::global_dof_index j) const
{
// if you get an error here, are
// you sure you called
// <tt>collect_sizes()</tt> before?
- const std::pair<unsigned int,unsigned int>
+ const std::pair<unsigned int,types::global_dof_index>
row_index = row_indices.global_to_local (i),
col_index = column_indices.global_to_local (j);
return sub_objects[row_index.first][col_index.first]->exists (row_index.second,
inline
unsigned int
BlockSparsityPatternBase<SparsityPatternBase>::
-row_length (const unsigned int row) const
+row_length (const types::global_dof_index row) const
{
- const std::pair<unsigned int,unsigned int>
+ const std::pair<unsigned int,types::global_dof_index>
row_index = row_indices.global_to_local (row);
unsigned int c = 0;
* use blocks of different
* sizes.
*/
- explicit BlockVector (const unsigned int num_blocks = 0,
- const unsigned int block_size = 0);
+ explicit BlockVector (const unsigned int num_blocks = 0,
+ const types::global_dof_index block_size = 0);
/**
* Copy-Constructor. Dimension set to
* <tt>block_sizes[i]</tt> zero
* elements.
*/
- BlockVector (const std::vector<unsigned int> &block_sizes);
+ BlockVector (const std::vector<types::global_dof_index> &block_sizes);
/**
* Constructor. Initialize vector
* is filled with zeros.
*/
void reinit (const unsigned int num_blocks,
- const unsigned int block_size = 0,
+ const types::global_dof_index block_size = 0,
const bool fast = false);
/**
* since they may be routed to
* the wrong block.
*/
- void reinit (const std::vector<unsigned int> &N,
- const bool fast=false);
+ void reinit (const std::vector<types::global_dof_index> &N,
+ const bool fast=false);
/**
* Reinitialize the BlockVector
template <typename Number>
BlockVector<Number>::BlockVector (const unsigned int n_blocks,
- const unsigned int block_size)
+ const types::global_dof_index block_size)
{
reinit (n_blocks, block_size);
}
template <typename Number>
-BlockVector<Number>::BlockVector (const std::vector<unsigned int> &n)
+BlockVector<Number>::BlockVector (const std::vector<types::global_dof_index> &n)
{
reinit (n, false);
}
template <typename Number>
-void BlockVector<Number>::reinit (const unsigned int n_bl,
- const unsigned int bl_sz,
- const bool fast)
+void BlockVector<Number>::reinit (const unsigned int n_bl,
+ const types::global_dof_index bl_sz,
+ const bool fast)
{
- std::vector<unsigned int> n(n_bl, bl_sz);
+ std::vector<types::global_dof_index> n(n_bl, bl_sz);
reinit(n, fast);
}
template <typename Number>
-void BlockVector<Number>::reinit (const std::vector<unsigned int> &n,
- const bool fast)
+void BlockVector<Number>::reinit (const std::vector<types::global_dof_index> &n,
+ const bool fast)
{
this->block_indices.reinit (n);
if (this->components.size() != this->n_blocks())
* const or non-const
* reference.
*/
- Iterator (BlockVector &parent,
- const unsigned int global_index);
+ Iterator (BlockVector &parent,
+ const types::global_dof_index global_index);
/**
* Copy constructor.
* variables.
*/
Iterator (BlockVector &parent,
- const unsigned int global_index,
- const unsigned int current_block,
- const unsigned int index_within_block,
- const unsigned int next_break_forward,
- const unsigned int next_break_backward);
+ const types::global_dof_index global_index,
+ const unsigned int current_block,
+ const types::global_dof_index index_within_block,
+ const types::global_dof_index next_break_forward,
+ const types::global_dof_index next_break_backward);
public:
* element to which we
* presently point.
*/
- unsigned int global_index;
+ types::global_dof_index global_index;
/**
* Current block and index
* to.
*/
unsigned int current_block;
- unsigned int index_within_block;
+ types::global_dof_index index_within_block;
/**
* Indices of the global
* efficient than always
* asking the parent object.
*/
- unsigned int next_break_forward;
- unsigned int next_break_backward;
+ types::global_dof_index next_break_forward;
+ types::global_dof_index next_break_backward;
/**
* Move forward one element.
* is the sum of the dimensions of all
* components.
*/
- unsigned int size () const;
+ types::global_dof_index size () const;
/**
* Return an iterator pointing to
/**
* Access components, returns U(i).
*/
- value_type operator() (const unsigned int i) const;
+ value_type operator() (const types::global_dof_index i) const;
/**
* Access components, returns U(i)
* as a writeable reference.
*/
- reference operator() (const unsigned int i);
+ reference operator() (const types::global_dof_index i);
/**
* Access components, returns U(i).
*
* Exactly the same as operator().
*/
- value_type operator[] (const unsigned int i) const;
+ value_type operator[] (const types::global_dof_index i) const;
/**
* Access components, returns U(i)
*
* Exactly the same as operator().
*/
- reference operator[] (const unsigned int i);
+ reference operator[] (const types::global_dof_index i);
/**
* Copy operator: fill all components of
* indices.
*/
template <typename Number>
- void add (const std::vector<unsigned int> &indices,
- const std::vector<Number> &values);
+ void add (const std::vector<types::global_dof_index> &indices,
+ const std::vector<Number> &values);
/**
* This is a second collective
* values.
*/
template <typename Number>
- void add (const std::vector<unsigned int> &indices,
- const Vector<Number> &values);
+ void add (const std::vector<types::global_dof_index> &indices,
+ const Vector<Number> &values);
/**
* Take an address where
* functions above.
*/
template <typename Number>
- void add (const unsigned int n_elements,
- const unsigned int *indices,
- const Number *values);
+ void add (const unsigned int n_elements,
+ const types::global_dof_index *indices,
+ const Number *values);
/**
* $U(0-DIM)+=s$. Addition of <tt>s</tt>
inline
Iterator<BlockVectorType,constness>::
Iterator (BlockVector &parent,
- const unsigned int global_index,
- const unsigned int current_block,
- const unsigned int index_within_block,
- const unsigned int next_break_forward,
- const unsigned int next_break_backward)
+ const types::global_dof_index global_index,
+ const unsigned int current_block,
+ const types::global_dof_index index_within_block,
+ const types::global_dof_index next_break_forward,
+ const types::global_dof_index next_break_backward)
:
parent (&parent),
global_index (global_index),
template <class BlockVectorType, bool constness>
Iterator<BlockVectorType,constness>::
- Iterator (BlockVector &parent,
- const unsigned int global_index)
+ Iterator (BlockVector &parent,
+ const types::global_dof_index global_index)
:
parent (&parent),
global_index (global_index)
// past-the-end
if (global_index < parent.size())
{
- const std::pair<unsigned int, unsigned int>
+ const std::pair<unsigned int, types::global_dof_index>
indices = parent.block_indices.global_to_local(global_index);
current_block = indices.first;
index_within_block = indices.second;
template <class VectorType>
inline
-unsigned int
+types::global_dof_index
BlockVectorBase<VectorType>::size () const
{
return block_indices.total_size();
void
BlockVectorBase<VectorType>::collect_sizes ()
{
- std::vector<unsigned int> sizes (n_blocks());
+ std::vector<types::global_dof_index> sizes (n_blocks());
for (unsigned int i=0; i<n_blocks(); ++i)
sizes[i] = block(i).size();
template <typename Number>
inline
void
-BlockVectorBase<VectorType>::add (const std::vector<unsigned int> &indices,
- const std::vector<Number> &values)
+BlockVectorBase<VectorType>::add (const std::vector<types::global_dof_index> &indices,
+ const std::vector<Number> &values)
{
Assert (indices.size() == values.size(),
ExcDimensionMismatch(indices.size(), values.size()));
template <typename Number>
inline
void
-BlockVectorBase<VectorType>::add (const std::vector<unsigned int> &indices,
- const Vector<Number> &values)
+BlockVectorBase<VectorType>::add (const std::vector<types::global_dof_index> &indices,
+ const Vector<Number> &values)
{
Assert (indices.size() == values.size(),
ExcDimensionMismatch(indices.size(), values.size()));
template <typename Number>
inline
void
-BlockVectorBase<VectorType>::add (const unsigned int n_indices,
- const unsigned int *indices,
- const Number *values)
+BlockVectorBase<VectorType>::add (const unsigned int n_indices,
+ const types::global_dof_index *indices,
+ const Number *values)
{
for (unsigned int i=0; i<n_indices; ++i)
(*this)(indices[i]) += values[i];
template <class VectorType>
inline
typename BlockVectorBase<VectorType>::value_type
-BlockVectorBase<VectorType>::operator() (const unsigned int i) const
+BlockVectorBase<VectorType>::operator() (const types::global_dof_index i) const
{
- const std::pair<unsigned int,unsigned int> local_index
+ const std::pair<unsigned int,types::global_dof_index> local_index
= block_indices.global_to_local (i);
return components[local_index.first](local_index.second);
}
template <class VectorType>
inline
typename BlockVectorBase<VectorType>::reference
-BlockVectorBase<VectorType>::operator() (const unsigned int i)
+BlockVectorBase<VectorType>::operator() (const types::global_dof_index i)
{
- const std::pair<unsigned int,unsigned int> local_index
+ const std::pair<unsigned int,types::global_dof_index> local_index
= block_indices.global_to_local (i);
return components[local_index.first](local_index.second);
}
template <class VectorType>
inline
typename BlockVectorBase<VectorType>::value_type
-BlockVectorBase<VectorType>::operator[] (const unsigned int i) const
+BlockVectorBase<VectorType>::operator[] (const types::global_dof_index i) const
{
return operator()(i);
}
template <class VectorType>
inline
typename BlockVectorBase<VectorType>::reference
-BlockVectorBase<VectorType>::operator[] (const unsigned int i)
+BlockVectorBase<VectorType>::operator[] (const types::global_dof_index i)
{
return operator()(i);
}
* matrix is of dimension
* $m \times n$.
*/
- unsigned int m () const;
+ types::global_dof_index m () const;
/**
* Return the dimension of the
* matrix is of dimension
* $m \times n$.
*/
- unsigned int n () const;
+ types::global_dof_index n () const;
/**
* Return the number of nonzero
* is allowed to store zero
* values in non-existent fields.
*/
- void set (const unsigned int i,
- const unsigned int j,
+ void set (const types::global_dof_index i,
+ const types::global_dof_index j,
const number value);
/**
* is allowed to store zero
* values in non-existent fields.
*/
- void add (const unsigned int i,
- const unsigned int j,
+ void add (const types::global_dof_index i,
+ const types::global_dof_index j,
const number value);
/**
* tailored better to a sparse matrix
* structure.
*/
- number operator () (const unsigned int i,
- const unsigned int j) const;
+ number operator () (const types::global_dof_index i,
+ const types::global_dof_index j) const;
/**
* This function is mostly like
* tailored better to a sparse matrix
* structure.
*/
- number el (const unsigned int i,
- const unsigned int j) const;
+ number el (const types::global_dof_index i,
+ const types::global_dof_index j) const;
/**
* Return the main diagonal
* involve searching for the
* right column number.
*/
- number diag_element (const unsigned int i) const;
+ number diag_element (const types::global_dof_index i) const;
/**
* Same as above, but return a
* writeable reference. You're
* sure you know what you do?
*/
- number &diag_element (const unsigned int i);
+ number &diag_element (const types::global_dof_index i);
//@}
/**
* Return the location of entry
* $(i,j)$ within the val array.
*/
- unsigned int compute_location (const unsigned int i,
- const unsigned int j) const;
+ unsigned int compute_location (const types::global_dof_index i,
+ const types::global_dof_index j) const;
// make all other sparse matrices
// friends
template <typename number>
inline
-unsigned int ChunkSparseMatrix<number>::m () const
+types::global_dof_index ChunkSparseMatrix<number>::m () const
{
Assert (cols != 0, ExcNotInitialized());
return cols->rows;
template <typename number>
inline
-unsigned int ChunkSparseMatrix<number>::n () const
+types::global_dof_index ChunkSparseMatrix<number>::n () const
{
Assert (cols != 0, ExcNotInitialized());
return cols->cols;
template <typename number>
inline
unsigned int
-ChunkSparseMatrix<number>::compute_location (const unsigned int i,
- const unsigned int j) const
+ChunkSparseMatrix<number>::compute_location (const types::global_dof_index i,
+ const types::global_dof_index j) const
{
const unsigned int chunk_size = cols->get_chunk_size();
const unsigned int chunk_index
template <typename number>
inline
-void ChunkSparseMatrix<number>::set (const unsigned int i,
- const unsigned int j,
+void ChunkSparseMatrix<number>::set (const types::global_dof_index i,
+ const types::global_dof_index j,
const number value)
{
template <typename number>
inline
-void ChunkSparseMatrix<number>::add (const unsigned int i,
- const unsigned int j,
+void ChunkSparseMatrix<number>::add (const types::global_dof_index i,
+ const types::global_dof_index j,
const number value)
{
template <typename number>
inline
-number ChunkSparseMatrix<number>::operator () (const unsigned int i,
- const unsigned int j) const
+number ChunkSparseMatrix<number>::operator () (const types::global_dof_index i,
+ const types::global_dof_index j) const
{
Assert (cols != 0, ExcNotInitialized());
AssertThrow (compute_location(i,j) != SparsityPattern::invalid_entry,
template <typename number>
inline
-number ChunkSparseMatrix<number>::el (const unsigned int i,
- const unsigned int j) const
+number ChunkSparseMatrix<number>::el (const types::global_dof_index i,
+ const types::global_dof_index j) const
{
Assert (cols != 0, ExcNotInitialized());
const unsigned int index = compute_location(i,j);
template <typename number>
inline
-number ChunkSparseMatrix<number>::diag_element (const unsigned int i) const
+number ChunkSparseMatrix<number>::diag_element (const types::global_dof_index i) const
{
Assert (cols != 0, ExcNotInitialized());
Assert (cols->optimize_diagonal(), ExcNotQuadratic());
template <typename number>
inline
-number &ChunkSparseMatrix<number>::diag_element (const unsigned int i)
+number &ChunkSparseMatrix<number>::diag_element (const types::global_dof_index i)
{
Assert (cols != 0, ExcNotInitialized());
Assert (cols->optimize_diagonal(), ExcNotQuadratic());
* takes effect for quadratic
* matrices only.
*/
- ChunkSparsityPattern (const unsigned int m,
- const unsigned int n,
+ ChunkSparsityPattern (const types::global_dof_index m,
+ const types::global_dof_index n,
const unsigned int max_chunks_per_row,
const unsigned int chunk_size,
const bool optimize_diagonal = true);
* takes effect for quadratic
* matrices only.
*/
- ChunkSparsityPattern (const unsigned int m,
- const unsigned int n,
+ ChunkSparsityPattern (const types::global_dof_index m,
+ const types::global_dof_index n,
const std::vector<unsigned int> &row_lengths,
const unsigned int chunk_size,
const bool optimize_diagonal = true);
* taking row and column numbers
* separately.
*/
- ChunkSparsityPattern (const unsigned int n,
- const unsigned int max_per_row,
- const unsigned int chunk_size);
+ ChunkSparsityPattern (const types::global_dof_index n,
+ const unsigned int max_per_row,
+ const unsigned int chunk_size);
/**
* Initialize a quadratic matrix.
* diagonal entries first in row;
* see optimize_diagonal().
*/
- ChunkSparsityPattern (const unsigned int m,
+ ChunkSparsityPattern (const types::global_dof_index m,
const std::vector<unsigned int> &row_lengths,
const unsigned int chunk_size,
const bool optimize_diagonal = true);
* operations to the other
* <tt>reinit</tt> function.
*/
- void reinit (const unsigned int m,
- const unsigned int n,
+ void reinit (const types::global_dof_index m,
+ const types::global_dof_index n,
const unsigned int max_per_row,
const unsigned int chunk_size,
const bool optimize_diagonal = true);
* optimized access in relaxation
* methods of SparseMatrix.
*/
- void reinit (const unsigned int m,
- const unsigned int n,
+ void reinit (const types::global_dof_index m,
+ const types::global_dof_index n,
const std::vector<unsigned int> &row_lengths,
const unsigned int chunk_size,
const bool optimize_diagonal = true);
* Same as above, but with a
* VectorSlice argument instead.
*/
- void reinit (const unsigned int m,
- const unsigned int n,
+ void reinit (const types::global_dof_index m,
+ const types::global_dof_index n,
const VectorSlice<const std::vector<unsigned int> > &row_lengths,
const unsigned int chunk_size,
const bool optimize_diagonal = true);
* pairs.
*/
template <typename ForwardIterator>
- void copy_from (const unsigned int n_rows,
- const unsigned int n_cols,
+ void copy_from (const types::global_dof_index n_rows,
+ const types::global_dof_index n_cols,
const ForwardIterator begin,
const ForwardIterator end,
const unsigned int chunk_size,
* If the entry already exists, nothing
* bad happens.
*/
- void add (const unsigned int i,
- const unsigned int j);
+ void add (const types::global_dof_index i,
+ const types::global_dof_index j);
/**
* Make the sparsity pattern
* matrix, which equals the dimension
* of the image space.
*/
- inline unsigned int n_rows () const;
+ inline types::global_dof_index n_rows () const;
/**
* Return number of columns of this
* matrix, which equals the dimension
* of the range space.
*/
- inline unsigned int n_cols () const;
+ inline types::global_dof_index n_cols () const;
/**
* Check if a value at a certain
* position may be non-zero.
*/
- bool exists (const unsigned int i,
- const unsigned int j) const;
+ bool exists (const types::global_dof_index i,
+ const types::global_dof_index j) const;
/**
* Number of entries in a specific row.
*/
- unsigned int row_length (const unsigned int row) const;
+ unsigned int row_length (const types::global_dof_index row) const;
/**
* Compute the bandwidth of the matrix
* Number of rows that this sparsity
* structure shall represent.
*/
- unsigned int rows;
+ types::global_dof_index rows;
/**
* Number of columns that this sparsity
* structure shall represent.
*/
- unsigned int cols;
+ types::global_dof_index cols;
/**
* The size of chunks.
inline
-unsigned int
+types::global_dof_index
ChunkSparsityPattern::n_rows () const
{
return rows;
inline
-unsigned int
+types::global_dof_index
ChunkSparsityPattern::n_cols () const
{
return cols;
template <typename ForwardIterator>
void
-ChunkSparsityPattern::copy_from (const unsigned int n_rows,
- const unsigned int n_cols,
+ChunkSparsityPattern::copy_from (const types::global_dof_index n_rows,
+ const types::global_dof_index n_cols,
const ForwardIterator begin,
const ForwardIterator end,
const unsigned int chunk_size,
* matrix with @p m rows and
* @p n columns.
*/
- CompressedSetSparsityPattern (const unsigned int m,
- const unsigned int n);
+ CompressedSetSparsityPattern (const types::global_dof_index m,
+ const types::global_dof_index n);
/**
* Initialize a square matrix of
* dimension @p n.
*/
- CompressedSetSparsityPattern (const unsigned int n);
+ CompressedSetSparsityPattern (const types::global_dof_index n);
/**
* Copy operator. For this the
* max_entries_per_row() nonzero
* entries per row.
*/
- void reinit (const unsigned int m,
- const unsigned int n);
+ void reinit (const types::global_dof_index m,
+ const types::global_dof_index n);
/**
* Since this object is kept
* matrix. If the entry already
* exists, nothing bad happens.
*/
- void add (const unsigned int i,
- const unsigned int j);
+ void add (const types::global_dof_index i,
+ const types::global_dof_index j);
/**
* Add several nonzero entries to the
* happens.
*/
template <typename ForwardIterator>
- void add_entries (const unsigned int row,
- ForwardIterator begin,
- ForwardIterator end,
- const bool indices_are_sorted = false);
+ void add_entries (const types::global_dof_index row,
+ ForwardIterator begin,
+ ForwardIterator end,
+ const bool indices_are_sorted = false);
/**
* Check if a value at a certain
* position may be non-zero.
*/
- bool exists (const unsigned int i,
- const unsigned int j) const;
+ bool exists (const types::global_dof_index i,
+ const types::global_dof_index j) const;
/**
* Make the sparsity pattern
* matrix, which equals the dimension
* of the image space.
*/
- unsigned int n_rows () const;
+ types::global_dof_index n_rows () const;
/**
* Return number of columns of this
* matrix, which equals the dimension
* of the range space.
*/
- unsigned int n_cols () const;
+ types::global_dof_index n_cols () const;
/**
* Number of entries in a specific row.
*/
- unsigned int row_length (const unsigned int row) const;
+ unsigned int row_length (const types::global_dof_index row) const;
/**
* Return an iterator that can loop over
* row. Dereferencing the iterator yields
* a column index.
*/
- row_iterator row_begin (const unsigned int row) const;
+ row_iterator row_begin (const types::global_dof_index row) const;
/**
* End iterator for the given row.
*/
- row_iterator row_end (const unsigned int row) const;
+ row_iterator row_end (const types::global_dof_index row) const;
/**
* Number of rows that this sparsity
* structure shall represent.
*/
- unsigned int rows;
+ types::global_dof_index rows;
/**
* Number of columns that this sparsity
* structure shall represent.
*/
- unsigned int cols;
+ types::global_dof_index cols;
/**
* For each row of the matrix, store the
* Add the given column number to
* this line.
*/
- void add (const unsigned int col_num);
+ void add (const types::global_dof_index col_num);
/**
* Add the columns specified by the
inline
void
-CompressedSetSparsityPattern::Line::add (const unsigned int j)
+CompressedSetSparsityPattern::Line::add (const types::global_dof_index j)
{
entries.insert (j);
}
inline
-unsigned int
+types::global_dof_index
CompressedSetSparsityPattern::n_rows () const
{
return rows;
inline
-unsigned int
+types::global_dof_index
CompressedSetSparsityPattern::n_cols () const
{
return cols;
inline
void
-CompressedSetSparsityPattern::add (const unsigned int i,
- const unsigned int j)
+CompressedSetSparsityPattern::add (const types::global_dof_index i,
+ const types::global_dof_index j)
{
Assert (i<rows, ExcIndexRange(i, 0, rows));
Assert (j<cols, ExcIndexRange(j, 0, cols));
template <typename ForwardIterator>
inline
void
-CompressedSetSparsityPattern::add_entries (const unsigned int row,
+CompressedSetSparsityPattern::add_entries (const types::global_dof_index row,
ForwardIterator begin,
ForwardIterator end,
const bool /*indices_are_sorted*/)
inline
unsigned int
-CompressedSetSparsityPattern::row_length (const unsigned int row) const
+CompressedSetSparsityPattern::row_length (const types::global_dof_index row) const
{
Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
inline
CompressedSetSparsityPattern::row_iterator
-CompressedSetSparsityPattern::row_begin (const unsigned int row) const
+CompressedSetSparsityPattern::row_begin (const types::global_dof_index row) const
{
return (lines[row].entries.begin ());
}
inline
CompressedSetSparsityPattern::row_iterator
-CompressedSetSparsityPattern::row_end (const unsigned int row) const
+CompressedSetSparsityPattern::row_end (const types::global_dof_index row) const
{
return (lines[row].entries.end ());
}
* default argument keeps all
* entries.
*/
- CompressedSimpleSparsityPattern (const unsigned int m,
- const unsigned int n,
+ CompressedSimpleSparsityPattern (const types::global_dof_index m,
+ const types::global_dof_index n,
const IndexSet &rowset = IndexSet());
/**
* Initialize a square matrix of
* dimension @p n.
*/
- CompressedSimpleSparsityPattern (const unsigned int n);
+ CompressedSimpleSparsityPattern (const types::global_dof_index n);
/**
* Copy operator. For this the
* default argument keeps all
* entries.
*/
- void reinit (const unsigned int m,
- const unsigned int n,
+ void reinit (const types::global_dof_index m,
+ const types::global_dof_index n,
const IndexSet &rowset = IndexSet());
/**
* matrix. If the entry already
* exists, nothing bad happens.
*/
- void add (const unsigned int i,
- const unsigned int j);
+ void add (const types::global_dof_index i,
+ const types::global_dof_index j);
/**
* Add several nonzero entries to the
* happens.
*/
template <typename ForwardIterator>
- void add_entries (const unsigned int row,
- ForwardIterator begin,
- ForwardIterator end,
- const bool indices_are_unique_and_sorted = false);
+ void add_entries (const types::global_dof_index row,
+ ForwardIterator begin,
+ ForwardIterator end,
+ const bool indices_are_unique_and_sorted = false);
/**
* Check if a value at a certain
* position may be non-zero.
*/
- bool exists (const unsigned int i,
- const unsigned int j) const;
+ bool exists (const types::global_dof_index i,
+ const types::global_dof_index j) const;
/**
* Make the sparsity pattern
* matrix, which equals the dimension
* of the image space.
*/
- unsigned int n_rows () const;
+ types::global_dof_index n_rows () const;
/**
* Return number of columns of this
* matrix, which equals the dimension
* of the range space.
*/
- unsigned int n_cols () const;
+ types::global_dof_index n_cols () const;
/**
* Number of entries in a
* index set of rows that we want
* to store.
*/
- unsigned int row_length (const unsigned int row) const;
+ unsigned int row_length (const types::global_dof_index row) const;
/**
* Access to column number field.
* Return the column number of
* the @p indexth entry in @p row.
*/
- unsigned int column_number (const unsigned int row,
- const unsigned int index) const;
+ unsigned int column_number (const types::global_dof_index row,
+ const types::global_dof_index index) const;
/**
* Return an iterator that can loop over
* row. Dereferencing the iterator yields
* a column index.
*/
- row_iterator row_begin (const unsigned int row) const;
+ row_iterator row_begin (const types::global_dof_index row) const;
/**
* Returns the end of the current row.
*/
- row_iterator row_end (const unsigned int row) const;
+ row_iterator row_end (const types::global_dof_index row) const;
/**
* Compute the bandwidth of the matrix
* represented by this structure. The
* Number of rows that this sparsity
* structure shall represent.
*/
- unsigned int rows;
+ types::global_dof_index rows;
/**
* Number of columns that this sparsity
* structure shall represent.
*/
- unsigned int cols;
+ types::global_dof_index cols;
/**
* A set that contains the valid rows.
* Add the given column number to
* this line.
*/
- void add (const unsigned int col_num);
+ void add (const types::global_dof_index col_num);
/**
* Add the columns specified by the
inline
void
-CompressedSimpleSparsityPattern::Line::add (const unsigned int j)
+CompressedSimpleSparsityPattern::Line::add (const types::global_dof_index j)
{
// first check the last element (or if line
// is still empty)
inline
-unsigned int
+types::global_dof_index
CompressedSimpleSparsityPattern::n_rows () const
{
return rows;
inline
-unsigned int
+types::global_dof_index
CompressedSimpleSparsityPattern::n_cols () const
{
return cols;
inline
void
-CompressedSimpleSparsityPattern::add (const unsigned int i,
- const unsigned int j)
+CompressedSimpleSparsityPattern::add (const types::global_dof_index i,
+ const types::global_dof_index j)
{
Assert (i<rows, ExcIndexRange(i, 0, rows));
Assert (j<cols, ExcIndexRange(j, 0, cols));
template <typename ForwardIterator>
inline
void
-CompressedSimpleSparsityPattern::add_entries (const unsigned int row,
+CompressedSimpleSparsityPattern::add_entries (const types::global_dof_index row,
ForwardIterator begin,
ForwardIterator end,
const bool indices_are_sorted)
inline
unsigned int
-CompressedSimpleSparsityPattern::row_length (const unsigned int row) const
+CompressedSimpleSparsityPattern::row_length (const types::global_dof_index row) const
{
Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
if (rowset.size() > 0 && !rowset.is_element(row))
inline
unsigned int
-CompressedSimpleSparsityPattern::column_number (const unsigned int row,
- const unsigned int index) const
+CompressedSimpleSparsityPattern::column_number (const types::global_dof_index row,
+ const types::global_dof_index index) const
{
Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
Assert( rowset.size() == 0 || rowset.is_element(row), ExcInternalError());
inline
CompressedSimpleSparsityPattern::row_iterator
-CompressedSimpleSparsityPattern::row_begin (const unsigned int row) const
+CompressedSimpleSparsityPattern::row_begin (const types::global_dof_index row) const
{
Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
const unsigned int local_row = rowset.size() ? rowset.index_within_set(row) : row;
inline
CompressedSimpleSparsityPattern::row_iterator
-CompressedSimpleSparsityPattern::row_end (const unsigned int row) const
+CompressedSimpleSparsityPattern::row_end (const types::global_dof_index row) const
{
Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
const unsigned int local_row = rowset.size() ? rowset.index_within_set(row) : row;
* matrix with @p m rows and
* @p n columns.
*/
- CompressedSparsityPattern (const unsigned int m,
- const unsigned int n);
+ CompressedSparsityPattern (const types::global_dof_index m,
+ const types::global_dof_index n);
/**
* Initialize a square matrix of
* dimension @p n.
*/
- CompressedSparsityPattern (const unsigned int n);
+ CompressedSparsityPattern (const types::global_dof_index n);
/**
* Copy operator. For this the
* max_entries_per_row() nonzero
* entries per row.
*/
- void reinit (const unsigned int m,
- const unsigned int n);
+ void reinit (const types::global_dof_index m,
+ const types::global_dof_index n);
/**
* Since this object is kept
* matrix. If the entry already
* exists, nothing bad happens.
*/
- void add (const unsigned int i,
- const unsigned int j);
+ void add (const types::global_dof_index i,
+ const types::global_dof_index j);
/**
* Add several nonzero entries to the
* happens.
*/
template <typename ForwardIterator>
- void add_entries (const unsigned int row,
- ForwardIterator begin,
- ForwardIterator end,
- const bool indices_are_unique_and_sorted = false);
+ void add_entries (const types::global_dof_index row,
+ ForwardIterator begin,
+ ForwardIterator end,
+ const bool indices_are_unique_and_sorted = false);
/**
* Check if a value at a certain
* position may be non-zero.
*/
- bool exists (const unsigned int i,
- const unsigned int j) const;
+ bool exists (const types::global_dof_index i,
+ const types::global_dof_index j) const;
/**
* Make the sparsity pattern
* matrix, which equals the dimension
* of the image space.
*/
- unsigned int n_rows () const;
+ types::global_dof_index n_rows () const;
/**
* Return number of columns of this
* matrix, which equals the dimension
* of the range space.
*/
- unsigned int n_cols () const;
+ types::global_dof_index n_cols () const;
/**
* Number of entries in a specific row.
*/
- unsigned int row_length (const unsigned int row) const;
+ unsigned int row_length (const types::global_dof_index row) const;
/**
* Access to column number field.
* Return the column number of
* the @p indexth entry in @p row.
*/
- unsigned int column_number (const unsigned int row,
- const unsigned int index) const;
+ unsigned int column_number (const types::global_dof_index row,
+ const unsigned int index) const;
/**
* Return an iterator that can loop over
* row. Dereferencing the iterator yields
* a column index.
*/
- row_iterator row_begin (const unsigned int row) const;
+ row_iterator row_begin (const types::global_dof_index row) const;
/**
* Returns the end of the current row.
*/
- row_iterator row_end (const unsigned int row) const;
+ row_iterator row_end (const types::global_dof_index row) const;
/**
* Compute the bandwidth of the matrix
* Number of rows that this sparsity
* structure shall represent.
*/
- unsigned int rows;
+ types::global_dof_index rows;
/**
* Number of columns that this sparsity
* structure shall represent.
*/
- unsigned int cols;
+ types::global_dof_index cols;
/**
* Store some data for each row
* Add the given column number to
* this line.
*/
- void add (const unsigned int col_num);
+ void add (const types::global_dof_index col_num);
/**
* Add the columns specified by the
inline
void
-CompressedSparsityPattern::Line::add (const unsigned int j)
+CompressedSparsityPattern::Line::add (const types::global_dof_index j)
{
// first check whether this entry is
// already in the cache. if so, we can
inline
-unsigned int
+types::global_dof_index
CompressedSparsityPattern::n_rows () const
{
return rows;
inline
-unsigned int
+types::global_dof_index
CompressedSparsityPattern::n_cols () const
{
return cols;
inline
void
-CompressedSparsityPattern::add (const unsigned int i,
- const unsigned int j)
+CompressedSparsityPattern::add (const types::global_dof_index i,
+ const types::global_dof_index j)
{
Assert (i<rows, ExcIndexRange(i, 0, rows));
Assert (j<cols, ExcIndexRange(j, 0, cols));
template <typename ForwardIterator>
inline
void
-CompressedSparsityPattern::add_entries (const unsigned int row,
+CompressedSparsityPattern::add_entries (const types::global_dof_index row,
ForwardIterator begin,
ForwardIterator end,
const bool indices_are_sorted)
inline
unsigned int
-CompressedSparsityPattern::row_length (const unsigned int row) const
+CompressedSparsityPattern::row_length (const types::global_dof_index row) const
{
Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
inline
unsigned int
-CompressedSparsityPattern::column_number (const unsigned int row,
- const unsigned int index) const
+CompressedSparsityPattern::column_number (const types::global_dof_index row,
+ const unsigned int index) const
{
Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
Assert (index < lines[row].entries.size(),
inline
CompressedSparsityPattern::row_iterator
-CompressedSparsityPattern::row_begin (const unsigned int row) const
+CompressedSparsityPattern::row_begin (const types::global_dof_index row) const
{
Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
inline
CompressedSparsityPattern::row_iterator
-CompressedSparsityPattern::row_end (const unsigned int row) const
+CompressedSparsityPattern::row_end (const types::global_dof_index row) const
{
Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
return lines[row].entries.end();
//TODO[WB]: We should have a function of the kind
-// ConstraintMatrix::add_constraint (const unsigned int constrained_dof,
-// const std::vector<std::pair<unsigned int, double> > &entries,
+// ConstraintMatrix::add_constraint (const types::global_dof_index constrained_dof,
+// const std::vector<std::pair<types::global_dof_index, double> > &entries,
// const double inhomogeneity = 0);
// rather than building up constraints piecemeal through add_line/add_entry
// etc. This would also eliminate the possibility of accidentally changing
* line. Always returns true if not in
* the distributed case.
*/
- bool can_store_line (const unsigned int line_index) const;
+ bool can_store_line (const types::global_dof_index line_index) const;
/**
* This function copies the content of @p
* line already exists, then the function
* simply returns without doing anything.
*/
- void add_line (const unsigned int line);
+ void add_line (const types::global_dof_index line);
/**
* Call the first add_line() function for
* inhomogeneities using
* set_inhomogeneity().
*/
- void add_lines (const std::set<unsigned int> &lines);
+ void add_lines (const std::set<types::global_dof_index> &lines);
/**
* Call the first add_line() function for
* same. Thus, it does no harm to
* enter a constraint twice.
*/
- void add_entry (const unsigned int line,
- const unsigned int column,
+ void add_entry (const types::global_dof_index line,
+ const types::global_dof_index column,
const double value);
/**
* function several times, but is
* faster.
*/
- void add_entries (const unsigned int line,
- const std::vector<std::pair<unsigned int,double> > &col_val_pairs);
+ void add_entries (const types::global_dof_index line,
+ const std::vector<std::pair<types::global_dof_index,double> > &col_val_pairs);
/**
* Set an imhomogeneity to the
* @note the line needs to be added with
* one of the add_line() calls first.
*/
- void set_inhomogeneity (const unsigned int line,
+ void set_inhomogeneity (const types::global_dof_index line,
const double value);
/**
* finally merge() them together
* again.
*/
- void shift (const unsigned int offset);
+ void shift (const types::global_dof_index offset);
/**
* Clear all entries of this
* called, we have to perform a linear
* search through all entries.
*/
- bool is_constrained (const unsigned int index) const;
+ bool is_constrained (const types::global_dof_index index) const;
/**
* Return whether the dof is
* freedom but with a weight different
* from one.
*/
- bool is_identity_constrained (const unsigned int index) const;
+ bool is_identity_constrained (const types::global_dof_index index) const;
/**
* Return the maximum number of other
* non-trivial inhomogeneous valeus set
* to the dof.
*/
- bool is_inhomogeneously_constrained (const unsigned int index) const;
+ bool is_inhomogeneously_constrained (const types::global_dof_index index) const;
/**
* Returns <tt>false</tt> if all
* zero pointer in case the dof is not
* constrained.
*/
- const std::vector<std::pair<unsigned int,double> > *
- get_constraint_entries (const unsigned int line) const;
+ const std::vector<std::pair<types::global_dof_index,double> > *
+ get_constraint_entries (const types::global_dof_index line) const;
/**
* Returns the value of the inhomogeneity
* line. Unconstrained dofs also return a
* zero value.
*/
- double get_inhomogeneity (const unsigned int line) const;
+ double get_inhomogeneity (const types::global_dof_index line) const;
/**
* Print the constraint lines. Mainly
template <class InVector, class OutVector>
void
distribute_local_to_global (const InVector &local_vector,
- const std::vector<unsigned int> &local_dof_indices,
+ const std::vector<types::global_dof_index> &local_dof_indices,
OutVector &global_vector) const;
/**
template <typename VectorType>
void
distribute_local_to_global (const Vector<double> &local_vector,
- const std::vector<unsigned int> &local_dof_indices,
+ const std::vector<types::global_dof_index> &local_dof_indices,
VectorType &global_vector,
const FullMatrix<double> &local_matrix) const;
template <typename MatrixType>
void
distribute_local_to_global (const FullMatrix<double> &local_matrix,
- const std::vector<unsigned int> &local_dof_indices,
+ const std::vector<types::global_dof_index> &local_dof_indices,
MatrixType &global_matrix) const;
/**
template <typename MatrixType>
void
distribute_local_to_global (const FullMatrix<double> &local_matrix,
- const std::vector<unsigned int> &row_indices,
- const std::vector<unsigned int> &col_indices,
+ const std::vector<types::global_dof_index> &row_indices,
+ const std::vector<types::global_dof_index> &col_indices,
MatrixType &global_matrix) const;
/**
void
distribute_local_to_global (const FullMatrix<double> &local_matrix,
const Vector<double> &local_vector,
- const std::vector<unsigned int> &local_dof_indices,
+ const std::vector<types::global_dof_index> &local_dof_indices,
MatrixType &global_matrix,
VectorType &global_vector,
bool use_inhomogeneities_for_rhs = false) const;
*/
template <typename SparsityType>
void
- add_entries_local_to_global (const std::vector<unsigned int> &local_dof_indices,
+ add_entries_local_to_global (const std::vector<types::global_dof_index> &local_dof_indices,
SparsityType &sparsity_pattern,
const bool keep_constrained_entries = true,
const Table<2,bool> &dof_mask = default_empty_table) const;
template <typename SparsityType>
void
- add_entries_local_to_global (const std::vector<unsigned int> &row_indices,
- const std::vector<unsigned int> &col_indices,
+ add_entries_local_to_global (const std::vector<types::global_dof_index> &row_indices,
+ const std::vector<types::global_dof_index> &col_indices,
SparsityType &sparsity_pattern,
const bool keep_constrained_entries = true,
const Table<2,bool> &dof_mask = default_empty_table) const;
* @ingroup Exceptions
*/
DeclException1 (ExcLineInexistant,
- unsigned int,
+ types::global_dof_index,
<< "The specified line " << arg1
<< " does not exist.");
/**
* of entries that make up the homogenous
* part of a constraint.
*/
- typedef std::vector<std::pair<unsigned int,double> > Entries;
+ typedef std::vector<std::pair<types::global_dof_index,double> > Entries;
/**
* Number of this line. Since only
* and have to store the line
* number explicitly.
*/
- unsigned int line;
+ types::global_dof_index line;
/**
* Row numbers and values of the
* contributions into vectors and
* matrices.
*/
- std::vector<unsigned int> lines_cache;
+ std::vector<types::global_dof_index> lines_cache;
/**
* This IndexSet is used to limit the
* index of line @p line in the vector
* lines_cache using local_lines.
*/
- unsigned int calculate_line_index (const unsigned int line) const;
+ unsigned int calculate_line_index (const types::global_dof_index line) const;
/**
* Return @p true if the weight of an
* used to delete entries with zero
* weight.
*/
- static bool check_zero_weight (const std::pair<unsigned int, double> &p);
+ static bool check_zero_weight (const std::pair<types::global_dof_index, double> &p);
/**
* Dummy table that serves as default
void
distribute_local_to_global (const FullMatrix<double> &local_matrix,
const Vector<double> &local_vector,
- const std::vector<unsigned int> &local_dof_indices,
+ const std::vector<types::global_dof_index> &local_dof_indices,
MatrixType &global_matrix,
VectorType &global_vector,
bool use_inhomogeneities_for_rhs,
void
distribute_local_to_global (const FullMatrix<double> &local_matrix,
const Vector<double> &local_vector,
- const std::vector<unsigned int> &local_dof_indices,
+ const std::vector<types::global_dof_index> &local_dof_indices,
MatrixType &global_matrix,
VectorType &global_vector,
bool use_inhomogeneities_for_rhs,
*/
template <typename SparsityType>
void
- add_entries_local_to_global (const std::vector<unsigned int> &local_dof_indices,
+ add_entries_local_to_global (const std::vector<types::global_dof_index> &local_dof_indices,
SparsityType &sparsity_pattern,
const bool keep_constrained_entries,
const Table<2,bool> &dof_mask,
*/
template <typename SparsityType>
void
- add_entries_local_to_global (const std::vector<unsigned int> &local_dof_indices,
+ add_entries_local_to_global (const std::vector<types::global_dof_index> &local_dof_indices,
SparsityType &sparsity_pattern,
const bool keep_constrained_entries,
const Table<2,bool> &dof_mask,
* row indices.
*/
void
- make_sorted_row_list (const std::vector<unsigned int> &local_dof_indices,
+ make_sorted_row_list (const std::vector<types::global_dof_index> &local_dof_indices,
internals::GlobalRowsFromLocal &global_rows) const;
/**
* function.
*/
void
- make_sorted_row_list (const std::vector<unsigned int> &local_dof_indices,
- std::vector<unsigned int> &active_dofs) const;
+ make_sorted_row_list (const std::vector<types::global_dof_index> &local_dof_indices,
+ std::vector<types::global_dof_index> &active_dofs) const;
/**
* Internal helper function for
* distribute_local_to_global function.
*/
double
- resolve_vector_entry (const unsigned int i,
+ resolve_vector_entry (const types::global_dof_index i,
const internals::GlobalRowsFromLocal &global_rows,
const Vector<double> &local_vector,
- const std::vector<unsigned int> &local_dof_indices,
+ const std::vector<types::global_dof_index> &local_dof_indices,
const FullMatrix<double> &local_matrix) const;
};
inline
void
-ConstraintMatrix::add_line (const unsigned int line)
+ConstraintMatrix::add_line (const types::global_dof_index line)
{
Assert (sorted==false, ExcMatrixIsClosed());
inline
void
-ConstraintMatrix::add_entry (const unsigned int line,
- const unsigned int column,
+ConstraintMatrix::add_entry (const types::global_dof_index line,
+ const types::global_dof_index column,
const double value)
{
Assert (sorted==false, ExcMatrixIsClosed());
inline
void
-ConstraintMatrix::set_inhomogeneity (const unsigned int line,
+ConstraintMatrix::set_inhomogeneity (const types::global_dof_index line,
const double value)
{
const unsigned int line_index = calculate_line_index(line);
inline
bool
-ConstraintMatrix::is_constrained (const unsigned int index) const
+ConstraintMatrix::is_constrained (const types::global_dof_index index) const
{
const unsigned int line_index = calculate_line_index(index);
return ((line_index < lines_cache.size())
inline
bool
-ConstraintMatrix::is_inhomogeneously_constrained (const unsigned int index) const
+ConstraintMatrix::is_inhomogeneously_constrained (const types::global_dof_index index) const
{
// check whether the entry is
// constrained. could use is_constrained, but
inline
-const std::vector<std::pair<unsigned int,double> > *
-ConstraintMatrix::get_constraint_entries (unsigned int line) const
+const std::vector<std::pair<types::global_dof_index,double> > *
+ConstraintMatrix::get_constraint_entries (const types::global_dof_index line) const
{
// check whether the entry is
// constrained. could use is_constrained, but
inline
double
-ConstraintMatrix::get_inhomogeneity (const unsigned int line) const
+ConstraintMatrix::get_inhomogeneity (const types::global_dof_index line) const
{
// check whether the entry is
// constrained. could use is_constrained, but
inline unsigned int
-ConstraintMatrix::calculate_line_index (const unsigned int line) const
+ConstraintMatrix::calculate_line_index (const types::global_dof_index line) const
{
//IndexSet is unused (serial case)
if (!local_lines.size())
inline bool
-ConstraintMatrix::can_store_line (unsigned int line_index) const
+ConstraintMatrix::can_store_line (types::global_dof_index line_index) const
{
return !local_lines.size() || local_lines.is_element(line_index);
}
template <class VectorType>
inline
void ConstraintMatrix::distribute_local_to_global (
- const unsigned int index,
+ const types::global_dof_index index,
const double value,
VectorType &global_vector) const
{
void
ConstraintMatrix::
distribute_local_to_global (const FullMatrix<double> &local_matrix,
- const std::vector<unsigned int> &local_dof_indices,
+ const std::vector<types::global_dof_index> &local_dof_indices,
MatrixType &global_matrix) const
{
// create a dummy and hand on to the
ConstraintMatrix::
distribute_local_to_global (const FullMatrix<double> &local_matrix,
const Vector<double> &local_vector,
- const std::vector<unsigned int> &local_dof_indices,
+ const std::vector<types::global_dof_index> &local_dof_indices,
MatrixType &global_matrix,
VectorType &global_vector,
bool use_inhomogeneities_for_rhs) const
inline
void
ConstraintMatrix::
-add_entries_local_to_global (const std::vector<unsigned int> &local_dof_indices,
+add_entries_local_to_global (const std::vector<types::global_dof_index> &local_dof_indices,
SparsityType &sparsity_pattern,
const bool keep_constrained_entries,
const Table<2,bool> &dof_mask) const
entry = uncondensed.begin(row);
entry != uncondensed.end(row); ++entry)
{
- const unsigned int column = entry->column();
+ const types::global_dof_index column = entry->column();
// end of row reached?
// this should not
entry = uncondensed.begin(row);
entry != uncondensed.end(row); ++entry)
{
- const unsigned int column = entry->column();
+ const types::global_dof_index column = entry->column();
// end of row reached?
// this should not
// $Id$
// Version: $Name$
//
-// Copyright (C) 2011-2012 by the deal.II authors
+// Copyright (C) 2011-2013 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
/**
* Returns a pointer to the first index in the DoF row @p row.
*/
- const unsigned int *begin_indices (const unsigned int row) const;
+ const types::global_dof_index *begin_indices (const unsigned int row) const;
/**
* Returns a pointer to the one past the last DoF index in the row @p
* row.
*/
- const unsigned int *end_indices (const unsigned int row) const;
+ const types::global_dof_index *end_indices (const unsigned int row) const;
/**
* Returns the number of entries in the indices field for the given row.
* Returns a pointer to the first index in the DoF row @p row for plain
* indices (i.e., the entries where constraints are not embedded).
*/
- const unsigned int *begin_indices_plain (const unsigned int row) const;
+ const types::global_dof_index *begin_indices_plain (const unsigned int row) const;
/**
* Returns a pointer to the one past the last DoF index in the row @p
* row (i.e., the entries where constraints are not embedded).
*/
- const unsigned int *end_indices_plain (const unsigned int row) const;
+ const types::global_dof_index *end_indices_plain (const unsigned int row) const;
/**
* Returns the FE index for a given finite element degree. If not in hp
/**
* Renumbers the degrees of freedom to give good access for this class.
*/
- void renumber_dofs (std::vector<unsigned int> &renumbering);
+ void renumber_dofs (std::vector<types::global_dof_index> &renumbering);
/**
* Returns the memory consumption in bytes of this class.
unsigned int> > row_starts;
/**
- * Stores the indices of the degrees of freedom for each cell. This
+ * Stores the (global) indices of the degrees of freedom for each cell. This
* array also includes the indirect contributions from constraints,
* which are described by the @p constraint_indicator field. Because of
* variable lengths of rows, this would be a vector of a
* vector. However, we use one contiguous memory region and store the
* rowstart in the variable @p row_starts.
*/
- std::vector<unsigned int> dof_indices;
+ std::vector<types::global_dof_index> dof_indices;
/**
* This variable describes the position of constraints in terms of the
* This stores a (sorted) list of all locally owned degrees of freedom
* that are constrained.
*/
- std::vector<unsigned int> constrained_dofs;
+ std::vector<types::global_dof_index> constrained_dofs;
/**
* Stores the rowstart indices of the compressed row storage in the @p
- * dof_indices_plain fields.
+ * plain_dof_indices fields.
*/
- std::vector<unsigned int> row_starts_plain_indices;
+ std::vector<types::global_dof_index> row_starts_plain_indices;
/**
* Stores the indices of the degrees of freedom for each cell. This
* contiguous memory region and store the rowstart in the variable @p
* row_starts_plain_indices.
*/
- std::vector<unsigned int> plain_dof_indices;
+ std::vector<types::global_dof_index> plain_dof_indices;
/**
* Stores the number of components in the DoFHandler where the indices
* calling @p assign_ghosts. Then, all information is collected by the
* partitioner.
*/
- std::vector<unsigned int> ghost_dofs;
+ std::vector<types::global_dof_index> ghost_dofs;
};
#ifndef DOXYGEN
inline
- const unsigned int *
+ const types::global_dof_index *
DoFInfo::begin_indices (const unsigned int row) const
{
AssertIndexRange (row, row_starts.size()-1);
inline
- const unsigned int *
+ const types::global_dof_index *
DoFInfo::end_indices (const unsigned int row) const
{
AssertIndexRange (row, row_starts.size()-1);
struct ConstraintComparator
{
- bool operator()(const std::pair<unsigned int,double> &p1,
- const std::pair<unsigned int,double> &p2) const
+ bool operator()(const std::pair<types::global_dof_index,double> &p1,
+ const std::pair<types::global_dof_index,double> &p2) const
{
return p1.second < p2.second;
}
* access later on.
*/
unsigned short
- insert_entries (const std::vector<std::pair<unsigned int,double> > &entries);
+ insert_entries (const std::vector<std::pair<types::global_dof_index,double> > &entries);
- std::vector<std::pair<unsigned int, double> > constraint_entries;
- std::vector<unsigned int> constraint_indices;
- std::pair<std::vector<Number>,unsigned int> next_constraint;
- std::map<std::vector<Number>,unsigned int,FPArrayComparator<double> > constraints;
+ std::vector<std::pair<types::global_dof_index, double> > constraint_entries;
+ std::vector<types::global_dof_index> constraint_indices;
+
+ std::pair<std::vector<Number>, types::global_dof_index> next_constraint;
+ std::map<std::vector<Number>, types::global_dof_index, FPArrayComparator<double> > constraints;
};
template <typename Number>
unsigned short
ConstraintValues<Number>::
- insert_entries (const std::vector<std::pair<unsigned int,double> > &entries)
+ insert_entries (const std::vector<std::pair<types::global_dof_index,double> > &entries)
{
next_constraint.first.resize(entries.size());
if (entries.size() > 0)
void
- DoFInfo::read_dof_indices (const std::vector<unsigned int> &local_indices,
+ DoFInfo::read_dof_indices (const std::vector<types::global_dof_index> &local_indices,
const std::vector<unsigned int> &lexicographic_inv,
const ConstraintMatrix &constraints,
const unsigned int cell_number,
{
Assert (vector_partitioner.get() !=0, ExcInternalError());
const unsigned int n_mpi_procs = vector_partitioner->n_mpi_processes();
- const unsigned int first_owned = vector_partitioner->local_range().first;
- const unsigned int last_owned = vector_partitioner->local_range().second;
+ const types::global_dof_index first_owned = vector_partitioner->local_range().first;
+ const types::global_dof_index last_owned = vector_partitioner->local_range().second;
const unsigned int n_owned = last_owned - first_owned;
std::pair<unsigned short,unsigned short> constraint_iterator (0,0);
dofs_per_cell[0] : dofs_per_cell[cell_active_fe_index[cell_number]];
for (unsigned int i=0; i<dofs_this_cell; i++)
{
- unsigned int current_dof =
+ types::global_dof_index current_dof =
local_indices[lexicographic_inv[i]];
const std::vector<std::pair<unsigned int,double> >
*entries_ptr =
*/
void assemble(VECTOR &global,
const BlockVector<double> &local,
- const std::vector<unsigned int> &dof);
+ const std::vector<types::global_dof_index> &dof);
/**
* The global matrices,
void assemble(
MatrixBlock<MATRIX> &global,
const FullMatrix<number> &local,
- unsigned int block_row,
- unsigned int block_col,
- const std::vector<unsigned int> &dof1,
- const std::vector<unsigned int> &dof2);
+ const unsigned int block_row,
+ const unsigned int block_col,
+ const std::vector<types::global_dof_index> &dof1,
+ const std::vector<types::global_dof_index> &dof2);
/**
* The global matrices,
void assemble(
MATRIX &global,
const FullMatrix<number> &local,
- unsigned int block_row,
- unsigned int block_col,
- const std::vector<unsigned int> &dof1,
- const std::vector<unsigned int> &dof2,
- unsigned int level1,
- unsigned int level2,
+ const unsigned int block_row,
+ const unsigned int block_col,
+ const std::vector<types::global_dof_index> &dof1,
+ const std::vector<types::global_dof_index> &dof2,
+ const unsigned int level1,
+ const unsigned int level2,
bool transpose = false);
/**
void assemble_fluxes(
MATRIX &global,
const FullMatrix<number> &local,
- unsigned int block_row,
- unsigned int block_col,
- const std::vector<unsigned int> &dof1,
- const std::vector<unsigned int> &dof2,
- unsigned int level1,
- unsigned int level2);
+ const unsigned int block_row,
+ const unsigned int block_col,
+ const std::vector<types::global_dof_index> &dof1,
+ const std::vector<types::global_dof_index> &dof2,
+ const unsigned int level1,
+ const unsigned int level2);
/**
* Assemble a single local
void assemble_up(
MATRIX &global,
const FullMatrix<number> &local,
- unsigned int block_row,
- unsigned int block_col,
- const std::vector<unsigned int> &dof1,
- const std::vector<unsigned int> &dof2,
- unsigned int level1,
- unsigned int level2);
+ const unsigned int block_row,
+ const unsigned int block_col,
+ const std::vector<types::global_dof_index> &dof1,
+ const std::vector<types::global_dof_index> &dof2,
+ const unsigned int level1,
+ const unsigned int level2);
/**
* Assemble a single local
void assemble_down(
MATRIX &global,
const FullMatrix<number> &local,
- unsigned int block_row,
- unsigned int block_col,
- const std::vector<unsigned int> &dof1,
- const std::vector<unsigned int> &dof2,
- unsigned int level1,
- unsigned int level2);
+ const unsigned int block_row,
+ const unsigned int block_col,
+ const std::vector<types::global_dof_index> &dof1,
+ const std::vector<types::global_dof_index> &dof2,
+ const unsigned int level1,
+ const unsigned int level2);
/**
* Assemble a single local
void assemble_in(
MATRIX &global,
const FullMatrix<number> &local,
- unsigned int block_row,
- unsigned int block_col,
- const std::vector<unsigned int> &dof1,
- const std::vector<unsigned int> &dof2,
- unsigned int level1,
- unsigned int level2);
+ const unsigned int block_row,
+ const unsigned int block_col,
+ const std::vector<types::global_dof_index> &dof1,
+ const std::vector<types::global_dof_index> &dof2,
+ const unsigned int level1,
+ const unsigned int level2);
/**
* Assemble a single local
void assemble_out(
MATRIX &global,
const FullMatrix<number> &local,
- unsigned int block_row,
- unsigned int block_col,
- const std::vector<unsigned int> &dof1,
- const std::vector<unsigned int> &dof2,
- unsigned int level1,
- unsigned int level2);
+ const unsigned int block_row,
+ const unsigned int block_col,
+ const std::vector<types::global_dof_index> &dof1,
+ const std::vector<types::global_dof_index> &dof2,
+ const unsigned int level1,
+ const unsigned int level2);
/**
* The level matrices,
ResidualLocalBlocksToGlobalBlocks<VECTOR>::assemble(
VECTOR &global,
const BlockVector<double> &local,
- const std::vector<unsigned int> &dof)
+ const std::vector<types::global_dof_index> &dof)
{
if (constraints == 0)
{
MatrixLocalBlocksToGlobalBlocks<MATRIX, number>::assemble(
MatrixBlock<MATRIX> &global,
const FullMatrix<number> &local,
- unsigned int block_row,
- unsigned int block_col,
- const std::vector<unsigned int> &dof1,
- const std::vector<unsigned int> &dof2)
+ const unsigned int block_row,
+ const unsigned int block_col,
+ const std::vector<types::global_dof_index> &dof1,
+ const std::vector<types::global_dof_index> &dof2)
{
if (constraints == 0)
{
else
{
const BlockIndices &bi = this->block_info->local();
- std::vector<unsigned int> sliced_row_indices (bi.block_size(block_row));
+ std::vector<types::global_dof_index> sliced_row_indices (bi.block_size(block_row));
for (unsigned int i=0; i<sliced_row_indices.size(); ++i)
sliced_row_indices[i] = dof1[bi.block_start(block_row)+i];
- std::vector<unsigned int> sliced_col_indices (bi.block_size(block_col));
+ std::vector<types::global_dof_index> sliced_col_indices (bi.block_size(block_col));
for (unsigned int i=0; i<sliced_col_indices.size(); ++i)
sliced_col_indices[i] = dof2[bi.block_start(block_col)+i];
{
// Row and column index of
// the block we are dealing with
- const unsigned int row = matrices->block(i).row;
- const unsigned int col = matrices->block(i).column;
+ const types::global_dof_index row = matrices->block(i).row;
+ const types::global_dof_index col = matrices->block(i).column;
assemble(matrices->block(i), info.matrix(i,false).matrix, row, col, info.indices, info.indices);
}
{
// Row and column index of
// the block we are dealing with
- const unsigned int row = matrices->block(i).row;
- const unsigned int col = matrices->block(i).column;
+ const types::global_dof_index row = matrices->block(i).row;
+ const types::global_dof_index col = matrices->block(i).column;
assemble(matrices->block(i), info1.matrix(i,false).matrix, row, col, info1.indices, info1.indices);
assemble(matrices->block(i), info1.matrix(i,true).matrix, row, col, info1.indices, info2.indices);
MGMatrixLocalBlocksToGlobalBlocks<MATRIX, number>::assemble(
MATRIX &global,
const FullMatrix<number> &local,
- unsigned int block_row,
- unsigned int block_col,
- const std::vector<unsigned int> &dof1,
- const std::vector<unsigned int> &dof2,
- unsigned int level1,
- unsigned int level2,
+ const unsigned int block_row,
+ const unsigned int block_col,
+ const std::vector<types::global_dof_index> &dof1,
+ const std::vector<types::global_dof_index> &dof2,
+ const unsigned int level1,
+ const unsigned int level2,
bool transpose)
{
for (unsigned int j=0; j<local.n_rows(); ++j)
MGMatrixLocalBlocksToGlobalBlocks<MATRIX, number>::assemble_fluxes(
MATRIX &global,
const FullMatrix<number> &local,
- unsigned int block_row,
- unsigned int block_col,
- const std::vector<unsigned int> &dof1,
- const std::vector<unsigned int> &dof2,
- unsigned int level1,
- unsigned int level2)
+ const unsigned int block_row,
+ const unsigned int block_col,
+ const std::vector<types::global_dof_index> &dof1,
+ const std::vector<types::global_dof_index> &dof2,
+ const unsigned int level1,
+ const unsigned int level2)
{
for (unsigned int j=0; j<local.n_rows(); ++j)
for (unsigned int k=0; k<local.n_cols(); ++k)
MGMatrixLocalBlocksToGlobalBlocks<MATRIX, number>::assemble_up(
MATRIX &global,
const FullMatrix<number> &local,
- unsigned int block_row,
- unsigned int block_col,
- const std::vector<unsigned int> &dof1,
- const std::vector<unsigned int> &dof2,
- unsigned int level1,
- unsigned int level2)
+ const unsigned int block_row,
+ const unsigned int block_col,
+ const std::vector<types::global_dof_index> &dof1,
+ const std::vector<types::global_dof_index> &dof2,
+ const unsigned int level1,
+ const unsigned int level2)
{
for (unsigned int j=0; j<local.n_rows(); ++j)
for (unsigned int k=0; k<local.n_cols(); ++k)
MGMatrixLocalBlocksToGlobalBlocks<MATRIX, number>::assemble_down(
MATRIX &global,
const FullMatrix<number> &local,
- unsigned int block_row,
- unsigned int block_col,
- const std::vector<unsigned int> &dof1,
- const std::vector<unsigned int> &dof2,
- unsigned int level1,
- unsigned int level2)
+ const unsigned int block_row,
+ const unsigned int block_col,
+ const std::vector<types::global_dof_index> &dof1,
+ const std::vector<types::global_dof_index> &dof2,
+ const unsigned int level1,
+ const unsigned int level2)
{
for (unsigned int j=0; j<local.n_rows(); ++j)
for (unsigned int k=0; k<local.n_cols(); ++k)
MGMatrixLocalBlocksToGlobalBlocks<MATRIX, number>::assemble_in(
MATRIX &global,
const FullMatrix<number> &local,
- unsigned int block_row,
- unsigned int block_col,
- const std::vector<unsigned int> &dof1,
- const std::vector<unsigned int> &dof2,
- unsigned int level1,
- unsigned int level2)
+ const unsigned int block_row,
+ const unsigned int block_col,
+ const std::vector<types::global_dof_index> &dof1,
+ const std::vector<types::global_dof_index> &dof2,
+ const unsigned int level1,
+ const unsigned int level2)
{
// AssertDimension(local.n(), dof1.size());
// AssertDimension(local.m(), dof2.size());
MGMatrixLocalBlocksToGlobalBlocks<MATRIX, number>::assemble_out(
MATRIX &global,
const FullMatrix<number> &local,
- unsigned int block_row,
- unsigned int block_col,
- const std::vector<unsigned int> &dof1,
- const std::vector<unsigned int> &dof2,
- unsigned int level1,
- unsigned int level2)
+ const unsigned int block_row,
+ const unsigned int block_col,
+ const std::vector<types::global_dof_index> &dof1,
+ const std::vector<types::global_dof_index> &dof2,
+ const unsigned int level1,
+ const unsigned int level2)
{
// AssertDimension(local.n(), dof1.size());
// AssertDimension(local.m(), dof2.size());
//---------------------------------------------------------------------------
// $Id$
//
-// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors
+// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
* The DoF indices of the
* current cell
*/
- std::vector<unsigned int> indices;
+ std::vector<types::global_dof_index> indices;
/**
* The DoF indices on the
* current cell, organized by
* local blocks
*/
- std::vector<std::vector<unsigned int> > indices_by_block;
+ std::vector<std::vector<types::global_dof_index> > indices_by_block;
/**
* Constructor setting the
template <class DHCellIterator, class DHFaceIterator>
void reinit(const DHCellIterator &c,
const DHFaceIterator &f,
- const unsigned int n);
+ const unsigned int face_no);
/**
* Set the current subface
template <class DHCellIterator, class DHFaceIterator>
void reinit(const DHCellIterator &c,
const DHFaceIterator &f,
- const unsigned int n,
- const unsigned int s);
+ const unsigned int face_no,
+ const unsigned int subface_no);
/**
* Switch to a new face of the
*/
template <class DHFaceIterator>
void set_face (const DHFaceIterator &f,
- const unsigned int n);
+ const unsigned int face_no);
/**
* Switch to a new subface of the
* same cell. Does not change
*/
template <class DHFaceIterator>
void set_subface (const DHFaceIterator &f,
- const unsigned int n,
- const unsigned int s);
+ const unsigned int face_no,
+ const unsigned int subface_no);
const BlockIndices &local_indices() const;
//void get_indices(const typename MGDoFHandler<dim, spacedim>::cell_iterator& c);
/// Auxiliary vector
- std::vector<unsigned int> indices_org;
+ std::vector<types::global_dof_index> indices_org;
/**
* An auxiliary local
inline void
DoFInfo<dim,spacedim,number>::set_face(
const DHFaceIterator &f,
- unsigned int n)
+ const unsigned int face_no)
{
face = static_cast<typename Triangulation<dim>::face_iterator> (f);
- face_number = n;
+ face_number = face_no;
sub_number = deal_II_numbers::invalid_unsigned_int;
}
DoFInfo<dim,spacedim,number>::reinit(
const DHCellIterator &c,
const DHFaceIterator &f,
- unsigned int n)
+ const unsigned int face_no)
{
if ((cell.state() != IteratorState::valid)
|| cell != static_cast<typename Triangulation<dim>::cell_iterator> (c))
level_cell = c->is_level_cell();
cell = static_cast<typename Triangulation<dim>::cell_iterator> (c);
- set_face(f,n);
+ set_face(f,face_no);
if (block_info)
LocalResults<number>::reinit(block_info->local());
inline void
DoFInfo<dim,spacedim,number>::set_subface(
const DHFaceIterator &f,
- unsigned int n,
- unsigned int s)
+ const unsigned int face_no,
+ const unsigned int subface_no)
{
face = static_cast<typename Triangulation<dim>::face_iterator> (f);
- face_number = n;
- sub_number = s;
+ face_number = face_no;
+ sub_number = subface_no;
}
DoFInfo<dim,spacedim,number>::reinit(
const DHCellIterator &c,
const DHFaceIterator &f,
- unsigned int n,
- unsigned int s)
+ const unsigned int face_no,
+ const unsigned int subface_no)
{
if (cell.state() != IteratorState::valid
|| cell != static_cast<typename Triangulation<dim>::cell_iterator> (c))
level_cell = c->is_level_cell();
cell = static_cast<typename Triangulation<dim>::cell_iterator> (c);
- set_subface(f,n,s);
+ set_subface(f, face_no, subface_no);
if (block_info)
LocalResults<number>::reinit(block_info->local());
* into #matrix.
*/
void assemble(const FullMatrix<double> &M,
- const std::vector<unsigned int> &i1,
- const std::vector<unsigned int> &i2);
+ const std::vector<types::global_dof_index> &i1,
+ const std::vector<types::global_dof_index> &i2);
/**
* The global matrix being
*/
void assemble(MATRIX &G,
const FullMatrix<double> &M,
- const std::vector<unsigned int> &i1,
- const std::vector<unsigned int> &i2);
+ const std::vector<types::global_dof_index> &i1,
+ const std::vector<types::global_dof_index> &i2);
/**
* Assemble a single matrix
*/
void assemble(MATRIX &G,
const FullMatrix<double> &M,
- const std::vector<unsigned int> &i1,
- const std::vector<unsigned int> &i2,
+ const std::vector<types::global_dof_index> &i1,
+ const std::vector<types::global_dof_index> &i2,
const unsigned int level);
/**
void assemble_up(MATRIX &G,
const FullMatrix<double> &M,
- const std::vector<unsigned int> &i1,
- const std::vector<unsigned int> &i2,
+ const std::vector<types::global_dof_index> &i1,
+ const std::vector<types::global_dof_index> &i2,
const unsigned int level = numbers::invalid_unsigned_int);
/**
* Assemble a single matrix
void assemble_down(MATRIX &G,
const FullMatrix<double> &M,
- const std::vector<unsigned int> &i1,
- const std::vector<unsigned int> &i2,
+ const std::vector<types::global_dof_index> &i1,
+ const std::vector<types::global_dof_index> &i2,
const unsigned int level = numbers::invalid_unsigned_int);
/**
void assemble_in(MATRIX &G,
const FullMatrix<double> &M,
- const std::vector<unsigned int> &i1,
- const std::vector<unsigned int> &i2,
+ const std::vector<types::global_dof_index> &i1,
+ const std::vector<types::global_dof_index> &i2,
const unsigned int level = numbers::invalid_unsigned_int);
/**
void assemble_out(MATRIX &G,
const FullMatrix<double> &M,
- const std::vector<unsigned int> &i1,
- const std::vector<unsigned int> &i2,
+ const std::vector<types::global_dof_index> &i1,
+ const std::vector<types::global_dof_index> &i2,
const unsigned int level = numbers::invalid_unsigned_int);
/**
template <class MATRIX>
inline void
MatrixSimple<MATRIX>::assemble(const FullMatrix<double> &M,
- const std::vector<unsigned int> &i1,
- const std::vector<unsigned int> &i2)
+ const std::vector<types::global_dof_index> &i1,
+ const std::vector<types::global_dof_index> &i2)
{
AssertDimension(M.m(), i1.size());
AssertDimension(M.n(), i2.size());
MGMatrixSimple<MATRIX>::assemble(
MATRIX &G,
const FullMatrix<double> &M,
- const std::vector<unsigned int> &i1,
- const std::vector<unsigned int> &i2)
+ const std::vector<types::global_dof_index> &i1,
+ const std::vector<types::global_dof_index> &i2)
{
AssertDimension(M.m(), i1.size());
AssertDimension(M.n(), i2.size());
MGMatrixSimple<MATRIX>::assemble(
MATRIX &G,
const FullMatrix<double> &M,
- const std::vector<unsigned int> &i1,
- const std::vector<unsigned int> &i2,
+ const std::vector<types::global_dof_index> &i1,
+ const std::vector<types::global_dof_index> &i2,
const unsigned int level)
{
AssertDimension(M.m(), i1.size());
MGMatrixSimple<MATRIX>::assemble_up(
MATRIX &G,
const FullMatrix<double> &M,
- const std::vector<unsigned int> &i1,
- const std::vector<unsigned int> &i2,
+ const std::vector<types::global_dof_index> &i1,
+ const std::vector<types::global_dof_index> &i2,
const unsigned int level)
{
AssertDimension(M.n(), i1.size());
MGMatrixSimple<MATRIX>::assemble_down(
MATRIX &G,
const FullMatrix<double> &M,
- const std::vector<unsigned int> &i1,
- const std::vector<unsigned int> &i2,
+ const std::vector<types::global_dof_index> &i1,
+ const std::vector<types::global_dof_index> &i2,
const unsigned int level)
{
AssertDimension(M.m(), i1.size());
MGMatrixSimple<MATRIX>::assemble_in(
MATRIX &G,
const FullMatrix<double> &M,
- const std::vector<unsigned int> &i1,
- const std::vector<unsigned int> &i2,
+ const std::vector<types::global_dof_index> &i1,
+ const std::vector<types::global_dof_index> &i2,
const unsigned int level)
{
AssertDimension(M.m(), i1.size());
MGMatrixSimple<MATRIX>::assemble_out(
MATRIX &G,
const FullMatrix<double> &M,
- const std::vector<unsigned int> &i1,
- const std::vector<unsigned int> &i2,
+ const std::vector<types::global_dof_index> &i1,
+ const std::vector<types::global_dof_index> &i2,
const unsigned int level)
{
AssertDimension(M.n(), i1.size());
SparseMatrix<double> &matrix,
const typename FunctionMap<spacedim>::type &boundary_functions,
Vector<double> &rhs_vector,
- std::vector<unsigned int> &dof_to_boundary_mapping,
+ std::vector<types::global_dof_index> &dof_to_boundary_mapping,
const Function<spacedim> *const weight = 0,
std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
// SparseMatrix<double> &matrix,
// const FunctionMap<1>::type &boundary_functions,
// Vector<double> &rhs_vector,
-// std::vector<unsigned int>&dof_to_boundary_mapping,
+// std::vector<types::global_dof_index>&dof_to_boundary_mapping,
// const Function<1> * const a = 0);
// //codimension 1
//
// SparseMatrix<double> &matrix,
// const FunctionMap<2>::type &boundary_functions,
// Vector<double> &rhs_vector,
-// std::vector<unsigned int>&dof_to_boundary_mapping,
+// std::vector<types::global_dof_index>&dof_to_boundary_mapping,
// const Function<2> * const a = 0);
SparseMatrix<double> &matrix,
const typename FunctionMap<spacedim>::type &boundary_functions,
Vector<double> &rhs_vector,
- std::vector<unsigned int> &dof_to_boundary_mapping,
+ std::vector<types::global_dof_index> &dof_to_boundary_mapping,
const Function<spacedim> *const a = 0,
std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
SparseMatrix<double> &matrix,
const typename FunctionMap<spacedim>::type &boundary_functions,
Vector<double> &rhs_vector,
- std::vector<unsigned int> &dof_to_boundary_mapping,
+ std::vector<types::global_dof_index> &dof_to_boundary_mapping,
const Function<spacedim> *const a = 0,
std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
// SparseMatrix<double> &matrix,
// const FunctionMap<1>::type &boundary_functions,
// Vector<double> &rhs_vector,
-// std::vector<unsigned int>&dof_to_boundary_mapping,
+// std::vector<types::global_dof_index>&dof_to_boundary_mapping,
// const Function<1> * const a = 0);
/**
SparseMatrix<double> &matrix,
const typename FunctionMap<spacedim>::type &boundary_functions,
Vector<double> &rhs_vector,
- std::vector<unsigned int> &dof_to_boundary_mapping,
+ std::vector<types::global_dof_index> &dof_to_boundary_mapping,
const Function<spacedim> *const a = 0,
std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
*/
template <typename number>
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
SparseMatrix<number> &matrix,
Vector<number> &solution,
Vector<number> &right_hand_side,
*/
template <typename number>
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
BlockSparseMatrix<number> &matrix,
BlockVector<number> &solution,
BlockVector<number> &right_hand_side,
* step-18.
*/
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
PETScWrappers::SparseMatrix &matrix,
PETScWrappers::Vector &solution,
PETScWrappers::Vector &right_hand_side,
* matrices.
*/
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
PETScWrappers::MPI::SparseMatrix &matrix,
PETScWrappers::MPI::Vector &solution,
PETScWrappers::MPI::Vector &right_hand_side,
* to this function is the same.
*/
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
PETScWrappers::MPI::SparseMatrix &matrix,
PETScWrappers::Vector &solution,
PETScWrappers::MPI::Vector &right_hand_side,
* Same as above but for BlockSparseMatrix.
*/
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
PETScWrappers::MPI::BlockSparseMatrix &matrix,
PETScWrappers::MPI::BlockVector &solution,
PETScWrappers::MPI::BlockVector &right_hand_side,
* across an MPI system.
*/
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
TrilinosWrappers::SparseMatrix &matrix,
TrilinosWrappers::Vector &solution,
TrilinosWrappers::Vector &right_hand_side,
* working on block structures.
*/
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
TrilinosWrappers::BlockSparseMatrix &matrix,
TrilinosWrappers::BlockVector &solution,
TrilinosWrappers::BlockVector &right_hand_side,
* types.
*/
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
TrilinosWrappers::SparseMatrix &matrix,
TrilinosWrappers::MPI::Vector &solution,
TrilinosWrappers::MPI::Vector &right_hand_side,
* on block structures.
*/
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
TrilinosWrappers::BlockSparseMatrix &matrix,
TrilinosWrappers::MPI::BlockVector &solution,
TrilinosWrappers::MPI::BlockVector &right_hand_side,
* documentation of this class.
*/
void
- local_apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
- const std::vector<unsigned int> &local_dof_indices,
+ local_apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+ const std::vector<types::global_dof_index> &local_dof_indices,
FullMatrix<double> &local_matrix,
Vector<double> &local_rhs,
const bool eliminate_columns);
* and stores all dof indices
* of the cells that'll be refined
*/
- std::vector<std::vector<unsigned int> > indices_on_cell;
+ std::vector<std::vector<types::global_dof_index> > indices_on_cell;
/**
* All cell data (the dof indices and
interpolate_boundary_values (const Mapping<DH::dimension,DH::space_dimension> &mapping,
const DH &dof,
const typename FunctionMap<DH::space_dimension>::type &function_map,
- std::map<unsigned int,double> &boundary_values,
+ std::map<types::global_dof_index,double> &boundary_values,
const ComponentMask &component_mask = ComponentMask());
/**
const DH &dof,
const types::boundary_id boundary_component,
const Function<DH::space_dimension> &boundary_function,
- std::map<unsigned int,double> &boundary_values,
+ std::map<types::global_dof_index,double> &boundary_values,
const ComponentMask &component_mask = ComponentMask());
/**
interpolate_boundary_values (const DH &dof,
const types::boundary_id boundary_component,
const Function<DH::space_dimension> &boundary_function,
- std::map<unsigned int,double> &boundary_values,
+ std::map<types::global_dof_index,double> &boundary_values,
const ComponentMask &component_mask = ComponentMask());
void
interpolate_boundary_values (const DH &dof,
const typename FunctionMap<DH::space_dimension>::type &function_map,
- std::map<unsigned int,double> &boundary_values,
+ std::map<types::global_dof_index,double> &boundary_values,
const ComponentMask &component_mask = ComponentMask());
const DoFHandler<dim,spacedim> &dof,
const typename FunctionMap<spacedim>::type &boundary_functions,
const Quadrature<dim-1> &q,
- std::map<unsigned int,double> &boundary_values,
+ std::map<types::global_dof_index,double> &boundary_values,
std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
/**
void project_boundary_values (const DoFHandler<dim,spacedim> &dof,
const typename FunctionMap<spacedim>::type &boundary_function,
const Quadrature<dim-1> &q,
- std::map<unsigned int,double> &boundary_values,
+ std::map<types::global_dof_index,double> &boundary_values,
std::vector<unsigned int> component_mapping = std::vector<unsigned int>());
/**
// the following vector collects all rep dofs.
// the position of a rep dof within this vector
// is called rep index.
- std::vector<std::vector<unsigned int> > dofs_of_rep_points(fe.size());
+ std::vector<std::vector<types::global_dof_index> > dofs_of_rep_points(fe.size());
// the following table converts a dof i
// to the rep index.
- std::vector<std::vector<unsigned int> > dof_to_rep_index_table(fe.size());
+ std::vector<std::vector<types::global_dof_index> > dof_to_rep_index_table(fe.size());
std::vector<unsigned int> n_rep_points (fe.size(), 0);
const unsigned int max_rep_points = *std::max_element (n_rep_points.begin(),
n_rep_points.end());
- std::vector<unsigned int> dofs_on_cell (fe.max_dofs_per_cell());
+ std::vector<types::global_dof_index> dofs_on_cell (fe.max_dofs_per_cell());
std::vector<Point<DH::space_dimension> > rep_points (max_rep_points);
// get space for the values of the
Vector<double> cell_data_1(dof_1.get_fe().dofs_per_cell);
Vector<double> cell_data_2(dof_2.get_fe().dofs_per_cell);
- std::vector<short unsigned int> touch_count (dof_2.n_dofs(), 0);
- std::vector<unsigned int> local_dof_indices (dof_2.get_fe().dofs_per_cell);
+ std::vector<short unsigned int> touch_count (dof_2.n_dofs(), 0); //TODO: check on datatype... kinda strange (UK)
+ std::vector<types::global_dof_index> local_dof_indices (dof_2.get_fe().dofs_per_cell);
typename DoFHandler<dim,spacedim>::active_cell_iterator h = dof_1.begin_active();
typename DoFHandler<dim,spacedim>::active_cell_iterator l = dof_2.begin_active();
{
void
interpolate_zero_boundary_values (const dealii::DoFHandler<1> &dof_handler,
- std::map<unsigned int,double> &boundary_values)
+ std::map<types::global_dof_index,double> &boundary_values)
{
// we only need to find the
// left-most and right-most
// codimension 1
void
interpolate_zero_boundary_values (const dealii::DoFHandler<1,2> &dof_handler,
- std::map<unsigned int,double> &boundary_values)
+ std::map<types::global_dof_index,double> &boundary_values)
{
// we only need to find the
// left-most and right-most
template <int dim, int spacedim>
void
interpolate_zero_boundary_values (const dealii::DoFHandler<dim,spacedim> &dof_handler,
- std::map<unsigned int,double> &boundary_values)
+ std::map<types::global_dof_index,double> &boundary_values)
{
const FiniteElement<dim,spacedim> &fe = dof_handler.get_fe();
typename dealii::DoFHandler<dim,spacedim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
- std::vector<unsigned int> face_dof_indices (fe.dofs_per_face);
+ std::vector<types::global_dof_index> face_dof_indices (fe.dofs_per_face);
for (; cell!=endc; ++cell)
for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
if (cell->at_boundary(f))
ExcDimensionMismatch (vec_result.size(), dof.n_dofs()));
// make up boundary values
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
if (enforce_zero_boundary == true)
// no need to project boundary
n_q_points = fe_values.n_quadrature_points,
n_components = fe.n_components();
- std::vector<unsigned int> dofs (dofs_per_cell);
+ std::vector<types::global_dof_index> dofs (dofs_per_cell);
Vector<double> cell_vector (dofs_per_cell);
typename DoFHandler<dim,spacedim>::active_cell_iterator
const unsigned int n_components = fe.n_components();
- std::vector<unsigned int> dofs (fe.max_dofs_per_cell());
+ std::vector<types::global_dof_index> dofs (fe.max_dofs_per_cell());
Vector<double> cell_vector (fe.max_dofs_per_cell());
typename hp::DoFHandler<dim,spacedim>::active_cell_iterator
const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
cell_point.first->get_dof_indices (local_dof_indices);
for (unsigned int i=0; i<dofs_per_cell; i++)
const unsigned int dofs_per_cell = cell_point.first->get_fe().dofs_per_cell;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
cell_point.first->get_dof_indices (local_dof_indices);
for (unsigned int i=0; i<dofs_per_cell; i++)
const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
cell_point.first->get_dof_indices (local_dof_indices);
for (unsigned int i=0; i<dofs_per_cell; i++)
const unsigned int dofs_per_cell = cell_point.first->get_fe().dofs_per_cell;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
cell_point.first->get_dof_indices (local_dof_indices);
for (unsigned int i=0; i<dofs_per_cell; i++)
n_q_points = fe_values.n_quadrature_points,
n_components = fe.n_components();
- std::vector<unsigned int> dofs (dofs_per_cell);
+ std::vector<types::global_dof_index> dofs (dofs_per_cell);
Vector<double> cell_vector (dofs_per_cell);
typename DoFHandler<dim,spacedim>::active_cell_iterator cell = dof_handler.begin_active(),
const unsigned int n_components = fe.n_components();
- std::vector<unsigned int> dofs (fe.max_dofs_per_cell());
+ std::vector<types::global_dof_index> dofs (fe.max_dofs_per_cell());
Vector<double> cell_vector (fe.max_dofs_per_cell());
typename hp::DoFHandler<dim,spacedim>::active_cell_iterator
void interpolate_boundary_values (const Mapping<DH::dimension, DH::space_dimension> &,
const DH &dof,
const typename FunctionMap<DH::space_dimension>::type &function_map,
- std::map<unsigned int,double> &boundary_values,
+ std::map<types::global_dof_index,double> &boundary_values,
const ComponentMask &component_mask,
const dealii::internal::int2type<1>)
{
interpolate_boundary_values (const Mapping<DH::dimension, DH::space_dimension> &mapping,
const DH &dof,
const typename FunctionMap<DH::space_dimension>::type &function_map,
- std::map<unsigned int,double> &boundary_values,
+ std::map<types::global_dof_index,double> &boundary_values,
const ComponentMask &component_mask,
const dealii::internal::int2type<DH::dimension>)
{
ExcDimensionMismatch(n_components, i->second->n_components));
// field to store the indices
- std::vector<unsigned int> face_dofs;
+ std::vector<types::global_dof_index> face_dofs;
face_dofs.reserve (DoFTools::max_dofs_per_face(dof));
std::vector<Point<spacedim> > dof_locations;
interpolate_boundary_values (const Mapping<DH::dimension, DH::space_dimension> &mapping,
const DH &dof,
const typename FunctionMap<DH::space_dimension>::type &function_map,
- std::map<unsigned int,double> &boundary_values,
+ std::map<types::global_dof_index,double> &boundary_values,
const ComponentMask &component_mask_)
{
internal::
const DH &dof,
const types::boundary_id boundary_component,
const Function<DH::space_dimension> &boundary_function,
- std::map<unsigned int,double> &boundary_values,
+ std::map<types::global_dof_index,double> &boundary_values,
const ComponentMask &component_mask)
{
typename FunctionMap<DH::space_dimension>::type function_map;
interpolate_boundary_values (const DH &dof,
const types::boundary_id boundary_component,
const Function<DH::space_dimension> &boundary_function,
- std::map<unsigned int,double> &boundary_values,
+ std::map<types::global_dof_index,double> &boundary_values,
const ComponentMask &component_mask)
{
interpolate_boundary_values(StaticMappingQ1<DH::dimension,DH::space_dimension>::mapping,
void
interpolate_boundary_values (const DH &dof,
const typename FunctionMap<DH::space_dimension>::type &function_map,
- std::map<unsigned int,double> &boundary_values,
+ std::map<types::global_dof_index,double> &boundary_values,
const ComponentMask &component_mask)
{
interpolate_boundary_values(StaticMappingQ1<DH::dimension,DH::space_dimension>::mapping,
ConstraintMatrix &constraints,
const ComponentMask &component_mask_)
{
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
interpolate_boundary_values (mapping, dof, function_map,
boundary_values, component_mask_);
- std::map<unsigned int,double>::const_iterator boundary_value =
+ std::map<types::global_dof_index,double>::const_iterator boundary_value =
boundary_values.begin();
for ( ; boundary_value !=boundary_values.end(); ++boundary_value)
{
const DoFHandler<1,1> &dof,
const FunctionMap<1>::type &boundary_functions,
const Quadrature<0> &,
- std::map<unsigned int,double> &boundary_values,
+ std::map<types::global_dof_index,double> &boundary_values,
std::vector<unsigned int> component_mapping)
{
Assert (component_mapping.size() == 0, ExcNotImplemented());
const DoFHandler<1,2> &dof,
const FunctionMap<2>::type &boundary_functions,
const Quadrature<0> &,
- std::map<unsigned int,double> &boundary_values,
+ std::map<types::global_dof_index,double> &boundary_values,
std::vector<unsigned int> component_mapping)
{
Assert (component_mapping.size() == 0, ExcNotImplemented());
const DoFHandler<dim, spacedim> &dof,
const typename FunctionMap<spacedim>::type &boundary_functions,
const Quadrature<dim-1> &q,
- std::map<unsigned int,double> &boundary_values,
+ std::map<types::global_dof_index,double> &boundary_values,
std::vector<unsigned int> component_mapping)
{
//TODO:[?] In project_boundary_values, no condensation of sparsity
else
AssertDimension (dof.get_fe().n_components(), component_mapping.size());
- std::vector<unsigned int> dof_to_boundary_mapping;
+ std::vector<types::global_dof_index> dof_to_boundary_mapping;
std::set<types::boundary_id> selected_boundary_components;
for (typename FunctionMap<spacedim>::type::const_iterator i=boundary_functions.begin();
i!=boundary_functions.end(); ++i)
project_boundary_values (const DoFHandler<dim,spacedim> &dof,
const typename FunctionMap<spacedim>::type &boundary_functions,
const Quadrature<dim-1> &q,
- std::map<unsigned int,double> &boundary_values,
+ std::map<types::global_dof_index,double> &boundary_values,
std::vector<unsigned int> component_mapping)
{
project_boundary_values(StaticMappingQ1<dim,spacedim>::mapping, dof, boundary_functions, q,
ConstraintMatrix &constraints,
std::vector<unsigned int> component_mapping)
{
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
project_boundary_values (mapping, dof, boundary_functions, q,
boundary_values, component_mapping);
- std::map<unsigned int,double>::const_iterator boundary_value =
+ std::map<types::global_dof_index,double>::const_iterator boundary_value =
boundary_values.begin();
for ( ; boundary_value !=boundary_values.end(); ++boundary_value)
{
template <int dim>
struct VectorDoFTuple
{
- unsigned int dof_indices[dim];
+ types::global_dof_index dof_indices[dim];
VectorDoFTuple ()
{
// 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<dim; ++d)
if (std::fabs(tangent_vector[d]) > std::fabs(tangent_vector[largest_component]) + 1e-10)
largest_component = d;
update_values);
std::vector<bool> dofs_processed;
std::vector<double> dof_values;
- std::vector<unsigned int> face_dof_indices;
+ std::vector<types::global_dof_index> face_dof_indices;
typename hp::DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active ();
switch (dim)
* fe_values[vec].value (fe.face_to_cell_index (i, face), q_point));
}
- std::vector<unsigned int> face_dof_indices (fe.dofs_per_face);
+ std::vector<types::global_dof_index> face_dof_indices (fe.dofs_per_face);
cell->face (face)->get_dof_indices (face_dof_indices, cell->active_fe_index ());
const Function<3> &boundary_function,
const std::vector<DerivativeForm<1,3,3> > &jacobians,
std::vector<double> &dof_values,
- std::vector<unsigned int> &projected_dofs)
+ std::vector<types::global_dof_index> &projected_dofs)
{
// Compute the intergral over
// the product of the normal
* fe_values[vec].value (fe.face_to_cell_index (i, face), q_point));
}
- std::vector<unsigned int> face_dof_indices (fe.dofs_per_face);
+ std::vector<types::global_dof_index> face_dof_indices (fe.dofs_per_face);
cell->face (face)->get_dof_indices (face_dof_indices, cell->active_fe_index ());
// compute a second one.
const unsigned int &n_dofs = dof_handler.n_dofs ();
std::vector<double> dof_values (n_dofs);
- std::vector<unsigned int> projected_dofs (n_dofs);
+ std::vector<types::global_dof_index> projected_dofs (n_dofs);
for (unsigned int dof = 0; dof < n_dofs; ++dof)
projected_dofs[dof] = 0;
{
const unsigned int &n_dofs = dof_handler.n_dofs ();
std::vector<double> dof_values (n_dofs);
- std::vector<unsigned int> projected_dofs (n_dofs);
+ std::vector<types::global_dof_index> projected_dofs (n_dofs);
for (unsigned int dof = 0; dof < n_dofs; ++dof)
projected_dofs[dof] = 0;
"to imposing Dirichlet values on the vector-valued "
"quantity."));
- std::vector<unsigned int> face_dofs;
+ std::vector<types::global_dof_index> face_dofs;
// create FE and mapping
// collections for all elements in
next = i;
++next;
- unsigned int first_index = i->begin;
- unsigned int last_index = i->end;
+ types::global_dof_index first_index = i->begin;
+ types::global_dof_index last_index = i->end;
// see if we can merge any of
// the following ranges
IndexSet
-IndexSet::get_view (const unsigned int begin,
- const unsigned int end) const
+IndexSet::get_view (const types::global_dof_index begin,
+ const types::global_dof_index end) const
{
Assert (begin <= end,
ExcMessage ("End index needs to be larger or equal to begin index!"));
void
IndexSet::read(std::istream &in)
{
- unsigned int s, numranges, b, e;
+ types::global_dof_index s;
+ unsigned int numranges;
+
in >> s >> numranges;
ranges.clear();
set_size(s);
for (unsigned int i=0; i<numranges; ++i)
{
+ types::global_dof_index b, e;
in >> b >> e;
add_range(b,e);
}
void
IndexSet::block_read(std::istream &in)
{
- unsigned int size;
+ types::global_dof_index size;
size_t n_ranges;
in.read(reinterpret_cast<char *>(&size), sizeof(size));
in.read(reinterpret_cast<char *>(&n_ranges), sizeof(n_ranges));
}
-void IndexSet::fill_index_vector(std::vector<unsigned int> &indices) const
+void IndexSet::fill_index_vector(std::vector<types::global_dof_index> &indices) const
{
compress();
for (std::vector<Range>::iterator it = ranges.begin();
it != ranges.end();
++it)
- for (unsigned int i=it->begin; i<it->end; ++i)
+ for (types::global_dof_index i=it->begin; i<it->end; ++i)
indices.push_back (i);
Assert (indices.size() == n_elements(), ExcInternalError());
#endif
else
{
- std::vector<unsigned int> indices;
+ std::vector<types::global_dof_index> indices;
fill_index_vector(indices);
return Epetra_Map (-1,
std::size_t
IndexSet::memory_consumption () const
{
- return MemoryConsumption::memory_consumption (ranges) +
- MemoryConsumption::memory_consumption (is_compressed) +
- MemoryConsumption::memory_consumption (index_space_size);
+ return (MemoryConsumption::memory_consumption (ranges) +
+ MemoryConsumption::memory_consumption (is_compressed) +
+ MemoryConsumption::memory_consumption (index_space_size));
}
}
+ template <typename Integer>
+ std::vector<Integer>
+ reverse_permutation (const std::vector<Integer> &permutation)
+ {
+ const unsigned int n = permutation.size();
+
+ std::vector<Integer> out (n);
+ for (unsigned int i=0; i<n; ++i)
+ out[i] = n - 1 - permutation[i];
+
+ return out;
+ }
+
+
+
+ template <typename Integer>
+ std::vector<Integer>
+ invert_permutation (const std::vector<Integer> &permutation)
+ {
+ const unsigned int n = permutation.size();
+
+ std::vector<Integer> out (n, numbers::invalid_unsigned_int);
+
+ for (unsigned int i=0; i<n; ++i)
+ {
+ Assert (permutation[i] < n, ExcIndexRange (permutation[i], 0, n));
+ out[permutation[i]] = i;
+ }
+
+ // check that we have actually reached
+ // all indices
+ for (unsigned int i=0; i<n; ++i)
+ Assert (out[i] != numbers::invalid_unsigned_int,
+ ExcMessage ("The given input permutation had duplicate entries!"));
+
+ return out;
+ }
+
+
+
namespace System
{
number_cache.n_global_active_cells
= std::accumulate (number_cache.n_locally_owned_active_cells.begin(),
number_cache.n_locally_owned_active_cells.end(),
- 0);
+ /* ensure sum is
+ computed with
+ correct data
+ type:*/
+ static_cast<types::global_dof_index>(0));
number_cache.n_global_levels = Utilities::MPI::max(this->n_levels(), mpi_communicator);
}
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
template <class DH, bool lda>
void
-DoFCellAccessor<DH,lda>::set_dof_indices (const std::vector<unsigned int> &local_dof_indices)
+DoFCellAccessor<DH,lda>::set_dof_indices (const std::vector<types::global_dof_index> &local_dof_indices)
{
Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
ExcMessage ("DoFHandler not initialized"));
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
const unsigned int DoFHandler<dim,spacedim>::space_dimension;
template <int dim, int spacedim>
-const unsigned int DoFHandler<dim,spacedim>::invalid_dof_index;
+const types::global_dof_index DoFHandler<dim,spacedim>::invalid_dof_index;
template <int dim, int spacedim>
const unsigned int DoFHandler<dim,spacedim>::default_fe_index;
namespace internal
{
template <int dim, int spacedim>
- const unsigned int *dummy ()
+ const types::global_dof_index *dummy ()
{
return &dealii::DoFHandler<dim,spacedim>::invalid_dof_index;
}
template<int spacedim>
static
- unsigned int distribute_dofs_on_cell (typename DoFHandler<1, spacedim>::cell_iterator &cell, unsigned int next_free_dof)
+ types::global_dof_index distribute_dofs_on_cell (typename DoFHandler<1, spacedim>::cell_iterator &cell, types::global_dof_index next_free_dof)
{
const FiniteElement<1, spacedim> &fe = cell->get_fe ();
template<int spacedim>
static
- unsigned int distribute_dofs_on_cell (typename DoFHandler<2, spacedim>::cell_iterator &cell, unsigned int next_free_dof)
+ types::global_dof_index distribute_dofs_on_cell (typename DoFHandler<2, spacedim>::cell_iterator &cell, types::global_dof_index next_free_dof)
{
const FiniteElement<2, spacedim> &fe = cell->get_fe ();
template<int spacedim>
static
- unsigned int distribute_dofs_on_cell (typename DoFHandler<3, spacedim>::cell_iterator &cell, unsigned int next_free_dof)
+ types::global_dof_index distribute_dofs_on_cell (typename DoFHandler<3, spacedim>::cell_iterator &cell, types::global_dof_index next_free_dof)
{
const FiniteElement<3, spacedim> &fe = cell->get_fe ();
template<int spacedim>
static
- unsigned int get_dof_index (
+ types::global_dof_index
+ get_dof_index (
const DoFHandler<1, spacedim> &dof_handler,
internal::DoFHandler::DoFLevel<1> &mg_level,
internal::DoFHandler::DoFFaces<1> &,
template<int spacedim>
static
- unsigned int get_dof_index (const DoFHandler<2, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<2> &, internal::DoFHandler::DoFFaces<2> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const int2type<1>)
+ types::global_dof_index
+ get_dof_index (const DoFHandler<2, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<2> &, internal::DoFHandler::DoFFaces<2> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const int2type<1>)
{
return mg_faces.lines.get_dof_index (dof_handler, obj_index, fe_index, local_index);
}
template<int spacedim>
static
- unsigned int get_dof_index (const DoFHandler<2, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<2> &mg_level, internal::DoFHandler::DoFFaces<2> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const int2type<2>)
+ types::global_dof_index
+ get_dof_index (const DoFHandler<2, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<2> &mg_level, internal::DoFHandler::DoFFaces<2> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const int2type<2>)
{
return mg_level.dof_object.get_dof_index (dof_handler, obj_index, fe_index, local_index);
}
template<int spacedim>
static
- unsigned int get_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &, internal::DoFHandler::DoFFaces<3> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const int2type<1>)
+ types::global_dof_index
+ get_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &, internal::DoFHandler::DoFFaces<3> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const int2type<1>)
{
return mg_faces.lines.get_dof_index (dof_handler, obj_index, fe_index, local_index);
}
template<int spacedim>
static
- unsigned int get_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &, internal::DoFHandler::DoFFaces<3> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const int2type<2>)
+ types::global_dof_index
+ get_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &, internal::DoFHandler::DoFFaces<3> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const int2type<2>)
{
return mg_faces.quads.get_dof_index (dof_handler, obj_index, fe_index, local_index);
}
template<int spacedim>
static
- unsigned int get_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &mg_level, internal::DoFHandler::DoFFaces<3> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const int2type<3>)
+ types::global_dof_index
+ get_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &mg_level, internal::DoFHandler::DoFFaces<3> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const int2type<3>)
{
return mg_level.dof_object.get_dof_index (dof_handler, obj_index, fe_index, local_index);
}
template<int spacedim>
static
- void set_dof_index (const DoFHandler<1, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<1> &mg_level, internal::DoFHandler::DoFFaces<1> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const unsigned int global_index, const int2type<1>)
+ void set_dof_index (const DoFHandler<1, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<1> &mg_level, internal::DoFHandler::DoFFaces<1> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const int2type<1>)
{
mg_level.dof_object.set_dof_index (dof_handler, obj_index, fe_index, local_index, global_index);
}
template<int spacedim>
static
- void set_dof_index (const DoFHandler<2, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<2> &, internal::DoFHandler::DoFFaces<2> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const unsigned int global_index, const int2type<1>)
+ void set_dof_index (const DoFHandler<2, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<2> &, internal::DoFHandler::DoFFaces<2> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const int2type<1>)
{
mg_faces.lines.set_dof_index (dof_handler, obj_index, fe_index, local_index, global_index);
}
template<int spacedim>
static
- void set_dof_index (const DoFHandler<2, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<2> &mg_level, internal::DoFHandler::DoFFaces<2> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const unsigned int global_index, const int2type<2>)
+ void set_dof_index (const DoFHandler<2, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<2> &mg_level, internal::DoFHandler::DoFFaces<2> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const int2type<2>)
{
mg_level.dof_object.set_dof_index (dof_handler, obj_index, fe_index, local_index, global_index);
}
template<int spacedim>
static
- void set_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &, internal::DoFHandler::DoFFaces<3> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const unsigned int global_index, const int2type<1>)
+ void set_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &, internal::DoFHandler::DoFFaces<3> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const int2type<1>)
{
mg_faces.lines.set_dof_index (dof_handler, obj_index, fe_index, local_index, global_index);
}
template<int spacedim>
static
- void set_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &, internal::DoFHandler::DoFFaces<3> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const unsigned int global_index, const int2type<2>)
+ void set_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &, internal::DoFHandler::DoFFaces<3> &mg_faces, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const int2type<2>)
{
mg_faces.quads.set_dof_index (dof_handler, obj_index, fe_index, local_index, global_index);
}
template<int spacedim>
static
- void set_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &mg_level, internal::DoFHandler::DoFFaces<3> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const unsigned int global_index, const int2type<3>)
+ void set_dof_index (const DoFHandler<3, spacedim> &dof_handler, internal::DoFHandler::DoFLevel<3> &mg_level, internal::DoFHandler::DoFFaces<3> &, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index, const int2type<3>)
{
mg_level.dof_object.set_dof_index (dof_handler, obj_index, fe_index, local_index, global_index);
}
template <>
-unsigned int DoFHandler<1>::n_boundary_dofs () const
+types::global_dof_index DoFHandler<1>::n_boundary_dofs () const
{
return 2*get_fe().dofs_per_vertex;
}
template <>
-unsigned int DoFHandler<1>::n_boundary_dofs (const FunctionMap &boundary_indicators) const
+types::global_dof_index DoFHandler<1>::n_boundary_dofs (const FunctionMap &boundary_indicators) const
{
// check that only boundary
// indicators 0 and 1 are allowed
template <>
-unsigned int DoFHandler<1>::n_boundary_dofs (const std::set<types::boundary_id> &boundary_indicators) const
+types::global_dof_index DoFHandler<1>::n_boundary_dofs (const std::set<types::boundary_id> &boundary_indicators) const
{
// check that only boundary
// indicators 0 and 1 are allowed
template <>
-unsigned int DoFHandler<1,2>::n_boundary_dofs () const
+types::global_dof_index DoFHandler<1,2>::n_boundary_dofs () const
{
return 2*get_fe().dofs_per_vertex;
}
template <>
-unsigned int DoFHandler<1,2>::n_boundary_dofs (const FunctionMap &boundary_indicators) const
+types::global_dof_index DoFHandler<1,2>::n_boundary_dofs (const FunctionMap &boundary_indicators) const
{
// check that only boundary
// indicators 0 and 1 are allowed
template <>
-unsigned int DoFHandler<1,2>::n_boundary_dofs (const std::set<types::boundary_id> &boundary_indicators) const
+types::global_dof_index DoFHandler<1,2>::n_boundary_dofs (const std::set<types::boundary_id> &boundary_indicators) const
{
// check that only boundary
// indicators 0 and 1 are allowed
template<int dim, int spacedim>
-unsigned int DoFHandler<dim,spacedim>::n_boundary_dofs () const
+types::global_dof_index DoFHandler<dim,spacedim>::n_boundary_dofs () const
{
std::set<int> boundary_dofs;
const unsigned int dofs_per_face = get_fe().dofs_per_face;
- std::vector<unsigned int> dofs_on_face(dofs_per_face);
+ std::vector<types::global_dof_index> dofs_on_face(dofs_per_face);
// loop over all faces of all cells
// and see whether they are at a
template<int dim, int spacedim>
-unsigned int
+types::global_dof_index
DoFHandler<dim,spacedim>::n_boundary_dofs (const FunctionMap &boundary_indicators) const
{
Assert (boundary_indicators.find(numbers::internal_face_boundary_id) == boundary_indicators.end(),
std::set<int> boundary_dofs;
const unsigned int dofs_per_face = get_fe().dofs_per_face;
- std::vector<unsigned int> dofs_on_face(dofs_per_face);
+ std::vector<types::global_dof_index> dofs_on_face(dofs_per_face);
// same as in the previous
// function, but with an additional
template<int dim, int spacedim>
-unsigned int
+types::global_dof_index
DoFHandler<dim,spacedim>::n_boundary_dofs (const std::set<types::boundary_id> &boundary_indicators) const
{
Assert (boundary_indicators.find (numbers::internal_face_boundary_id) == boundary_indicators.end(),
std::set<int> boundary_dofs;
const unsigned int dofs_per_face = get_fe().dofs_per_face;
- std::vector<unsigned int> dofs_on_face(dofs_per_face);
+ std::vector<types::global_dof_index> dofs_on_face(dofs_per_face);
// same as in the previous
// function, but with a different
mem += MemoryConsumption::memory_consumption (*mg_faces);
for (unsigned int i = 0; i < mg_vertex_dofs.size (); ++i)
- mem += sizeof (MGVertexDoFs) + (1 + mg_vertex_dofs[i].get_finest_level () - mg_vertex_dofs[i].get_coarsest_level ()) * sizeof (unsigned int);
+ mem += sizeof (MGVertexDoFs) + (1 + mg_vertex_dofs[i].get_finest_level () - mg_vertex_dofs[i].get_coarsest_level ()) * sizeof (types::global_dof_index);
return mem;
}
template <int dim, int spacedim>
void
-DoFHandler<dim,spacedim>::renumber_dofs (const std::vector<unsigned int> &new_numbers)
+DoFHandler<dim,spacedim>::renumber_dofs (const std::vector<types::global_dof_index> &new_numbers)
{
Assert (new_numbers.size() == n_locally_owned_dofs(),
ExcRenumberingIncomplete());
// processor
if (n_locally_owned_dofs() == n_dofs())
{
- std::vector<unsigned int> tmp(new_numbers);
+ std::vector<types::global_dof_index> tmp(new_numbers);
std::sort (tmp.begin(), tmp.end());
- std::vector<unsigned int>::const_iterator p = tmp.begin();
- unsigned int i = 0;
+ std::vector<types::global_dof_index>::const_iterator p = tmp.begin();
+ types::global_dof_index i = 0;
for (; p!=tmp.end(); ++p, ++i)
Assert (*p == i, ExcNewNumbersNotConsecutive(i));
}
else
- for (unsigned int i=0; i<new_numbers.size(); ++i)
+ for (types::global_dof_index i=0; i<new_numbers.size(); ++i)
Assert (new_numbers[i] < n_dofs(),
ExcMessage ("New DoF index is not less than the total number of dofs."));
#endif
template <int dim, int spacedim>
void
DoFHandler<dim,spacedim>::renumber_dofs (const unsigned int,
- const std::vector<unsigned int> &)
+ const std::vector<types::global_dof_index> &)
{
Assert(false, ExcNotImplemented());
}
template<>
void DoFHandler<1>::renumber_dofs (const unsigned int level,
- const std::vector<unsigned int> &new_numbers)
+ const std::vector<types::global_dof_index> &new_numbers)
{
Assert (new_numbers.size() == n_dofs(level), DoFHandler<1>::ExcRenumberingIncomplete());
template<>
void DoFHandler<2>::renumber_dofs (const unsigned int level,
- const std::vector<unsigned int> &new_numbers)
+ const std::vector<types::global_dof_index> &new_numbers)
{
Assert (new_numbers.size() == n_dofs(level),
DoFHandler<2>::ExcRenumberingIncomplete());
template<>
void DoFHandler<3>::renumber_dofs (const unsigned int level,
- const std::vector<unsigned int> &new_numbers)
+ const std::vector<types::global_dof_index> &new_numbers)
{
Assert (new_numbers.size() == n_dofs(level),
DoFHandler<3>::ExcRenumberingIncomplete());
delete faces;
faces = 0;
- std::vector<unsigned int> tmp;
+ std::vector<types::global_dof_index> tmp;
std::swap (vertex_dofs, tmp);
number_cache.clear ();
template<int dim, int spacedim>
template<int structdim>
-unsigned int DoFHandler<dim, spacedim>::get_dof_index (
+types::global_dof_index
+DoFHandler<dim, spacedim>::get_dof_index (
const unsigned int obj_level,
const unsigned int obj_index,
const unsigned int fe_index,
template<int dim, int spacedim>
template<int structdim>
-void DoFHandler<dim, spacedim>::set_dof_index (const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const unsigned int global_index) const
+void DoFHandler<dim, spacedim>::set_dof_index (const unsigned int obj_level, const unsigned int obj_index, const unsigned int fe_index, const unsigned int local_index, const types::global_dof_index global_index) const
{
internal::DoFHandler::Implementation::set_dof_index (*this, *this->mg_levels[obj_level], *this->mg_faces, obj_index, fe_index, local_index, global_index, internal::int2type<structdim> ());
}
+
template<int dim, int spacedim>
DoFHandler<dim, spacedim>::MGVertexDoFs::MGVertexDoFs (): coarsest_level (numbers::invalid_unsigned_int), finest_level (0), indices (0), indices_offset (0)
{
}
+
template<int dim, int spacedim>
DoFHandler<dim, spacedim>::MGVertexDoFs::~MGVertexDoFs ()
{
{
namespace internal
\{
- template const unsigned int * dummy<deal_II_dimension,deal_II_dimension> ();
+ template const types::global_dof_index * dummy<deal_II_dimension,deal_II_dimension> ();
#if deal_II_dimension < 3
- template const unsigned int * dummy<deal_II_dimension,deal_II_dimension+1> ();
+ template const types::global_dof_index * dummy<deal_II_dimension,deal_II_dimension+1> ();
#endif
\}
*/
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
distribute_dofs_on_cell (const DoFHandler<1,spacedim> &dof_handler,
const typename DoFHandler<1,spacedim>::active_cell_iterator &cell,
- unsigned int next_free_dof)
+ types::global_dof_index next_free_dof)
{
// distribute dofs of vertices
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
distribute_dofs_on_cell (const DoFHandler<2,spacedim> &dof_handler,
const typename DoFHandler<2,spacedim>::active_cell_iterator &cell,
- unsigned int next_free_dof)
+ types::global_dof_index next_free_dof)
{
if (dof_handler.get_fe().dofs_per_vertex > 0)
// number dofs on vertices
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
distribute_dofs_on_cell (const DoFHandler<3,spacedim> &dof_handler,
const typename DoFHandler<3,spacedim>::active_cell_iterator &cell,
- unsigned int next_free_dof)
+ types::global_dof_index next_free_dof)
{
if (dof_handler.get_fe().dofs_per_vertex > 0)
// number dofs on vertices
* Distribute degrees of freedom on all cells, or on cells with the
* correct subdomain_id if the corresponding argument is not equal to
* numbers::invalid_subdomain_id. Return the total number of dofs
- * returned.
+ * distributed.
*/
template <int dim, int spacedim>
static
- unsigned int
- distribute_dofs (const unsigned int offset,
+ types::global_dof_index
+ distribute_dofs (const types::global_dof_index offset,
const types::subdomain_id subdomain_id,
DoFHandler<dim,spacedim> &dof_handler)
{
tria.save_user_flags(user_flags);
const_cast<dealii::Triangulation<dim,spacedim> &>(tria).clear_user_flags ();
- unsigned int next_free_dof = offset;
+ types::global_dof_index next_free_dof = offset;
typename DoFHandler<dim,spacedim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
template <int spacedim>
static
void
- renumber_dofs (const std::vector<unsigned int> &new_numbers,
+ renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
const IndexSet &,
DoFHandler<1,spacedim> &dof_handler,
const bool check_validity)
// numbers may be invalid_dof_index,
// namely when the appropriate
// vertex/line/etc is unused
- for (std::vector<unsigned int>::iterator
+ for (std::vector<types::global_dof_index>::iterator
i=dof_handler.vertex_dofs.begin();
i!=dof_handler.vertex_dofs.end(); ++i)
if (*i != DoFHandler<1,spacedim>::invalid_dof_index)
ExcInternalError ());
for (unsigned int level=0; level<dof_handler.levels.size(); ++level)
- for (std::vector<unsigned int>::iterator
+ for (std::vector<types::global_dof_index>::iterator
i=dof_handler.levels[level]->dof_object.dofs.begin();
i!=dof_handler.levels[level]->dof_object.dofs.end(); ++i)
if (*i != DoFHandler<1,spacedim>::invalid_dof_index)
template <int spacedim>
static
void
- renumber_dofs (const std::vector<unsigned int> &new_numbers,
+ renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
const IndexSet &indices,
- DoFHandler<2,spacedim> &dof_handler,
+ DoFHandler<2,spacedim> &dof_handler,
const bool check_validity)
{
// note that we can not use cell
// numbers may be invalid_dof_index,
// namely when the appropriate
// vertex/line/etc is unused
- for (std::vector<unsigned int>::iterator
+ for (std::vector<types::global_dof_index>::iterator
i=dof_handler.vertex_dofs.begin();
i!=dof_handler.vertex_dofs.end(); ++i)
if (*i != DoFHandler<2,spacedim>::invalid_dof_index)
== false,
ExcInternalError ());
- for (std::vector<unsigned int>::iterator
+ for (std::vector<types::global_dof_index>::iterator
i=dof_handler.faces->lines.dofs.begin();
i!=dof_handler.faces->lines.dofs.end(); ++i)
if (*i != DoFHandler<2,spacedim>::invalid_dof_index)
for (unsigned int level=0; level<dof_handler.levels.size(); ++level)
{
- for (std::vector<unsigned int>::iterator
+ for (std::vector<types::global_dof_index>::iterator
i=dof_handler.levels[level]->dof_object.dofs.begin();
i!=dof_handler.levels[level]->dof_object.dofs.end(); ++i)
if (*i != DoFHandler<2,spacedim>::invalid_dof_index)
template <int spacedim>
static
void
- renumber_dofs (const std::vector<unsigned int> &new_numbers,
+ renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
const IndexSet &indices,
DoFHandler<3,spacedim> &dof_handler,
const bool check_validity)
// numbers may be invalid_dof_index,
// namely when the appropriate
// vertex/line/etc is unused
- for (std::vector<unsigned int>::iterator
+ for (std::vector<types::global_dof_index>::iterator
i=dof_handler.vertex_dofs.begin();
i!=dof_handler.vertex_dofs.end(); ++i)
if (*i != DoFHandler<3,spacedim>::invalid_dof_index)
== false,
ExcInternalError ());
- for (std::vector<unsigned int>::iterator
+ for (std::vector<types::global_dof_index>::iterator
i=dof_handler.faces->lines.dofs.begin();
i!=dof_handler.faces->lines.dofs.end(); ++i)
if (*i != DoFHandler<3,spacedim>::invalid_dof_index)
*i = ((indices.n_elements() == 0) ?
new_numbers[*i] :
new_numbers[indices.index_within_set(*i)]);
- for (std::vector<unsigned int>::iterator
+ for (std::vector<types::global_dof_index>::iterator
i=dof_handler.faces->quads.dofs.begin();
i!=dof_handler.faces->quads.dofs.end(); ++i)
if (*i != DoFHandler<3,spacedim>::invalid_dof_index)
for (unsigned int level=0; level<dof_handler.levels.size(); ++level)
{
- for (std::vector<unsigned int>::iterator
+ for (std::vector<types::global_dof_index>::iterator
i=dof_handler.levels[level]->dof_object.dofs.begin();
i!=dof_handler.levels[level]->dof_object.dofs.end(); ++i)
if (*i != DoFHandler<3,spacedim>::invalid_dof_index)
Sequential<dim,spacedim>::
distribute_dofs (DoFHandler<dim,spacedim> &dof_handler) const
{
- const unsigned int n_dofs =
+ const types::global_dof_index n_dofs =
Implementation::distribute_dofs (0,
numbers::invalid_subdomain_id,
dof_handler);
number_cache.locally_owned_dofs.compress();
number_cache.n_locally_owned_dofs_per_processor
- = std::vector<unsigned int> (1,
- number_cache.n_global_dofs);
+ = std::vector<types::global_dof_index> (1,
+ number_cache.n_global_dofs);
number_cache.locally_owned_dofs_per_processor
= std::vector<IndexSet> (1,
template <int dim, int spacedim>
NumberCache
Sequential<dim,spacedim>::
- renumber_dofs (const std::vector<unsigned int> &new_numbers,
+ renumber_dofs (const std::vector<types::global_dof_index> &new_numbers,
dealii::DoFHandler<dim,spacedim> &dof_handler) const
{
Implementation::renumber_dofs (new_numbers, IndexSet(0),
number_cache.locally_owned_dofs.compress();
number_cache.n_locally_owned_dofs_per_processor
- = std::vector<unsigned int> (1,
- number_cache.n_global_dofs);
+ = std::vector<types::global_dof_index> (1,
+ number_cache.n_global_dofs);
number_cache.locally_owned_dofs_per_processor
= std::vector<IndexSet> (1,
{
std::vector<unsigned int> tree_index;
std::vector<typename dealii::internal::p4est::types<dim>::quadrant> quadrants;
- std::vector<unsigned int> dofs;
+ std::vector<dealii::types::global_dof_index> dofs;
unsigned int bytes_for_buffer () const
{
tree_index.size() * sizeof(unsigned int) +
quadrants.size() * sizeof(typename dealii::internal::p4est
::types<dim>::quadrant) +
- dofs.size() * sizeof(unsigned int));
+ dofs.size() * sizeof(dealii::types::global_dof_index));
}
void pack_data (std::vector<char> &buffer) const
std::memcpy(ptr,
&dofs[0],
- dofs.size() * sizeof(unsigned int));
- ptr += dofs.size() * sizeof(unsigned int);
+ dofs.size() * sizeof(dealii::types::global_dof_index));
+ ptr += dofs.size() * sizeof(dealii::types::global_dof_index);
Assert (ptr == &buffer[0]+buffer.size(),
ExcInternalError());
// this cell's dof_indices
// need to be sent to
// someone
- std::vector<unsigned int>
+ std::vector<dealii::types::global_dof_index>
local_dof_indices (dealii_cell->get_fe().dofs_per_cell);
dealii_cell->get_dof_indices (local_dof_indices);
const typename dealii::internal::p4est::types<dim>::quadrant &p4est_cell,
const typename DoFHandler<dim,spacedim>::level_cell_iterator &dealii_cell,
const typename dealii::internal::p4est::types<dim>::quadrant &quadrant,
- unsigned int *dofs)
+ dealii::types::global_dof_index *dofs)
{
if (internal::p4est::quadrant_is_equal<dim>(p4est_cell, quadrant))
{
Assert(dealii_cell->is_ghost(), ExcInternalError());
// update dof indices of cell
- std::vector<unsigned int>
+ std::vector<dealii::types::global_dof_index>
dof_indices (dealii_cell->get_fe().dofs_per_cell);
dealii_cell->update_cell_dof_indices_cache();
dealii_cell->get_dof_indices(dof_indices);
// that are going to send stuff to us
std::set<dealii::types::subdomain_id> senders;
{
- std::vector<unsigned int> local_dof_indices;
+ std::vector<dealii::types::global_dof_index> local_dof_indices;
typename DoFHandler<dim,spacedim>::active_cell_iterator
cell, endc = dof_handler.end();
memcpy(&cells, ptr, sizeof(unsigned int));
ptr+=sizeof(unsigned int);
- //reinterpret too evil?
+ //TODO: reinterpret too evil?
unsigned int *treeindex=reinterpret_cast<unsigned int *>(ptr);
ptr+=cells*sizeof(unsigned int);
typename dealii::internal::p4est::types<dim>::quadrant *quadrant
=reinterpret_cast<typename dealii::internal::p4est::types<dim>::quadrant *>(ptr);
ptr+=cells*sizeof(typename dealii::internal::p4est::types<dim>::quadrant);
- unsigned int *dofs=reinterpret_cast<unsigned int *>(ptr);
+ dealii::types::global_dof_index *dofs=reinterpret_cast<dealii::types::global_dof_index *>(ptr);
for (unsigned int c=0; c<cells; ++c, dofs+=1+dofs[0])
{
//* 1. distribute on own
//* subdomain
- const unsigned int n_initial_local_dofs =
+ const dealii::types::global_dof_index n_initial_local_dofs =
Implementation::distribute_dofs (0, tr->locally_owned_subdomain(),
dof_handler);
//* 2. iterate over ghostcells and
//kill dofs that are not owned
//by us
- std::vector<unsigned int> renumbering(n_initial_local_dofs);
+ std::vector<dealii::types::global_dof_index> renumbering(n_initial_local_dofs);
for (unsigned int i=0; i<renumbering.size(); ++i)
renumbering[i] = i;
{
- std::vector<unsigned int> local_dof_indices;
+ std::vector<dealii::types::global_dof_index> local_dof_indices;
typename DoFHandler<dim,spacedim>::active_cell_iterator
cell = dof_handler.begin_active(),
// make indices consecutive
number_cache.n_locally_owned_dofs = 0;
- for (std::vector<unsigned int>::iterator it=renumbering.begin();
+ for (std::vector<dealii::types::global_dof_index>::iterator it=renumbering.begin();
it!=renumbering.end(); ++it)
if (*it != DoFHandler<dim,spacedim>::invalid_dof_index)
*it = number_cache.n_locally_owned_dofs++;
1, MPI_UNSIGNED,
tr->get_communicator());
- const unsigned int
+ const dealii::types::global_dof_index
shift = std::accumulate (number_cache
.n_locally_owned_dofs_per_processor.begin(),
number_cache
.n_locally_owned_dofs_per_processor.begin()
+ tr->locally_owned_subdomain(),
- 0);
- for (std::vector<unsigned int>::iterator it=renumbering.begin();
+ static_cast<dealii::types::global_dof_index>(0));
+ for (std::vector<dealii::types::global_dof_index>::iterator it=renumbering.begin();
it!=renumbering.end(); ++it)
if (*it != DoFHandler<dim,spacedim>::invalid_dof_index)
(*it) += shift;
.n_locally_owned_dofs_per_processor.begin(),
number_cache
.n_locally_owned_dofs_per_processor.end(),
- 0);
+ static_cast<dealii::types::global_dof_index>(0));
number_cache.locally_owned_dofs = IndexSet(number_cache.n_global_dofs);
number_cache.locally_owned_dofs
// fill global_dof_indexsets
number_cache.locally_owned_dofs_per_processor.resize(n_cpus);
{
- unsigned int lshift = 0;
+ dealii::types::global_dof_index lshift = 0;
for (unsigned int i=0; i<n_cpus; ++i)
{
number_cache.locally_owned_dofs_per_processor[i]
#ifdef DEBUG
//check that we are really done
{
- std::vector<unsigned int> local_dof_indices;
+ std::vector<dealii::types::global_dof_index> local_dof_indices;
typename DoFHandler<dim,spacedim>::active_cell_iterator
cell, endc = dof_handler.end();
template <int dim, int spacedim>
NumberCache
ParallelDistributed<dim, spacedim>::
- renumber_dofs (const std::vector<unsigned int> &new_numbers,
+ renumber_dofs (const std::vector<dealii::types::global_dof_index> &new_numbers,
dealii::DoFHandler<dim,spacedim> &dof_handler) const
{
Assert (new_numbers.size() == dof_handler.locally_owned_dofs().n_elements(),
number_cache.locally_owned_dofs = IndexSet (dof_handler.n_dofs());
if (dof_handler.locally_owned_dofs().n_elements()>0)
{
- std::vector<unsigned int>::const_iterator it = new_numbers.begin();
+ std::vector<dealii::types::global_dof_index>::const_iterator it = new_numbers.begin();
const unsigned int n_blocks = dof_handler.get_fe().n_blocks();
- std::vector<std::pair<unsigned int,unsigned int> > block_indices(n_blocks);
+ std::vector<std::pair<dealii::types::global_dof_index,unsigned int> > block_indices(n_blocks);
block_indices[0].first = *it++;
block_indices[0].second = 1;
unsigned int current_block = 0, n_filled_blocks = 1;
// mark not locally active DoFs as
// invalid
{
- std::vector<unsigned int> local_dof_indices;
+ std::vector<dealii::types::global_dof_index> local_dof_indices;
typename DoFHandler<dim,spacedim>::active_cell_iterator
cell = dof_handler.begin_active(),
.n_locally_owned_dofs_per_processor.begin(),
number_cache
.n_locally_owned_dofs_per_processor.end(),
- 0);
+ static_cast<dealii::types::global_dof_index>(0));
tr->load_user_flags(user_flags);
}
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const unsigned int global_index)
+ const types::global_dof_index global_index)
{
Assert ((fe_index == dealii::DoFHandler<dh_dim, spacedim>::default_fe_index),
ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
// $Id$
// Version: $Name$
//
-// Copyright (C) 2006, 2010 by the deal.II authors
+// Copyright (C) 2006, 2010, 2011 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
for (deal_II_dimension, structdim : DIMENSIONS)
{
template
- unsigned int
+ types::global_dof_index
DoFObjects<structdim>::
get_dof_index (const dealii::DoFHandler<deal_II_dimension> &dof_handler,
const unsigned int obj_index,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const unsigned int global_index);
+ const types::global_dof_index global_index);
#if (deal_II_dimension < 3) && (structdim < 3)
template
- unsigned int
+ types::global_dof_index
DoFObjects<structdim>::
get_dof_index (const dealii::DoFHandler<deal_II_dimension,deal_II_dimension+1> &dof_handler,
const unsigned int obj_index,
const unsigned int obj_index,
const unsigned int fe_index,
const unsigned int local_index,
- const unsigned int global_index);
+ const types::global_dof_index global_index);
#endif
}
// $Id$
// Version: $name$
//
-// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
#include <deal.II/base/thread_management.h>
#include <deal.II/base/utilities.h>
#include <deal.II/base/quadrature_lib.h>
+#include <deal.II/base/types.h>
#include <deal.II/base/template_constraints.h>
#include <deal.II/lac/sparsity_pattern.h>
{
namespace boost
{
- namespace types
+ namespace boosttypes
{
using namespace ::boost;
using namespace std;
template <class DH>
void create_graph (const DH &dof_handler,
const bool use_constraints,
- types::Graph &graph,
- types::property_map<types::Graph,types::vertex_degree_t>::type &graph_degree)
+ boosttypes::Graph &graph,
+ boosttypes::property_map<boosttypes::Graph,boosttypes::vertex_degree_t>::type &graph_degree)
{
{
// create intermediate sparsity pattern
add_edge (row, csp.column_number (row, col), graph);
}
- types::graph_traits<types::Graph>::vertex_iterator ui, ui_end;
+ boosttypes::graph_traits<boosttypes::Graph>::vertex_iterator ui, ui_end;
graph_degree = get(::boost::vertex_degree, graph);
for (::boost::tie(ui, ui_end) = vertices(graph); ui != ui_end; ++ui)
const bool reversed_numbering,
const bool use_constraints)
{
- std::vector<unsigned int> renumbering(dof_handler.n_dofs(),
- DH::invalid_dof_index);
+ std::vector<types::global_dof_index> renumbering(dof_handler.n_dofs(),
+ DH::invalid_dof_index);
compute_Cuthill_McKee(renumbering, dof_handler, reversed_numbering,
use_constraints);
template <class DH>
void
- compute_Cuthill_McKee (std::vector<unsigned int> &new_dof_indices,
+ compute_Cuthill_McKee (std::vector<types::global_dof_index> &new_dof_indices,
const DH &dof_handler,
const bool reversed_numbering,
const bool use_constraints)
{
- types::Graph
+ boosttypes::Graph
graph(dof_handler.n_dofs());
- types::property_map<types::Graph,types::vertex_degree_t>::type
+ boosttypes::property_map<boosttypes::Graph,boosttypes::vertex_degree_t>::type
graph_degree;
internal::create_graph (dof_handler, use_constraints, graph, graph_degree);
- types::property_map<types::Graph, types::vertex_index_t>::type
+ boosttypes::property_map<boosttypes::Graph, boosttypes::vertex_index_t>::type
index_map = get(::boost::vertex_index, graph);
- std::vector<types::Vertex> inv_perm(num_vertices(graph));
+ std::vector<boosttypes::Vertex> inv_perm(num_vertices(graph));
if (reversed_numbering == false)
::boost::cuthill_mckee_ordering(graph, inv_perm.rbegin(),
get(::boost::vertex_color, graph),
make_degree_map(graph));
- for (types::size_type c = 0; c != inv_perm.size(); ++c)
+ for (boosttypes::size_type c = 0; c != inv_perm.size(); ++c)
new_dof_indices[index_map[inv_perm[c]]] = c;
Assert (std::find (new_dof_indices.begin(), new_dof_indices.end(),
const bool reversed_numbering,
const bool use_constraints)
{
- std::vector<unsigned int> renumbering(dof_handler.n_dofs(),
- DH::invalid_dof_index);
+ std::vector<types::global_dof_index> renumbering(dof_handler.n_dofs(),
+ DH::invalid_dof_index);
compute_king_ordering(renumbering, dof_handler, reversed_numbering,
use_constraints);
template <class DH>
void
- compute_king_ordering (std::vector<unsigned int> &new_dof_indices,
+ compute_king_ordering (std::vector<types::global_dof_index> &new_dof_indices,
const DH &dof_handler,
const bool reversed_numbering,
const bool use_constraints)
{
- types::Graph
+ boosttypes::Graph
graph(dof_handler.n_dofs());
- types::property_map<types::Graph,types::vertex_degree_t>::type
+ boosttypes::property_map<boosttypes::Graph,boosttypes::vertex_degree_t>::type
graph_degree;
internal::create_graph (dof_handler, use_constraints, graph, graph_degree);
- types::property_map<types::Graph, types::vertex_index_t>::type
+ boosttypes::property_map<boosttypes::Graph, boosttypes::vertex_index_t>::type
index_map = get(::boost::vertex_index, graph);
- std::vector<types::Vertex> inv_perm(num_vertices(graph));
+ std::vector<boosttypes::Vertex> inv_perm(num_vertices(graph));
if (reversed_numbering == false)
::boost::king_ordering(graph, inv_perm.rbegin());
else
::boost::king_ordering(graph, inv_perm.begin());
- for (types::size_type c = 0; c != inv_perm.size(); ++c)
+ for (boosttypes::size_type c = 0; c != inv_perm.size(); ++c)
new_dof_indices[index_map[inv_perm[c]]] = c;
Assert (std::find (new_dof_indices.begin(), new_dof_indices.end(),
const bool reversed_numbering,
const bool use_constraints)
{
- std::vector<unsigned int> renumbering(dof_handler.n_dofs(),
- DH::invalid_dof_index);
+ std::vector<types::global_dof_index> renumbering(dof_handler.n_dofs(),
+ DH::invalid_dof_index);
compute_minimum_degree(renumbering, dof_handler, reversed_numbering,
use_constraints);
template <class DH>
void
- compute_minimum_degree (std::vector<unsigned int> &new_dof_indices,
+ compute_minimum_degree (std::vector<types::global_dof_index> &new_dof_indices,
const DH &dof_handler,
const bool reversed_numbering,
const bool use_constraints)
Graph G(n);
- std::vector<unsigned int> dofs_on_this_cell;
+ std::vector<dealii::types::global_dof_index> dofs_on_this_cell;
typename DH::active_cell_iterator cell = dof_handler.begin_active(),
endc = dof_handler.end();
Cuthill_McKee (DH &dof_handler,
const bool reversed_numbering,
const bool use_constraints,
- const std::vector<unsigned int> &starting_indices)
+ const std::vector<types::global_dof_index> &starting_indices)
{
- std::vector<unsigned int> renumbering(dof_handler.n_dofs(),
- DH::invalid_dof_index);
+ std::vector<types::global_dof_index> renumbering(dof_handler.n_dofs(),
+ DH::invalid_dof_index);
compute_Cuthill_McKee(renumbering, dof_handler, reversed_numbering,
use_constraints, starting_indices);
template <class DH>
void
- compute_Cuthill_McKee (std::vector<unsigned int> &new_indices,
+ compute_Cuthill_McKee (std::vector<types::global_dof_index> &new_indices,
const DH &dof_handler,
const bool reversed_numbering,
const bool use_constraints,
- const std::vector<unsigned int> &starting_indices)
+ const std::vector<types::global_dof_index> &starting_indices)
{
// make the connection graph. in
// more than 2d use an intermediate
void Cuthill_McKee (DH &dof_handler,
const unsigned int level,
const bool reversed_numbering,
- const std::vector<unsigned int> &starting_indices)
+ const std::vector<types::global_dof_index> &starting_indices)
{
Assert(dof_handler.n_dofs(level) != numbers::invalid_unsigned_int,
ExcNotInitialized());
dof_handler.max_couplings_between_dofs());
MGTools::make_sparsity_pattern (dof_handler, sparsity, level);
- std::vector<unsigned int> new_indices(sparsity.n_rows());
+ std::vector<types::global_dof_index> new_indices(sparsity.n_rows());
SparsityTools::reorder_Cuthill_McKee (sparsity, new_indices,
starting_indices);
component_wise (DoFHandler<dim,spacedim> &dof_handler,
const std::vector<unsigned int> &component_order_arg)
{
- std::vector<unsigned int> renumbering (dof_handler.n_locally_owned_dofs(),
- DoFHandler<dim>::invalid_dof_index);
+ std::vector<types::global_dof_index> renumbering (dof_handler.n_locally_owned_dofs(),
+ DoFHandler<dim>::invalid_dof_index);
typename DoFHandler<dim,spacedim>::active_cell_iterator
start = dof_handler.begin_active();
const typename DoFHandler<dim,spacedim>::level_cell_iterator
end = dof_handler.end();
- const unsigned int result =
+ const types::global_dof_index result =
compute_component_wise<dim,spacedim,
typename DoFHandler<dim,spacedim>::active_cell_iterator,
typename DoFHandler<dim,spacedim>::level_cell_iterator>
const std::vector<unsigned int> &component_order_arg)
{
//TODO: Merge with previous function
- std::vector<unsigned int> renumbering (dof_handler.n_dofs(),
+ std::vector<types::global_dof_index> renumbering (dof_handler.n_dofs(),
hp::DoFHandler<dim>::invalid_dof_index);
typename hp::DoFHandler<dim>::active_cell_iterator
const typename hp::DoFHandler<dim>::level_cell_iterator
end = dof_handler.end();
- const unsigned int result =
+ const types::global_dof_index result =
compute_component_wise<hp::DoFHandler<dim>::dimension,hp::DoFHandler<dim>::space_dimension,
typename hp::DoFHandler<dim>::active_cell_iterator,
typename hp::DoFHandler<dim>::level_cell_iterator>
Assert(dof_handler.n_dofs(level) != numbers::invalid_unsigned_int,
ExcNotInitialized());
- std::vector<unsigned int> renumbering (dof_handler.n_dofs(level),
+ std::vector<types::global_dof_index> renumbering (dof_handler.n_dofs(level),
DH::invalid_dof_index);
typename DH::level_cell_iterator start =dof_handler.begin(level);
typename DH::level_cell_iterator end = dof_handler.end(level);
- const unsigned int result =
+ const types::global_dof_index result =
compute_component_wise<DH::dimension, DH::space_dimension,
typename DH::level_cell_iterator, typename DH::level_cell_iterator>
(renumbering, start, end, component_order_arg);
template <int dim, int spacedim, class ITERATOR, class ENDITERATOR>
- unsigned int
- compute_component_wise (std::vector<unsigned int> &new_indices,
+ types::global_dof_index
+ compute_component_wise (std::vector<types::global_dof_index> &new_indices,
const ITERATOR &start,
const ENDITERATOR &end,
const std::vector<unsigned int> &component_order_arg)
// vector to hold the dof indices on
// the cell we visit at a time
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
// prebuilt list to which component
// a given dof on a cell
// dof indices are entered
// multiply, so we will have to
// take care of that
- std::vector<std::vector<unsigned int> >
+ std::vector<std::vector<types::global_dof_index> >
component_to_dof_map (fe_collection.n_components());
for (ITERATOR cell=start; cell!=end; ++cell)
if (cell->is_locally_owned())
// calculate the number of locally owned
// DoFs per bucket
const unsigned int n_buckets = fe_collection.n_components();
- std::vector<unsigned int> shifts(n_buckets);
+ std::vector<types::global_dof_index> shifts(n_buckets);
if (const parallel::distributed::Triangulation<dim,spacedim> *tria
= (dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>
(&start->get_dof_handler().get_tria())))
{
#ifdef DEAL_II_USE_P4EST
- std::vector<unsigned int> local_dof_count(n_buckets);
+ std::vector<types::global_dof_index> local_dof_count(n_buckets);
for (unsigned int c=0; c<n_buckets; ++c)
local_dof_count[c] = component_to_dof_map[c].size();
// gather information from all CPUs
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
all_dof_counts(fe_collection.n_components() *
Utilities::MPI::n_mpi_processes (tria->get_communicator()));
+ Assert (sizeof(types::global_dof_index) == sizeof(unsigned int),
+ ExcNotImplemented());
MPI_Allgather ( &local_dof_count[0], n_buckets, MPI_UNSIGNED, &all_dof_counts[0],
n_buckets, MPI_UNSIGNED, tria->get_communicator());
// now concatenate all the
// components in the order the user
// desired to see
- unsigned int next_free_index = 0;
+ types::global_dof_index next_free_index = 0;
for (unsigned int component=0; component<fe_collection.n_components(); ++component)
{
const typename std::vector<unsigned int>::const_iterator
void
block_wise (DoFHandler<dim,spacedim> &dof_handler)
{
- std::vector<unsigned int> renumbering (dof_handler.n_locally_owned_dofs(),
+ std::vector<types::global_dof_index> renumbering (dof_handler.n_locally_owned_dofs(),
DoFHandler<dim>::invalid_dof_index);
typename DoFHandler<dim,spacedim>::active_cell_iterator
const typename DoFHandler<dim,spacedim>::level_cell_iterator
end = dof_handler.end();
- const unsigned int result =
+ const types::global_dof_index result =
compute_block_wise<dim, spacedim, typename DoFHandler<dim,spacedim>::active_cell_iterator,
typename DoFHandler<dim,spacedim>::level_cell_iterator>
(renumbering, start, end);
void
block_wise (hp::DoFHandler<dim> &dof_handler)
{
- std::vector<unsigned int> renumbering (dof_handler.n_dofs(),
- hp::DoFHandler<dim>::invalid_dof_index);
+ std::vector<types::global_dof_index> renumbering (dof_handler.n_dofs(),
+ hp::DoFHandler<dim>::invalid_dof_index);
typename hp::DoFHandler<dim>::active_cell_iterator
start = dof_handler.begin_active();
const typename hp::DoFHandler<dim>::level_cell_iterator
end = dof_handler.end();
- const unsigned int result =
+ const types::global_dof_index result =
compute_block_wise<dim, dim, typename hp::DoFHandler<dim>::active_cell_iterator,
typename hp::DoFHandler<dim>::level_cell_iterator>(renumbering,
start, end);
Assert(dof_handler.n_dofs(level) != numbers::invalid_unsigned_int,
ExcNotInitialized());
- std::vector<unsigned int> renumbering (dof_handler.n_dofs(level),
+ std::vector<types::global_dof_index> renumbering (dof_handler.n_dofs(level),
DoFHandler<dim>::invalid_dof_index);
typename DoFHandler<dim>::level_cell_iterator
typename DoFHandler<dim>::level_cell_iterator
end = dof_handler.end(level);
- const unsigned int result =
+ const types::global_dof_index result =
compute_block_wise<dim, dim, typename DoFHandler<dim>::level_cell_iterator,
typename DoFHandler<dim>::level_cell_iterator>(
renumbering, start, end);
template <int dim, int spacedim, class ITERATOR, class ENDITERATOR>
- unsigned int
- compute_block_wise (std::vector<unsigned int> &new_indices,
+ types::global_dof_index
+ compute_block_wise (std::vector<types::global_dof_index> &new_indices,
const ITERATOR &start,
const ENDITERATOR &end)
{
// vector to hold the dof indices on
// the cell we visit at a time
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
// prebuilt list to which block
// a given dof on a cell
// should go.
- std::vector<std::vector<unsigned int> > block_list (fe_collection.size());
+ std::vector<std::vector<types::global_dof_index> > block_list (fe_collection.size());
for (unsigned int f=0; f<fe_collection.size(); ++f)
{
const FiniteElement<dim,spacedim> &fe = fe_collection[f];
// dof indices are entered
// multiply, so we will have to
// take care of that
- std::vector<std::vector<unsigned int> >
+ std::vector<std::vector<types::global_dof_index> >
block_to_dof_map (fe_collection.n_blocks());
for (ITERATOR cell=start; cell!=end; ++cell)
if (cell->is_locally_owned())
// calculate the number of locally owned
// DoFs per bucket
const unsigned int n_buckets = fe_collection.n_blocks();
- std::vector<unsigned int> shifts(n_buckets);
+ std::vector<types::global_dof_index> shifts(n_buckets);
if (const parallel::distributed::Triangulation<dim,spacedim> *tria
= (dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>
(&start->get_dof_handler().get_tria())))
{
#ifdef DEAL_II_USE_P4EST
- std::vector<unsigned int> local_dof_count(n_buckets);
+ std::vector<types::global_dof_index> local_dof_count(n_buckets);
for (unsigned int c=0; c<n_buckets; ++c)
local_dof_count[c] = block_to_dof_map[c].size();
// gather information from all CPUs
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
all_dof_counts(fe_collection.n_components() *
Utilities::MPI::n_mpi_processes (tria->get_communicator()));
+ Assert (sizeof(types::global_dof_index) == sizeof(unsigned int),
+ ExcNotImplemented());
MPI_Allgather ( &local_dof_count[0], n_buckets, MPI_UNSIGNED, &all_dof_counts[0],
n_buckets, MPI_UNSIGNED, tria->get_communicator());
// now concatenate all the
// components in the order the user
// desired to see
- unsigned int next_free_index = 0;
+ types::global_dof_index next_free_index = 0;
for (unsigned int block=0; block<fe_collection.n_blocks(); ++block)
{
const typename std::vector<unsigned int>::const_iterator
// Note that this function only works for active dofs.
template <int dim, class iterator>
- unsigned int
+ types::global_dof_index
compute_hierarchical_recursive (
- unsigned int next_free,
- std::vector<unsigned int> &new_indices,
+ types::global_dof_index next_free,
+ std::vector<types::global_dof_index> &new_indices,
const iterator &cell,
const IndexSet &locally_owned)
{
if (cell->is_locally_owned())
{
const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
cell->get_dof_indices (local_dof_indices);
for (unsigned int i = 0; i < dofs_per_cell; ++i)
void
hierarchical (DoFHandler<dim> &dof_handler)
{
- std::vector<unsigned int> renumbering (dof_handler.n_locally_owned_dofs(),
+ std::vector<types::global_dof_index> renumbering (dof_handler.n_locally_owned_dofs(),
DoFHandler<dim>::invalid_dof_index);
typename DoFHandler<dim>::level_cell_iterator cell;
- unsigned int next_free = 0;
+ types::global_dof_index next_free = 0;
const IndexSet locally_owned = dof_handler.locally_owned_dofs();
const parallel::distributed::Triangulation<dim> *tria
sort_selected_dofs_back (DH &dof_handler,
const std::vector<bool> &selected_dofs)
{
- std::vector<unsigned int> renumbering(dof_handler.n_dofs(),
- DH::invalid_dof_index);
+ std::vector<types::global_dof_index> renumbering(dof_handler.n_dofs(),
+ DH::invalid_dof_index);
compute_sort_selected_dofs_back(renumbering, dof_handler, selected_dofs);
dof_handler.renumber_dofs(renumbering);
Assert(dof_handler.n_dofs(level) != numbers::invalid_unsigned_int,
ExcNotInitialized());
- std::vector<unsigned int> renumbering(dof_handler.n_dofs(level),
+ std::vector<types::global_dof_index> renumbering(dof_handler.n_dofs(level),
DH::invalid_dof_index);
compute_sort_selected_dofs_back(renumbering, dof_handler, selected_dofs, level);
template <class DH>
void
- compute_sort_selected_dofs_back (std::vector<unsigned int> &new_indices,
+ compute_sort_selected_dofs_back (std::vector<types::global_dof_index> &new_indices,
const DH &dof_handler,
const std::vector<bool> &selected_dofs)
{
- const unsigned int n_dofs = dof_handler.n_dofs();
+ const types::global_dof_index n_dofs = dof_handler.n_dofs();
Assert (selected_dofs.size() == n_dofs,
ExcDimensionMismatch (selected_dofs.size(), n_dofs));
Assert (new_indices.size() == n_dofs,
ExcDimensionMismatch(new_indices.size(), n_dofs));
- const unsigned int n_selected_dofs = std::count (selected_dofs.begin(),
- selected_dofs.end(),
- false);
+ const types::global_dof_index n_selected_dofs = std::count (selected_dofs.begin(),
+ selected_dofs.end(),
+ false);
- unsigned int next_unselected = 0;
- unsigned int next_selected = n_selected_dofs;
- for (unsigned int i=0; i<n_dofs; ++i)
+ types::global_dof_index next_unselected = 0;
+ types::global_dof_index next_selected = n_selected_dofs;
+ for (types::global_dof_index i=0; i<n_dofs; ++i)
if (selected_dofs[i] == false)
{
new_indices[i] = next_unselected;
template <class DH>
void
- compute_sort_selected_dofs_back (std::vector<unsigned int> &new_indices,
+ compute_sort_selected_dofs_back (std::vector<types::global_dof_index> &new_indices,
const DH &dof_handler,
const std::vector<bool> &selected_dofs,
const unsigned int level)
void
cell_wise (DH &dof, const std::vector<typename DH::active_cell_iterator> &cells)
{
- std::vector<unsigned int> renumbering(dof.n_dofs());
- std::vector<unsigned int> reverse(dof.n_dofs());
+ std::vector<types::global_dof_index> renumbering(dof.n_dofs());
+ std::vector<types::global_dof_index> reverse(dof.n_dofs());
compute_cell_wise(renumbering, reverse, dof, cells);
dof.renumber_dofs(renumbering);
template <class DH>
void
compute_cell_wise (
- std::vector<unsigned int> &new_indices,
- std::vector<unsigned int> &reverse,
+ std::vector<types::global_dof_index> &new_indices,
+ std::vector<types::global_dof_index> &reverse,
const DH &dof,
const typename std::vector<typename DH::active_cell_iterator> &cells)
{
ExcDimensionMismatch(cells.size(),
dof.get_tria().n_active_cells()));
- unsigned int n_global_dofs = dof.n_dofs();
+ types::global_dof_index n_global_dofs = dof.n_dofs();
// Actually, we compute the
// inverse of the reordering
// make sure, that each dof is
// reordered only once.
std::vector<bool> already_sorted(n_global_dofs, false);
- std::vector<unsigned int> cell_dofs;
+ std::vector<types::global_dof_index> cell_dofs;
unsigned int global_index = 0;
}
Assert(global_index == n_global_dofs, ExcRenumberingIncomplete());
- for (unsigned int i=0; i<reverse.size(); ++i)
+ for (types::global_dof_index i=0; i<reverse.size(); ++i)
new_indices[reverse[i]] = i;
}
Assert(dof.n_dofs(level) != numbers::invalid_unsigned_int,
ExcNotInitialized());
- std::vector<unsigned int> renumbering(dof.n_dofs(level));
- std::vector<unsigned int> reverse(dof.n_dofs(level));
+ std::vector<types::global_dof_index> renumbering(dof.n_dofs(level));
+ std::vector<types::global_dof_index> reverse(dof.n_dofs(level));
compute_cell_wise(renumbering, reverse, dof, level, cells);
dof.renumber_dofs(level, renumbering);
template <class DH>
void compute_cell_wise (
- std::vector<unsigned int> &new_order,
- std::vector<unsigned int> &reverse,
+ std::vector<types::global_dof_index> &new_order,
+ std::vector<types::global_dof_index> &reverse,
const DH &dof,
const unsigned int level,
const typename std::vector<typename DH::level_cell_iterator> &cells)
unsigned int n_cell_dofs = dof.get_fe().n_dofs_per_cell();
std::vector<bool> already_sorted(n_global_dofs, false);
- std::vector<unsigned int> cell_dofs(n_cell_dofs);
+ std::vector<types::global_dof_index> cell_dofs(n_cell_dofs);
unsigned int global_index = 0;
}
Assert(global_index == n_global_dofs, ExcRenumberingIncomplete());
- for (unsigned int i=0; i<new_order.size(); ++i)
+ for (types::global_dof_index i=0; i<new_order.size(); ++i)
new_order[reverse[i]] = i;
}
const Point<DH::space_dimension> &direction,
const bool dof_wise_renumbering)
{
- std::vector<unsigned int> renumbering(dof.n_dofs());
- std::vector<unsigned int> reverse(dof.n_dofs());
+ std::vector<types::global_dof_index> renumbering(dof.n_dofs());
+ std::vector<types::global_dof_index> reverse(dof.n_dofs());
compute_downstream(renumbering, reverse, dof, direction,
dof_wise_renumbering);
template <class DH>
void
compute_downstream (
- std::vector<unsigned int> &new_indices,
- std::vector<unsigned int> &reverse,
+ std::vector<types::global_dof_index> &new_indices,
+ std::vector<types::global_dof_index> &reverse,
const DH &dof,
const Point<DH::space_dimension> &direction,
const bool dof_wise_renumbering)
std::vector<bool> already_touched (n_dofs, false);
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
typename DH::active_cell_iterator begin = dof.begin_active();
typename DH::active_cell_iterator end = dof.end();
for ( ; begin != end; ++begin)
ComparePointwiseDownstream<DH::space_dimension> comparator (direction);
std::sort (support_point_list.begin(), support_point_list.end(),
comparator);
- for (unsigned int i=0; i<n_dofs; ++i)
+ for (types::global_dof_index i=0; i<n_dofs; ++i)
new_indices[support_point_list[i].second] = i;
}
}
const Point<DH::space_dimension> &direction,
const bool dof_wise_renumbering)
{
- std::vector<unsigned int> renumbering(dof.n_dofs(level));
- std::vector<unsigned int> reverse(dof.n_dofs(level));
+ std::vector<types::global_dof_index> renumbering(dof.n_dofs(level));
+ std::vector<types::global_dof_index> reverse(dof.n_dofs(level));
compute_downstream(renumbering, reverse, dof, level, direction,
dof_wise_renumbering);
template <class DH>
void
compute_downstream (
- std::vector<unsigned int> &new_indices,
- std::vector<unsigned int> &reverse,
+ std::vector<types::global_dof_index> &new_indices,
+ std::vector<types::global_dof_index> &reverse,
const DH &dof,
const unsigned int level,
const Point<DH::space_dimension> &direction,
std::vector<bool> already_touched (dof.n_dofs(), false);
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
typename DH::level_cell_iterator begin = dof.begin(level);
typename DH::level_cell_iterator end = dof.end(level);
for ( ; begin != end; ++begin)
ComparePointwiseDownstream<DH::space_dimension> comparator (direction);
std::sort (support_point_list.begin(), support_point_list.end(),
comparator);
- for (unsigned int i=0; i<n_dofs; ++i)
+ for (types::global_dof_index i=0; i<n_dofs; ++i)
new_indices[support_point_list[i].second] = i;
}
}
const Point<DH::space_dimension> ¢er,
const bool counter)
{
- std::vector<unsigned int> renumbering(dof.n_dofs());
+ std::vector<types::global_dof_index> renumbering(dof.n_dofs());
compute_clockwise_dg(renumbering, dof, center, counter);
dof.renumber_dofs(renumbering);
template <class DH>
void
compute_clockwise_dg (
- std::vector<unsigned int> &new_indices,
+ std::vector<types::global_dof_index> &new_indices,
const DH &dof,
const Point<DH::space_dimension> ¢er,
const bool counter)
std::copy (begin, end, ordered_cells.begin());
std::sort (ordered_cells.begin(), ordered_cells.end(), comparator);
- std::vector<unsigned int> reverse(new_indices.size());
+ std::vector<types::global_dof_index> reverse(new_indices.size());
compute_cell_wise(new_indices, reverse, dof, ordered_cells);
}
void
random (DH &dof_handler)
{
- std::vector<unsigned int> renumbering(dof_handler.n_dofs(),
- DH::invalid_dof_index);
+ std::vector<types::global_dof_index> renumbering(dof_handler.n_dofs(),
+ DH::invalid_dof_index);
compute_random(renumbering, dof_handler);
dof_handler.renumber_dofs(renumbering);
template <class DH>
void
compute_random (
- std::vector<unsigned int> &new_indices,
+ std::vector<types::global_dof_index> &new_indices,
const DH &dof_handler)
{
- const unsigned int n_dofs = dof_handler.n_dofs();
+ const types::global_dof_index n_dofs = dof_handler.n_dofs();
Assert(new_indices.size() == n_dofs,
ExcDimensionMismatch(new_indices.size(), n_dofs));
void
subdomain_wise (DH &dof_handler)
{
- std::vector<unsigned int> renumbering(dof_handler.n_dofs(),
- DH::invalid_dof_index);
+ std::vector<types::global_dof_index> renumbering(dof_handler.n_dofs(),
+ DH::invalid_dof_index);
compute_subdomain_wise(renumbering, dof_handler);
dof_handler.renumber_dofs(renumbering);
template <class DH>
void
- compute_subdomain_wise (std::vector<unsigned int> &new_dof_indices,
+ compute_subdomain_wise (std::vector<types::global_dof_index> &new_dof_indices,
const DH &dof_handler)
{
- const unsigned int n_dofs = dof_handler.n_dofs();
+ const types::global_dof_index n_dofs = dof_handler.n_dofs();
Assert (new_dof_indices.size() == n_dofs,
ExcDimensionMismatch (new_dof_indices.size(), n_dofs));
// this order also after reordering
std::fill (new_dof_indices.begin(), new_dof_indices.end(),
numbers::invalid_unsigned_int);
- unsigned int next_free_index = 0;
- for (unsigned int subdomain=0; subdomain<n_subdomains; ++subdomain)
- for (unsigned int i=0; i<n_dofs; ++i)
+ types::global_dof_index next_free_index = 0;
+ for (types::subdomain_id_t subdomain=0; subdomain<n_subdomains; ++subdomain)
+ for (types::global_dof_index i=0; i<n_dofs; ++i)
if (subdomain_association[i] == subdomain)
{
Assert (new_dof_indices[i] == numbers::invalid_unsigned_int,
template
void
- compute_Cuthill_McKee (std::vector<unsigned int> &,
+ compute_Cuthill_McKee (std::vector<dealii::types::global_dof_index> &,
const DoFHandler<deal_II_dimension> &, bool, bool);
template
template
void
- compute_king_ordering (std::vector<unsigned int> &,
+ compute_king_ordering (std::vector<dealii::types::global_dof_index> &,
const DoFHandler<deal_II_dimension> &, bool, bool);
template
template
void
- compute_minimum_degree (std::vector<unsigned int> &,
+ compute_minimum_degree (std::vector<dealii::types::global_dof_index> &,
const DoFHandler<deal_II_dimension> &, bool, bool);
template
void
- compute_Cuthill_McKee (std::vector<unsigned int> &,
+ compute_Cuthill_McKee (std::vector<dealii::types::global_dof_index> &,
const hp::DoFHandler<deal_II_dimension> &, bool, bool);
template
template
void
- compute_king_ordering (std::vector<unsigned int> &,
+ compute_king_ordering (std::vector<dealii::types::global_dof_index> &,
const hp::DoFHandler<deal_II_dimension> &, bool, bool);
template
template
void
- compute_minimum_degree (std::vector<unsigned int> &,
+ compute_minimum_degree (std::vector<dealii::types::global_dof_index> &,
const hp::DoFHandler<deal_II_dimension> &, bool, bool);
\}
"associated DoF handler objects, asking for any subdomain other "
"than the locally owned one does not make sense."));
- std::vector<unsigned int> dofs_on_this_cell;
+ std::vector<types::global_dof_index> dofs_on_this_cell;
dofs_on_this_cell.reserve (max_dofs_per_cell(dof));
typename DH::active_cell_iterator cell = dof.begin_active(),
endc = dof.end();
}
- std::vector<unsigned int> dofs_on_this_cell(fe_collection.max_dofs_per_cell());
+ std::vector<types::global_dof_index> dofs_on_this_cell(fe_collection.max_dofs_per_cell());
typename DH::active_cell_iterator cell = dof.begin_active(),
endc = dof.end();
cell_row->get_fe().dofs_per_cell;
const unsigned int dofs_per_cell_col =
cell_col->get_fe().dofs_per_cell;
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
local_dof_indices_row(dofs_per_cell_row);
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
local_dof_indices_col(dofs_per_cell_col);
cell_row->get_dof_indices (local_dof_indices_row);
cell_col->get_dof_indices (local_dof_indices_col);
cell_row_child->get_fe().dofs_per_cell;
const unsigned int dofs_per_cell_col =
cell_col->get_fe().dofs_per_cell;
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
local_dof_indices_row(dofs_per_cell_row);
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
local_dof_indices_col(dofs_per_cell_col);
cell_row_child->get_dof_indices (local_dof_indices_row);
cell_col->get_dof_indices (local_dof_indices_col);
cell_row->get_fe().dofs_per_cell;
const unsigned int dofs_per_cell_col =
cell_col_child->get_fe().dofs_per_cell;
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
local_dof_indices_row(dofs_per_cell_row);
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
local_dof_indices_col(dofs_per_cell_col);
cell_row->get_dof_indices (local_dof_indices_row);
cell_col_child->get_dof_indices (local_dof_indices_col);
void
make_boundary_sparsity_pattern (
const DH &dof,
- const std::vector<unsigned int> &dof_to_boundary_mapping,
+ const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SparsityPattern &sparsity)
{
if (DH::dimension == 1)
#ifdef DEBUG
if (sparsity.n_rows() != 0)
{
- unsigned int max_element = 0;
- for (std::vector<unsigned int>::const_iterator i=dof_to_boundary_mapping.begin();
+ types::global_dof_index max_element = 0;
+ for (std::vector<types::global_dof_index>::const_iterator i=dof_to_boundary_mapping.begin();
i!=dof_to_boundary_mapping.end(); ++i)
if ((*i != DH::invalid_dof_index) &&
(*i > max_element))
};
#endif
- std::vector<unsigned int> dofs_on_this_face;
+ std::vector<types::global_dof_index> dofs_on_this_face;
dofs_on_this_face.reserve (max_dofs_per_face(dof));
// loop over all faces to check whether they are at a boundary. note
void make_boundary_sparsity_pattern (
const DH &dof,
const typename FunctionMap<DH::space_dimension>::type &boundary_indicators,
- const std::vector<unsigned int> &dof_to_boundary_mapping,
+ const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SparsityPattern &sparsity)
{
if (DH::dimension == 1)
cell = cell->child(direction);
const unsigned int dofs_per_vertex = cell->get_fe().dofs_per_vertex;
- std::vector<unsigned int> boundary_dof_boundary_indices (dofs_per_vertex);
+ std::vector<types::global_dof_index> boundary_dof_boundary_indices (dofs_per_vertex);
// next get boundary mapped dof indices of boundary dofs
for (unsigned int i=0; i<dofs_per_vertex; ++i)
#ifdef DEBUG
if (sparsity.n_rows() != 0)
{
- unsigned int max_element = 0;
- for (std::vector<unsigned int>::const_iterator i=dof_to_boundary_mapping.begin();
+ types::global_dof_index max_element = 0;
+ for (std::vector<types::global_dof_index>::const_iterator i=dof_to_boundary_mapping.begin();
i!=dof_to_boundary_mapping.end(); ++i)
if ((*i != DH::invalid_dof_index) &&
(*i > max_element))
};
#endif
- std::vector<unsigned int> dofs_on_this_face;
+ std::vector<types::global_dof_index> dofs_on_this_face;
dofs_on_this_face.reserve (max_dofs_per_face(dof));
typename DH::active_cell_iterator cell = dof.begin_active(),
endc = dof.end();
"associated DoF handler objects, asking for any subdomain other "
"than the locally owned one does not make sense."));
- std::vector<unsigned int> dofs_on_this_cell;
- std::vector<unsigned int> dofs_on_other_cell;
+ std::vector<types::global_dof_index> dofs_on_this_cell;
+ std::vector<types::global_dof_index> dofs_on_other_cell;
dofs_on_this_cell.reserve (max_dofs_per_cell(dof));
dofs_on_other_cell.reserve (max_dofs_per_cell(dof));
typename DH::active_cell_iterator cell = dof.begin_active(),
{
const FiniteElement<DH::dimension,DH::space_dimension> &fe = dof.get_fe();
- std::vector<unsigned int> dofs_on_this_cell(fe.dofs_per_cell);
- std::vector<unsigned int> dofs_on_other_cell(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> dofs_on_this_cell(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> dofs_on_other_cell(fe.dofs_per_cell);
const Table<2,Coupling>
int_dof_mask = dof_couplings_from_component_couplings(fe, int_mask),
const dealii::hp::FECollection<dim,spacedim> &fe = dof.get_fe();
- std::vector<unsigned int> dofs_on_this_cell(DoFTools::max_dofs_per_cell(dof));
- std::vector<unsigned int> dofs_on_other_cell(DoFTools::max_dofs_per_cell(dof));
+ std::vector<types::global_dof_index> dofs_on_this_cell(DoFTools::max_dofs_per_cell(dof));
+ std::vector<types::global_dof_index> dofs_on_other_cell(DoFTools::max_dofs_per_cell(dof));
const std::vector<Table<2,Coupling> >
int_dof_mask
{
inline bool
check_master_dof_list (const FullMatrix<double> &face_interpolation_matrix,
- const std::vector<unsigned int> &master_dof_list)
+ const std::vector<types::global_dof_index> &master_dof_list)
{
const unsigned int N = master_dof_list.size();
// that base element are independent of that of the other one. this
// latter case shows up when running hp/hp_constraints_q_system_06
- std::vector<unsigned int> master_dof_list;
+ std::vector<types::global_dof_index> master_dof_list;
unsigned int index = 0;
for (int v=0;
v<static_cast<signed int>(GeometryInfo<dim>::vertices_per_face);
// finally copy the list into the mask
std::fill (master_dof_mask.begin(), master_dof_mask.end(), false);
- for (std::vector<unsigned int>::const_iterator i=master_dof_list.begin();
+ for (std::vector<types::global_dof_index>::const_iterator i=master_dof_list.begin();
i!=master_dof_list.end(); ++i)
master_dof_mask[*i] = true;
}
* avoid making the sparsity pattern fuller than necessary.
*/
void
- filter_constraints (const std::vector<unsigned int> &master_dofs,
- const std::vector<unsigned int> &slave_dofs,
+ filter_constraints (const std::vector<types::global_dof_index> &master_dofs,
+ const std::vector<types::global_dof_index> &slave_dofs,
const FullMatrix<double> &face_constraints,
ConstraintMatrix &constraints)
{
const unsigned int spacedim = DH::space_dimension;
- std::vector<unsigned int> dofs_on_mother;
- std::vector<unsigned int> dofs_on_children;
+ std::vector<types::global_dof_index> dofs_on_mother;
+ std::vector<types::global_dof_index> dofs_on_children;
// loop over all lines; only on lines there can be constraints. We do
// so by looping over all active cells and checking whether any of
{
const unsigned int dim = 3;
- std::vector<unsigned int> dofs_on_mother;
- std::vector<unsigned int> dofs_on_children;
+ std::vector<types::global_dof_index> dofs_on_mother;
+ std::vector<types::global_dof_index> dofs_on_children;
// loop over all quads; only on quads there can be constraints. We do
// so by looping over all active cells and checking whether any of
// similarly have arrays that will hold master and slave dof numbers,
// as well as a scratch array needed for the complicated case below
- std::vector<unsigned int> master_dofs;
- std::vector<unsigned int> slave_dofs;
- std::vector<unsigned int> scratch_dofs;
+ std::vector<types::global_dof_index> master_dofs;
+ std::vector<types::global_dof_index> slave_dofs;
+ std::vector<types::global_dof_index> scratch_dofs;
// caches for the face and subface interpolation matrices between
// different (or the same) finite elements. we compute them only
const unsigned int dofs_per_face = fe.dofs_per_face;
- std::vector<unsigned int> dofs_1(dofs_per_face);
- std::vector<unsigned int> dofs_2(dofs_per_face);
+ std::vector<types::global_dof_index> dofs_1(dofs_per_face);
+ std::vector<types::global_dof_index> dofs_2(dofs_per_face);
face_1->get_dof_indices(dofs_1, face_1_index);
face_2->get_dof_indices(dofs_2, face_2_index);
}
// then loop over all cells and do the work
- std::vector<unsigned int> indices;
+ std::vector<types::global_dof_index> indices;
for (typename DH::active_cell_iterator c=dof.begin_active();
c!=dof.end(); ++ c)
if (c->is_locally_owned())
}
// then loop over all cells and do the work
- std::vector<unsigned int> indices;
+ std::vector<types::global_dof_index> indices;
for (typename DH::active_cell_iterator c=dof.begin_active();
c!=dof.end(); ++ c)
if (c->is_locally_owned())
typename DH::active_cell_iterator cell = dof_handler.begin_active(),
endc = dof_handler.end();
- std::vector<unsigned int> dof_indices;
+ std::vector<types::global_dof_index> dof_indices;
dof_indices.reserve (max_dofs_per_cell(dof_handler));
for (unsigned int present_cell = 0; cell!=endc; ++cell, ++present_cell)
(component_mask.n_selected_components(n_components(dof_handler)) !=
n_components(dof_handler)));
- std::vector<unsigned int> face_dof_indices;
+ std::vector<types::global_dof_index> face_dof_indices;
face_dof_indices.reserve (max_dofs_per_face(dof_handler));
// now loop over all cells and check whether their faces are at the
// clear and reset array by default values
selected_dofs.clear ();
selected_dofs.resize (dof_handler.n_dofs(), false);
- std::vector<unsigned int> cell_dof_indices;
+ std::vector<types::global_dof_index> cell_dof_indices;
cell_dof_indices.reserve (max_dofs_per_cell(dof_handler));
// now loop over all cells and check whether their faces are at the
// preset all values by false
std::fill_n (selected_dofs.begin(), dof_handler.n_dofs(), false);
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
local_dof_indices.reserve (max_dofs_per_cell(dof_handler));
// this function is similar to the make_sparsity_pattern function, see
// add the DoF on the adjacent ghost cells to the IndexSet, cache them
// in a set. need to check each dof manually because we can't be sure
// that the dof range of locally_owned_dofs is really contiguous.
- std::vector<unsigned int> dof_indices;
- std::set<unsigned int> global_dof_indices;
+ std::vector<types::global_dof_index> dof_indices;
+ std::set<types::global_dof_index> global_dof_indices;
typename DH::active_cell_iterator cell = dof_handler.begin_active(),
endc = dof_handler.end();
dof_indices.resize(cell->get_fe().dofs_per_cell);
cell->get_dof_indices(dof_indices);
- for (std::vector<unsigned int>::iterator it=dof_indices.begin();
+ for (std::vector<types::global_dof_index>::iterator it=dof_indices.begin();
it!=dof_indices.end();
++it)
if (!dof_set.is_element(*it))
// add the DoF on the adjacent ghost cells to the IndexSet, cache them
// in a set. need to check each dof manually because we can't be sure
// that the dof range of locally_owned_dofs is really contiguous.
- std::vector<unsigned int> dof_indices;
- std::set<unsigned int> global_dof_indices;
+ std::vector<types::global_dof_index> dof_indices;
+ std::set<types::global_dof_index> global_dof_indices;
typename DH::active_cell_iterator cell = dof_handler.begin_active(),
endc = dof_handler.end();
dof_indices.resize(cell->get_fe().dofs_per_cell);
cell->get_dof_indices(dof_indices);
- for (std::vector<unsigned int>::iterator it=dof_indices.begin();
+ for (std::vector<types::global_dof_index>::iterator it=dof_indices.begin();
it!=dof_indices.end();
++it)
if (!dof_set.is_element(*it))
std::fill_n (subdomain_association.begin(), dof_handler.n_dofs(),
numbers::invalid_subdomain_id);
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
local_dof_indices.reserve (max_dofs_per_cell(dof_handler));
// pseudo-randomly assign variables which lie on the interface between
IndexSet index_set (dof_handler.n_dofs());
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
local_dof_indices.reserve (max_dofs_per_cell(dof_handler));
// first generate an unsorted list of all indices which we fill from
// that inserts indices in the middle, which is an O(n^2) algorithm and
// hence too expensive. Could also use std::set, but that is in general
// more expensive than a vector
- std::vector<unsigned int> subdomain_indices;
+ std::vector<types::global_dof_index> subdomain_indices;
typename DH::active_cell_iterator
cell = dof_handler.begin_active(),
const std::vector<unsigned char> &dofs_by_component,
const std::vector<unsigned int> &target_component,
const bool only_once,
- std::vector<unsigned int> &dofs_per_component,
+ std::vector<types::global_dof_index> &dofs_per_component,
unsigned int &component)
{
for (unsigned int b=0; b<fe.n_base_elements(); ++b)
const std::vector<unsigned char> &dofs_by_component,
const std::vector<unsigned int> &target_component,
const bool only_once,
- std::vector<unsigned int> &dofs_per_component,
+ std::vector<types::global_dof_index> &dofs_per_component,
unsigned int &component)
{
// assert that all elements in the collection have the same structure
void
count_dofs_per_component (
const DH &dof_handler,
- std::vector<unsigned int> &dofs_per_component,
+ std::vector<types::global_dof_index> &dofs_per_component,
bool only_once,
std::vector<unsigned int> target_component)
{
template <class DH>
void
count_dofs_per_block (const DH &dof_handler,
- std::vector<unsigned int> &dofs_per_block,
+ std::vector<types::global_dof_index> &dofs_per_block,
const std::vector<unsigned int> &target_block_)
{
std::vector<unsigned int> target_block = target_block_;
template <int dim, int spacedim>
void
count_dofs_per_component (const DoFHandler<dim,spacedim> &dof_handler,
- std::vector<unsigned int> &dofs_per_component,
+ std::vector<types::global_dof_index> &dofs_per_component,
std::vector<unsigned int> target_component)
{
count_dofs_per_component (dof_handler, dofs_per_component,
dealii::Vector<double> global_parameter_representation (n_fine_dofs);
typename dealii::DoFHandler<dim,spacedim>::active_cell_iterator cell;
- std::vector<unsigned int> parameter_dof_indices (coarse_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> parameter_dof_indices (coarse_fe.dofs_per_cell);
for (cell=begin; cell!=end; ++cell)
{
// if this is an interesting dof. finally count how many true's
// there
std::vector<bool> dof_is_interesting (fine_grid.n_dofs(), false);
- std::vector<unsigned int> local_dof_indices (fine_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (fine_fe.dofs_per_cell);
for (typename dealii::DoFHandler<dim,spacedim>::active_cell_iterator
cell=fine_grid.begin_active();
if (true)
{
- std::vector<unsigned int> local_dof_indices(fine_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices(fine_fe.dofs_per_cell);
unsigned int next_free_index=0;
for (typename dealii::DoFHandler<dim,spacedim>::active_cell_iterator
cell=fine_grid.begin_active();
template <class DH>
void
map_dof_to_boundary_indices (const DH &dof_handler,
- std::vector<unsigned int> &mapping)
+ std::vector<types::global_dof_index> &mapping)
{
Assert (&dof_handler.get_fe() != 0, ExcNoFESelected());
mapping.insert (mapping.end(), dof_handler.n_dofs(),
DH::invalid_dof_index);
- std::vector<unsigned int> dofs_on_face;
+ std::vector<types::global_dof_index> dofs_on_face;
dofs_on_face.reserve (max_dofs_per_face(dof_handler));
unsigned int next_boundary_index = 0;
void map_dof_to_boundary_indices (
const DH &dof_handler,
const std::set<types::boundary_id> &boundary_indicators,
- std::vector<unsigned int> &mapping)
+ std::vector<types::global_dof_index> &mapping)
{
Assert (&dof_handler.get_fe() != 0, ExcNoFESelected());
Assert (boundary_indicators.find (numbers::internal_face_boundary_id) == boundary_indicators.end(),
if (boundary_indicators.size() == 0)
return;
- std::vector<unsigned int> dofs_on_face;
+ std::vector<types::global_dof_index> dofs_on_face;
dofs_on_face.reserve (max_dofs_per_face(dof_handler));
unsigned int next_boundary_index = 0;
void
map_dofs_to_support_points(const hp::MappingCollection<DH::dimension, DH::space_dimension> &mapping,
const DH &dof_handler,
- std::map<unsigned int,Point<DH::space_dimension> > &support_points)
+ std::map<types::global_dof_index,Point<DH::space_dimension> > &support_points)
{
const unsigned int dim = DH::dimension;
const unsigned int spacedim = DH::space_dimension;
typename DH::active_cell_iterator cell =
dof_handler.begin_active(), endc = dof_handler.end();
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
for (; cell != endc; ++cell)
// only work on locally relevant cells
if (cell->is_artificial() == false)
std::vector<Point<DH::space_dimension> > &support_points)
{
// get the data in the form of the map as above
- std::map<unsigned int,Point<DH::space_dimension> > x_support_points;
+ std::map<types::global_dof_index,Point<DH::space_dimension> > x_support_points;
map_dofs_to_support_points(mapping, dof_handler, x_support_points);
// now convert from the map to the linear vector. make sure every
void
map_dofs_to_support_points (const Mapping<dim,spacedim> &mapping,
const DoFHandler<dim,spacedim> &dof_handler,
- std::map<unsigned int, Point<spacedim> > &support_points)
+ std::map<types::global_dof_index, Point<spacedim> > &support_points)
{
support_points.clear();
void
map_dofs_to_support_points(const hp::MappingCollection<dim, spacedim> &mapping,
const hp::DoFHandler<dim, spacedim> &dof_handler,
- std::map<unsigned int, Point<spacedim> > &support_points)
+ std::map<types::global_dof_index, Point<spacedim> > &support_points)
{
support_points.clear();
VectorTools::ExcNoComponentSelected());
// a field to store the indices
- std::vector<unsigned int> face_dofs;
+ std::vector<types::global_dof_index> face_dofs;
face_dofs.reserve (max_dofs_per_face(dof));
typename DH<dim,spacedim>::active_cell_iterator
const DH &dof_handler,
const unsigned int level,
const std::vector<bool> &selected_dofs,
- unsigned int offset)
+ types::global_dof_index offset)
{
typename DH::level_cell_iterator cell;
typename DH::level_cell_iterator endc = dof_handler.end(level);
template void
DoFTools::make_boundary_sparsity_pattern<DoFHandler<deal_II_dimension>,SP>
(const DoFHandler<deal_II_dimension>& dof,
- const std::vector<unsigned int> &,
+ const std::vector<types::global_dof_index> &,
SP &);
template void
DoFTools::make_boundary_sparsity_pattern<hp::DoFHandler<deal_II_dimension>,SP>
(const hp::DoFHandler<deal_II_dimension>& dof,
- const std::vector<unsigned int> &,
+ const std::vector<types::global_dof_index> &,
SP &);
template void
DoFTools::make_boundary_sparsity_pattern<DoFHandler<deal_II_dimension>,SP>
(const DoFHandler<deal_II_dimension>& dof,
const FunctionMap<deal_II_dimension>::type &boundary_indicators,
- const std::vector<unsigned int> &dof_to_boundary_mapping,
+ const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SP &sparsity);
template void
// This function is the same Raviart-Thomas interpolation performed by
// interpolate. Still, we cannot use interpolate, since it was written
-// for smooth functions. Thefunctions interpolated here are not
+// for smooth functions. The functions interpolated here are not
// smooth, maybe even not continuous. Therefore, we must double the
// number of quadrature points in each direction in order to integrate
// only smooth functions.
typename DH2<dim,spacedim>::active_cell_iterator cell2 = dof2.begin_active(),
endc2 = dof2.end();
- std::vector<unsigned int> dofs;
+ std::vector<types::global_dof_index> dofs;
dofs.reserve (DoFTools::max_dofs_per_cell (dof2));
u2 = 0;
// for parallel vectors check,
// if this component is owned by
// this processor.
- for (unsigned int i=0; i<dof2.n_dofs(); ++i)
+ for (types::global_dof_index i=0; i<dof2.n_dofs(); ++i)
if (locally_owned_dofs.is_element(i))
{
Assert(touch_count(i)!=0, ExcInternalError());
Vector<double> u1_local(n1);
Vector<double> u2_local(n2);
- std::vector<unsigned int> dofs(n2);
+ std::vector<types::global_dof_index> dofs(n2);
FullMatrix<double> matrix(n2,n1);
get_projection_matrix(dof1.get_fe(), dof2.get_fe(), matrix);
* to.
*/
virtual
- unsigned int
+ types::global_dof_index
n_dofs_for_dof_handler () const = 0;
#include "fe_values.decl.1.inst"
* to.
*/
virtual
- unsigned int
+ types::global_dof_index
n_dofs_for_dof_handler () const;
#include "fe_values.decl.2.inst"
* error.
*/
virtual
- unsigned int
+ types::global_dof_index
n_dofs_for_dof_handler () const;
#include "fe_values.decl.2.inst"
template <int dim, int spacedim>
template <typename CI>
-unsigned int
+types::global_dof_index
FEValuesBase<dim,spacedim>::CellIterator<CI>::n_dofs_for_dof_handler () const
{
return cell->get_dof_handler().n_dofs();
{
Assert (cell->has_children() == false, ExcNotImplemented());
- std::vector<unsigned int> dof_indices (cell->get_fe().dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices (cell->get_fe().dofs_per_cell);
cell->get_dof_indices (dof_indices);
for (unsigned int i=0; i<cell->get_fe().dofs_per_cell; ++i)
template <int dim, int spacedim>
-unsigned int
+types::global_dof_index
FEValuesBase<dim,spacedim>::TriaCellIterator::n_dofs_for_dof_handler () const
{
Assert (false, ExcMessage (message_string));
template <class InputVector, typename number>
void FEValuesBase<dim,spacedim>::get_function_values (
const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
std::vector<number> &values) const
{
Assert (this->update_flags & update_values, ExcAccessToUninitializedField());
template <class InputVector, typename number>
void FEValuesBase<dim,spacedim>::get_function_values (
const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
std::vector<Vector<number> > &values) const
{
// Size of indices must be a multiple of dofs_per_cell such that an integer
template <class InputVector>
void FEValuesBase<dim,spacedim>::get_function_values (
const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
VectorSlice<std::vector<std::vector<double> > > values,
bool quadrature_points_fastest) const
{
template <class InputVector>
void FEValuesBase<dim,spacedim>::get_function_gradients (
const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
std::vector<Tensor<1,spacedim> > &gradients) const
{
Assert (this->update_flags & update_gradients, ExcAccessToUninitializedField());
template <class InputVector>
void FEValuesBase<dim,spacedim>::get_function_gradients (
const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
VectorSlice<std::vector<std::vector<Tensor<1,spacedim> > > > gradients,
bool quadrature_points_fastest) const
{
template <class InputVector>
void FEValuesBase<dim,spacedim>::get_function_hessians (
const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
std::vector<Tensor<2,spacedim> > &hessians) const
{
Assert (this->update_flags & update_second_derivatives,
template <class InputVector>
void FEValuesBase<dim, spacedim>::get_function_hessians (
const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
VectorSlice<std::vector<std::vector<Tensor<2,spacedim> > > > hessians,
bool quadrature_points_fastest) const
{
template <class InputVector, typename number>
void FEValuesBase<dim,spacedim>::get_function_laplacians (
const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
std::vector<number> &laplacians) const
{
Assert (this->update_flags & update_hessians, ExcAccessToUninitializedField());
template <class InputVector, typename number>
void FEValuesBase<dim,spacedim>::get_function_laplacians (
const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
std::vector<Vector<number> > &laplacians) const
{
// Size of indices must be a multiple of dofs_per_cell such that an integer
template <class InputVector, typename number>
void FEValuesBase<dim,spacedim>::get_function_laplacians (
const InputVector &fe_function,
- const VectorSlice<const std::vector<unsigned int> > &indices,
+ const VectorSlice<const std::vector<types::global_dof_index> > &indices,
std::vector<std::vector<number> > &laplacians,
bool quadrature_points_fastest) const
{
// first, basic assertion
// with respect to vector size,
- const unsigned int n_dofs = euler_dof_handler->n_dofs();
- const unsigned int vector_size = euler_vector->size();
+ const types::global_dof_index n_dofs = euler_dof_handler->n_dofs();
+ const types::global_dof_index vector_size = euler_vector->size();
AssertDimension(vector_size,n_dofs);
- // return, wheter a given @p cell will be
+ // return, whether a given @p cell will be
// coarsened, which is the case if all
// children are active and have their coarsen
// flag set. In case only part of the coarsen
// $Id$
// Version: $Name$
//
-// Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors
+// Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
*/
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
distribute_dofs_on_cell (const typename dealii::hp::DoFHandler<1,spacedim>::active_cell_iterator &cell,
- unsigned int next_free_dof)
+ types::global_dof_index next_free_dof)
{
const unsigned int dim = 1;
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
distribute_dofs_on_cell (const typename dealii::hp::DoFHandler<2,spacedim>::active_cell_iterator &cell,
- unsigned int next_free_dof)
+ types::global_dof_index next_free_dof)
{
const unsigned int dim = 2;
template <int spacedim>
static
- unsigned int
+ types::global_dof_index
distribute_dofs_on_cell (const typename dealii::hp::DoFHandler<3,spacedim>::active_cell_iterator &cell,
- unsigned int next_free_dof)
+ types::global_dof_index next_free_dof)
{
const unsigned int dim = 3;
= std::vector<unsigned int> (dof_handler.tria->n_raw_lines(level),
DoFHandler<dim,spacedim>::invalid_dof_index);
- unsigned int next_free_dof = 0;
+ types::global_dof_index next_free_dof = 0;
for (typename DoFHandler<dim,spacedim>::active_cell_iterator
cell=dof_handler.begin_active(level);
cell!=dof_handler.end_active(level); ++cell)
}
dof_handler.levels[level]->dof_object.dofs
- = std::vector<unsigned int> (next_free_dof,
- DoFHandler<dim,spacedim>::invalid_dof_index);
+ = std::vector<types::global_dof_index> (next_free_dof,
+ DoFHandler<dim,spacedim>::invalid_dof_index);
}
// safety check: make sure that
#ifdef DEBUG
for (unsigned int level=0; level<dof_handler.tria->n_levels(); ++level)
{
- unsigned int counter = 0;
+ types::global_dof_index counter = 0;
for (typename DoFHandler<dim,spacedim>::cell_iterator
cell=dof_handler.begin_active(level);
cell!=dof_handler.end_active(level); ++cell)
= std::vector<unsigned int> (dof_handler.tria->n_raw_quads(level),
DoFHandler<dim,spacedim>::invalid_dof_index);
- unsigned int next_free_dof = 0;
+ types::global_dof_index next_free_dof = 0;
for (typename DoFHandler<dim,spacedim>::active_cell_iterator
cell=dof_handler.begin_active(level);
cell!=dof_handler.end_active(level); ++cell)
}
dof_handler.levels[level]->dof_object.dofs
- = std::vector<unsigned int> (next_free_dof,
- DoFHandler<dim,spacedim>::invalid_dof_index);
+ = std::vector<types::global_dof_index> (next_free_dof,
+ DoFHandler<dim,spacedim>::invalid_dof_index);
}
// safety check: make sure that
#ifdef DEBUG
for (unsigned int level=0; level<dof_handler.tria->n_levels(); ++level)
{
- unsigned int counter = 0;
+ types::global_dof_index counter = 0;
for (typename DoFHandler<dim,spacedim>::cell_iterator
cell=dof_handler.begin_active(level);
cell!=dof_handler.end_active(level); ++cell)
= std::vector<unsigned int> (dof_handler.tria->n_raw_lines(),
DoFHandler<dim,spacedim>::invalid_dof_index);
dof_handler.faces->lines.dofs
- = std::vector<unsigned int> (n_line_slots,
- DoFHandler<dim,spacedim>::invalid_dof_index);
+ = std::vector<types::global_dof_index> (n_line_slots,
+ DoFHandler<dim,spacedim>::invalid_dof_index);
// with the memory now
// allocated, loop over the
= std::vector<unsigned int> (dof_handler.tria->n_raw_hexs(level),
DoFHandler<dim,spacedim>::invalid_dof_index);
- unsigned int next_free_dof = 0;
+ types::global_dof_index next_free_dof = 0;
for (typename DoFHandler<dim,spacedim>::active_cell_iterator
cell=dof_handler.begin_active(level);
cell!=dof_handler.end_active(level); ++cell)
}
dof_handler.levels[level]->dof_object.dofs
- = std::vector<unsigned int> (next_free_dof,
- DoFHandler<dim,spacedim>::invalid_dof_index);
+ = std::vector<types::global_dof_index> (next_free_dof,
+ DoFHandler<dim,spacedim>::invalid_dof_index);
}
// safety check: make sure that
#ifdef DEBUG
for (unsigned int level=0; level<dof_handler.tria->n_levels(); ++level)
{
- unsigned int counter = 0;
+ types::global_dof_index counter = 0;
for (typename DoFHandler<dim,spacedim>::cell_iterator
cell=dof_handler.begin_active(level);
cell!=dof_handler.end_active(level); ++cell)
= std::vector<unsigned int> (dof_handler.tria->n_raw_quads(),
DoFHandler<dim,spacedim>::invalid_dof_index);
dof_handler.faces->quads.dofs
- = std::vector<unsigned int> (n_quad_slots,
- DoFHandler<dim,spacedim>::invalid_dof_index);
+ = std::vector<types::global_dof_index> (n_quad_slots,
+ DoFHandler<dim,spacedim>::invalid_dof_index);
}
// with the memory now
template <>
- unsigned int DoFHandler<1>::n_boundary_dofs () const
+ types::global_dof_index DoFHandler<1>::n_boundary_dofs () const
{
Assert (finite_elements != 0, ExcNoFESelected());
DoFHandler<1,1>::cell_iterator cell;
- unsigned int n = 0;
+ types::global_dof_index n = 0;
// search left-most cell
cell = this->begin_active();
template <>
- unsigned int DoFHandler<1>::n_boundary_dofs (const FunctionMap &boundary_indicators) const
+ types::global_dof_index DoFHandler<1>::n_boundary_dofs (const FunctionMap &boundary_indicators) const
{
Assert (finite_elements != 0, ExcNoFESelected());
ExcInvalidBoundaryIndicator());
DoFHandler<1,1>::active_cell_iterator cell;
- unsigned int n = 0;
+ types::global_dof_index n = 0;
// search left-most cell
if (boundary_indicators.find (0) != boundary_indicators.end())
template <>
- unsigned int DoFHandler<1>::n_boundary_dofs (const std::set<types::boundary_id> &boundary_indicators) const
+ types::global_dof_index DoFHandler<1>::n_boundary_dofs (const std::set<types::boundary_id> &boundary_indicators) const
{
Assert (finite_elements != 0, ExcNoFESelected());
ExcInvalidBoundaryIndicator());
DoFHandler<1,1>::active_cell_iterator cell;
- unsigned int n = 0;
+ types::global_dof_index n = 0;
// search left-most cell
if (boundary_indicators.find (0) != boundary_indicators.end())
template <>
- unsigned int DoFHandler<1,2>::n_boundary_dofs () const
+ types::global_dof_index DoFHandler<1,2>::n_boundary_dofs () const
{
Assert(false,ExcNotImplemented());
return 0;
}
template <>
- unsigned int DoFHandler<1,2>::n_boundary_dofs (const FunctionMap &) const
+ types::global_dof_index DoFHandler<1,2>::n_boundary_dofs (const FunctionMap &) const
{
Assert(false,ExcNotImplemented());
return 0;
}
template <>
- unsigned int DoFHandler<1,2>::n_boundary_dofs (const std::set<types::boundary_id> &) const
+ types::global_dof_index DoFHandler<1,2>::n_boundary_dofs (const std::set<types::boundary_id> &) const
{
Assert(false,ExcNotImplemented());
return 0;
template <>
- unsigned int DoFHandler<1,3>::n_boundary_dofs () const
+ types::global_dof_index DoFHandler<1,3>::n_boundary_dofs () const
{
Assert(false,ExcNotImplemented());
return 0;
}
template <>
- unsigned int DoFHandler<1,3>::n_boundary_dofs (const FunctionMap &) const
+ types::global_dof_index DoFHandler<1,3>::n_boundary_dofs (const FunctionMap &) const
{
Assert(false,ExcNotImplemented());
return 0;
}
template <>
- unsigned int DoFHandler<1,3>::n_boundary_dofs (const std::set<types::boundary_id> &) const
+ types::global_dof_index DoFHandler<1,3>::n_boundary_dofs (const std::set<types::boundary_id> &) const
{
Assert(false,ExcNotImplemented());
return 0;
template<int dim, int spacedim>
- unsigned int DoFHandler<dim,spacedim>::n_boundary_dofs () const
+ types::global_dof_index DoFHandler<dim,spacedim>::n_boundary_dofs () const
{
Assert (finite_elements != 0, ExcNoFESelected());
- std::set<int> boundary_dofs;
- std::vector<unsigned int> dofs_on_face;
+ std::set<types::global_dof_index> boundary_dofs;
+ std::vector<types::global_dof_index> dofs_on_face;
dofs_on_face.reserve (this->get_fe ().max_dofs_per_face());
// loop over all faces to check
template<int dim, int spacedim>
- unsigned int
+ types::global_dof_index
DoFHandler<dim,spacedim>::n_boundary_dofs (const FunctionMap &boundary_indicators) const
{
Assert (finite_elements != 0, ExcNoFESelected());
// same as above, but with
// additional checks for set of
// boundary indicators
- std::set<int> boundary_dofs;
- std::vector<unsigned int> dofs_on_face;
+ std::set<types::global_dof_index> boundary_dofs;
+ std::vector<types::global_dof_index> dofs_on_face;
dofs_on_face.reserve (this->get_fe ().max_dofs_per_face());
typename DoFHandler<dim,spacedim>::active_cell_iterator cell = this->begin_active (),
template<int dim, int spacedim>
- unsigned int
+ types::global_dof_index
DoFHandler<dim,spacedim>::n_boundary_dofs (const std::set<types::boundary_id> &boundary_indicators) const
{
Assert (finite_elements != 0, ExcNoFESelected());
// same as above, but with
// additional checks for set of
// boundary indicators
- std::set<int> boundary_dofs;
- std::vector<unsigned int> dofs_on_face;
+ std::set<types::global_dof_index> boundary_dofs;
+ std::vector<types::global_dof_index> dofs_on_face;
dofs_on_face.reserve (this->get_fe ().max_dofs_per_face());
typename DoFHandler<dim,spacedim>::active_cell_iterator cell = this->begin_active (),
template <>
- unsigned int DoFHandler<2,3>::n_boundary_dofs () const
+ types::global_dof_index DoFHandler<2,3>::n_boundary_dofs () const
{
Assert(false,ExcNotImplemented());
return 0;
template <>
- unsigned int DoFHandler<2,3>::n_boundary_dofs (const FunctionMap &) const
+ types::global_dof_index DoFHandler<2,3>::n_boundary_dofs (const FunctionMap &) const
{
Assert(false,ExcNotImplemented());
return 0;
template <>
- unsigned int DoFHandler<2,3>::n_boundary_dofs (const std::set<types::boundary_id> &) const
+ types::global_dof_index DoFHandler<2,3>::n_boundary_dofs (const std::set<types::boundary_id> &) const
{
Assert(false,ExcNotImplemented());
return 0;
template<int dim, int spacedim>
void
DoFHandler<dim,spacedim>::
- compute_vertex_dof_identities (std::vector<unsigned int> &new_dof_indices) const
+ compute_vertex_dof_identities (std::vector<types::global_dof_index> &new_dof_indices) const
{
// Note: we may wish to have
// something here similar to what
= *vertex_dof_identities[first_fe_index][other_fe_index];
for (unsigned int i=0; i<identities.size(); ++i)
{
- const unsigned int lower_dof_index
+ const types::global_dof_index lower_dof_index
= dealii::internal::DoFAccessor::Implementation::
get_vertex_dof_index (*this,
vertex_index,
first_fe_index,
identities[i].first);
- const unsigned int higher_dof_index
+ const types::global_dof_index higher_dof_index
= dealii::internal::DoFAccessor::Implementation::
get_vertex_dof_index (*this,
vertex_index,
template <>
void
DoFHandler<1,1>::
- compute_line_dof_identities (std::vector<unsigned int> &) const
+ compute_line_dof_identities (std::vector<types::global_dof_index> &) const
{}
template <>
void
DoFHandler<1,2>::
- compute_line_dof_identities (std::vector<unsigned int> &) const
+ compute_line_dof_identities (std::vector<types::global_dof_index> &) const
{}
template <>
void
DoFHandler<1,3>::
- compute_line_dof_identities (std::vector<unsigned int> &) const
+ compute_line_dof_identities (std::vector<types::global_dof_index> &) const
{}
template<int dim, int spacedim>
void
DoFHandler<dim,spacedim>::
- compute_line_dof_identities (std::vector<unsigned int> &new_dof_indices) const
+ compute_line_dof_identities (std::vector<types::global_dof_index> &new_dof_indices) const
{
// we will mark lines that we
// have already treated, so first
for (unsigned int j=0; j<(*finite_elements)[fe_index_1].dofs_per_line; ++j)
{
- const unsigned int master_dof_index
+ const types::global_dof_index master_dof_index
= line->dof_index (j, fe_index_1);
- const unsigned int slave_dof_index
+ const types::global_dof_index slave_dof_index
= line->dof_index (j, fe_index_2);
// if master dof
= *line_dof_identities[most_dominating_fe_index][other_fe_index];
for (unsigned int i=0; i<identities.size(); ++i)
{
- const unsigned int master_dof_index
+ const types::global_dof_index master_dof_index
= line->dof_index (identities[i].first, most_dominating_fe_index);
- const unsigned int slave_dof_index
+ const types::global_dof_index slave_dof_index
= line->dof_index (identities[i].second, other_fe_index);
Assert ((new_dof_indices[master_dof_index] ==
template <>
void
DoFHandler<1>::
- compute_quad_dof_identities (std::vector<unsigned int> &) const
+ compute_quad_dof_identities (std::vector<types::global_dof_index> &) const
{}
template <>
void
DoFHandler<1,2>::
- compute_quad_dof_identities (std::vector<unsigned int> &) const
+ compute_quad_dof_identities (std::vector<types::global_dof_index> &) const
{}
template <>
void
DoFHandler<1,3>::
- compute_quad_dof_identities (std::vector<unsigned int> &) const
+ compute_quad_dof_identities (std::vector<types::global_dof_index> &) const
{}
template <>
void
DoFHandler<2>::
- compute_quad_dof_identities (std::vector<unsigned int> &) const
+ compute_quad_dof_identities (std::vector<types::global_dof_index> &) const
{}
template <>
void
DoFHandler<2,3>::
- compute_quad_dof_identities (std::vector<unsigned int> &) const
+ compute_quad_dof_identities (std::vector<types::global_dof_index> &) const
{}
template<int dim, int spacedim>
void
DoFHandler<dim,spacedim>::
- compute_quad_dof_identities (std::vector<unsigned int> &new_dof_indices) const
+ compute_quad_dof_identities (std::vector<types::global_dof_index> &new_dof_indices) const
{
// we will mark quads that we
// have already treated, so first
= *quad_dof_identities[most_dominating_fe_index][other_fe_index];
for (unsigned int i=0; i<identities.size(); ++i)
{
- const unsigned int master_dof_index
+ const types::global_dof_index master_dof_index
= quad->dof_index (identities[i].first, most_dominating_fe_index);
- const unsigned int slave_dof_index
+ const types::global_dof_index slave_dof_index
= quad->dof_index (identities[i].second, other_fe_index);
Assert ((new_dof_indices[master_dof_index] ==
// Step 1: distribute DoFs on all
// active entities
{
- unsigned int next_free_dof = 0;
+ types::global_dof_index next_free_dof = 0;
active_cell_iterator cell = begin_active(),
endc = end();
// faces and other
// lower-dimensional objects
// where elements come together
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
constrained_indices (number_cache.n_global_dofs, numbers::invalid_unsigned_int);
compute_vertex_dof_identities (constrained_indices);
compute_line_dof_identities (constrained_indices);
// loop over all dofs and assign
// new numbers to those which are
// not constrained
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
new_dof_indices (number_cache.n_global_dofs, numbers::invalid_unsigned_int);
- unsigned int next_free_dof = 0;
- for (unsigned int i=0; i<number_cache.n_global_dofs; ++i)
+ types::global_dof_index next_free_dof = 0;
+ for (types::global_dof_index i=0; i<number_cache.n_global_dofs; ++i)
if (constrained_indices[i] == numbers::invalid_unsigned_int)
{
new_dof_indices[i] = next_free_dof;
// then loop over all those that
// are constrained and record the
// new dof number for those:
- for (unsigned int i=0; i<number_cache.n_global_dofs; ++i)
+ for (types::global_dof_index i=0; i<number_cache.n_global_dofs; ++i)
if (constrained_indices[i] != numbers::invalid_unsigned_int)
{
Assert (new_dof_indices[constrained_indices[i]] !=
new_dof_indices[i] = new_dof_indices[constrained_indices[i]];
}
- for (unsigned int i=0; i<number_cache.n_global_dofs; ++i)
+ for (types::global_dof_index i=0; i<number_cache.n_global_dofs; ++i)
{
Assert (new_dof_indices[i] != numbers::invalid_unsigned_int,
ExcInternalError());
= IndexSet (number_cache.n_global_dofs);
number_cache.locally_owned_dofs.add_range (0,
number_cache.n_global_dofs);
-
+ Assert (number_cache.n_global_dofs < std::numeric_limits<unsigned int>::max (),
+ ExcMessage ("Global number of degrees of freedom is too large."));
number_cache.n_locally_owned_dofs_per_processor
= std::vector<unsigned int> (1,
- number_cache.n_global_dofs);
+ (unsigned int) number_cache.n_global_dofs);
number_cache.locally_owned_dofs_per_processor
= std::vector<IndexSet> (1,
template<int dim, int spacedim>
- void DoFHandler<dim,spacedim>::renumber_dofs (const std::vector<unsigned int> &new_numbers)
+ void DoFHandler<dim,spacedim>::renumber_dofs (const std::vector<types::global_dof_index> &new_numbers)
{
Assert (new_numbers.size() == n_dofs(), ExcRenumberingIncomplete());
#ifdef DEBUG
// consecutively numbered
if (true)
{
- std::vector<unsigned int> tmp(new_numbers);
+ std::vector<types::global_dof_index> tmp(new_numbers);
std::sort (tmp.begin(), tmp.end());
- std::vector<unsigned int>::const_iterator p = tmp.begin();
- unsigned int i = 0;
+ std::vector<types::global_dof_index>::const_iterator p = tmp.begin();
+ types::global_dof_index i = 0;
for (; p!=tmp.end(); ++p, ++i)
Assert (*p == i, ExcNewNumbersNotConsecutive(i));
}
template<int dim, int spacedim>
void
DoFHandler<dim,spacedim>::
- renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+ renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
dealii::internal::int2type<0>)
{
Assert (new_numbers.size() == n_dofs(), ExcRenumberingIncomplete());
for (unsigned int d=0; d<(*finite_elements)[fe_index].dofs_per_vertex; ++d)
{
- const unsigned int vertex_dof_index
+ const types::global_dof_index vertex_dof_index
= dealii::internal::DoFAccessor::Implementation::
get_vertex_dof_index(*this,
vertex_index,
template<int dim, int spacedim>
void
DoFHandler<dim,spacedim>::
- renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+ renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
dealii::internal::int2type<1>)
{
Assert (new_numbers.size() == n_dofs(), ExcRenumberingIncomplete());
template<>
void
DoFHandler<2,2>::
- renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+ renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
dealii::internal::int2type<2>)
{
const unsigned int dim = 2;
template<>
void
DoFHandler<2,3>::
- renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+ renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
dealii::internal::int2type<2>)
{
const unsigned int dim = 2;
template<>
void
DoFHandler<3,3>::
- renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+ renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
dealii::internal::int2type<2>)
{
const unsigned int dim = 3;
template<>
void
DoFHandler<3,3>::
- renumber_dofs_internal (const std::vector<unsigned int> &new_numbers,
+ renumber_dofs_internal (const std::vector<types::global_dof_index> &new_numbers,
dealii::internal::int2type<3>)
{
const unsigned int dim = 3;
template <int dim, int spacedim>
template <int structdim>
- unsigned int
+ types::global_dof_index
DoFHandler<dim,spacedim>::get_dof_index (const unsigned int,
const unsigned int,
const unsigned int,
const unsigned int,
const unsigned int,
const unsigned int,
- const unsigned int) const
+ const types::global_dof_index) const
{
Assert (false, ExcNotImplemented());
}
faces = NULL;
{
- std::vector<unsigned int> tmp;
+ std::vector<types::global_dof_index> tmp;
std::swap (vertex_dofs, tmp);
}
template <class SparsityPatternBase>
-unsigned int
+types::global_dof_index
BlockSparsityPatternBase<SparsityPatternBase>::n_rows () const
{
// only count in first column, since
// all rows should be equivalent
- unsigned int count = 0;
+ types::global_dof_index count = 0;
for (unsigned int r=0; r<rows; ++r)
count += sub_objects[r][0]->n_rows();
return count;
template <class SparsityPatternBase>
-unsigned int
+types::global_dof_index
BlockSparsityPatternBase<SparsityPatternBase>::n_cols () const
{
// only count in first row, since
// all rows should be equivalent
- unsigned int count = 0;
+ types::global_dof_index count = 0;
for (unsigned int c=0; c<columns; ++c)
count += sub_objects[0][c]->n_cols();
return count;
BlockSparsityPattern::reinit(
const BlockIndices &rows,
const BlockIndices &cols,
- const std::vector<std::vector<unsigned int> > &row_lengths)
+ const std::vector<std::vector<types::global_dof_index> > &row_lengths)
{
AssertDimension (row_lengths.size(), cols.size());
BlockCompressedSparsityPattern::
BlockCompressedSparsityPattern (
- const std::vector<unsigned int> &row_indices,
- const std::vector<unsigned int> &col_indices)
+ const std::vector<types::global_dof_index> &row_indices,
+ const std::vector<types::global_dof_index> &col_indices)
{
reinit(row_indices, col_indices);
}
void
BlockCompressedSparsityPattern::reinit (
- const std::vector< unsigned int > &row_block_sizes,
- const std::vector< unsigned int > &col_block_sizes)
+ const std::vector< types::global_dof_index > &row_block_sizes,
+ const std::vector< types::global_dof_index > &col_block_sizes)
{
BlockSparsityPatternBase<CompressedSparsityPattern>::reinit(row_block_sizes.size(), col_block_sizes.size());
for (unsigned int i=0; i<row_block_sizes.size(); ++i)
BlockCompressedSetSparsityPattern::
BlockCompressedSetSparsityPattern (
- const std::vector<unsigned int> &row_indices,
- const std::vector<unsigned int> &col_indices)
+ const std::vector<types::global_dof_index> &row_indices,
+ const std::vector<types::global_dof_index> &col_indices)
{
reinit(row_indices, col_indices);
}
void
BlockCompressedSetSparsityPattern::reinit (
- const std::vector< unsigned int > &row_block_sizes,
- const std::vector< unsigned int > &col_block_sizes)
+ const std::vector< types::global_dof_index > &row_block_sizes,
+ const std::vector< types::global_dof_index > &col_block_sizes)
{
BlockSparsityPatternBase<CompressedSetSparsityPattern>::reinit(row_block_sizes.size(), col_block_sizes.size());
for (unsigned int i=0; i<row_block_sizes.size(); ++i)
BlockCompressedSimpleSparsityPattern::
-BlockCompressedSimpleSparsityPattern (const std::vector<unsigned int> &row_indices,
- const std::vector<unsigned int> &col_indices)
+BlockCompressedSimpleSparsityPattern (const std::vector<types::global_dof_index> &row_indices,
+ const std::vector<types::global_dof_index> &col_indices)
:
BlockSparsityPatternBase<CompressedSimpleSparsityPattern>(row_indices.size(),
col_indices.size())
void
BlockCompressedSimpleSparsityPattern::reinit (
- const std::vector< unsigned int > &row_block_sizes,
- const std::vector< unsigned int > &col_block_sizes)
+ const std::vector< types::global_dof_index > &row_block_sizes,
+ const std::vector< types::global_dof_index > &col_block_sizes)
{
BlockSparsityPatternBase<CompressedSimpleSparsityPattern>::
reinit(row_block_sizes.size(), col_block_sizes.size());
BlockSparsityPattern::
- BlockSparsityPattern (const std::vector<unsigned int> &row_indices,
- const std::vector<unsigned int> &col_indices)
+ BlockSparsityPattern (const std::vector<types::global_dof_index> &row_indices,
+ const std::vector<types::global_dof_index> &col_indices)
:
BlockSparsityPatternBase<SparsityPattern>(row_indices.size(),
col_indices.size())
void
- BlockSparsityPattern::reinit (const std::vector<unsigned int> &row_block_sizes,
- const std::vector<unsigned int> &col_block_sizes)
+ BlockSparsityPattern::reinit (const std::vector<types::global_dof_index> &row_block_sizes,
+ const std::vector<types::global_dof_index> &col_block_sizes)
{
dealii::BlockSparsityPatternBase<SparsityPattern>::
reinit(row_block_sizes.size(), col_block_sizes.size());
-ChunkSparsityPattern::ChunkSparsityPattern (const unsigned int m,
- const unsigned int n,
+ChunkSparsityPattern::ChunkSparsityPattern (const types::global_dof_index m,
+ const types::global_dof_index n,
const unsigned int max_per_row,
const unsigned int chunk_size,
const bool optimize_diag)
ChunkSparsityPattern::ChunkSparsityPattern (
- const unsigned int m,
- const unsigned int n,
+ const types::global_dof_index m,
+ const types::global_dof_index n,
const std::vector<unsigned int> &row_lengths,
const unsigned int chunk_size,
const bool optimize_diag)
-ChunkSparsityPattern::ChunkSparsityPattern (const unsigned int n,
- const unsigned int max_per_row,
- const unsigned int chunk_size)
+ChunkSparsityPattern::ChunkSparsityPattern (const types::global_dof_index n,
+ const unsigned int max_per_row,
+ const unsigned int chunk_size)
{
reinit (n, n, max_per_row, chunk_size, true);
}
ChunkSparsityPattern::ChunkSparsityPattern (
- const unsigned int m,
+ const types::global_dof_index m,
const std::vector<unsigned int> &row_lengths,
const unsigned int chunk_size,
const bool optimize_diag)
void
-ChunkSparsityPattern::reinit (const unsigned int m,
- const unsigned int n,
+ChunkSparsityPattern::reinit (const types::global_dof_index m,
+ const types::global_dof_index n,
const unsigned int max_per_row,
const unsigned int chunk_size,
const bool optimize_diag)
void
ChunkSparsityPattern::reinit (
- const unsigned int m,
- const unsigned int n,
+ const types::global_dof_index m,
+ const types::global_dof_index n,
const VectorSlice<const std::vector<unsigned int> > &row_lengths,
const unsigned int chunk_size,
const bool optimize_diag)
void
ChunkSparsityPattern::reinit (
- const unsigned int m,
- const unsigned int n,
+ const types::global_dof_index m,
+ const types::global_dof_index n,
const std::vector<unsigned int> &row_lengths,
const unsigned int chunk_size,
const bool optimize_diag)
void
-ChunkSparsityPattern::add (const unsigned int i,
- const unsigned int j)
+ChunkSparsityPattern::add (const types::global_dof_index i,
+ const types::global_dof_index j)
{
Assert (i<rows, ExcInvalidIndex(i,rows));
Assert (j<cols, ExcInvalidIndex(j,cols));
bool
-ChunkSparsityPattern::exists (const unsigned int i,
- const unsigned int j) const
+ChunkSparsityPattern::exists (const types::global_dof_index i,
+ const types::global_dof_index j) const
{
Assert (i<rows, ExcIndexRange(i,0,rows));
Assert (j<cols, ExcIndexRange(j,0,cols));
unsigned int
-ChunkSparsityPattern::row_length (const unsigned int i) const
+ChunkSparsityPattern::row_length (const types::global_dof_index i) const
{
Assert (i<rows, ExcIndexRange(i,0,rows));
-CompressedSetSparsityPattern::CompressedSetSparsityPattern (const unsigned int m,
- const unsigned int n)
+CompressedSetSparsityPattern::CompressedSetSparsityPattern (const types::global_dof_index m,
+ const types::global_dof_index n)
:
rows(0),
cols(0)
-CompressedSetSparsityPattern::CompressedSetSparsityPattern (const unsigned int n)
+CompressedSetSparsityPattern::CompressedSetSparsityPattern (const types::global_dof_index n)
:
rows(0),
cols(0)
void
-CompressedSetSparsityPattern::reinit (const unsigned int m,
- const unsigned int n)
+CompressedSetSparsityPattern::reinit (const types::global_dof_index m,
+ const types::global_dof_index n)
{
rows = m;
cols = n;
bool
-CompressedSetSparsityPattern::exists (const unsigned int i,
- const unsigned int j) const
+CompressedSetSparsityPattern::exists (const types::global_dof_index i,
+ const types::global_dof_index j) const
{
Assert (i<rows, ExcIndexRange(i, 0, rows));
Assert (j<cols, ExcIndexRange(j, 0, cols));
-CompressedSimpleSparsityPattern::CompressedSimpleSparsityPattern (const unsigned int m,
- const unsigned int n,
+CompressedSimpleSparsityPattern::CompressedSimpleSparsityPattern (const types::global_dof_index m,
+ const types::global_dof_index n,
const IndexSet &rowset_
)
:
-CompressedSimpleSparsityPattern::CompressedSimpleSparsityPattern (const unsigned int n)
+CompressedSimpleSparsityPattern::CompressedSimpleSparsityPattern (const types::global_dof_index n)
:
rows(0),
cols(0),
void
-CompressedSimpleSparsityPattern::reinit (const unsigned int m,
- const unsigned int n,
+CompressedSimpleSparsityPattern::reinit (const types::global_dof_index m,
+ const types::global_dof_index n,
const IndexSet &rowset_)
{
rows = m;
bool
-CompressedSimpleSparsityPattern::exists (const unsigned int i,
- const unsigned int j) const
+CompressedSimpleSparsityPattern::exists (const types::global_dof_index i,
+ const types::global_dof_index j) const
{
Assert (i<rows, ExcIndexRange(i, 0, rows));
Assert (j<cols, ExcIndexRange(j, 0, cols));
// explicit instantiations
-template void CompressedSimpleSparsityPattern::Line::add_entries(unsigned int *,
- unsigned int *,
+template void CompressedSimpleSparsityPattern::Line::add_entries(types::global_dof_index *,
+ types::global_dof_index *,
const bool);
-template void CompressedSimpleSparsityPattern::Line::add_entries(const unsigned int *,
- const unsigned int *,
+template void CompressedSimpleSparsityPattern::Line::add_entries(const types::global_dof_index *,
+ const types::global_dof_index *,
const bool);
#ifndef DEAL_II_VECTOR_ITERATOR_IS_POINTER
template void CompressedSimpleSparsityPattern::Line::
-CompressedSparsityPattern::CompressedSparsityPattern (const unsigned int m,
- const unsigned int n)
+CompressedSparsityPattern::CompressedSparsityPattern (const types::global_dof_index m,
+ const types::global_dof_index n)
:
rows(0),
cols(0)
-CompressedSparsityPattern::CompressedSparsityPattern (const unsigned int n)
+CompressedSparsityPattern::CompressedSparsityPattern (const types::global_dof_index n)
:
rows(0),
cols(0)
void
-CompressedSparsityPattern::reinit (const unsigned int m,
- const unsigned int n)
+CompressedSparsityPattern::reinit (const types::global_dof_index m,
+ const types::global_dof_index n)
{
rows = m;
cols = n;
bool
-CompressedSparsityPattern::exists (const unsigned int i,
- const unsigned int j) const
+CompressedSparsityPattern::exists (const types::global_dof_index i,
+ const types::global_dof_index j) const
{
Assert (i<rows, ExcIndexRange(i, 0, rows));
Assert (j<cols, ExcIndexRange(j, 0, cols));
// explicit instantiations
-template void CompressedSparsityPattern::Line::add_entries(unsigned int *,
- unsigned int *,
+template void CompressedSparsityPattern::Line::add_entries(types::global_dof_index *,
+ types::global_dof_index *,
const bool);
-template void CompressedSparsityPattern::Line::add_entries(const unsigned int *,
- const unsigned int *,
+template void CompressedSparsityPattern::Line::add_entries(const types::global_dof_index *,
+ const types::global_dof_index *,
const bool);
#ifndef DEAL_II_VECTOR_ITERATOR_IS_POINTER
template void CompressedSparsityPattern::Line::
struct CopyData
{
- std::vector<unsigned int> dof_indices;
+ std::vector<types::global_dof_index> dof_indices;
FullMatrix<double> cell_matrix;
dealii::Vector<double> cell_rhs;
};
SparseMatrix<double> &matrix,
const typename FunctionMap<spacedim>::type &boundary_functions,
Vector<double> &rhs_vector,
- std::vector<unsigned int> &dof_to_boundary_mapping,
+ std::vector<types::global_dof_index> &dof_to_boundary_mapping,
const Function<spacedim> *const coefficient,
const std::vector<unsigned int> &component_mapping,
const MatrixCreator::internal::IteratorRange<DoFHandler<dim,spacedim> > range,
std::vector<Vector<double> > rhs_values_system (fe_values.n_quadrature_points,
Vector<double>(n_function_components));
- std::vector<unsigned int> dofs (dofs_per_cell);
- std::vector<unsigned int> dofs_on_face_vector (dofs_per_face);
+ std::vector<types::global_dof_index> dofs (dofs_per_cell);
+ std::vector<types::global_dof_index> dofs_on_face_vector (dofs_per_face);
// for each dof on the cell, have a
// flag whether it is on the face
SparseMatrix<double> &,
const FunctionMap<3>::type &,
Vector<double> &,
- std::vector<unsigned int> &,
+ std::vector<types::global_dof_index> &,
const Function<3> *const ,
const std::vector<unsigned int> &,
const MatrixCreator::internal::IteratorRange<DoFHandler<2,3> > ,
SparseMatrix<double> &,
const FunctionMap<3>::type &,
Vector<double> &,
- std::vector<unsigned int> &,
+ std::vector<types::global_dof_index> &,
const Function<3> *const ,
const std::vector<unsigned int> &,
const MatrixCreator::internal::IteratorRange<DoFHandler<1,3> > ,
SparseMatrix<double> &matrix,
const typename FunctionMap<spacedim>::type &boundary_functions,
Vector<double> &rhs_vector,
- std::vector<unsigned int> &dof_to_boundary_mapping,
+ std::vector<types::global_dof_index> &dof_to_boundary_mapping,
const Function<spacedim> *const coefficient,
std::vector<unsigned int> component_mapping)
{
SparseMatrix<double> &matrix,
const typename FunctionMap<spacedim>::type &boundary_functions,
Vector<double> &rhs_vector,
- std::vector<unsigned int> &dof_to_boundary_mapping,
+ std::vector<types::global_dof_index> &dof_to_boundary_mapping,
const Function<spacedim> *const coefficient,
const std::vector<unsigned int> &component_mapping,
const MatrixCreator::internal::IteratorRange<DoFHandler<dim,spacedim> > range,
SparseMatrix<double> &matrix,
const typename FunctionMap<spacedim>::type &boundary_functions,
Vector<double> &rhs_vector,
- std::vector<unsigned int> &dof_to_boundary_mapping,
+ std::vector<types::global_dof_index> &dof_to_boundary_mapping,
const Function<spacedim> *const coefficient,
const std::vector<unsigned int> &component_mapping,
const MatrixCreator::internal::IteratorRange<hp::DoFHandler<dim,spacedim> > range,
if (true)
{
unsigned int max_element = 0;
- for (std::vector<unsigned int>::const_iterator i=dof_to_boundary_mapping.begin();
+ for (std::vector<types::global_dof_index>::const_iterator i=dof_to_boundary_mapping.begin();
i!=dof_to_boundary_mapping.end(); ++i)
if ((*i != hp::DoFHandler<dim,spacedim>::invalid_dof_index) &&
(*i > max_element))
std::vector<double> rhs_values_scalar;
std::vector<Vector<double> > rhs_values_system;
- std::vector<unsigned int> dofs (max_dofs_per_cell);
- std::vector<unsigned int> dofs_on_face_vector (max_dofs_per_face);
+ std::vector<types::global_dof_index> dofs (max_dofs_per_cell);
+ std::vector<types::global_dof_index> dofs_on_face_vector (max_dofs_per_face);
// for each dof on the cell, have a
// flag whether it is on the face
SparseMatrix<double> &matrix,
const typename FunctionMap<spacedim>::type &rhs,
Vector<double> &rhs_vector,
- std::vector<unsigned int> &dof_to_boundary_mapping,
+ std::vector<types::global_dof_index> &dof_to_boundary_mapping,
const Function<spacedim> *const a,
std::vector<unsigned int> component_mapping)
{
SparseMatrix<double> &matrix,
const typename FunctionMap<spacedim>::type &boundary_functions,
Vector<double> &rhs_vector,
- std::vector<unsigned int> &dof_to_boundary_mapping,
+ std::vector<types::global_dof_index> &dof_to_boundary_mapping,
const Function<spacedim> *const coefficient,
std::vector<unsigned int> component_mapping)
{
SparseMatrix<double> &matrix,
const typename FunctionMap<spacedim>::type &boundary_functions,
Vector<double> &rhs_vector,
- std::vector<unsigned int> &dof_to_boundary_mapping,
+ std::vector<types::global_dof_index> &dof_to_boundary_mapping,
const Function<spacedim> *const coefficient,
const std::vector<unsigned int> &component_mapping,
const MatrixCreator::internal::IteratorRange<hp::DoFHandler<dim,spacedim> > range,
SparseMatrix<double> &matrix,
const typename FunctionMap<spacedim>::type &rhs,
Vector<double> &rhs_vector,
- std::vector<unsigned int> &dof_to_boundary_mapping,
+ std::vector<types::global_dof_index> &dof_to_boundary_mapping,
const Function<spacedim> *const a,
std::vector<unsigned int> component_mapping)
{
//TODO:[WB] I don't think that the optimized storage of diagonals is needed (GK)
template <typename number>
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
SparseMatrix<number> &matrix,
Vector<number> &solution,
Vector<number> &right_hand_side,
}
- std::map<unsigned int,double>::const_iterator dof = boundary_values.begin(),
- endd = boundary_values.end();
+ std::map<types::global_dof_index,double>::const_iterator dof = boundary_values.begin(),
+ endd = boundary_values.end();
for (; dof != endd; ++dof)
{
Assert (dof->first < n_dofs, ExcInternalError());
- const unsigned int dof_number = dof->first;
+ const types::global_dof_index dof_number = dof->first;
// for each boundary dof:
// set entries of this line to zero except for the diagonal
template <typename number>
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
BlockSparseMatrix<number> &matrix,
BlockVector<number> &solution,
BlockVector<number> &right_hand_side,
first_nonzero_diagonal_entry = 1;
- std::map<unsigned int,double>::const_iterator dof = boundary_values.begin(),
- endd = boundary_values.end();
+ std::map<types::global_dof_index,double>::const_iterator dof = boundary_values.begin(),
+ endd = boundary_values.end();
const BlockSparsityPattern &
sparsity_pattern = matrix.get_sparsity_pattern();
// get global index and index
// in the block in which this
// dof is located
- const unsigned int dof_number = dof->first;
- const std::pair<unsigned int,unsigned int>
+ const types::global_dof_index dof_number = dof->first;
+ const std::pair<types::global_dof_index,unsigned int>
block_index = index_mapping.global_to_local (dof_number);
// for each boundary dof:
{
template <typename PETScMatrix, typename PETScVector>
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
PETScMatrix &matrix,
PETScVector &solution,
PETScVector &right_hand_side,
// figure out which rows of the matrix we
// have to eliminate on this processor
std::vector<unsigned int> constrained_rows;
- for (std::map<unsigned int,double>::const_iterator
+ for (std::map<types::global_dof_index,double>::const_iterator
dof = boundary_values.begin();
dof != boundary_values.end();
++dof)
right_hand_side.compress ();
solution.compress ();
- std::vector<unsigned int> indices;
+ std::vector<types::global_dof_index> indices;
std::vector<PetscScalar> solution_values;
- for (std::map<unsigned int,double>::const_iterator
+ for (std::map<types::global_dof_index,double>::const_iterator
dof = boundary_values.begin();
dof != boundary_values.end();
++dof)
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
PETScWrappers::SparseMatrix &matrix,
PETScWrappers::Vector &solution,
PETScWrappers::Vector &right_hand_side,
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
PETScWrappers::MPI::SparseMatrix &matrix,
PETScWrappers::MPI::Vector &solution,
PETScWrappers::MPI::Vector &right_hand_side,
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
PETScWrappers::MPI::BlockSparseMatrix &matrix,
PETScWrappers::MPI::BlockVector &solution,
PETScWrappers::MPI::BlockVector &right_hand_side,
std::vector<std::map<unsigned int,double> > block_boundary_values(n_blocks);
{
int offset = 0, block=0;
- for (std::map<unsigned int,double>::const_iterator
+ for (std::map<types::global_dof_index,double>::const_iterator
dof = boundary_values.begin();
dof != boundary_values.end();
++dof)
offset += matrix.block(block,0).m();
block++;
}
- const unsigned int index = dof->first - offset;
- block_boundary_values[block].insert(std::pair<unsigned int, double> (index,dof->second));
+ const types::global_dof_index index = dof->first - offset;
+ block_boundary_values[block].insert(std::pair<types::global_dof_index, double> (index,dof->second));
}
}
// the whole row.
for (unsigned int block_m=0; block_m<n_blocks; ++block_m)
{
- const std::pair<unsigned int, unsigned int> local_range
+ const std::pair<types::global_dof_index, types::global_dof_index> local_range
= matrix.block(block_m,0).local_range();
std::vector<unsigned int> constrained_rows;
- for (std::map<unsigned int,double>::const_iterator
+ for (std::map<types::global_dof_index,double>::const_iterator
dof = block_boundary_values[block_m].begin();
dof != block_boundary_values[block_m].end();
++dof)
{
template <typename TrilinosMatrix, typename TrilinosVector>
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
TrilinosMatrix &matrix,
TrilinosVector &solution,
TrilinosVector &right_hand_side,
if (boundary_values.size() == 0)
return;
- const std::pair<unsigned int, unsigned int> local_range
+ const std::pair<types::global_dof_index, types::global_dof_index> local_range
= matrix.local_range();
Assert (local_range == right_hand_side.local_range(),
ExcInternalError());
// matrix that we can see. if we can't
// find such an entry, take one
TrilinosScalar average_nonzero_diagonal_entry = 1;
- for (unsigned int i=local_range.first; i<local_range.second; ++i)
+ for (types::global_dof_index i=local_range.first; i<local_range.second; ++i)
if (matrix.diag_element(i) != 0)
{
average_nonzero_diagonal_entry = std::fabs(matrix.diag_element(i));
// figure out which rows of the matrix we
// have to eliminate on this processor
std::vector<unsigned int> constrained_rows;
- for (std::map<unsigned int,double>::const_iterator
+ for (std::map<types::global_dof_index,double>::const_iterator
dof = boundary_values.begin();
dof != boundary_values.end();
++dof)
right_hand_side.compress ();
solution.compress ();
- std::vector<unsigned int> indices;
+ std::vector<types::global_dof_index> indices;
std::vector<TrilinosScalar> solution_values;
- for (std::map<unsigned int,double>::const_iterator
+ for (std::map<types::global_dof_index,double>::const_iterator
dof = boundary_values.begin();
dof != boundary_values.end();
++dof)
template <typename TrilinosMatrix, typename TrilinosBlockVector>
void
- apply_block_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_block_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
TrilinosMatrix &matrix,
TrilinosBlockVector &solution,
TrilinosBlockVector &right_hand_side,
// into blocks for the boundary values.
// To this end, generate a vector of
// maps with the respective indices.
- std::vector<std::map<unsigned int,double> > block_boundary_values(n_blocks);
+ std::vector<std::map<types::global_dof_index,double> > block_boundary_values(n_blocks);
{
int offset = 0, block=0;
- for (std::map<unsigned int,double>::const_iterator
+ for (std::map<types::global_dof_index,double>::const_iterator
dof = boundary_values.begin();
dof != boundary_values.end();
++dof)
offset += matrix.block(block,0).m();
block++;
}
- const unsigned int index = dof->first - offset;
+ const types::global_dof_index index = dof->first - offset;
block_boundary_values[block].insert(
- std::pair<unsigned int, double> (index,dof->second));
+ std::pair<types::global_dof_index, double> (index,dof->second));
}
}
// the whole row.
for (unsigned int block_m=0; block_m<n_blocks; ++block_m)
{
- const std::pair<unsigned int, unsigned int> local_range
+ const std::pair<types::global_dof_index, types::global_dof_index> local_range
= matrix.block(block_m,0).local_range();
std::vector<unsigned int> constrained_rows;
- for (std::map<unsigned int,double>::const_iterator
+ for (std::map<types::global_dof_index,double>::const_iterator
dof = block_boundary_values[block_m].begin();
dof != block_boundary_values[block_m].end();
++dof)
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
TrilinosWrappers::SparseMatrix &matrix,
TrilinosWrappers::Vector &solution,
TrilinosWrappers::Vector &right_hand_side,
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
TrilinosWrappers::SparseMatrix &matrix,
TrilinosWrappers::MPI::Vector &solution,
TrilinosWrappers::MPI::Vector &right_hand_side,
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
TrilinosWrappers::BlockSparseMatrix &matrix,
TrilinosWrappers::BlockVector &solution,
TrilinosWrappers::BlockVector &right_hand_side,
void
- apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
TrilinosWrappers::BlockSparseMatrix &matrix,
TrilinosWrappers::MPI::BlockVector &solution,
TrilinosWrappers::MPI::BlockVector &right_hand_side,
void
- local_apply_boundary_values (const std::map<unsigned int,double> &boundary_values,
- const std::vector<unsigned int> &local_dof_indices,
+ local_apply_boundary_values (const std::map<types::global_dof_index,double> &boundary_values,
+ const std::vector<types::global_dof_index> &local_dof_indices,
FullMatrix<double> &local_matrix,
Vector<double> &local_rhs,
const bool eliminate_columns)
const unsigned int n_local_dofs = local_dof_indices.size();
for (unsigned int i=0; i<n_local_dofs; ++i)
{
- const std::map<unsigned int, double>::const_iterator
+ const std::map<types::global_dof_index, double>::const_iterator
boundary_value = boundary_values.find (local_dof_indices[i]);
if (boundary_value != boundary_values.end())
{
{
template
void
- apply_boundary_values<double> (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values<double> (const std::map<types::global_dof_index,double> &boundary_values,
SparseMatrix<double> &matrix,
Vector<double> &solution,
Vector<double> &right_hand_side,
const bool eliminate_columns);
template
void
- apply_boundary_values<float> (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values<float> (const std::map<types::global_dof_index,double> &boundary_values,
SparseMatrix<float> &matrix,
Vector<float> &solution,
Vector<float> &right_hand_side,
template
void
- apply_boundary_values<double> (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values<double> (const std::map<types::global_dof_index,double> &boundary_values,
BlockSparseMatrix<double> &matrix,
BlockVector<double> &solution,
BlockVector<double> &right_hand_side,
const bool eliminate_columns);
template
void
- apply_boundary_values<float> (const std::map<unsigned int,double> &boundary_values,
+ apply_boundary_values<float> (const std::map<types::global_dof_index,double> &boundary_values,
BlockSparseMatrix<float> &matrix,
BlockVector<float> &solution,
BlockVector<float> &right_hand_side,
}
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
local_dof_indices (dof_handler->get_fe ().dofs_per_cell);
std::vector <int> new_solution_indices;
current_cell->get_dof_indices (local_dof_indices);
}
}
- std::vector<unsigned int> local_dof_indices (dof_handler->get_fe ().dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dof_handler->get_fe ().dofs_per_cell);
for (unsigned int point = 0; point < locations.size (); point++)
{
current_cell[point]->get_dof_indices (local_dof_indices);
" at the same time!"));
Vector<typename VECTOR::value_type> local_values;
- std::vector<unsigned int> dofs;
+ std::vector<types::global_dof_index> dofs;
typename std::map<std::pair<unsigned int, unsigned int>, Pointerstruct>::const_iterator
pointerstruct,
}
};
-
+
// @sect3{Evaluating the solution}
{
// @sect4{The EvaluationBase class}
template <int dim>
- class EvaluationBase
+ class EvaluationBase
{
public:
virtual ~EvaluationBase ();
void set_refinement_cycle (const unsigned int refinement_cycle);
-
+
virtual void operator () (const DoFHandler<dim> &dof_handler,
const Vector<double> &solution) const = 0;
-
+
unsigned int refinement_cycle;
};
template <int dim>
EvaluationBase<dim>::~EvaluationBase ()
{}
-
-
+
+
template <int dim>
void
EvaluationBase<dim>::set_refinement_cycle (const unsigned int step)
{
public:
PointValueEvaluation (const Point<dim> &evaluation_point);
-
+
virtual void operator () (const DoFHandler<dim> &dof_handler,
const Vector<double> &solution) const;
-
+
DeclException1 (ExcEvaluationPointNotFound,
Point<dim>,
<< "The evaluation point " << arg1
<< " was not found among the vertices of the present grid.");
-
+
const Point<dim> evaluation_point;
};
:
evaluation_point (evaluation_point)
{}
-
+
template <int dim>
void
PointValueEvaluation<dim>::
operator () (const DoFHandler<dim> &dof_handler,
- const Vector<double> &solution) const
+ const Vector<double> &solution) const
{
double point_value = 1e20;
{
public:
PointXDerivativeEvaluation (const Point<dim> &evaluation_point);
-
+
virtual void operator () (const DoFHandler<dim> &dof_handler,
const Vector<double> &solution) const;
-
+
DeclException1 (ExcEvaluationPointNotFound,
Point<dim>,
<< "The evaluation point " << arg1
<< " was not found among the vertices of the present grid.");
-
+
const Point<dim> evaluation_point;
};
:
evaluation_point (evaluation_point)
{}
-
+
// The more interesting things
// happen inside the function doing
void
PointXDerivativeEvaluation<dim>::
operator () (const DoFHandler<dim> &dof_handler,
- const Vector<double> &solution) const
+ const Vector<double> &solution) const
{
// This time initialize the
// return value with something
update_gradients | update_q_points);
std::vector<Tensor<1,dim> >
solution_gradients (vertex_quadrature.n_quadrature_points);
-
+
// ...and next loop over all cells
// and their vertices, and count
// how often the vertex has been
}
-
+
// @sect4{The GridOutput class}
// Since this program has a more
{
public:
GridOutput (const std::string &output_name_base);
-
+
virtual void operator () (const DoFHandler<dim> &dof_handler,
const Vector<double> &solution) const;
-
+
const std::string output_name_base;
};
:
output_name_base (output_name_base)
{}
-
+
template <int dim>
void
#else
std::ofstream out (filename.str());
#endif
-
+
GridOut().write_eps (dof_handler.get_tria(), out);
}
}
-
+
// @sect3{The Laplace solver classes}
// Next are the actual solver
// which requires the class to be
// known:
template <int dim> class WeightedResidual;
-
-
+
+
// @sect4{The Laplace solver base class}
// This class is almost unchanged,
virtual void set_refinement_cycle (const unsigned int cycle);
virtual void output_solution () const = 0;
-
-
+
+
const SmartPointer<Triangulation<dim> > triangulation;
unsigned int refinement_cycle;
template <int dim>
- Base<dim>::~Base ()
+ Base<dim>::~Base ()
{}
{
refinement_cycle = cycle;
}
-
+
// @sect4{The Laplace Solver class}
Solver (Triangulation<dim> &triangulation,
const FiniteElement<dim> &fe,
const Quadrature<dim> &quadrature,
- const Quadrature<dim-1> &face_quadrature,
+ const Quadrature<dim-1> &face_quadrature,
const Function<dim> &boundary_values);
virtual
~Solver ();
virtual
unsigned int
n_dofs () const;
-
-
+
+
const SmartPointer<const FiniteElement<dim> > fe;
const SmartPointer<const Quadrature<dim> > quadrature;
- const SmartPointer<const Quadrature<dim-1> > face_quadrature;
+ const SmartPointer<const Quadrature<dim-1> > face_quadrature;
DoFHandler<dim> dof_handler;
Vector<double> solution;
const SmartPointer<const Function<dim> > boundary_values;
virtual void assemble_rhs (Vector<double> &rhs) const = 0;
-
-
+
+
struct LinearSystem
{
LinearSystem (const DoFHandler<dim> &dof_handler);
void solve (Vector<double> &solution) const;
-
+
ConstraintMatrix hanging_node_constraints;
SparsityPattern sparsity_pattern;
SparseMatrix<double> matrix;
Base<dim> (triangulation),
fe (&fe),
quadrature (&quadrature),
- face_quadrature (&face_quadrature),
+ face_quadrature (&face_quadrature),
dof_handler (triangulation),
boundary_values (&boundary_values)
{}
template <int dim>
- Solver<dim>::~Solver ()
+ Solver<dim>::~Solver ()
{
dof_handler.clear ();
}
{
return dof_handler.n_dofs();
}
-
+
template <int dim>
void
const unsigned int n_threads = multithread_info.n_default_threads;
std::vector<std::pair<active_cell_iterator,active_cell_iterator> >
- thread_ranges
+ thread_ranges
= Threads::split_range<active_cell_iterator> (dof_handler.begin_active (),
dof_handler.end (),
n_threads);
0,
*boundary_values,
boundary_value_map);
-
+
threads.join_all ();
linear_system.hanging_node_constraints.condense (linear_system.matrix);
Threads::ThreadMutex &mutex) const
{
MappingQ<dim> mapping (4);
- FEValues<dim> fe_values (mapping, *fe, *quadrature,
+ FEValues<dim> fe_values (mapping, *fe, *quadrature,
UpdateFlags(update_gradients | update_values |
update_q_points |
update_JxW_values));
FullMatrix<double> cell_matrix (dofs_per_cell, dofs_per_cell);
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
std::vector<double> laplace_coefficients (fe_values.n_quadrature_points);
std::vector<double> mass_coefficients (fe_values.n_quadrature_points);
-
-
+
+
for (typename DoFHandler<dim>::active_cell_iterator cell=begin_cell;
cell!=end_cell; ++cell)
{
laplace_coefficients);
MassCoefficient<dim>().value_list (fe_values.get_quadrature_points(),
mass_coefficients);
-
-
+
+
for (unsigned int q_point=0; q_point<n_q_points; ++q_point)
for (unsigned int i=0; i<dofs_per_cell; ++i)
for (unsigned int j=0; j<dofs_per_cell; ++j)
void (*mhnc_p) (const DoFHandler<dim> &,
ConstraintMatrix &)
= &DoFTools::make_hanging_node_constraints;
-
+
Threads::Thread<>
mhnc_thread = Threads::spawn (mhnc_p)(dof_handler, hanging_node_constraints);
virtual
void solve_problem ();
-
+
virtual
unsigned int n_dofs () const;
-
+
virtual
void postprocess (const Evaluation::EvaluationBase<dim> &postprocessor) const;
virtual
void output_solution () const;
-
-
+
+
const SmartPointer<const Function<dim> > rhs_function;
virtual void assemble_rhs (Vector<double> &rhs) const;
{
abort ();
}
-
+
template <int dim>
void
PrimalSolver<dim>::
- assemble_rhs (Vector<double> &rhs) const
+ assemble_rhs (Vector<double> &rhs) const
{
MappingQ<dim> mapping (4);
- FEValues<dim> fe_values (mapping, *this->fe, *this->quadrature,
+ FEValues<dim> fe_values (mapping, *this->fe, *this->quadrature,
UpdateFlags(update_values |
update_q_points |
update_JxW_values));
Vector<double> cell_rhs (dofs_per_cell);
std::vector<double> rhs_values (n_q_points);
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
typename DoFHandler<dim>::active_cell_iterator
cell = this->dof_handler.begin_active(),
rhs_function->value_list (fe_values.get_quadrature_points(),
rhs_values);
-
+
for (unsigned int q_point=0; q_point<n_q_points; ++q_point)
for (unsigned int i=0; i<dofs_per_cell; ++i)
cell_rhs(i) += (fe_values.shape_value(i,q_point) *
virtual void refine_grid ();
-
+
const SmartPointer<const Function<dim> > weighting_function;
};
for (unsigned int cell_index=0; cell!=endc; ++cell, ++cell_index)
estimated_error(cell_index)
*= weighting_function->value (cell->center());
-
+
GridRefinement::refine_and_coarsen_fixed_number (*this->triangulation,
estimated_error,
0.2, 0.02);
namespace Data
{
// @sect4{The SetUpBase and SetUp classes}
-
+
// Based on the above description,
// the ``SetUpBase'' class then
// looks as follows. To allow using
virtual
const Function<dim> & get_right_hand_side () const;
-
+
virtual
void create_coarse_grid (Triangulation<dim> &coarse_grid) const;
-
+
static const typename Traits::BoundaryValues boundary_values;
static const typename Traits::RightHandSide right_hand_side;
};
// functions:
template <class Traits, int dim>
const Function<dim> &
- SetUp<Traits,dim>::get_boundary_values () const
+ SetUp<Traits,dim>::get_boundary_values () const
{
return boundary_values;
}
template <class Traits, int dim>
const Function<dim> &
- SetUp<Traits,dim>::get_right_hand_side () const
+ SetUp<Traits,dim>::get_right_hand_side () const
{
return right_hand_side;
}
template <class Traits, int dim>
void
SetUp<Traits,dim>::
- create_coarse_grid (Triangulation<dim> &coarse_grid) const
+ create_coarse_grid (Triangulation<dim> &coarse_grid) const
{
Traits::create_coarse_grid (coarse_grid);
}
-
+
// @sect4{The CurvedRidges class}
{
public:
BoundaryValues () : Function<dim> () {};
-
+
virtual double value (const Point<dim> &p,
const unsigned int component) const;
};
{
public:
RightHandSide () : Function<dim> () {};
-
+
virtual double value (const Point<dim> &p,
const unsigned int component) const;
};
void
create_coarse_grid (Triangulation<dim> &coarse_grid);
};
-
-
+
+
template <int dim>
double
CurvedRidges<dim>::BoundaryValues::
100*std::sin(10*p(i)+5*p(0)*p(0));
};
t1 = t1*t1;
-
+
return -u*(t1+t2+t3);
}
GridGenerator::hyper_cube (coarse_grid, -1, 1);
coarse_grid.refine_global (2);
}
-
+
// @sect4{The Exercise_2_3 class}
-
+
// This example program was written
// while giving practical courses
// for a lecture on adaptive finite
public:
RightHandSide () : ConstantFunction<dim> (1.) {};
};
-
+
// Finally a function to
// generate the coarse
// grid. This is somewhat more
// enough to do the creation by
// hand, rather than using a mesh
// generator.
-/*
+/*
template <>
void
Exercise_2_3<2>::
Point<2> (0., -1.),
Point<2> (+1./2, -1.),
Point<2> (+1, -1.),
-
+
Point<2> (-1., -1./2.),
Point<2> (-1./2, -1./2.),
Point<2> (0., -1./2.),
Point<2> (+1./2, -1./2.),
Point<2> (+1, -1./2.),
-
+
Point<2> (-1., 0.),
Point<2> (-1./2, 0.),
Point<2> (+1./2, 0.),
Point<2> (+1, 0.),
-
+
Point<2> (-1., 1./2.),
Point<2> (-1./2, 1./2.),
Point<2> (0., 1./2.),
Point<2> (+1./2, 1./2.),
Point<2> (+1, 1./2.),
-
+
Point<2> (-1., 1.),
Point<2> (-1./2, 1.),
- Point<2> (0., 1.),
+ Point<2> (0., 1.),
Point<2> (+1./2, 1.),
Point<2> (+1, 1.) };
const unsigned int
// the material indicator to zero
// for all the cells:
std::vector<CellData<dim> > cells (n_cells, CellData<dim>());
- for (unsigned int i=0; i<n_cells; ++i)
+ for (unsigned int i=0; i<n_cells; ++i)
{
for (unsigned int j=0;
j<GeometryInfo<dim>::vertices_per_cell;
coarse_grid.create_triangulation (vertices,
cells,
SubCellData());
-
+
// And since we want that the
// evaluation point (3/4,3/4) in
// this example is a grid point,
// we refine once globally:
coarse_grid.refine_global (1);
}
-*/
+*/
template <>
coarse_grid.set_boundary (0, boundary);
coarse_grid.refine_global (1);
}
-
+
}
// @sect4{Discussion}
namespace DualFunctional
{
// @sect4{The DualFunctionalBase class}
-
+
// First start with the base class
// for dual functionals. Since for
// linear problems the
// @sect4{The PointValueEvaluation class}
-
+
// As a first application, we
// consider the functional
// corresponding to the evaluation
void
assemble_rhs (const DoFHandler<dim> &dof_handler,
Vector<double> &rhs) const;
-
+
DeclException1 (ExcEvaluationPointNotFound,
Point<dim>,
<< "The evaluation point " << arg1
<< " was not found among the vertices of the present grid.");
-
+
const Point<dim> evaluation_point;
};
:
evaluation_point (evaluation_point)
{}
-
+
// As for doing the main purpose of
// the class, assembling the right
// @sect4{The PointXDerivativeEvaluation class}
-
+
// As second application, we again
// consider the evaluation of the
// x-derivative of the solution at
void
assemble_rhs (const DoFHandler<dim> &dof_handler,
Vector<double> &rhs) const;
-
+
DeclException1 (ExcEvaluationPointNotFound,
Point<dim>,
<< "The evaluation point " << arg1
<< " was not found among the vertices of the present grid.");
-
+
const Point<dim> evaluation_point;
};
:
evaluation_point (evaluation_point)
{}
-
+
// What is interesting is the
// implementation of this
// for the number of quadrature
// points and shape functions...
QGauss<dim> quadrature(4);
- MappingQ<dim> mapping (4);
+ MappingQ<dim> mapping (4);
FEValues<dim> fe_values (mapping, dof_handler.get_fe(), quadrature,
update_gradients |
update_q_points |
// shape functions at the
// quadrature points:
Vector<double> cell_rhs (dofs_per_cell);
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
// Finally have a variable in
// which we will sum up the
// integrating the unit functions
// on these cells:
double total_volume = 0;
-
+
// Then start the loop over all
// cells, and select those cells
// which are close enough to the
// total area/volume.
fe_values.reinit (cell);
cell_rhs = 0;
-
+
for (unsigned int q=0; q<n_q_points; ++q)
{
for (unsigned int i=0; i<dofs_per_cell; ++i)
// which we have integrated:
rhs.scale (1./total_volume);
}
-
+
}
virtual
void
solve_problem ();
-
+
virtual
unsigned int
n_dofs () const;
void
postprocess (const Evaluation::EvaluationBase<dim> &postprocessor) const;
-
+
const SmartPointer<const DualFunctional::DualFunctionalBase<dim> > dual_functional;
virtual void assemble_rhs (Vector<double> &rhs) const;
{
Solver<dim>::postprocess(postprocessor);
}
-
+
template <int dim>
void
DualSolver<dim>::
- assemble_rhs (Vector<double> &rhs) const
+ assemble_rhs (Vector<double> &rhs) const
{
dual_functional->assemble_rhs (this->dof_handler, rhs);
}
virtual
void
postprocess (const Evaluation::EvaluationBase<dim> &postprocessor) const;
-
+
virtual
unsigned int
n_dofs () const;
void
output_solution () const;
-
+
// In the private section, we
// have two functions that are
// used to call the
// to avoid that we have to
// write this lengthy name
// over and over again:
-
+
typedef
typename DoFHandler<dim>::active_cell_iterator
active_cell_iterator;
const SmartPointer<const Function<dim> > right_hand_side;
std::vector<double> cell_residual;
- std::vector<double> rhs_values;
- std::vector<double> dual_weights;
+ std::vector<double> rhs_values;
+ std::vector<double> dual_weights;
typename std::vector<Tensor<2,dim> > cell_grad_grads;
CellData (const FiniteElement<dim> &fe,
const Quadrature<dim> &quadrature,
FESubfaceValues<dim> fe_subface_values_cell;
std::vector<double> jump_residual;
- std::vector<double> dual_weights;
+ std::vector<double> dual_weights;
typename std::vector<Tensor<1,dim> > cell_grads;
typename std::vector<Tensor<1,dim> > neighbor_grads;
FaceData (const FiniteElement<dim> &fe,
const Quadrature<dim-1> &face_quadrature);
};
-
+
// Regarding the evaluation of
// the error estimator, we have
update_q_points |
update_JxW_values),
right_hand_side (&right_hand_side)
- {
+ {
const unsigned int n_q_points
= quadrature.n_quadrature_points;
-
+
cell_residual.resize(n_q_points);
- rhs_values.resize(n_q_points);
- dual_weights.resize(n_q_points);
+ rhs_values.resize(n_q_points);
+ dual_weights.resize(n_q_points);
cell_grad_grads.resize(n_q_points);
}
-
-
+
+
template <int dim>
WeightedResidual<dim>::FaceData::
update_normal_vectors),
fe_subface_values_cell (mapping, fe, face_quadrature,
update_gradients)
- {
+ {
const unsigned int n_face_q_points
= face_quadrature.n_quadrature_points;
-
+
jump_residual.resize(n_face_q_points);
- dual_weights.resize(n_face_q_points);
+ dual_weights.resize(n_face_q_points);
cell_grads.resize(n_face_q_points);
neighbor_grads.resize(n_face_q_points);
}
-
+
threads.join_all ();
}
-
+
template <int dim>
void
WeightedResidual<dim>::solve_primal_problem ()
{
DualSolver<dim>::solve_problem ();
}
-
+
template <int dim>
void
{
PrimalSolver<dim>::postprocess (postprocessor);
}
-
-
+
+
template <int dim>
unsigned int
WeightedResidual<dim>::n_dofs () const
// of the error.
GridRefinement::refine_and_coarsen_fixed_fraction (*this->triangulation,
error_indicators,
- 0.5/std::sqrt(1.+step),
+ 0.5/std::sqrt(1.+step),
0.2/std::sqrt(1.+step));
this->triangulation->execute_coarsening_and_refinement ();
}
-
+
// Since we want to output both the
// primal and the dual solution, we
{
const PrimalSolver<dim> &primal_solver = *this;
const DualSolver<dim> &dual_solver = *this;
-
+
ConstraintMatrix primal_hanging_node_constraints;
DoFTools::make_hanging_node_constraints (primal_solver.dof_handler,
primal_hanging_node_constraints);
dual_solver.solution,
primal_solver.dof_handler,
primal_hanging_node_constraints,
- dual_solution);
+ dual_solution);
// approximate error, gradient,
// and second derivative
primal_solver.dof_handler,
primal_solver.solution,
gradient_indicators);
-
+
DerivativeApproximation::
approximate_second_derivative (mapping,
primal_solver.dof_handler,
primal_solver.solution,
second_indicators);
-
+
}
// distribute cell to dof vectors
Vector<double> x_error_indicators (primal_solver.dof_handler.n_dofs());
DoFTools::distribute_cell_to_dof_vector (primal_solver.dof_handler,
second_indicators,
x_second_indicators);
-
-
+
+
// we generate too much output in
// 3d. instead of doing it that
{
coarse_to_fine_map[cell]->get_interpolated_dof_values (primal_solver.solution,tmp);
cell->set_dof_values (tmp, coarse_primal_solution);
-
+
coarse_to_fine_map[cell]->get_interpolated_dof_values (dual_solution,tmp);
cell->set_dof_values (tmp, coarse_dual_solution);
-
+
coarse_to_fine_map[cell]->get_interpolated_dof_values (x_error_indicators,tmp);
cell->set_dof_values (tmp, coarse_error_indicators);
-
+
coarse_to_fine_map[cell]->get_interpolated_dof_values (x_gradient_indicators,tmp);
cell->set_dof_values (tmp, coarse_gradient_indicators);
-
+
coarse_to_fine_map[cell]->get_interpolated_dof_values (x_second_indicators,tmp);
cell->set_dof_values (tmp, coarse_second_indicators);
}
-
+
{
DataOut<dim> data_out;
data_out.attach_dof_handler (coarser_dof_handler);
data_out.add_data_vector (coarse_gradient_indicators, "gradient");
data_out.add_data_vector (coarse_second_indicators, "second_derivatives");
data_out.build_patches ();
-
+
#ifdef HAVE_STD_STRINGSTREAM
std::ostringstream filename;
#else
#else
std::ofstream out (filename.str());
#endif
-
+
data_out.write_gmv (out);
}
-
+
}
// functions that actually do the
// work, and finally collects the
// results.
-
+
template <int dim>
void
WeightedResidual<dim>::
dual_solver.dof_handler,
dual_hanging_node_constraints,
primal_solution);
-
+
// Then for computing the
// interpolation of the
// numerically approximated dual
primal_solver.dof_handler,
primal_hanging_node_constraints,
dual_weights);
-
+
// Note that this could probably
// have been more efficient since
// those constraints have been
// dual solution. We leave the
// optimization of the program in
// this respect as an exercise.
-
+
// Having computed the dual
// weights we now proceed with
// computing the cell and face
n_threads, i,
error_indicators,
face_integrals);
- threads.join_all();
+ threads.join_all();
// Once the error contributions
// are computed, sum them up. For
// term, since the other half
// will be taken by the
// neighboring cell.
- unsigned int present_cell=0;
+ unsigned int present_cell=0;
for (active_cell_iterator cell=dual_solver.dof_handler.begin_active();
cell!=dual_solver.dof_handler.end();
++cell, ++present_cell)
*dual_solver.quadrature,
*primal_solver.rhs_function);
FaceData face_data (*dual_solver.fe,
- *dual_solver.face_quadrature);
+ *dual_solver.face_quadrature);
// Then calculate the start cell
// for this thread. We let the
// back right now
if (cell == dual_solver.dof_handler.end())
return;
-
+
// Next loop over all cells. The
// check for loop end is done at
// the end of the loop, along
dual_weights,
cell_data,
error_indicators);
-
+
// After computing the cell
// terms, turn to the face
// terms. For this, loop over
// the list of faces with
// a zero contribution to
// the error.
- if (cell->face(face_no)->at_boundary())
+ if (cell->face(face_no)->at_boundary())
{
face_integrals[cell->face(face_no)] = 0;
continue;
};
-
+
// Next, note that since
// we want to compute the
// jump terms on each
// the coarse cell.
if (cell->at_boundary(face_no) == false)
if (cell->neighbor(face_no)->level() < cell->level())
- continue;
+ continue;
// Now we know that we
primal_solution,
dual_weights,
face_data,
- face_integrals);
+ face_integrals);
else
integrate_over_irregular_face (cell, face_no,
primal_solution,
// @sect4{Computing edge term error contributions - 1}
-
+
// On the other hand, computation
// of the edge terms for the error
// estimate is not so
// that cell, and extract the
// gradients on that cell:
const active_cell_iterator neighbor = cell->neighbor(face_no);
- face_data.fe_face_values_neighbor.reinit (neighbor, neighbor_neighbor);
+ face_data.fe_face_values_neighbor.reinit (neighbor, neighbor_neighbor);
face_data.fe_face_values_neighbor.get_function_grads (primal_solution,
face_data.neighbor_grads);
// this face:
face_data.fe_face_values_cell.get_function_values (dual_weights,
face_data.dual_weights);
-
+
// Finally, we have to compute
// the sum over jump residuals,
// dual weights, and quadrature
// @sect4{Computing edge term error contributions - 2}
-
+
// We are still missing the case of
// faces with hanging nodes. This
// is what is covered in this
n_q_points = face_data.fe_face_values_cell.n_quadrature_points;
const typename DoFHandler<dim>::cell_iterator
- neighbor = cell->neighbor(face_no);
+ neighbor = cell->neighbor(face_no);
Assert (neighbor.state() == IteratorState::valid,
ExcInternalError());
Assert (neighbor->has_children(),
// the same.
const unsigned int
neighbor_neighbor = cell->neighbor_of_neighbor (face_no);
-
+
// Then simply do everything we
// did in the previous function
// for one face for all the
neighbor_neighbor);
face_data.fe_face_values_neighbor.get_function_grads (primal_solution,
face_data.neighbor_grads);
-
+
// and finally building the
// jump residuals. Since we
// take the normal vector
// Then get dual weights:
face_data.fe_face_values_neighbor.get_function_values (dual_weights,
face_data.dual_weights);
-
+
// At last, sum up the
// contribution of this
// sub-face, and set it in
typename DoFHandler<dim>::face_iterator face = cell->face(face_no);
for (unsigned int subface_no=0;
subface_no<GeometryInfo<dim>::subfaces_per_face;
- ++subface_no)
+ ++subface_no)
{
Assert (face_integrals.find(face->child(subface_no)) !=
face_integrals.end(),
ExcInternalError());
Assert (face_integrals[face->child(subface_no)] != -1e20,
ExcInternalError());
-
+
sum += face_integrals[face->child(subface_no)];
};
// Finally store the value with
// the parent face.
face_integrals[face] = sum;
}
-
+
}
// structure, these values are
// all set to default values, for
// simple use.
- struct ProblemDescription
+ struct ProblemDescription
{
// First allow for the
// degrees of the piecewise
*descriptor.dual_functional);
break;
};
-
+
case ProblemDescription::global_refinement:
{
solver
descriptor.data->get_boundary_values());
break;
};
-
+
case ProblemDescription::kelly_indicator:
{
solver
*descriptor.kelly_weight);
break;
};
-
+
default:
AssertThrow (false, ExcInternalError());
};
-
+
// Now that all objects are in
// place, run the main loop. The
// stopping criterion is
{
std::cout << "Refinement cycle: " << step
<< std::endl;
-
+
solver->set_refinement_cycle (step);
solver->solve_problem ();
solver->output_solution ();
std::cout << " Number of degrees of freedom="
<< solver->n_dofs() << std::endl;
-
+
for (typename EvaluatorList::const_iterator
e = descriptor.evaluator_list.begin();
e != descriptor.evaluator_list.end(); ++e)
solver->postprocess (**e);
};
-
+
if (solver->n_dofs() < descriptor.max_degrees_of_freedom)
solver->refine_grid ();
else
// etc), and passes them packed into
// a structure to the frame work
// class above.
-int main (int argc, char **argv)
+int main (int argc, char **argv)
{
// if no argument is given, then do 18
// iterations
<< std::endl;
exit (1);
}
-
-
-
-
+
+
+
+
deallog.depth_console (0);
try
{
// can also use
// ``CurvedRidges<dim>'':
descriptor.data = new Data::SetUp<Data::Exercise_2_3<dim>,dim> ();
-
+
// Next set first a dual
// functional, then a list of
// evaluation objects. We
const Point<dim> evaluation_point (0., 0., 0.);
descriptor.dual_functional
= new DualFunctional::PointValueEvaluation<dim> (evaluation_point);
-
+
Evaluation::PointValueEvaluation<dim>
postprocessor1 (evaluation_point);
Evaluation::GridOutput<dim>
postprocessor2 ("grid");
-
+
descriptor.evaluator_list.push_back (&postprocessor1);
descriptor.evaluator_list.push_back (&postprocessor2);
#else
descriptor.max_degrees_of_freedom = 20000;
#endif
-
+
// Finally pass the descriptor
// object to a function that
// runs the entire solution
<< std::endl;
return 1;
}
- catch (...)
+ catch (...)
{
std::cerr << std::endl << std::endl
<< "----------------------------------------------------"
typename DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
- std::vector<unsigned int> local_dof_indices(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices(fe.dofs_per_cell);
for (; cell!=endc; ++cell)
{
typename DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
endc = dof_handler.end();
- std::vector<unsigned int> local_dof_indices(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices(fe.dofs_per_cell);
for (; cell!=endc; ++cell)
{
// loop over all cells, active or
// not
- std::vector<unsigned int> local_dof_indices (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (fe.dofs_per_cell);
for (typename DoFHandler<dim>::cell_iterator cell=dof_handler.begin();
cell != dof_handler.end(); ++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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values (n_q_points);
FullMatrix<double> cell_matrix (dofs_per_cell, dofs_per_cell);
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
for (typename DoFHandler<dim>::active_cell_iterator cell=begin_cell;
cell!=end_cell; ++cell)
Vector<double> cell_rhs (dofs_per_cell);
std::vector<double> rhs_values (n_q_points);
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
typename DoFHandler<dim>::active_cell_iterator
cell = this->dof_handler.begin_active(),
FullMatrix<double> cell_matrix (dofs_per_cell, dofs_per_cell);
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
for (typename DoFHandler<dim>::active_cell_iterator cell=begin_cell;
cell!=end_cell; ++cell)
Vector<double> cell_rhs (dofs_per_cell);
std::vector<double> rhs_values (n_q_points);
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
typename DoFHandler<dim>::active_cell_iterator
cell = this->dof_handler.begin_active(),
const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
Vector<double> cell_rhs (dofs_per_cell);
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
double total_volume = 0;
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
std::vector<double> local_solution_values (n_q_points);
std::vector<Tensor<1,dim> > local_solution_grads (n_q_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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
typename DoFHandler<dim>::active_cell_iterator cell = mg_dof_handler.begin_active(),
endc = mg_dof_handler.end();
FullMatrix<double> cell_matrix (dofs_per_cell, dofs_per_cell);
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
typename MGDoFHandler<dim>::cell_iterator cell = mg_dof_handler.begin(),
endc = mg_dof_handler.end();
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
DoFHandler<2>::active_cell_iterator
cell = dof_handler.begin_active(),
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
typename DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active(),
endc = dof_handler.end();
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values (n_q_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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values (n_q_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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
FEValues<dim> x_fe_values (*fe, quadrature_formula,
update_values | update_gradients |
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
std::vector<double> lambda_values (n_q_points);
std::vector<double> mu_values (n_q_points);
std::vector< Point<spacedim> > cell_normals_i, cell_normals_j;
- std::vector<unsigned int> local_dof_indices_i (dofs_per_cell);
- std::vector<unsigned int> local_dof_indices_j (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices_i (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices_j (dofs_per_cell);
// std::cout
std::vector< Point<spacedim> > cell_normals(q_iterated.size());
std::vector< Point<spacedim> > cell_tangentials(q_iterated.size());
- std::vector<unsigned int> local_dof_indices (fe_q.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (fe_q.dofs_per_cell);
typename DoFHandler<spacedim-1, spacedim>::active_cell_iterator
cell = dof_handler_q.begin_active(),
std::vector<double> shape_directional_derivative(dofs_per_cell);
Vector<double> projected_directional_derivative(triangulation.n_cells());
- std::vector<unsigned int> local_dof_indices (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (fe.dofs_per_cell);
typename DoFHandler<dim, spacedim>::active_cell_iterator
cell = dof_handler.begin_active(),
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active(),
endc = dof_handler.end();
FullMatrix<double> local_matrix(dofs_per_cell, dofs_per_cell);
Vector<double> local_rhs(dofs_per_cell);
- std::vector<unsigned int> local_dof_indices(dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
const FEValuesExtractors::SymmetricTensor<2> stress(0);
const unsigned int dofs_per_cell = fe.dofs_per_cell;
deallog << "dofs_per_cell: " << fe.dofs_per_cell << std::endl;
- std::vector<unsigned int> local_dof_indices(dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
const FEValuesExtractors::SymmetricTensor<2> stress(0);
const FEValuesExtractors::Scalar gamma(n_stress_components);
FullMatrix<double> cell_matrix;
Vector<double> cell_rhs;
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
typename hp::DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
FullMatrix<double> cell_matrix;
Vector<double> cell_rhs;
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
typename hp::DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
FullMatrix<double> cell_matrix;
Vector<double> cell_rhs;
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
typename hp::DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
std::vector<double> rhs_values (n_q_points);
typename DoFHandler<dim>::active_cell_iterator
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
std::vector<double> rhs_values (n_q_points);
typename DoFHandler<dim>::active_cell_iterator
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
std::vector<double> rhs_values (n_q_points);
typename DoFHandler<dim>::active_cell_iterator
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
std::vector<double> rhs_values (n_q_points);
typename DoFHandler<dim>::active_cell_iterator
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
std::vector<double> rhs_values (n_q_points);
typename DoFHandler<dim>::active_cell_iterator
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
std::vector<double> rhs_values (n_q_points);
typename DoFHandler<dim>::active_cell_iterator
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values (n_q_points);
QGauss<dim> quadrature_formula(2);
FEValues<dim> fe_values(finite_element, quadrature_formula, update_values | update_quadrature_points); // just need local_dof_indices and quadrature_points
- std::vector<unsigned int> local_dof_indices(finite_element.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices(finite_element.dofs_per_cell);
std::vector<Point<dim> > dof_locations(finite_element.dofs_per_cell);
Vector<double> cell_pole(finite_element.dofs_per_cell);
= dofh.begin_active();
const unsigned int dofs_per_cell = dofh.get_fe().dofs_per_cell;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
cell_matrix = 0;
cell_rhs = 0;
FullMatrix<double> cell_matrix (dofs_per_cell, dofs_per_cell);
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
for (typename hp::DoFHandler<dim>::active_cell_iterator cell=begin_cell;
cell!=end_cell; ++cell)
Vector<double> cell_rhs (dofs_per_cell);
std::vector<double> rhs_values (n_q_points);
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
typename hp::DoFHandler<dim>::active_cell_iterator
cell = this->dof_handler.begin_active(),
const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
Vector<double> cell_rhs (dofs_per_cell);
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
double total_volume = 0;
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
std::vector<double> local_solution_values (n_q_points);
std::vector<Tensor<1,dim> > local_solution_grads (n_q_points);
double err_l2 = 0,
err_hdiv = 0;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
for (; cell!=endc; ++cell)
{
double err_l2 = 0,
err_hdiv = 0;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
for (; cell!=endc; ++cell)
{
cell = dof_handler.begin_active(),
endc = dof_handler.end();
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
FullMatrix<double> local_matrix (dofs_per_cell, dofs_per_cell);
QGauss<dim> quadrature (3);
cell = dof_handler.begin_active(),
endc = dof_handler.end();
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
FullMatrix<double> local_matrix (dofs_per_cell, dofs_per_cell);
QGauss<dim> quadrature (3);
cell = dof_handler.begin_active(),
endc = dof_handler.end();
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
FullMatrix<double> local_matrix (dofs_per_cell, dofs_per_cell);
QGauss<dim> quadrature (3);
cell = dof_handler.begin_active(),
endc = dof_handler.end();
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
FullMatrix<double> local_matrix (dofs_per_cell, dofs_per_cell);
QGauss<dim> quadrature (3);
cell = dof_handler.begin_active(),
endc = dof_handler.end();
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
FullMatrix<double> local_matrix (dofs_per_cell, dofs_per_cell);
QGauss<dim> quadrature (3);
DoFHandler<2>::active_cell_iterator cell = dof_handler->begin_active(),
endc = dof_handler->end();
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
for (; cell!=endc; ++cell)
{
DoFHandler<2>::active_cell_iterator cell = dof_handler->begin_active(),
endc = dof_handler->end();
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
for (; cell!=endc; ++cell)
{
FullMatrix<double> cell_matrix;
Vector<double> cell_rhs;
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
typename hp::DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
typename DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
hp::DoFHandler<dim> dof_handler(tria);
dof_handler.distribute_dofs(fe_collection);
- std::vector<unsigned int> local_dof_indices (fe_collection[0].dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (fe_collection[0].dofs_per_cell);
for (typename hp::DoFHandler<dim>::active_cell_iterator
cell=dof_handler.begin_active();
cell!=dof_handler.end(); ++cell)
hp::DoFHandler<dim> dof_handler(tria);
dof_handler.distribute_dofs(fe_collection);
- std::vector<unsigned int> local_dof_indices (fe_collection[0].dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (fe_collection[0].dofs_per_cell);
for (typename hp::DoFHandler<dim>::active_cell_iterator
cell=dof_handler.begin_active();
cell!=dof_handler.end(); ++cell)
hp::DoFHandler<dim> dof_handler(tria);
dof_handler.distribute_dofs(fe_collection);
- std::vector<unsigned int> local_dof_indices (fe_collection[0].dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (fe_collection[0].dofs_per_cell);
for (typename hp::DoFHandler<dim>::active_cell_iterator
cell=dof_handler.begin_active();
cell!=dof_handler.end(); ++cell)
dof_handler.distribute_dofs(fe_collection);
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
for (typename hp::DoFHandler<dim>::active_cell_iterator
cell=dof_handler.begin_active();
cell!=dof_handler.end(); ++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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
cell_matrix = 0;
cell_rhs = 0;
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
cell_matrix = 0;
cell_rhs = 0;
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
cell_matrix = 0;
cell_rhs = 0;
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
cell_matrix = 0;
cell_rhs = 0;
dof_handler.distribute_dofs(fe_collection);
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
for (typename hp::DoFHandler<dim>::active_cell_iterator
cell=dof_handler.begin_active();
cell!=dof_handler.end(); ++cell)
FullMatrix<double> cell_matrix (dofs_per_cell, dofs_per_cell);
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
for (typename hp::DoFHandler<dim>::active_cell_iterator cell=begin_cell;
cell!=end_cell; ++cell)
Vector<double> cell_rhs (dofs_per_cell);
std::vector<double> rhs_values (n_q_points);
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
typename hp::DoFHandler<dim>::active_cell_iterator
cell = this->dof_handler.begin_active(),
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
hp::DoFHandler<2>::active_cell_iterator
cell = dof_handler.begin_active(),
FullMatrix<double> cell_matrix (max_dofs_per_cell, max_dofs_per_cell);
Vector<double> cell_rhs (max_dofs_per_cell);
- std::vector<unsigned int> local_dof_indices (max_dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (max_dofs_per_cell);
hp::DoFHandler<2>::active_cell_iterator
cell = dof_handler.begin_active(),
FullMatrix<double> cell_matrix (max_dofs_per_cell, max_dofs_per_cell);
Vector<double> cell_rhs (max_dofs_per_cell);
- std::vector<unsigned int> local_dof_indices (max_dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (max_dofs_per_cell);
hp::DoFHandler<2>::active_cell_iterator
cell = dof_handler.begin_active(),
FullMatrix<double> cell_matrix (max_dofs_per_cell, max_dofs_per_cell);
Vector<double> cell_rhs (max_dofs_per_cell);
- std::vector<unsigned int> local_dof_indices (max_dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (max_dofs_per_cell);
hp::DoFHandler<2>::active_cell_iterator
cell = dof_handler.begin_active(),
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
typename hp::DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active(),
endc = dof_handler.end();
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values (n_q_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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values (n_q_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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
hp::FEValues<dim> x_fe_values (*fe, quadrature_formula,
update_values | update_gradients |
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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
std::vector<double> lambda_values (n_q_points);
std::vector<double> mu_values (n_q_points);
= dofh.begin_active();
const unsigned int dofs_per_cell = dofh.get_fe().dofs_per_cell;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
if (myid==0)
= dofh.begin_active();
const unsigned int dofs_per_cell = dofh.get_fe().dofs_per_cell;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
for (; cell != dofh.end(); ++cell)
if (cell->is_ghost())
= dofh.begin_active();
const unsigned int dofs_per_cell = dofh.get_fe().dofs_per_cell;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
for (; cell != dofh.end(); ++cell)
if (!cell->is_artificial())
if (myid==0)
{
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
typename DoFHandler<dim>::active_cell_iterator
cell, endc = dofh.end();
if (myid==0)
{
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
typename DoFHandler<dim>::active_cell_iterator
cell, endc = dofh.end();
typename MGDoFHandler<dim>::cell_iterator
cell = mgdof.begin(),
endc = mgdof.end();
- std::vector<unsigned int> local_dof_indices (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (fe.dofs_per_cell);
std::vector<unsigned int> mg_dof_indices (fe.dofs_per_cell);
for (; cell!=endc; ++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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values (n_q_points);
FullMatrix<double> cell_matrix (dofs_per_cell, dofs_per_cell);
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values (n_q_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);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
typename DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),