// And while we're already computing things in parallel, interpolating
// boundary values is one more thing that can be done independently, so
// we do it here:
- std::map<unsigned int,double> boundary_value_map;
+ std::map<types::global_dof_index,double> boundary_value_map;
VectorTools::interpolate_boundary_values (dof_handler,
0,
*boundary_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);
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(),
assemble_rhs (linear_system.rhs);
linear_system.hanging_node_constraints.condense (linear_system.rhs);
- std::map<unsigned int,double> boundary_value_map;
+ std::map<types::global_dof_index,double> boundary_value_map;
VectorTools::interpolate_boundary_values (dof_handler,
0,
*boundary_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);
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(),
std::vector<Tensor<1, dim> > old_solution_gradients(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 = dof_handler.begin_active(),
hanging_node_constraints.condense (system_matrix);
hanging_node_constraints.condense (system_rhs);
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
ZeroFunction<dim>(),
template <int dim>
void MinimalSurfaceProblem<dim>::set_boundary_values ()
{
- std::map<unsigned int, double> boundary_values;
+ std::map<types::global_dof_index, double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
BoundaryValues<dim>(),
boundary_values);
- for (std::map<unsigned int, double>::const_iterator
+ for (std::map<types::global_dof_index, double>::const_iterator
p = boundary_values.begin();
p != boundary_values.end(); ++p)
present_solution(p->first) = p->second;
Vector<double> cell_rhs (dofs_per_cell);
std::vector<Tensor<1, dim> > gradients(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 = 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);
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);
// While we're at it, let us also count how many degrees of freedom there
// exist on the present process:
- const unsigned int n_local_dofs
+ const types::global_dof_index n_local_dofs
= DoFTools::count_dofs_with_subdomain_association (dof_handler,
this_mpi_process);
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);
//
// However, we still have to apply boundary values, in the same way as we
// always do:
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
ZeroFunction<dim>(dim),
// of pressure variables equals the number of shape functions that are
// nonzero in the dim-th component. Let us compute these numbers and then
// create some nice output with that:
- std::vector<unsigned int> dofs_per_component (dim+1);
+ std::vector<types::global_dof_index> dofs_per_component (dim+1);
DoFTools::count_dofs_per_component (dof_handler, dofs_per_component);
const unsigned int n_u = dofs_per_component[0],
n_p = dofs_per_component[dim];
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);
// The next step is to declare objects that represent the source term,
// pressure boundary value, and coefficient in the equation. In addition
void InverseMatrix<Matrix>::vmult (Vector<double> &dst,
const Vector<double> &src) const
{
- SolverControl solver_control (std::max(src.size(), 200U),
+ SolverControl solver_control (std::max(src.size(), static_cast<std::size_t> 200),
1e-8*src.l2_norm());
SolverCG<> cg (solver_control);
dof_handler.distribute_dofs (fe);
DoFRenumbering::component_wise (dof_handler);
- std::vector<unsigned int> dofs_per_component (dim+2);
+ std::vector<types::global_dof_index> dofs_per_component (dim+2);
DoFTools::count_dofs_per_component (dof_handler, dofs_per_component);
const unsigned int n_u = dofs_per_component[0],
n_p = dofs_per_component[dim],
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 PressureRightHandSide<dim> pressure_right_hand_side;
const PressureBoundaryValues<dim> pressure_boundary_values;
std::vector<Vector<double> > present_solution_values_face(n_face_q_points, Vector<double>(dim+2));
std::vector<double> neighbor_saturation (n_face_q_points);
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
SaturationBoundaryValues<dim> saturation_boundary_values;
// <code>DoFTools::count_dofs_per_block</code> does the same as
// <code>DoFTools::count_dofs_per_component</code>, but now grouped as
// velocity and pressure block via <code>block_component</code>.
- std::vector<unsigned int> dofs_per_block (2);
+ std::vector<types::global_dof_index> dofs_per_block (2);
DoFTools::count_dofs_per_block (dof_handler, dofs_per_block, block_component);
const unsigned int n_u = dofs_per_block[0],
n_p = dofs_per_block[1];
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 RightHandSide<dim> right_hand_side;
std::vector<Vector<double> > rhs_values (n_q_points,
BoundaryValuesU<dim> boundary_values_u_function;
boundary_values_u_function.set_time (time);
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
boundary_values_u_function,
BoundaryValuesV<dim> boundary_values_v_function;
boundary_values_v_function.set_time (time);
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
boundary_values_v_function,
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 unsigned int n_q_points = quadrature_formula.size();
Vector<double> local_nl_term (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> old_data_values (n_q_points);
std::vector<double> new_data_values (n_q_points);
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> local_nl_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> old_data_values (n_q_points);
std::vector<double> new_data_values (n_q_points);
system_matrix);
system_rhs = 0;
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
BoundaryValues<dim>(),
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(),
Vector<double> system_rhs;
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
ConstraintMatrix hanging_node_constraints;
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(),
std::vector<double> extraneous_source_values (n_q_points);
std::vector<double> solution_old_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 = dof_handler.begin_active(),
prolongation_matrix.Tvmult_add (cell_rhs, tmp);
}
- std::vector<unsigned int> local_dof_indices (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (fe.dofs_per_cell);
cell_g->get_dof_indices (local_dof_indices);
for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
template <int dim>
void NeutronDiffusionProblem<dim>::refine_grid ()
{
- std::vector<unsigned int> n_cells (parameters.n_groups);
+ std::vector<types::global_dof_index> n_cells (parameters.n_groups);
for (unsigned int group=0; group<parameters.n_groups; ++group)
n_cells[group] = energy_groups[group]->n_active_cells();
// vector to transfer the cell contributions to the appropriate location
// in the global system matrix after.
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 DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
// which is characterized by the boundary indicator 1. The Dirichlet
// values are provided by the <code>DirichletBoundaryValues</code> class
// we defined above:
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
1,
DirichletBoundaryValues<dim>(),
// global matrix, we have to know the global numbers of the degrees of
// freedom. When we query them, we need a scratch (temporary) array for
// these numbers:
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
// Now for the loop over all cells. We have seen before how this works, so
// this should be familiar including the conventional names for these
// their boundary values (which are zero here for all entries). This mapping
// of DoF numbers to boundary values is done by the <code>std::map</code>
// class.
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
ZeroFunction<2>(),
void DGMethod<dim>::assemble_system2 ()
{
const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
- std::vector<unsigned int> dofs (dofs_per_cell);
- std::vector<unsigned int> dofs_neighbor (dofs_per_cell);
+ std::vector<types::global_dof_index> dofs (dofs_per_cell);
+ std::vector<types::global_dof_index> dofs_neighbor (dofs_per_cell);
const UpdateFlags update_flags = update_values
| update_gradients
const unsigned int n_q_points = fe_v.n_quadrature_points;
- 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<Vector<double> > cell_wind(n_q_points, Vector<double>(dim) );
double normal_wind;
const unsigned int n_q_points = fe_v.n_quadrature_points;
- std::vector<unsigned int> dofs(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> dofs(fe.dofs_per_cell);
std::vector<double> local_phi(n_q_points);
std::vector<double> normal_wind(n_q_points);
const double t_0, T, Re;
EquationData::Velocity<dim> vel_exact;
- std::map<unsigned int, double> boundary_values;
+ std::map<types::global_dof_index, double> boundary_values;
std::vector<types::boundary_id> boundary_indicators;
Triangulation<dim> triangulation;
unsigned int vel_dpc;
unsigned int pres_dpc;
FullMatrix<double> local_grad;
- std::vector<unsigned int> vel_local_dof_indices;
- std::vector<unsigned int> pres_local_dof_indices;
+ std::vector<types::global_dof_index> vel_local_dof_indices;
+ std::vector<types::global_dof_index> pres_local_dof_indices;
InitGradPerTaskData (const unsigned int dd,
const unsigned int vdpc,
struct AdvectionPerTaskData
{
FullMatrix<double> local_advection;
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
AdvectionPerTaskData (const unsigned int dpc)
:
local_advection (dpc, dpc),
phi_n_minus_1 = phi_n;
- static std::map<unsigned int, double> bval;
+ static std::map<types::global_dof_index, double> bval;
if (reinit_prec)
VectorTools::interpolate_boundary_values (dof_handler_pressure, 3,
ZeroFunction<dim>(), bval);
dof_handler_pressure.n_dofs()),
ExcInternalError());
static Vector<double> joint_solution (joint_dof_handler.n_dofs());
- std::vector<unsigned int> loc_joint_dof_indices (joint_fe.dofs_per_cell),
+ std::vector<types::global_dof_index> loc_joint_dof_indices (joint_fe.dofs_per_cell),
loc_vel_dof_indices (fe_velocity.dofs_per_cell),
loc_pres_dof_indices (fe_pressure.dofs_per_cell);
typename DoFHandler<dim>::active_cell_iterator
update_values);
const unsigned int dpc = fe_velocity.dofs_per_cell,
nqp = quadrature_velocity.size();
- std::vector<unsigned int> ldi (dpc);
+ std::vector<types::global_dof_index> ldi (dpc);
Vector<double> loc_rot (dpc);
std::vector< Tensor<1,dim> > grad_u1 (nqp), grad_u2 (nqp);
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);
const RightHandSide<spacedim> rhs;
}
}
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (mapping,
dof_handler,
0,
// task, we only have to replace the ZeroFunction used there by an object of
// the class which describes the boundary values we would like to use
// (i.e. the <code>BoundaryValues</code> class declared above):
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
BoundaryValues<dim>(),
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 RightHandSide right_hand_side;
// solid. The following piece of code was already presented in the
// introduction:
{
- std::vector<unsigned int> local_face_dof_indices (stokes_fe.dofs_per_face);
+ std::vector<types::global_dof_index> local_face_dof_indices (stokes_fe.dofs_per_face);
for (typename hp::DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active();
cell != dof_handler.end(); ++cell)
stokes_dofs_per_cell);
Vector<double> local_rhs;
- std::vector<unsigned int> local_dof_indices;
- std::vector<unsigned int> neighbor_dof_indices (stokes_dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices;
+ std::vector<types::global_dof_index> neighbor_dof_indices (stokes_dofs_per_cell);
const RightHandSide<dim> right_hand_side;
}
// With the matrix so built, we use zero boundary values again:
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
ZeroFunction<dim>(),
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);
// Then we need objects which can evaluate the values, gradients, etc of
// the shape functions at the quadrature points. While it seems that it
hanging_node_constraints.condense (system_matrix);
hanging_node_constraints.condense (system_rhs);
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
Solution<dim>(),
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);
// As was shown in previous examples as well, we need a place where to
// store the values of the coefficients at all the quadrature points on a
// object would represent a scalar function. Since the solution vector has
// <code>dim</code> components, we need to pass <code>dim</code> as number
// of components to the zero function as well.
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
ZeroFunction<dim>(dim),
// ... an array to hold the global indices of the degrees of freedom of
// the cell on which we are presently working...
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
// ... and array in which the values of right hand side, advection
// direction, and boundary values will be stored, for cell and face
}
- inline MPI_Datatype mpi_type_id (const unsigned long long int *)
- {
- return MPI_UNSIGNED_LONG;
- }
-
-
inline MPI_Datatype mpi_type_id (const unsigned long long int *)
{
return MPI_UNSIGNED_LONG_LONG;
*/
const unsigned int artificial_subdomain_id DEAL_II_DEPRECATED = static_cast<subdomain_id>(-2);
-#define DEAL_II_USE_LARGE_INDEX_TYPE
+//#define DEAL_II_USE_LARGE_INDEX_TYPE
#ifdef DEAL_II_USE_LARGE_INDEX_TYPE
/**
* The type used for global indices of
std::vector<unsigned long long int>
- invert_permutation (const std::vector<unsigned long int> &permutation)
+ invert_permutation (const std::vector<unsigned long long int> &permutation)
{
const unsigned long long int n = permutation.size();