count_dofs_per_component (const DH &dof_handler,
std::vector<types::global_dof_index> &dofs_per_component,
const bool vector_valued_once = false,
- std::vector<types::global_dof_index> target_component
- = std::vector<types::global_dof_index>());
+ std::vector<unsigned int> target_component
+ = std::vector<unsigned int>());
/**
* Count the degrees of freedom
void
count_dofs_per_component (const DoFHandler<dim,spacedim> &dof_handler,
std::vector<types::global_dof_index> &dofs_per_component,
- std::vector<types::global_dof_index> target_component) DEAL_II_DEPRECATED;
+ std::vector<unsigned int> target_component) DEAL_II_DEPRECATED;
/**
* This function can be used when
// loop over all local dofs. ind_local holds local number on cell, index
// iterates over the elements of index_local_to_global and dof_indices
// points to the global indices stored in index_local_to_global
- const unsigned int *dof_indices = dof_info.begin_indices_plain(cell);
+ const types::global_dof_index *dof_indices = dof_info.begin_indices_plain(cell);
// scalar case (or case when all components have the same degrees of freedom
// and sit on a different vector each)
void
resolve_components (const FiniteElement<dim,spacedim> &fe,
const std::vector<unsigned char> &dofs_by_component,
- const std::vector<types::global_dof_index> &target_component,
+ const std::vector<unsigned int> &target_component,
const bool only_once,
std::vector<types::global_dof_index> &dofs_per_component,
unsigned int &component)
void
resolve_components (const hp::FECollection<dim,spacedim> &fe_collection,
const std::vector<unsigned char> &dofs_by_component,
- const std::vector<types::global_dof_index> &target_component,
+ const std::vector<unsigned int> &target_component,
const bool only_once,
std::vector<types::global_dof_index> &dofs_per_component,
unsigned int &component)
const DH &dof_handler,
std::vector<types::global_dof_index> &dofs_per_component,
bool only_once,
- std::vector<types::global_dof_index> target_component)
+ std::vector<unsigned int> target_component)
{
const unsigned int n_components = dof_handler.get_fe().n_components();
void
count_dofs_per_component (const DoFHandler<dim,spacedim> &dof_handler,
std::vector<types::global_dof_index> &dofs_per_component,
- std::vector<types::global_dof_index> target_component)
+ std::vector<unsigned int> target_component)
{
count_dofs_per_component (dof_handler, dofs_per_component,
false, target_component);
void
DoFTools::count_dofs_per_component<DoFHandler<deal_II_dimension> > (
const DoFHandler<deal_II_dimension>&,
- std::vector<types::global_dof_index>&, bool, std::vector<types::global_dof_index>);
+ std::vector<types::global_dof_index>&, bool, std::vector<unsigned int>);
template
void
DoFTools::count_dofs_per_component<hp::DoFHandler<deal_II_dimension> > (
const hp::DoFHandler<deal_II_dimension>&,
- std::vector<types::global_dof_index>&, bool, std::vector<types::global_dof_index>);
+ std::vector<types::global_dof_index>&, bool, std::vector<unsigned int>);
#if deal_II_dimension < 3
void
DoFTools::count_dofs_per_component<DoFHandler<deal_II_dimension, deal_II_dimension+1> > (
const DoFHandler<deal_II_dimension, deal_II_dimension+1>&,
- std::vector<types::global_dof_index>&, bool, std::vector<types::global_dof_index>);
+ std::vector<types::global_dof_index>&, bool, std::vector<unsigned int>);
template
void
DoFTools::count_dofs_per_component<hp::DoFHandler<deal_II_dimension, deal_II_dimension+1> > (
const hp::DoFHandler<deal_II_dimension, deal_II_dimension+1>&,
- std::vector<types::global_dof_index>&, bool, std::vector<types::global_dof_index>);
+ std::vector<types::global_dof_index>&, bool, std::vector<unsigned int>);
template
void
void
DoFTools::count_dofs_per_component<DoFHandler<1,3> > (
const DoFHandler<1,3>&,
- std::vector<types::global_dof_index>&, bool, std::vector<types::global_dof_index>);
+ std::vector<types::global_dof_index>&, bool, std::vector<unsigned int>);
template
void
DoFTools::count_dofs_per_component<hp::DoFHandler<1,3> > (
const hp::DoFHandler<1,3>&,
- std::vector<types::global_dof_index>&, bool, std::vector<types::global_dof_index>);
+ std::vector<types::global_dof_index>&, bool, std::vector<unsigned int>);
template
void
void
DoFTools::count_dofs_per_component<deal_II_dimension> (
const DoFHandler<deal_II_dimension>&,
- std::vector<types::global_dof_index>&, std::vector<types::global_dof_index>);
+ std::vector<types::global_dof_index>&, std::vector<unsigned int>);
template
void
count_dofs_per_component (const DoFHandler<dim,spacedim> &dof_handler,
std::vector<std::vector<types::global_dof_index> > &result,
bool only_once,
- std::vector<types::global_dof_index> target_component)
+ std::vector<unsigned int> target_component)
{
const FiniteElement<dim> &fe = dof_handler.get_fe();
const unsigned int n_components = fe.n_components();
void
count_dofs_per_component (const DoFHandler<dim,spacedim> &dof_handler,
std::vector<std::vector<types::global_dof_index> > &result,
- std::vector<types::global_dof_index> target_component)
+ std::vector<unsigned int> target_component)
{
count_dofs_per_component (dof_handler, result,
false, target_component);
template void count_dofs_per_component (
const DoFHandler<deal_II_dimension>&, std::vector<std::vector<types::global_dof_index> >&,
- bool, std::vector<types::global_dof_index>);
+ bool, std::vector<unsigned int>);
template void count_dofs_per_component (
const DoFHandler<deal_II_dimension>&, std::vector<std::vector<types::global_dof_index> >&,
- std::vector<types::global_dof_index>);
+ std::vector<unsigned int>);
template void count_dofs_per_block (
const DoFHandler<deal_II_dimension>&, std::vector<std::vector<types::global_dof_index> >&,
std::vector<unsigned int>);
for (unsigned int i=0; i<9*is1.size()/10; ++i)
is1.add_index (rand() % is1.size());
- std::vector<unsigned int> indices;
+ std::vector<types::global_dof_index> indices;
is1.fill_index_vector (indices);
deallog << "Original index set: " << std::endl;
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> 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,
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,
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> fe_values (fe, quadrature_formula,
update_values | update_gradients |
deallog << " DoF " << i << std::endl;
};
- std::vector<unsigned int> dofs_per_component (fe.n_components(), 0U);
+ std::vector<types::global_dof_index> dofs_per_component (fe.n_components(),
+ static_cast<types::global_dof_index>(0));
DoFTools::count_dofs_per_component (dof_handler, dofs_per_component);
deallog << "DoFs per component: ";
for (unsigned int i=0; i<fe.n_components(); ++i)
// correctly implemented by now
- std::map<unsigned int,double> dirichlet_dofs;
+ std::map<types::global_dof_index,double> dirichlet_dofs;
// we declare a vector of bools,
// which tells the
void ImposeBC<dim>::get_ready ()
{
dof_handler.distribute_dofs (fe);
- std::vector<unsigned int> dofs_per_comp (fe.n_components());
+ std::vector<types::global_dof_index> dofs_per_comp (fe.n_components());
DoFTools::count_dofs_per_component(dof_handler, dofs_per_comp);
// For an FESystem with Nedelec-elements as
void ImposeBC<dim>::test_extract_boundary_DoFs ()
{
- std::map<unsigned int, double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
std::vector<bool> bc_component_select(dim + 1);
// extract boundary DoFs for the Nedelec-component
void ImposeBC<dim>::test_interpolate_BC ()
{
- std::map<unsigned int, double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
std::vector<bool> bc_component_select(dim + 1, false);
// (1) writing them into the matrix and
// applying boundary values later on, or
// (2) applying them right away
- std::map<unsigned int, double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
ConstantFunction<dim>(1.),
boundary_values);
- std::vector<unsigned int> local_dofs (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dofs (fe.dofs_per_cell);
FullMatrix<double> local_matrix (fe.dofs_per_cell, fe.dofs_per_cell);
Vector<double> local_vector (fe.dofs_per_cell);
for (typename DoFHandler<dim>::active_cell_iterator
// (1) writing them into the matrix and
// applying boundary values later on, or
// (2) applying them right away
- std::map<unsigned int, double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
ConstantFunction<dim>(1.),
boundary_values);
- std::vector<unsigned int> local_dofs (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dofs (fe.dofs_per_cell);
FullMatrix<double> local_matrix (fe.dofs_per_cell, fe.dofs_per_cell);
Vector<double> local_vector (fe.dofs_per_cell);
for (typename DoFHandler<dim>::active_cell_iterator
// (1) writing them into the matrix and
// applying boundary values later on, or
// (2) applying them right away
- std::map<unsigned int, double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
boundary_values[N/2] = 42;
// then fill the matrices
- std::vector<unsigned int> local_dofs (N);
+ std::vector<types::global_dof_index> local_dofs (N);
FullMatrix<double> local_matrix (N,N);
Vector<double> local_vector (N);
{
// (1) writing them into the matrix and
// applying boundary values later on, or
// (2) applying them right away
- std::map<unsigned int, double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
boundary_values[N/2] = 42;
// then fill the matrices
- std::vector<unsigned int> local_dofs (N);
+ std::vector<types::global_dof_index> local_dofs (N);
FullMatrix<double> local_matrix (N,N);
Vector<double> local_vector (N);
{
for (unsigned int i=0; i<N; ++i)
- local_dofs[i] = i;
+ local_dofs[i] = i;
local_matrix = 0;
for (unsigned int i=0; i<N; ++i)
// from the system of equations
// happens *after* the elimination
// of hanging nodes.
- 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>(),
// initialize object denoting zero
// boundary values and boundary
// constraints
- std::map<unsigned int, double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
ConstantFunction<dim>(1.),
// initialize object denoting zero
// boundary values and boundary
// constraints
- std::map<unsigned int, double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
1,
ConstantFunction<dim>(1.),
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,
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,
hanging_node_constraints.condense (matrix);
hanging_node_constraints.condense (residual);
- 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);
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();
}
- 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>(),
}
- 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>(),
}
}
- 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>(),
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>(),
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>(),
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>(dim),
{
case 2:
{
- const unsigned int n_dofs = dof_handler.n_dofs();
- const unsigned int block_size[2] = { n_dofs/3, n_dofs - n_dofs/3 };
+ const types::global_dof_index n_dofs = dof_handler.n_dofs();
+ const types::global_dof_index block_size[2] = { n_dofs/3, n_dofs - n_dofs/3 };
for (unsigned int i=0; i<2; ++i)
for (unsigned int j=0; j<2; ++j)
case 3:
{
- const unsigned int n_dofs = dof_handler.n_dofs();
- const unsigned int block_size[3] = { n_dofs/5, n_dofs/7, n_dofs - n_dofs/5 - n_dofs/7 };
+ const types::global_dof_index n_dofs = dof_handler.n_dofs();
+ const types::global_dof_index block_size[3] = { n_dofs/5, n_dofs/7, n_dofs - n_dofs/5 - n_dofs/7 };
for (unsigned int i=0; i<3; ++i)
for (unsigned int j=0; j<3; ++j)
{
case 2:
{
- const unsigned int n_dofs = dof_handler.n_dofs();
- const unsigned int block_size_[2] = { n_dofs/3, n_dofs - n_dofs/3 };
- const std::vector<unsigned int> block_size (&block_size_[0],
+ const types::global_dof_index n_dofs = dof_handler.n_dofs();
+ const types::global_dof_index block_size_[2] = { n_dofs/3, n_dofs - n_dofs/3 };
+ const std::vector<types::global_dof_index> block_size (&block_size_[0],
&block_size_[2]);
solution.reinit (block_size);
case 3:
{
- const unsigned int n_dofs = dof_handler.n_dofs();
- const unsigned int block_size_[3] = { n_dofs/5, n_dofs/7, n_dofs - n_dofs/5 - n_dofs/7 };
- const std::vector<unsigned int> block_size (&block_size_[0],
+ const types::global_dof_index n_dofs = dof_handler.n_dofs();
+ const types::global_dof_index block_size_[3] = { n_dofs/5, n_dofs/7, n_dofs - n_dofs/5 - n_dofs/7 };
+ const std::vector<types::global_dof_index> block_size (&block_size_[0],
&block_size_[3]);
solution.reinit (block_size);
};
- 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 write_map (const std::map<unsigned int,double> &bv)
+void write_map (const std::map<types::global_dof_index,double> &bv)
{
- for (std::map<unsigned int,double>::const_iterator
+ for (std::map<types::global_dof_index,double>::const_iterator
i=bv.begin(); i!=bv.end(); ++i)
deallog << i->first << ' ' << i->second <<std::endl;
}
// interpolate boundary values
deallog << "Interpolated boundary values" << std::endl;
- std::map<unsigned int,double> interpolated_bv;
+ std::map<types::global_dof_index,double> interpolated_bv;
VectorTools::interpolate_boundary_values (mapping, dof, function_map,
interpolated_bv, std::vector<bool>());
write_map (interpolated_bv);
if (dim != 3)
{
deallog << "Projected boundary values" << std::endl;
- std::map<unsigned int,double> projected_bv;
+ std::map<types::global_dof_index,double> projected_bv;
VectorTools::project_boundary_values (mapping, dof, function_map,
boundary_q(dof), projected_bv);
write_map (projected_bv);
block_component[comp] = 2;
}//comp
- std::vector<unsigned int> dofs_per_block(3,0);//3 blocks, count dofs:
+ std::vector<types::global_dof_index> dofs_per_block(3,0);//3 blocks, count dofs:
DoFTools::count_dofs_per_component (dh, dofs_per_block, false, block_component);
DoFRenumbering::component_wise(dh, block_component);
const unsigned int dofs_per_fl_msh_face = fluid_fe->dofs_per_face;
const unsigned int dofs_per_solid_face = solid_fe->dofs_per_face;
- std::vector<unsigned int> fl_msh_face_dof_indices (dofs_per_fl_msh_face);
- std::vector<unsigned int> solid_face_dof_indices (dofs_per_solid_face );
+ std::vector<types::global_dof_index> fl_msh_face_dof_indices (dofs_per_fl_msh_face);
+ std::vector<types::global_dof_index> solid_face_dof_indices (dofs_per_solid_face );
std::vector<std::pair<unsigned int, unsigned int> > solid_fluid_pairs;
std::vector<std::pair<unsigned int, unsigned int> > solid_mesh_pairs;
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);
for (hp::DoFHandler<dim>::active_cell_iterator
cell = dh.begin_active();
library_constraints.merge (correct_constraints);
{
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof,
0,
ConstantFunction<dim>(1.),
boundary_values);
- 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)
{
{
Assert (correct_constraints.is_constrained(i) ==
library_constraints.is_constrained(i), ExcInternalError());
- typedef const std::vector<std::pair<unsigned int, double> >& constraint_format;
+ typedef const std::vector<std::pair<types::global_dof_index, double> >& constraint_format;
if (correct_constraints.is_constrained(i))
{
constraint_format correct = *correct_constraints.get_constraint_entries(i);
FullMatrix<double> full (dof.n_dofs(), dof.n_dofs());
FullMatrix<double> local_mat (fe.dofs_per_cell, fe.dofs_per_cell);
- std::vector<unsigned int> local_dof_indices (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (fe.dofs_per_cell);
// loop over cells, fill local matrix with
// random values, insert both into sparse and
ChunkSparseMatrix<double> chunk_sparse (chunk_sparsity);
FullMatrix<double> local_mat (fe.dofs_per_cell, fe.dofs_per_cell);
- std::vector<unsigned int> local_dof_indices (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (fe.dofs_per_cell);
// loop over cells, fill local matrix with
// random values, insert both into sparse and
.get_function_divergences (fe_function, divergences);
// now do the same "by hand"
- std::vector<unsigned int> local_dof_indices (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (fe.dofs_per_cell);
dof.begin_active()->get_dof_indices (local_dof_indices);
for (unsigned int q=0; q<quadrature.size(); ++q)
.get_function_divergences (fe_function, divergences);
// now do the same "by hand"
- std::vector<unsigned int> local_dof_indices (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (fe.dofs_per_cell);
dof.begin_active()->get_dof_indices (local_dof_indices);
for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
.get_function_divergences (fe_function, divergences);
// now do the same "by hand"
- std::vector<unsigned int> local_dof_indices (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (fe.dofs_per_cell);
dof.begin_active()->get_dof_indices (local_dof_indices);
for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
// function.
{
test_all_constraints.merge (hanging_nodes_only);
- 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>(),
}
hanging_nodes_only.condense (reference_matrix, reference_rhs);
- 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>(),
rhs (local_dofs2[i]) += local_vec (i);
}
- std::map<unsigned int, double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
boundary_values.insert (std::pair<unsigned int,double>(1, -5.0));
boundary_values.insert (std::pair<unsigned int,double>(3, 2.0));
boundary_values.insert (std::pair<unsigned int,double>(4, 0.0));
// add boundary conditions as
// inhomogeneous constraints here.
{
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
ConstantFunction<dim>(1.,2),
// use some other rhs vector as dummy for
// application of Dirichlet conditions
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
ConstantFunction<dim>(1.,2),
// take the right hand side function as
// boundary function
{
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
RightHandSide<dim>(),
// use some other rhs vector as dummy for
// application of Dirichlet conditions
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
RightHandSide<dim>(),
dof_handler.distribute_dofs (fe);
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
10,
Functions::SquareFunction<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 Coefficient<dim> coefficient;
std::vector<double> coefficient_values (n_q_points);
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>(),
Quadrature<dim> quadrature_formula(finite_element.get_unit_support_points ());
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);
typename DoFHandler<dim>::active_cell_iterator cell, endc;
Quadrature<dim> quadrature_formula(finite_element.get_unit_support_points ());
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);
typename DoFHandler<dim>::active_cell_iterator cell, endc;
triangulation.execute_coarsening_and_refinement ();
dof_handler.distribute_dofs (fe);
- std::vector<unsigned int> dofs_per_block (fe.n_components());
+ std::vector<types::global_dof_index> dofs_per_block (fe.n_components());
DoFTools::count_dofs_per_block (dof_handler, dofs_per_block);
Assert (std::accumulate (dofs_per_block.begin(), dofs_per_block.end(), 0U)
hanging_node_constraints.condense (system_matrix);
hanging_node_constraints.condense (system_rhs);
condense.stop();
- 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>(),
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,
hanging_node_constraints.condense (matrix);
hanging_node_constraints.condense (residual);
- 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>(),
std::vector<Vector<double> > coefficient_vector_values (n_q_points,
Vector<double> (n_components));
- std::vector<unsigned int> dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices (dofs_per_cell);
std::vector<Vector<double> > rhs_values(n_q_points, Vector<double>(n_components));
const FiniteElement<dim> &fe = dof.get_fe();
// 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
// one line or one vertex
typename DoFHandler<dim>::active_cell_iterator cell = dof.begin_active(),
endc = dof.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->face(f)->at_boundary())
std::vector<Vector<double> > coefficient_vector_values (n_q_points,
Vector<double> (n_components));
- std::vector<unsigned int> dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices (dofs_per_cell);
std::vector<Vector<double> > rhs_values(n_q_points, Vector<double>(n_components));
// between two faces.
std::vector<double> sign_change (dofs_per_cell, 1.0);
const unsigned int dofs_per_face = fe.dofs_per_face;
- std::vector<unsigned int> face_dof_indices (dofs_per_face);
+ std::vector<types::global_dof_index> face_dof_indices (dofs_per_face);
for (unsigned int f = 0; f < 2; ++f)
{
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>::active_cell_iterator cell = dof_handler.begin_active(),
const FiniteElement<dim> &fe = dof.get_fe();
// 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
// one line or one vertex
typename DoFHandler<dim>::active_cell_iterator cell = dof.begin_active(),
endc = dof.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->face(f)->at_boundary())
// Create set of all DoFs, which are on the boundary.
DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active(),
endc = dof_handler.end();
- std::vector<unsigned int> face_dof_indices (dof_handler.get_fe().dofs_per_face);
+ std::vector<types::global_dof_index> face_dof_indices (dof_handler.get_fe().dofs_per_face);
for (; cell!=endc; ++cell)
for (unsigned int f=0; f<GeometryInfo<2>::faces_per_cell; ++f)
{
typename DoFHandler<dim>::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);
cell->get_dof_indices(local_dof_indices);
unsigned int first_disc_dof=local_dof_indices[dofs_per_cell-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,
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)
{
fe_v.reinit(cell);
}
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
exact_solution,
}
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
exact_solution,
-void print (const std::vector<unsigned int> &v)
+void print (const std::vector<types::global_dof_index> &v)
{
deallog << v.size();
for (unsigned int i=0; i<v.size(); ++i)
// no grouping
{
- std::vector<unsigned int> dpc(dim+1);
+ std::vector<types::global_dof_index> dpc(dim+1);
DoFTools::count_dofs_per_component (dof_handler, dpc);
print (dpc);
}
{
- std::vector<unsigned int> dpc(dim+1);
+ std::vector<types::global_dof_index> dpc(dim+1);
DoFTools::count_dofs_per_block (dof_handler, dpc);
print (dpc);
}
{
std::vector<unsigned int> group(dim+1, 0);
group[dim] = 1;
- std::vector<unsigned int> dpc(2);
+ std::vector<types::global_dof_index> dpc(2);
DoFTools::count_dofs_per_component (dof_handler, dpc, false, group);
Assert (dpc.size() == 2, ExcInternalError());
print (dpc);
{
std::vector<unsigned int> group(dim+1, 0);
group[dim] = 1;
- std::vector<unsigned int> dpc(2);
+ std::vector<types::global_dof_index> dpc(2);
DoFTools::count_dofs_per_block (dof_handler, dpc, group);
Assert (dpc.size() == 2, ExcInternalError());
print (dpc);
{
std::vector<unsigned int> group(dim+1, 2*dim);
group[dim] = 0;
- std::vector<unsigned int> dpc(2*dim+1);
+ std::vector<types::global_dof_index> dpc(2*dim+1);
DoFTools::count_dofs_per_component (dof_handler, dpc, false, group);
Assert (dpc.size() == 2*dim+1, ExcInternalError());
print (dpc);
{
std::vector<unsigned int> group(dim+1, 2*dim);
group[dim] = 0;
- std::vector<unsigned int> dpc(2*dim+1);
+ std::vector<types::global_dof_index> dpc(2*dim+1);
DoFTools::count_dofs_per_block (dof_handler, dpc, group);
Assert (dpc.size() == 2*dim+1, ExcInternalError());
print (dpc);
-void print (const std::vector<unsigned int> &v)
+void print (const std::vector<types::global_dof_index> &v)
{
deallog << v.size();
for (unsigned int i=0; i<v.size(); ++i)
// no grouping
{
- std::vector<unsigned int> dpc(dim+1);
+ std::vector<types::global_dof_index> dpc(dim+1);
DoFTools::count_dofs_per_component (dof_handler, dpc);
print (dpc);
}
{
- std::vector<unsigned int> dpc(dim+1);
+ std::vector<types::global_dof_index> dpc(dim+1);
DoFTools::count_dofs_per_block (dof_handler, dpc);
print (dpc);
}
{
std::vector<unsigned int> group(dim+1, 0);
group[dim] = 1;
- std::vector<unsigned int> dpc(2);
+ std::vector<types::global_dof_index> dpc(2);
DoFTools::count_dofs_per_component (dof_handler, dpc, false, group);
Assert (dpc.size() == 2, ExcInternalError());
print (dpc);
{
std::vector<unsigned int> group(dim+1, 0);
group[dim] = 1;
- std::vector<unsigned int> dpc(2);
+ std::vector<types::global_dof_index> dpc(2);
DoFTools::count_dofs_per_block (dof_handler, dpc, group);
Assert (dpc.size() == 2, ExcInternalError());
print (dpc);
{
std::vector<unsigned int> group(dim+1, 2*dim);
group[dim] = 0;
- std::vector<unsigned int> dpc(2*dim+1);
+ std::vector<types::global_dof_index> dpc(2*dim+1);
DoFTools::count_dofs_per_component (dof_handler, dpc, false, group);
Assert (dpc.size() == 2*dim+1, ExcInternalError());
print (dpc);
{
std::vector<unsigned int> group(dim+1, 2*dim);
group[dim] = 0;
- std::vector<unsigned int> dpc(2*dim+1);
+ std::vector<types::global_dof_index> dpc(2*dim+1);
DoFTools::count_dofs_per_block (dof_handler, dpc, group);
Assert (dpc.size() == 2*dim+1, ExcInternalError());
print (dpc);
deallog << " active_fe_index=" << cell->active_fe_index() << std::endl;
deallog << " dofs=";
- std::vector<unsigned int> local_dofs (fe[cell->active_fe_index()].dofs_per_cell);
+ std::vector<types::global_dof_index> local_dofs (fe[cell->active_fe_index()].dofs_per_cell);
cell->get_dof_indices (local_dofs);
for (unsigned int i=0; i<fe[cell->active_fe_index()].dofs_per_cell; ++i)
deallog << local_dofs[i] << ' ';
for (unsigned int i=0; i<3; ++i)
{
deallog << "DoF indices for fe_index=" << i << ": ";
- std::vector<unsigned int> line_dofs (fe[i].dofs_per_line + 2*fe[i].dofs_per_vertex);
+ std::vector<types::global_dof_index> line_dofs (fe[i].dofs_per_line + 2*fe[i].dofs_per_vertex);
cell->line(l)->get_dof_indices (line_dofs, i);
for (unsigned int j=0; j<fe[i].dofs_per_line + 2*fe[i].dofs_per_vertex; ++j)
deallog << line_dofs[j] << ' ';
deallog << "cell=" << cell << ", face=" << f
<< ", fe_index=" << cell->active_fe_index()
<< ", dofs=";
- std::vector<unsigned int> dofs (fe[cell->active_fe_index()].dofs_per_face);
+ std::vector<types::global_dof_index> dofs (fe[cell->active_fe_index()].dofs_per_face);
cell->face(f)->get_dof_indices (dofs,
cell->active_fe_index());
for (unsigned int i=0; i<dofs.size(); ++i)
for (unsigned int i=0; i<4; ++i)
{
deallog << "DoF indices for fe_index=" << i << ": ";
- std::vector<unsigned int> line_dofs (fe[i].dofs_per_line + 2*fe[i].dofs_per_vertex);
+ std::vector<types::global_dof_index> line_dofs (fe[i].dofs_per_line + 2*fe[i].dofs_per_vertex);
cell->line(l)->get_dof_indices (line_dofs, i);
for (unsigned int j=0; j<fe[i].dofs_per_line + 2*fe[i].dofs_per_vertex; ++j)
deallog << line_dofs[j] << ' ';
dof_handler.distribute_dofs(fe_collection);
- std::vector<unsigned int> face_dof_indices;
- std::vector<unsigned int> neighbor_face_dof_indices;
+ std::vector<types::global_dof_index> face_dof_indices;
+ std::vector<types::global_dof_index> neighbor_face_dof_indices;
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> line_dof_indices_1 (fe_collection[0].dofs_per_line +
+ std::vector<types::global_dof_index> line_dof_indices_1 (fe_collection[0].dofs_per_line +
2 * fe_collection[0].dofs_per_vertex);
- std::vector<unsigned int> line_dof_indices_2 (fe_collection[0].dofs_per_line +
+ std::vector<types::global_dof_index> line_dof_indices_2 (fe_collection[0].dofs_per_line +
2 * fe_collection[0].dofs_per_vertex);
for (typename hp::DoFHandler<dim>::active_cell_iterator
hanging_node_constraints.condense (system_matrix);
hanging_node_constraints.condense (system_rhs);
condense.stop();
- 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>(),
hanging_node_constraints.condense (system_matrix);
hanging_node_constraints.condense (system_rhs);
condense.stop();
- 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>(),
hanging_node_constraints.condense (system_matrix);
hanging_node_constraints.condense (system_rhs);
condense.stop();
- 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>(),
hanging_node_constraints.condense (system_matrix);
hanging_node_constraints.condense (system_rhs);
condense.stop();
- 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>(),
<< std::endl;
ExactSolution<dim> exact_solution;
- std::map<unsigned int,double> boundary_values;
+ std::map<types::global_dof_index,double> boundary_values;
VectorTools::interpolate_boundary_values (dof_handler,
0,
exact_solution,
{
deallog << cell << ' ' << cell->active_fe_index() << std::endl
<< " ";
- std::vector<unsigned int> local_dof_indices (cell->get_fe().dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (cell->get_fe().dofs_per_cell);
cell->get_dof_indices (local_dof_indices);
for (unsigned int i=0; i<cell->get_fe().dofs_per_cell; ++i)
{
deallog << cell << ' ' << cell->active_fe_index() << std::endl
<< " ";
- std::vector<unsigned int> local_dof_indices (cell->get_fe().dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (cell->get_fe().dofs_per_cell);
cell->get_dof_indices (local_dof_indices);
for (unsigned int i=0; i<cell->get_fe().dofs_per_cell; ++i)
{
deallog << cell << ' ' << cell->active_fe_index() << std::endl
<< " ";
- std::vector<unsigned int> local_dof_indices (cell->get_fe().dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (cell->get_fe().dofs_per_cell);
cell->get_dof_indices (local_dof_indices);
for (unsigned int i=0; i<cell->get_fe().dofs_per_cell; ++i)
{
deallog << cell << ' ' << cell->active_fe_index() << std::endl
<< " ";
- std::vector<unsigned int> local_dof_indices (cell->get_fe().dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (cell->get_fe().dofs_per_cell);
cell->get_dof_indices (local_dof_indices);
for (unsigned int i=0; i<cell->get_fe().dofs_per_cell; ++i)
dof.distribute_dofs(fe_collection);
std::vector<bool> touched(dof.n_dofs(), false);
- 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.begin_active();
cell != dof.end(); ++cell)
{
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,
}
- 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>(),
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<2>(),
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<2>(),
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<2>(),
}
- 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>(),
}
}
- 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>(),
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>(),
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>(),
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>(dim),
std::vector<std::vector<Tensor<1,dim> > >
ugrad(dim,std::vector<Tensor<1,dim> >(fev.n_quadrature_points));
- std::vector<unsigned int> indices(nv);
+ std::vector<types::global_dof_index> indices(nv);
for (unsigned int i=0;i<nv;++i)
indices[i] = i;
std::vector<std::vector<double> >
uval (dim,std::vector<double>(fev.n_quadrature_points));
- std::vector<unsigned int> indices(nv);
+ std::vector<types::global_dof_index> indices(nv);
for (unsigned int i=0;i<nv;++i)
indices[i] = i;
std::vector<std::vector<Tensor<1,dim> > >
ugrad(dim,std::vector<Tensor<1,dim> >(fev.n_quadrature_points));
- std::vector<unsigned int> indices(n);
+ std::vector<types::global_dof_index> indices(n);
for (unsigned int i=0;i<n;++i)
indices[i] = i;
std::vector<std::vector<Tensor<1,dim> > >
ugrad (d,std::vector<Tensor<1,dim> >(fev.n_quadrature_points));
- std::vector<unsigned int> indices(n);
+ std::vector<types::global_dof_index> indices(n);
for (unsigned int i=0;i<n;++i)
indices[i] = i;
u1grad(d,std::vector<Tensor<1,dim> >(fev1.n_quadrature_points)),
u2grad(d,std::vector<Tensor<1,dim> >(fev2.n_quadrature_points));
- std::vector<unsigned int> indices1(n1), indices2(n2);
+ std::vector<types::global_dof_index> indices1(n1), indices2(n2);
for (unsigned int i=0;i<n1;++i) indices1[i] = i;
for (unsigned int i=0;i<n2;++i) indices2[i] = i;
std::vector<std::vector<Tensor<1,dim> > >
ugrad(d,std::vector<Tensor<1,dim> >(fev.n_quadrature_points));
- std::vector<unsigned int> indices(n);
+ std::vector<types::global_dof_index> indices(n);
for (unsigned int i=0;i<n;++i)
indices[i] = i;
std::vector<std::vector<Tensor<1,dim> > >
ugrad (d,std::vector<Tensor<1,dim> >(fev.n_quadrature_points));
- std::vector<unsigned int> indices(n);
+ std::vector<types::global_dof_index> indices(n);
for (unsigned int i=0;i<n;++i)
indices[i] = i;
u1grad(d,std::vector<Tensor<1,dim> >(fev1.n_quadrature_points)),
u2grad(d,std::vector<Tensor<1,dim> >(fev2.n_quadrature_points));
- std::vector<unsigned int> indices1(n1), indices2(n2);
+ std::vector<types::global_dof_index> indices1(n1), indices2(n2);
for (unsigned int i=0;i<n1;++i) indices1[i] = i;
for (unsigned int i=0;i<n2;++i) indices2[i] = i;
bi1.push_back(4);
test(bi1);
- std::vector<unsigned int> v(4);
+ std::vector<types::global_dof_index> v(4);
for (unsigned int i=0;i<v.size();++i)
v[i] = 4-i;
// and see what we can get after
// vmults:
BlockVector<double> src;
- std::vector<unsigned int> src_sizes (2);
+ std::vector<types::global_dof_index> src_sizes (2);
src_sizes[0] = 10;
src_sizes[1] = 19;
src.reinit (src_sizes);
BlockVector<double> dst;
- std::vector<unsigned int> dst_sizes (3);
+ std::vector<types::global_dof_index> dst_sizes (3);
dst_sizes[0] = 2;
dst_sizes[1] = 7;
dst_sizes[2] = 10;
deallog.threshold_double(1.e-10);
BlockSparsityPattern sparsity;
- std::vector<unsigned int> row_blocks(4);
+ std::vector<types::global_dof_index> row_blocks(4);
row_blocks[0] = 4;
row_blocks[1] = 5;
row_blocks[2] = 1;
row_blocks[3] = 4;
- std::vector<unsigned int> col_blocks(3);
+ std::vector<types::global_dof_index> col_blocks(3);
col_blocks[0] = 2;
col_blocks[1] = 3;
col_blocks[2] = 2;
BlockIndices rows(row_blocks);
BlockIndices cols(col_blocks);
- std::vector<std::vector<unsigned int> >
+ std::vector<std::vector<types::global_dof_index> >
row_length(cols.size(),
- std::vector<unsigned int>(rows.total_size()));
+ std::vector<types::global_dof_index>(rows.total_size()));
for (unsigned int jb=0;jb<row_length.size();++jb)
for (unsigned int i=0;i<row_length[jb].size();++i)
{
deallog.depth_console(0);
deallog.threshold_double(1.e-10);
- std::vector<unsigned int> row_blocks(4);
+ std::vector<types::global_dof_index> row_blocks(4);
row_blocks[0] = 4;
row_blocks[1] = 5;
row_blocks[2] = 1;
row_blocks[3] = 4;
- std::vector<unsigned int> col_blocks(3);
+ std::vector<types::global_dof_index> col_blocks(3);
col_blocks[0] = 2;
col_blocks[1] = 3;
col_blocks[2] = 2;
{
deallog.push("BlockIndices");
- std::vector<unsigned int> ivector(4);
+ std::vector<types::global_dof_index> ivector(4);
ivector[0] = 3;
ivector[1] = 0;
ivector[2] = 1;
ivector[3] = 2;
- const std::vector<unsigned int> vector_indices(ivector);
+ const std::vector<types::global_dof_index> vector_indices(ivector);
BlockIndices i1(ivector);
BlockIndices i2 = i1;
for (unsigned int i = 0; i < v.size(); ++i)
v[i] = double(i+1);
- std::vector<unsigned int> partition(3);
+ std::vector<types::global_dof_index> partition(3);
for (unsigned int i = 0; i < partition.size(); ++i)
partition[i] = 3;
void test ()
{
- std::vector<unsigned int> ivector(4);
+ std::vector<types::global_dof_index> ivector(4);
ivector[0] = 2;
ivector[1] = 4;
ivector[2] = 3;
void test ()
{
- std::vector<unsigned int> ivector(4);
+ std::vector<types::global_dof_index> ivector(4);
ivector[0] = 2;
ivector[1] = 4;
ivector[2] = 3;
{
deallog.push("BlockIndices");
- std::vector<unsigned int> ivector(4);
+ std::vector<types::global_dof_index> ivector(4);
ivector[0] = 3;
ivector[1] = 0;
ivector[2] = 1;
ivector[3] = 2;
- const std::vector<unsigned int> vector_indices(ivector);
+ const std::vector<types::global_dof_index> vector_indices(ivector);
BlockIndices i1(ivector);
BlockIndices i2 = i1;
void test ()
{
- std::vector<unsigned int> ivector(4);
+ std::vector<types::global_dof_index> ivector(4);
ivector[0] = 2;
ivector[1] = 4;
ivector[2] = 3;
void test ()
{
- std::vector<unsigned int> ivector(4);
+ std::vector<types::global_dof_index> ivector(4);
ivector[0] = 2;
ivector[1] = 4;
ivector[2] = 3;
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.begin_active(),
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);
const FEValuesExtractors::Vector sc (0);
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);
const FEValuesExtractors::Vector sc (0);
update_values | update_gradients |
update_JxW_values);
FullMatrix<double> cell_matrix;
- 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.begin_active(),
const unsigned int n_quadrature_points = quad.size();
const unsigned int dofs_per_cell = fe.dofs_per_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);
typename DoFHandler<dim>::active_cell_iterator
cell = dof.begin_active(),
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);
const FEValuesExtractors::Vector velocities (0);
const FEValuesExtractors::Scalar pressure (dim);
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);
const FEValuesExtractors::Vector velocities (0);
const FEValuesExtractors::Scalar pressure (dim);
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);
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.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.begin_active(),
vector.reinit (dofh.locally_owned_dofs(), MPI_COMM_WORLD);
{
const unsigned int dofs_per_cell = 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);
Vector<double> local_vector (dofs_per_cell);
for (unsigned int i=0; i<dofs_per_cell; ++i)
local_vector(i) = 1.;
vector.reinit (dofh.locally_owned_dofs(), MPI_COMM_WORLD);
{
const unsigned int dofs_per_cell = 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);
Vector<double> local_vector (dofs_per_cell);
for (unsigned int i=0; i<dofs_per_cell; ++i)
local_vector(i) = 1.;
vector.reinit (dofh.locally_owned_dofs(), MPI_COMM_WORLD);
{
const unsigned int dofs_per_cell = 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);
Vector<double> local_vector (dofs_per_cell);
for (unsigned int i=0; i<dofs_per_cell; ++i)
local_vector(i) = 1.;
FEValues<dim> fe_values (fe, quadrature_formula, update_quadrature_points |
update_JxW_values | update_values);
const unsigned int dofs_per_cell = 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);
Vector<double> local_vector (dofs_per_cell);
const unsigned int n_q_points = quadrature_formula.size();
FEValues<dim> fe_values (fe, quadrature_formula, update_quadrature_points |
update_JxW_values | update_values);
const unsigned int dofs_per_cell = 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);
Vector<double> local_vector (dofs_per_cell);
const unsigned int n_q_points = quadrature_formula.size();
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);
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(),
using namespace std;
-void log_vector (const std::vector<std::set<unsigned int> >& count)
+void log_vector (const std::vector<std::set<types::global_dof_index> >& count)
{
for (unsigned int l=0;l<count.size();++l)
{
deallog << "Level " << l << ':';
- for (std::set<unsigned int>::const_iterator c=count[l].begin();
+ for (std::set<types::global_dof_index>::const_iterator c=count[l].begin();
c != count[l].end();++c)
deallog << ' ' << *c;
deallog << std::endl;
MGDoFHandler<dim> mgdof(tr);
mgdof.distribute_dofs(fe);
- std::vector<std::set<unsigned int> > boundary_indices(tr.n_levels());
+ std::vector<std::set<types::global_dof_index> > boundary_indices(tr.n_levels());
MGTools::make_boundary_list(mgdof, fmap, boundary_indices);
log_vector(boundary_indices);
}
using namespace std;
-void log_vector (const std::vector<std::vector<unsigned int> >& count)
+void log_vector (const std::vector<std::vector<types::global_dof_index> >& count)
{
for (unsigned int l=0;l<count.size();++l)
{
MGDoFHandler<dim> mgdof(tr);
mgdof.distribute_dofs(fe);
- std::vector<std::vector<unsigned int> > count(tr.n_levels());
+ std::vector<std::vector<types::global_dof_index> > count(tr.n_levels());
MGTools::count_dofs_per_component(mgdof, count, false);
log_vector(count);
MGTools::count_dofs_per_component(mgdof, count, true);
typename MGDoFHandler<dim>::cell_iterator cell;
const typename MGDoFHandler<dim>::cell_iterator end = dof.end();
- std::vector<unsigned int> indices;
+ std::vector<types::global_dof_index> indices;
for (cell = dof.begin(); cell != end; ++cell)
{
typename MGDoFHandler<dim>::cell_iterator cell;
const typename MGDoFHandler<dim>::cell_iterator end = dof.end();
- std::vector<unsigned int> indices;
+ std::vector<types::global_dof_index> indices;
for (cell = dof.begin(); cell != end; ++cell)
{
{
unsigned int counter=0;
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
- std::vector<unsigned int> dof_indices(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
for (typename MGDoFHandler<dim>::active_cell_iterator
cell = dof.begin_active();
cell != dof.end(); ++cell)
{
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
const unsigned int dofs_per_face = dof.get_fe().dofs_per_face;
- std::vector<unsigned int> dof_indices(dofs_per_cell);
- std::vector<unsigned int> face_indices(dofs_per_face);
+ std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
+ std::vector<types::global_dof_index> face_indices(dofs_per_face);
for(unsigned int l=0; l<dof.get_tria().n_levels(); ++l)
{
MGLevelObject<Vector<double> > &u)
{
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
- std::vector<unsigned int> dof_indices(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
for(unsigned int l=0; l<dof.get_tria().n_levels(); ++l)
{
deallog << std::endl;
Vector<double> diff;
diff.reinit (u);
const unsigned int dofs_per_cell = dof_1.get_fe().dofs_per_cell;
- std::vector<unsigned int> dof_indices_1(dofs_per_cell);
- std::vector<unsigned int> dof_indices_2(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices_1(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices_2(dofs_per_cell);
for (typename MGDoFHandler<dim>::active_cell_iterator
cell_1 = dof_1.begin_active(), cell_2 = dof_2.begin_active();
cell_1 != dof_1.end(); ++cell_1, ++cell_2)
{
unsigned int counter=0;
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
- std::vector<unsigned int> dof_indices(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
for (typename MGDoFHandler<dim>::active_cell_iterator
cell = dof.begin_active();
cell != dof.end(); ++cell)
Vector<double> diff;
diff.reinit (u);
const unsigned int dofs_per_cell = dof_1.get_fe().dofs_per_cell;
- std::vector<unsigned int> dof_indices_1(dofs_per_cell);
- std::vector<unsigned int> dof_indices_2(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices_1(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices_2(dofs_per_cell);
for (typename MGDoFHandler<dim>::active_cell_iterator
cell_1 = dof_1.begin_active(), cell_2 = dof_2.begin_active();
cell_1 != dof_1.end(); ++cell_1, ++cell_2)
Vector<double> &u)
{
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
- std::vector<unsigned int> dof_indices(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
for (typename MGDoFHandler<dim>::active_cell_iterator
cell = dof.begin_active();
cell != dof.end(); ++cell)
{
unsigned int counter=0;
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
- std::vector<unsigned int> dof_indices(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
typename MGDoFHandler<dim>::cell_iterator
cell = dof.begin(0);
cell->get_mg_dof_indices(dof_indices);
MGDoFHandler<dim> mg_dof_handler_renumbered;
const unsigned int degree;
- std::vector<std::set<unsigned int> >
+ std::vector<std::set<types::global_dof_index> >
boundary_indices_renumbered;
};
u[l].reinit(mg_dof_handler_renumbered.n_dofs(l));
u[l] = 1.;
- for(std::set<unsigned int>::const_iterator i = boundary_indices_renumbered[l].begin();
+ for(std::set<types::global_dof_index>::const_iterator i = boundary_indices_renumbered[l].begin();
i!=boundary_indices_renumbered[l].end(); ++i)
{
u[l](*i) = 0;
Vector<double> &u)
{
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
- std::vector<unsigned int> dof_indices(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
for (typename MGDoFHandler<dim>::active_cell_iterator
cell = dof.begin_active();
cell != dof.end(); ++cell)
{
unsigned int counter=0;
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
- std::vector<unsigned int> dof_indices(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
typename MGDoFHandler<dim>::cell_iterator
cell = dof.begin(0);
cell->get_mg_dof_indices(dof_indices);
{
diff.reinit (v);
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
- std::vector<unsigned int> mg_dof_indices(dofs_per_cell);
+ std::vector<types::global_dof_index> mg_dof_indices(dofs_per_cell);
const unsigned int n_comp = dof.get_fe().n_components();
for (typename MGDoFHandler<dim>::cell_iterator
cell= dof.begin(level);
void print(const MGDoFHandler<dim> &dof, std::vector<std::vector<bool> > &interface_dofs)
{
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
- std::vector<unsigned int> dof_indices(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
for(unsigned int l=0; l<dof.get_tria().n_levels(); ++l)
{
deallog << std::endl;
cell = mgdof.begin(),
endc = mgdof.end();
std::vector<types::global_dof_index> local_dof_indices (fe.dofs_per_cell);
- std::vector<unsigned int> mg_dof_indices (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> mg_dof_indices (fe.dofs_per_cell);
for (; cell!=endc; ++cell)
{
if (!cell->has_children())
mg_dof_handler.distribute_dofs(fe);
for (unsigned int level=0; level<tria.n_levels(); ++level)
{
- const unsigned int n_dofs=mg_dof_handler.n_dofs(level);
- vector<unsigned int> new_numbers(n_dofs);
+ const types::global_dof_index n_dofs=mg_dof_handler.n_dofs(level);
+ vector<types::global_dof_index> new_numbers(n_dofs);
for (unsigned int i=0; i<n_dofs; ++i)
new_numbers[i]=n_dofs-1-i;
{
unsigned int counter=0;
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
- std::vector<unsigned int> dof_indices(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
for (typename MGDoFHandler<dim>::active_cell_iterator
cell = dof.begin_active();
cell != dof.end(); ++cell)
{
unsigned int counter=0;
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
- std::vector<unsigned int> dof_indices(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
typename MGDoFHandler<dim>::cell_iterator
cell = dof.begin(0);
cell->get_mg_dof_indices(dof_indices);
MGLevelObject<Vector<double> > &u)
{
const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
- std::vector<unsigned int> dof_indices(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
for(unsigned int l=0; l<dof.get_tria().n_levels(); ++l)
{
deallog << std::endl;
Vector<double> diff;
diff.reinit (u);
const unsigned int dofs_per_cell = dof_1.get_fe().dofs_per_cell;
- std::vector<unsigned int> dof_indices_1(dofs_per_cell);
- std::vector<unsigned int> dof_indices_2(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices_1(dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices_2(dofs_per_cell);
for (typename MGDoFHandler<dim>::active_cell_iterator
cell_1 = dof_1.begin_active(), cell_2 = dof_2.begin_active();
cell_1 != dof_1.end(); ++cell_1, ++cell_2)
const dealii::MGDoFHandler<dim,spacedim> &mg_dof,
MGLevelObject<BlockVector<number> > &v,
const std::vector<bool> &sel,
- std::vector<std::vector<unsigned int> >& ndofs)
+ std::vector<std::vector<types::global_dof_index> >& ndofs)
{
std::vector<bool> selected=sel;
// Compute the number of blocks needed
if (ndofs.size() == 0)
{
- std::vector<std::vector<unsigned int> >
+ std::vector<std::vector<types::global_dof_index> >
new_dofs(mg_dof.get_tria().n_levels(),
- std::vector<unsigned int>(selected.size()));
+ std::vector<types::global_dof_index>(selected.size()));
std::swap(ndofs, new_dofs);
MGTools::count_dofs_per_block (mg_dof, ndofs);
}
DoFHandler<dim>& dof=mgdof;
mgdof.distribute_dofs(fe);
DoFRenumbering::component_wise(mgdof);
- vector<unsigned int> ndofs(fe.n_blocks());
+ vector<types::global_dof_index> ndofs(fe.n_blocks());
DoFTools::count_dofs_per_block(mgdof, ndofs);
for (unsigned int l=0;l<tr.n_levels();++l)
DoFRenumbering::component_wise(mgdof, l);
- std::vector<std::vector<unsigned int> > mg_ndofs(mgdof.get_tria().n_levels(),
- std::vector<unsigned int>(fe.n_blocks()));
+ std::vector<std::vector<types::global_dof_index> > mg_ndofs(mgdof.get_tria().n_levels(),
+ std::vector<types::global_dof_index>(fe.n_blocks()));
MGTools::count_dofs_per_block(mgdof, mg_ndofs);
deallog << "Global dofs:";
const dealii::MGDoFHandler<dim,spacedim> &mg_dof,
MGLevelObject<dealii::Vector<number> > &v,
const unsigned int selected_block,
- std::vector<std::vector<unsigned int> >& ndofs)
+ std::vector<std::vector<types::global_dof_index> >& ndofs)
{
const unsigned int n_blocks = mg_dof.get_fe().n_blocks();
Assert(selected_block < n_blocks, ExcIndexRange(selected_block, 0, n_blocks));
if (ndofs.size() == 0)
{
- std::vector<std::vector<unsigned int> >
+ std::vector<std::vector<types::global_dof_index> >
new_dofs(mg_dof.get_tria().n_levels(),
- std::vector<unsigned int>(selected.size()));
+ std::vector<types::global_dof_index>(selected.size()));
std::swap(ndofs, new_dofs);
MGTools::count_dofs_per_block (mg_dof, ndofs);
}
DoFHandler<dim>& dof=mgdof;
mgdof.distribute_dofs(fe);
DoFRenumbering::component_wise(mgdof);
- vector<unsigned int> ndofs(fe.n_blocks());
+ vector<types::global_dof_index> ndofs(fe.n_blocks());
DoFTools::count_dofs_per_block(mgdof, ndofs);
for (unsigned int l=0;l<tr.n_levels();++l)
DoFRenumbering::component_wise(mgdof, l);
- std::vector<std::vector<unsigned int> > mg_ndofs(mgdof.get_tria().n_levels(),
- std::vector<unsigned int>(fe.n_blocks()));
+ std::vector<std::vector<types::global_dof_index> > mg_ndofs(mgdof.get_tria().n_levels(),
+ std::vector<types::global_dof_index>(fe.n_blocks()));
MGTools::count_dofs_per_block(mgdof, mg_ndofs);
deallog << "Global dofs:";
const dealii::MGDoFHandler<dim,spacedim> &mg_dof,
MGLevelObject<dealii::Vector<number> > &v,
const unsigned int selected_block,
- std::vector<std::vector<unsigned int> >& ndofs)
+ std::vector<std::vector<types::global_dof_index> >& ndofs)
{
const unsigned int n_blocks = mg_dof.get_fe().n_blocks();
Assert(selected_block < n_blocks, ExcIndexRange(selected_block, 0, n_blocks));
if (ndofs.size() == 0)
{
- std::vector<std::vector<unsigned int> >
+ std::vector<std::vector<types::global_dof_index> >
new_dofs(mg_dof.get_tria().n_levels(),
std::vector<unsigned int>(selected.size()));
std::swap(ndofs, new_dofs);
const dealii::MGDoFHandler<dim,spacedim> &mg_dof,
MGLevelObject<BlockVector<number> > &v,
const std::vector<bool> &sel,
- std::vector<std::vector<unsigned int> >& ndofs)
+ std::vector<std::vector<types::global_dof_index> >& ndofs)
{
std::vector<bool> selected=sel;
// Compute the number of blocks needed
if (ndofs.size() == 0)
{
- std::vector<std::vector<unsigned int> >
+ std::vector<std::vector<types::global_dof_index> >
new_dofs(mg_dof.get_tria().n_levels(),
- std::vector<unsigned int>(selected.size()));
+ std::vector<types::global_dof_index>(selected.size()));
std::swap(ndofs, new_dofs);
MGTools::count_dofs_per_block (mg_dof, ndofs);
}
}
// Store sizes
- vector<unsigned int> ndofs(fe.n_blocks());
+ vector<types::global_dof_index> ndofs(fe.n_blocks());
DoFTools::count_dofs_per_block(mgdof, ndofs);
- std::vector<std::vector<unsigned int> > mg_ndofs(mgdof.get_tria().n_levels(),
- std::vector<unsigned int>(fe.n_blocks()));
+ std::vector<std::vector<types::global_dof_index> > mg_ndofs(mgdof.get_tria().n_levels(),
+ std::vector<types::global_dof_index>(fe.n_blocks()));
MGTools::count_dofs_per_block(mgdof, mg_ndofs);
MGTransferPrebuilt<BlockVector<double> > transfer;
for (unsigned int i=0;i<u.size();++i)
u(i) = i+1;
- std::vector<std::vector<unsigned int> > cached_sizes;
+ std::vector<std::vector<types::global_dof_index> > cached_sizes;
MGLevelObject<BlockVector<double> > v;
MGLevelObject<BlockVector<double> > wb;
MGLevelObject<Vector<double> > ws;
mgdof.distribute_dofs(fe);
DoFRenumbering::component_wise(static_cast<DoFHandler<dim>&>(mgdof),
target_component);
- vector<unsigned int> ndofs(*std::max_element (target_component.begin(),
+ vector<types::global_dof_index> ndofs(*std::max_element (target_component.begin(),
target_component.end()) + 1);
DoFTools::count_dofs_per_component(dof, ndofs, true, target_component);
for (unsigned int l=0;l<tr.n_levels();++l)
DoFRenumbering::component_wise(mgdof, l, mg_target_component);
- std::vector<std::vector<unsigned int> > mg_ndofs(mgdof.get_tria().n_levels());
+ std::vector<std::vector<types::global_dof_index> > mg_ndofs(mgdof.get_tria().n_levels());
MGTools::count_dofs_per_component(mgdof, mg_ndofs, true, mg_target_component);
deallog << "Global dofs:";
assemble_laplace(Bb, bb, dof_handler, fe);
assemble_laplace(B, b, dof_handler, fe);
- 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>(size.size()),