// Here is a vector where each entry denotes the numbers of degrees of
// freedom that are stored on the processor with that particular number:
- std::vector<unsigned int> local_dofs_per_process;
+ std::vector<types::global_dof_index> local_dofs_per_process;
// Next, how many degrees of freedom the present processor stores. This
// is, of course, an abbreviation to
// <code>local_dofs_per_process[this_mpi_process]</code>.
- unsigned int n_local_dofs;
+ types::global_dof_index n_local_dofs;
// In the same direction, also cache how many cells the present processor
// owns. Note that the cells that belong to a processor are not
// for each vector component and because we only want to restrict vertical
// motion, it has only its last component set:
FEValuesExtractors::Scalar z_component (dim-1);
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::
interpolate_boundary_values (dof_handler,
0,
DoFHandler<dim> stokes_dof_handler;
ConstraintMatrix stokes_constraints;
- std::vector<unsigned int> stokes_block_sizes;
+ std::vector<types::global_dof_index> stokes_block_sizes;
TrilinosWrappers::BlockSparseMatrix stokes_matrix;
TrilinosWrappers::BlockSparseMatrix stokes_preconditioner_matrix;
temperature_constraints.close ();
}
- std::vector<unsigned int> stokes_dofs_per_block (2);
+ std::vector<types::global_dof_index> stokes_dofs_per_block (2);
DoFTools::count_dofs_per_block (stokes_dof_handler, stokes_dofs_per_block,
stokes_sub_blocks);
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> local_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<Tensor<2,dim> > grad_phi_u (dofs_per_cell);
std::vector<double> phi_p (dofs_per_cell);
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);
// Next we need a vector that will contain the values of the temperature
// solution at the previous time level at the quadrature points to
FullMatrix<double> local_mass_matrix (dofs_per_cell, dofs_per_cell);
FullMatrix<double> local_stiffness_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> phi_T (dofs_per_cell);
std::vector<Tensor<1,dim> > grad_phi_T (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);
// Next comes the declaration of vectors to hold the old and older
// solution values (as a notation for time levels <i>n-1</i> and
// output as only a qualititative means to understand a solution, we
// ignore this $\mathcal{O}(h)$ error.
{
- std::vector<unsigned int> local_joint_dof_indices (joint_fe.dofs_per_cell);
- std::vector<unsigned int> local_stokes_dof_indices (stokes_fe.dofs_per_cell);
- std::vector<unsigned int> local_temperature_dof_indices (temperature_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_joint_dof_indices (joint_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_stokes_dof_indices (stokes_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_temperature_dof_indices (temperature_fe.dofs_per_cell);
typename DoFHandler<dim>::active_cell_iterator
joint_cell = joint_dof_handler.begin_active(),
StokesPreconditioner (const StokesPreconditioner &data);
FullMatrix<double> local_matrix;
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
};
template <int dim>
FullMatrix<double> local_mass_matrix;
FullMatrix<double> local_stiffness_matrix;
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
};
template <int dim>
TemperatureRHS (const TemperatureRHS &data);
Vector<double> local_rhs;
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
FullMatrix<double> matrix_for_bc;
};
const unsigned int dofs_per_cell = fe_values.dofs_per_cell,
n_q_points = fe_values.n_quadrature_points;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
Vector<double> cell_vector (dofs_per_cell);
FullMatrix<double> matrix_for_bc (dofs_per_cell, dofs_per_cell);
temperature_dof_handler.distribute_dofs (temperature_fe);
- std::vector<unsigned int> stokes_dofs_per_block (2);
+ std::vector<types::global_dof_index> stokes_dofs_per_block (2);
DoFTools::count_dofs_per_block (stokes_dof_handler, stokes_dofs_per_block,
stokes_sub_blocks);
joint_solution.reinit (joint_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD);
{
- std::vector<unsigned int> local_joint_dof_indices (joint_fe.dofs_per_cell);
- std::vector<unsigned int> local_stokes_dof_indices (stokes_fe.dofs_per_cell);
- std::vector<unsigned int> local_temperature_dof_indices (temperature_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_joint_dof_indices (joint_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_stokes_dof_indices (stokes_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_temperature_dof_indices (temperature_fe.dofs_per_cell);
typename DoFHandler<dim>::active_cell_iterator
joint_cell = joint_dof_handler.begin_active(),
void assemble_system ();
void assemble_cell_term (const FEValues<dim> &fe_v,
- const std::vector<unsigned int> &dofs);
+ const std::vector<types::global_dof_index> &dofs);
void assemble_face_term (const unsigned int face_no,
const FEFaceValuesBase<dim> &fe_v,
const FEFaceValuesBase<dim> &fe_v_neighbor,
- const std::vector<unsigned int> &dofs,
- const std::vector<unsigned int> &dofs_neighbor,
+ const std::vector<types::global_dof_index> &dofs,
+ const std::vector<types::global_dof_index> &dofs_neighbor,
const bool external_face,
const unsigned int boundary_id,
const double face_diameter);
{
const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
- std::vector<unsigned int> dof_indices (dofs_per_cell);
- std::vector<unsigned int> dof_indices_neighbor (dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices_neighbor (dofs_per_cell);
const UpdateFlags update_flags = update_values
| update_gradients
assemble_face_term (face_no, fe_v_face,
fe_v_face,
dof_indices,
- std::vector<unsigned int>(),
+ std::vector<types::global_dof_index>(),
true,
cell->face(face_no)->boundary_indicator(),
cell->face(face_no)->diameter());
void
ConservationLaw<dim>::
assemble_cell_term (const FEValues<dim> &fe_v,
- const std::vector<unsigned int> &dof_indices)
+ const std::vector<types::global_dof_index> &dof_indices)
{
const unsigned int dofs_per_cell = fe_v.dofs_per_cell;
const unsigned int n_q_points = fe_v.n_quadrature_points;
ConservationLaw<dim>::assemble_face_term(const unsigned int face_no,
const FEFaceValuesBase<dim> &fe_v,
const FEFaceValuesBase<dim> &fe_v_neighbor,
- const std::vector<unsigned int> &dof_indices,
- const std::vector<unsigned int> &dof_indices_neighbor,
+ const std::vector<types::global_dof_index> &dof_indices,
+ const std::vector<types::global_dof_index> &dof_indices_neighbor,
const bool external_face,
const unsigned int boundary_id,
const double face_diameter)
FullMatrix<double> cell_stiffness_matrix (dofs_per_cell, dofs_per_cell);
FullMatrix<double> cell_mass_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);
FunctionParser<dim> potential;
potential.initialize (FunctionParser<dim>::default_variable_names (),
{
data.cell_loop (&LaplaceOperator::local_apply, this, dst, src);
- const std::vector<unsigned int> &
+ const std::vector<types::global_dof_index> &
constrained_dofs = data.get_constrained_dofs();
for (unsigned int i=0; i<constrained_dofs.size(); ++i)
dst(constrained_dofs[i]) += src(constrained_dofs[i]);
diagonal_values = diagonal;
- const std::vector<unsigned int> &
+ const std::vector<types::global_dof_index> &
constrained_dofs = data.get_constrained_dofs();
for (unsigned int i=0; i<constrained_dofs.size(); ++i)
diagonal_values(constrained_dofs[i]) = 1.0;
typename FunctionMap<dim>::type dirichlet_boundary;
ZeroFunction<dim> homogeneous_dirichlet_bc (1);
dirichlet_boundary[0] = &homogeneous_dirichlet_bc;
- std::vector<std::set<unsigned int> > boundary_indices(triangulation.n_levels());
+ std::vector<std::set<types::global_dof_index> > boundary_indices(triangulation.n_levels());
MGTools::make_boundary_list (dof_handler,
dirichlet_boundary,
boundary_indices);
for (unsigned int level=0; level<nlevels; ++level)
{
- std::set<unsigned int>::iterator bc_it = boundary_indices[level].begin();
+ std::set<types::global_dof_index>::iterator bc_it = boundary_indices[level].begin();
for ( ; bc_it != boundary_indices[level].end(); ++bc_it)
mg_constraints[level].add_line(*bc_it);
const unsigned int dofs_per_cell = fe.dofs_per_cell;
const unsigned int n_q_points = quadrature_formula.size();
- 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);
const unsigned int dofs_per_cell = fe.dofs_per_cell;
const unsigned int n_q_points = quadrature_formula.size();
- 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> local_matrix (dofs_per_cell, 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);
typename DoFHandler<dim>::active_cell_iterator
cell = dof_handler.begin_active(),
FullMatrix<double> cell_matrix (dofs_per_cell, dofs_per_cell);
TrilinosWrappers::Vector 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(),
const unsigned int n_q_points = quadrature_formula.size();
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(),
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 FEValuesExtractors::Vector displacement (0);
for (unsigned i=0; i<dim; i++)
ones[i] = 1.0;
- std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
const FEValuesExtractors::Vector displacement (0);
const FEValues<dim> &darcy_fe_values,
const double global_max_u_F_prime,
const double global_S_variation,
- const std::vector<unsigned int> &local_dof_indices);
+ const std::vector<types::global_dof_index> &local_dof_indices);
void assemble_saturation_rhs_boundary_term (const FEFaceValues<dim> &saturation_fe_face_values,
const FEFaceValues<dim> &darcy_fe_face_values,
- const std::vector<unsigned int> &local_dof_indices);
+ const std::vector<types::global_dof_index> &local_dof_indices);
void solve ();
void refine_mesh (const unsigned int min_grid_level,
const unsigned int max_grid_level);
}
- std::vector<unsigned int> darcy_dofs_per_block (2);
+ std::vector<types::global_dof_index> darcy_dofs_per_block (2);
DoFTools::count_dofs_per_block (darcy_dof_handler, darcy_dofs_per_block, darcy_block_component);
const unsigned int n_u = darcy_dofs_per_block[0],
n_p = darcy_dofs_per_block[1],
std::vector<double> old_saturation_values (n_q_points);
FullMatrix<double> local_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<Tensor<1,dim> > phi_u (dofs_per_cell);
std::vector<Tensor<1,dim> > grad_phi_p (dofs_per_cell);
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;
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);
typename DoFHandler<dim>::active_cell_iterator
cell = saturation_dof_handler.begin_active(),
update_values);
const unsigned int dofs_per_cell = saturation_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);
const double global_max_u_F_prime = get_max_u_F_prime ();
const std::pair<double,double> global_S_range = get_extrapolated_saturation_range ();
const FEValues<dim> &darcy_fe_values,
const double global_max_u_F_prime,
const double global_S_variation,
- const std::vector<unsigned int> &local_dof_indices)
+ const std::vector<types::global_dof_index> &local_dof_indices)
{
const unsigned int dofs_per_cell = saturation_fe_values.dofs_per_cell;
const unsigned int n_q_points = saturation_fe_values.n_quadrature_points;
TwoPhaseFlowProblem<dim>::
assemble_saturation_rhs_boundary_term (const FEFaceValues<dim> &saturation_fe_face_values,
const FEFaceValues<dim> &darcy_fe_face_values,
- const std::vector<unsigned int> &local_dof_indices)
+ const std::vector<types::global_dof_index> &local_dof_indices)
{
const unsigned int dofs_per_cell = saturation_fe_face_values.dofs_per_cell;
const unsigned int n_face_q_points = saturation_fe_face_values.n_quadrature_points;
Vector<double> joint_solution (joint_dof_handler.n_dofs());
{
- std::vector<unsigned int> local_joint_dof_indices (joint_fe.dofs_per_cell);
- std::vector<unsigned int> local_darcy_dof_indices (darcy_fe.dofs_per_cell);
- std::vector<unsigned int> local_saturation_dof_indices (saturation_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_joint_dof_indices (joint_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_darcy_dof_indices (darcy_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_saturation_dof_indices (saturation_fe.dofs_per_cell);
typename DoFHandler<dim>::active_cell_iterator
joint_cell = joint_dof_handler.begin_active(),
J_dof = 2
};
- std::vector<unsigned int> dofs_per_block;
- std::vector<unsigned int> element_indices_u;
- std::vector<unsigned int> element_indices_p;
- std::vector<unsigned int> element_indices_J;
+ std::vector<types::global_dof_index> dofs_per_block;
+ std::vector<types::global_dof_index> element_indices_u;
+ std::vector<types::global_dof_index> element_indices_p;
+ std::vector<types::global_dof_index> element_indices_J;
// Rules for Gauss-quadrature on both the cell and faces. The number of
// quadrature points on both cells and faces is recorded.
struct Solid<dim>::PerTaskData_K
{
FullMatrix<double> cell_matrix;
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
PerTaskData_K(const unsigned int dofs_per_cell)
:
struct Solid<dim>::PerTaskData_RHS
{
Vector<double> cell_rhs;
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
PerTaskData_RHS(const unsigned int dofs_per_cell)
:
struct Solid<dim>::PerTaskData_SC
{
FullMatrix<double> cell_matrix;
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
FullMatrix<double> k_orig;
FullMatrix<double> k_pu;
// Setup the sparsity pattern and tangent matrix
tangent_matrix.clear();
{
- const unsigned int n_dofs_u = dofs_per_block[u_dof];
- const unsigned int n_dofs_p = dofs_per_block[p_dof];
- const unsigned int n_dofs_J = dofs_per_block[J_dof];
+ const types::global_dof_index n_dofs_u = dofs_per_block[u_dof];
+ const types::global_dof_index n_dofs_p = dofs_per_block[p_dof];
+ const types::global_dof_index n_dofs_J = dofs_per_block[J_dof];
BlockCompressedSimpleSparsityPattern csp(n_blocks, n_blocks);
FullMatrix<double> cell_matrix;
Vector<double> cell_rhs;
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
const Coefficient<dim> coefficient;
std::vector<double> coefficient_values (n_q_points);
}
- 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>(2),