class EigenInverse : private Solver<VECTOR>
{
public:
+ /**
+ * Declare type of container size.
+ */
+ typedef types::global_dof_index size_type;
+
/**
* Standardized data struct to
* pipe additional data to the
// 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);
// 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(2);
+ std::vector<types::global_dof_index> dpc(2);
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(2, 0);
group[1] = 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(2, 2*dim);
group[1] = 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);
dof_handler.distribute_dofs(fe_system);
//count dofs per component and show them on the screen
- std::vector<unsigned int> dofs_per_component(3,0);
- std::vector<unsigned int> dofs_per_component_hp(3,0);
+ std::vector<types::global_dof_index> dofs_per_component(3,0);
+ std::vector<types::global_dof_index> dofs_per_component_hp(3,0);
DoFTools::count_dofs_per_component(dof_handler, dofs_per_component);
DoFTools::count_dofs_per_component(hp_dof_handler, dofs_per_component_hp);
make_block_vector (const Vector<double> &in,
BlockVector<double> &out)
{
- std::vector<unsigned int> block_sizes(2);
+ std::vector<types::global_dof_index> block_sizes(2);
block_sizes[0] = in.size() / 2;
block_sizes[1] = in.size() - block_sizes[0];
deallog << dof_handler.n_dofs() << " degrees of freedom" << std::endl;
- std::map<unsigned int, double> bv;
+ std::map<types::global_dof_index, double> bv;
VectorTools::interpolate_boundary_values (dof_handler,
0,
Functions::SquareFunction<spacedim>(),
bv);
deallog << bv.size() << " boundary degrees of freedom" << std::endl;
- for (std::map<unsigned int, double>::const_iterator i = bv.begin();
+ for (std::map<types::global_dof_index, double>::const_iterator i = bv.begin();
i != bv.end(); ++i)
deallog << i->first << ' ' << i->second << std::endl;
deallog << dof_handler.n_dofs() << " degrees of freedom" << std::endl;
- std::map<unsigned int, double> bv;
+ std::map<types::global_dof_index, double> bv;
VectorTools::interpolate_boundary_values (dof_handler,
0,
X<spacedim>(),
bv);
deallog << bv.size() << " boundary degrees of freedom" << std::endl;
- for (std::map<unsigned int, double>::const_iterator i = bv.begin();
+ for (std::map<types::global_dof_index, double>::const_iterator i = bv.begin();
i != bv.end(); ++i)
deallog << i->first << ' ' << i->second << std::endl;
// separatel
for (unsigned int boundary_id=0; boundary_id<2; ++boundary_id)
{
- std::map<unsigned int, double> bv;
+ std::map<type::global_dof_index, double> bv;
VectorTools::interpolate_boundary_values (dof_handler,
boundary_id,
Functions::SquareFunction<spacedim>(),
bv);
deallog << bv.size() << " boundary degrees of freedom" << std::endl;
- for (std::map<unsigned int, double>::const_iterator i = bv.begin();
+ for (std::map<types::global_dof_index, double>::const_iterator i = bv.begin();
i != bv.end(); ++i)
deallog << i->first << ' ' << i->second << std::endl;
// separately
for (unsigned int boundary_id=0; boundary_id<2; ++boundary_id)
{
- std::map<unsigned int, double> bv;
+ std::map<types::global_dof_index, double> bv;
VectorTools::interpolate_boundary_values (dof_handler,
boundary_id,
Functions::SquareFunction<spacedim>(),
// separatel
for (unsigned int boundary_id=0; boundary_id<2; ++boundary_id)
{
- std::map<unsigned int, double> bv;
+ std::map<types::global_dof_index, double> bv;
VectorTools::interpolate_boundary_values (dof_handler,
boundary_id,
Functions::SquareFunction<spacedim>(),
for (typename DoFHandler<dim,spacedim>::active_cell_iterator
cell = dof_handler.begin_active(); cell!=dof_handler.end(); ++cell)
{
- std::vector<unsigned int> x (cell->get_fe().dofs_per_cell);
+ std::vector<types::global_dof_index> x (cell->get_fe().dofs_per_cell);
cell->get_dof_indices (x);
deallog << cell << std::endl;
update_values
| update_q_points | update_JxW_values);
- std::vector <unsigned int> global_dofs (element.dofs_per_cell);
+ std::vector <types::global_dof_index> global_dofs (element.dofs_per_cell);
std::vector <double> function (quadrature.size());
Vector<double> u (dof.n_dofs ());
Assert (dof_handler.locally_owned_dofs() == all,
ExcInternalError());
Assert (dof_handler.n_locally_owned_dofs_per_processor() ==
- std::vector<unsigned int> (1,N),
+ std::vector<types::global_dof_index> (1,N),
ExcInternalError());
Assert (dof_handler.locally_owned_dofs_per_processor() ==
std::vector<IndexSet>(1,all),
Assert (dof_handler.locally_owned_dofs() == all,
ExcInternalError());
Assert (dof_handler.n_locally_owned_dofs_per_processor() ==
- std::vector<unsigned int> (1,N),
+ std::vector<types::global_dof_index> (1,N),
ExcInternalError());
Assert (dof_handler.locally_owned_dofs_per_processor() ==
std::vector<IndexSet>(1,all),
void
print_dofs (const DoFHandler<dim> &dof)
{
- std::vector<unsigned int> v (dof.get_fe().dofs_per_cell);
+ std::vector<types::global_dof_index> v (dof.get_fe().dofs_per_cell);
for (typename DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
cell != dof.end(); ++cell)
{
print_dofs (const DoFHandler<dim> &dof)
{
const FiniteElement<dim>& fe = dof.get_fe();
- std::vector<unsigned int> v (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> v (fe.dofs_per_cell);
std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
if (fe.has_support_points())
print_dofs (const MGDoFHandler<dim> &dof, unsigned int level)
{
const FiniteElement<dim>& fe = dof.get_fe();
- std::vector<unsigned int> v (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> v (fe.dofs_per_cell);
std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
if (fe.has_support_points())
print_dofs (const DoFHandler<dim> &dof)
{
const FiniteElement<dim>& fe = dof.get_fe();
- std::vector<unsigned int> v (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> v (fe.dofs_per_cell);
std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
if (fe.has_support_points())
print_dofs (const DoFHandler<dim> &dof)
{
const FiniteElement<dim>& fe = dof.get_fe();
- std::vector<unsigned int> v (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> v (fe.dofs_per_cell);
std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
if (fe.has_support_points())
void
print_dofs (const DoFHandler<dim> &dof)
{
- std::vector<unsigned int> v (dof.get_fe().dofs_per_cell);
+ std::vector<types::global_dof_index> v (dof.get_fe().dofs_per_cell);
for (typename DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
cell != dof.end(); ++cell)
print_dofs (const DoFHandler<dim> &dof)
{
const FiniteElement<dim>& fe = dof.get_fe();
- std::vector<unsigned int> v (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> v (fe.dofs_per_cell);
std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
if (fe.has_support_points())
print_dofs (const DoFHandler<dim> &dof)
{
const FiniteElement<dim>& fe = dof.get_fe();
- std::vector<unsigned int> v (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> v (fe.dofs_per_cell);
std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
if (fe.has_support_points())
print_dofs (const DoFHandler<dim> &dof)
{
const FiniteElement<dim>& fe = dof.get_fe();
- std::vector<unsigned int> v (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> v (fe.dofs_per_cell);
std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
if (fe.has_support_points())
print_dofs (const DoFHandler<dim> &dof, stream & out)
{
const FiniteElement<dim>& fe = dof.get_fe();
- std::vector<unsigned int> v (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> v (fe.dofs_per_cell);
std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
if (fe.has_support_points())
out << std::setprecision (2);
out << std::fixed;
const FiniteElement<dim>& fe = dof.get_fe();
- std::vector<unsigned int> v (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> v (fe.dofs_per_cell);
std_cxx1x::shared_ptr<FEValues<dim> > fevalues;
if (fe.has_support_points())
DoFHandler<dim> dof(tr);
dof.distribute_dofs(element);
- std::vector<unsigned int> count (element.n_components());
+ std::vector<types::global_dof_index> count (element.n_components());
DoFTools::count_dofs_per_component (dof, count, false);
for (unsigned int d=0; d<count.size(); ++d)
dof.begin_active()->set_active_fe_index(1);
dof.distribute_dofs(element);
- std::vector<unsigned int> count (element.n_components());
+ std::vector<types::global_dof_index> count (element.n_components());
DoFTools::count_dofs_per_component (dof, count, false);
for (unsigned int d=0; d<count.size(); ++d)
DoFHandler<dim> dof(tr);
dof.distribute_dofs(element);
- std::vector<unsigned int> count (element.n_components());
+ std::vector<types::global_dof_index> count (element.n_components());
DoFTools::count_dofs_per_component (dof, count, true);
for (unsigned int d=0; d<count.size(); ++d)
DoFRenumbering::component_wise(dof_handler);
// total number of dof per block component
- 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_stress_dof = dofs_per_block[0];
template <int dim>
void
-solve_eliminated (std::map<unsigned int,double> &bv,
+solve_eliminated (std::map<types::global_dof_index,double> &bv,
SparseMatrix<double> &A,
Vector<double> &u,
Vector<double> &f)
update_values | update_gradients
| update_q_points | update_JxW_values);
- std::vector <unsigned int> global_dofs (element.dofs_per_cell);
+ std::vector <types::global_dof_index> global_dofs (element.dofs_per_cell);
std::vector <double> function (quadrature.size());
Vector<double> f (dof.n_dofs ());
}
// interpolate boundary values
- std::map<unsigned int,double> bv;
+ std::map<types::global_dof_index,double> bv;
VectorTools::interpolate_boundary_values (mapping, dof, 0, cosine, bv, std::vector<bool>());
// the cosine has too many zero
// values on the boundary of the
// domain, so reset the elements to
// some other value
- for (typename std::map<unsigned int,double>::iterator i=bv.begin();
+ for (typename std::map<types::global_dof_index,double>::iterator i=bv.begin();
i!=bv.end(); ++i)
i->second = std::sin(i->second+0.5)+1.0;
// build up a map of vertex indices
// of boundary vertices to the new
// boundary points
- std::map<unsigned int,Point<dim> > new_points;
+ std::map<types::global_dof_index,Point<dim> > new_points;
// new center and new radius
// of the inner circle.
// leave the
// point, where
// they are.
- new_points.insert(std::pair<unsigned int, Point<dim> > (
+ new_points.insert(std::pair<types::global_dof_index, Point<dim> > (
face->vertex_index(vertex_no), v));
}
else if (std::fabs(std::sqrt(v.square())-inner_radius)<1e-12)
// the radius
// of the
// circle.
- new_points.insert(std::pair<unsigned int, Point<dim> > (
+ new_points.insert(std::pair<types::global_dof_index, Point<dim> > (
face->vertex_index(vertex_no), n_radius/inner_radius*v+n_center));
face->set_boundary_indicator(1);
}
SparseMatrix<double> mat(sp);
Vector<double> rhs(5);
- std::vector<unsigned int> local_dofs;
+ std::vector<types::global_dof_index> local_dofs;
for (unsigned int i=0;i<5;++i)
local_dofs.push_back(i);
// "assemble":
- std::vector<unsigned int> local_dofs1;
+ std::vector<types::global_dof_index> local_dofs1;
for (unsigned int i=0;i<5;++i)
local_dofs1.push_back(i);
- std::vector<unsigned int> local_dofs2;
+ std::vector<types::global_dof_index> local_dofs2;
local_dofs2.push_back(1);
for (unsigned int i=1;i<5;++i)
local_dofs2.push_back(3+i);
Functions::SquareFunction<dim>(),
boundary_values);
deallog << boundary_values.size() << std::endl;
- 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)
deallog << p->first << ' ' << p->second << std::endl;
constraints.close ();
- 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],
// loop over all lines and make sure that
// all the DoF indices on these lines are
// identical
- std::vector<unsigned int> indices_1;
- std::vector<unsigned int> indices_2;
+ std::vector<types::global_dof_index> indices_1;
+ std::vector<types::global_dof_index> indices_2;
std::set<unsigned int> line_already_treated;
exact_solution,
boundary_values);
- for (std::map<unsigned int,double>::iterator i=boundary_values.begin();
+ for (std::map<types::global_dof_index,double>::iterator i=boundary_values.begin();
i != boundary_values.end(); ++i)
deallog << i->first << ' ' << i->second << std::endl;
}
Assert (dof_handler.locally_owned_dofs() == all,
ExcInternalError());
Assert (dof_handler.n_locally_owned_dofs_per_processor() ==
- std::vector<unsigned int> (1,N),
+ std::vector<types::global_dof_index> (1,N),
ExcInternalError());
Assert (dof_handler.locally_owned_dofs_per_processor() ==
std::vector<IndexSet>(1,all),
void
print_dofs (const hp::DoFHandler<dim> &dof)
{
- std::vector<unsigned int> v;
+ std::vector<types::global_dof_index> v;
for (typename hp::DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
cell != dof.end(); ++cell)
{
void
print_dofs (const hp::DoFHandler<dim> &dof)
{
- std::vector<unsigned int> v;
+ std::vector<types::global_dof_index> v;
for (typename hp::DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
cell != dof.end(); ++cell)
{
void
print_dofs (const hp::DoFHandler<dim> &dof)
{
- std::vector<unsigned int> v;
+ std::vector<types::global_dof_index> v;
for (typename hp::DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
cell != dof.end(); ++cell)
{
dof_handler.distribute_dofs (fe_collection);
deallog << dof_handler.n_dofs() << " dofs" << std::endl;
- std::map<unsigned int, double> bv;
+ std::map<types::global_dof_index, double> bv;
VectorTools::interpolate_boundary_values (dof_handler,
0,
ZeroFunction<dim>(1),
bv);
- for (std::map<unsigned int, double>::iterator
+ for (std::map<types::global_dof_index, double>::iterator
p = bv.begin(); p!=bv.end(); ++p)
deallog << p->first << ' ' << p->second << std::endl;
}
dof_handler.distribute_dofs (fe_collection);
deallog << dof_handler.n_dofs() << " dofs" << std::endl;
- std::map<unsigned int, double> bv;
+ std::map<types::global_dof_index, double> bv;
VectorTools::interpolate_boundary_values (dof_handler,
0,
ZeroFunction<dim>(4),
bv);
- for (std::map<unsigned int, double>::iterator
+ for (std::map<types::global_dof_index, double>::iterator
p = bv.begin(); p!=bv.end(); ++p)
deallog << p->first << ' ' << p->second << std::endl;
}
hp::QCollection<dim-1> face_quadrature;
face_quadrature.push_back (QGauss<dim-1>(6));
- std::vector<unsigned int> dof_to_boundary_mapping;
+ std::vector<dof_index> dof_to_boundary_mapping;
DoFTools::map_dof_to_boundary_indices (dof,
dof_to_boundary_mapping);
for (unsigned int i=1; i<7-dim; ++i)
face_quadrature.push_back (QGauss<dim-1>(3+i));
- std::vector<unsigned int> dof_to_boundary_mapping;
+ std::vector<types::global_dof_index> dof_to_boundary_mapping;
DoFTools::map_dof_to_boundary_indices (dof,
dof_to_boundary_mapping);
template <int dim>
-std::vector<unsigned int>
+std::vector<types::global_dof_index>
get_dofs (const hp::DoFHandler<dim> &dof)
{
- std::vector<unsigned int> local;
- std::vector<unsigned int> global;
+ std::vector<types::global_dof_index> local;
+ std::vector<types::global_dof_index> global;
for (typename hp::DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
cell != dof.end(); ++cell)
{
// do component-wise and save the
// results
DoFRenumbering::component_wise (dof);
- const std::vector<unsigned int> vc = get_dofs (dof);
+ const std::vector<types::global_dof_index> vc = get_dofs (dof);
// now do the same with blocks
DoFRenumbering::block_wise (dof);
- const std::vector<unsigned int> vb = get_dofs (dof);
+ const std::vector<types::global_dof_index> vb = get_dofs (dof);
Assert (vc == vb, ExcInternalError());
std::vector<unsigned int>
get_dofs (const hp::DoFHandler<dim> &dof)
{
- std::vector<unsigned int> local;
- std::vector<unsigned int> global;
+ std::vector<types::global_dof_index> local;
+ std::vector<types::global_dof_index> global;
for (typename hp::DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
cell != dof.end(); ++cell)
{
template <int dim>
-std::vector<unsigned int>
+std::vector<types::global_dof_index>
get_dofs (const hp::DoFHandler<dim> &dof)
{
- std::vector<unsigned int> local;
- std::vector<unsigned int> global;
+ std::vector<types::global_dof_index> local;
+ std::vector<types::global_dof_index> global;
for (typename hp::DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
cell != dof.end(); ++cell)
{
// do component-wise and save the
// results
DoFRenumbering::component_wise (dof, order);
- const std::vector<unsigned int> vc = get_dofs (dof);
+ const std::vector<types::global_dof_index> vc = get_dofs (dof);
// now do the same with blocks
DoFRenumbering::block_wise (dof);
- const std::vector<unsigned int> vb = get_dofs (dof);
+ const std::vector<types::global_dof_index> vb = get_dofs (dof);
Assert (vc == vb, ExcInternalError());
void
print_dofs (const hp::DoFHandler<dim> &dof)
{
- std::vector<unsigned int> v;
+ std::vector<types::global_dof_index> v;
for (typename hp::DoFHandler<dim>::active_cell_iterator cell=dof.begin_active();
cell != dof.end(); ++cell)
{
void DGMethod<dim>::assemble_system1 ()
{
const unsigned int dofs_per_cell = dof_handler.get_fe()[0].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
}
}
- std::vector<unsigned int> cell_indices(fe.dofs_per_cell);
- std::vector<unsigned int> neighbor_indices(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> cell_indices(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> neighbor_indices(fe.dofs_per_cell);
for (typename DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active();
cell != dof_handler.end();++cell)
const unsigned int d = GeometryInfo<dim>::unit_normal_direction[other_face];
- std::vector<std::pair<unsigned int, double> > rhs;
+ std::vector<std::pair<types::global_dof_index, double> > rhs;
const unsigned int constrained = fe.face_to_cell_index(
(fvertex == 0) ? 2 : fe.dofs_per_face-1, face);
double constrained_weight = 0.;
{
constraints.add_line(7);
- std::vector<std::pair<unsigned int, double> > rhs;
- rhs.push_back(std::pair<unsigned int, double>(41,1.0));
- rhs.push_back(std::pair<unsigned int, double>(42,1.0));
+ std::vector<std::pair<types::global_dof_index, double> > rhs;
+ rhs.push_back(std::pair<types::global_dof_index, double>(41,1.0));
+ rhs.push_back(std::pair<types::global_dof_index, double>(42,1.0));
constraints.add_entries(7, rhs);
}
{
constraints.add_line(41);
- std::vector<std::pair<unsigned int, double> > rhs;
- rhs.push_back(std::pair<unsigned int, double>(42,1.0));
+ std::vector<std::pair<types::global_dof_index, double> > rhs;
+ rhs.push_back(std::pair<types::global_dof_index, double>(42,1.0));
constraints.add_entries(41, rhs);
}
{
constraints.add_line(42);
- std::vector<std::pair<unsigned int, double> > rhs;
- rhs.push_back(std::pair<unsigned int, double>(41,1.0));
+ std::vector<std::pair<types::global_dof_index, double> > rhs;
+ rhs.push_back(std::pair<types::global_dof_index, double>(41,1.0));
constraints.add_entries(42, rhs);
}
PreconditionSSOR<> prec_ssor;
prec_ssor.initialize(A, 1.2);
- std::vector<unsigned int> permutation(dim);
- std::vector<unsigned int> inverse_permutation(dim);
+ std::vector<types::global_dof_index> permutation(dim);
+ std::vector<types::global_dof_index> inverse_permutation(dim);
// Create a permutation: Blocks
// backwards and every second
PreconditionSOR<> prec_sor;
prec_sor.initialize(A, 1.);
- std::vector<unsigned int> permutation(dim);
- std::vector<unsigned int> inverse_permutation(dim);
+ std::vector<types::global_dof_index> permutation(dim);
+ std::vector<types::global_dof_index> inverse_permutation(dim);
// Create a permutation: Blocks
// backwards and every second
testproblem.five_point(A, true);
// The permutation vectors;
- std::vector<unsigned int> perm(dim);
- std::vector<unsigned int> iperm(dim);
+ std::vector<types::global_dof_index> perm(dim);
+ std::vector<types::global_dof_index> iperm(dim);
for (unsigned int blocksize = 4; blocksize < 32; blocksize <<= 1)
{
SolverRichardson<> rich(control, mem, .01);
SolverRichardson<> prich(control, mem, 1.);
- const unsigned int block_size = (unsigned int) std::sqrt(A.n()+.3);
+ const types::global_dof_index block_size = (types::global_dof_index) std::sqrt(A.n()+.3);
const unsigned int n_blocks = A.n()/block_size;
typename PreconditionBlock<MATRIX, float>::AdditionalData
data(block_size, 1.2);
- std::vector<unsigned int> perm(A.n());
- std::vector<unsigned int> iperm(A.n());
+ std::vector<types::global_dof_index> perm(A.n());
+ std::vector<types::global_dof_index> iperm(A.n());
for (unsigned int i=0;i<n_blocks;++i)
for (unsigned int j=0;j<block_size;++j)
{
// now check for equivalence of sp3 and sp4
for (unsigned int row=0; row<sp3.n_rows(); ++row)
{
- const unsigned int
+ const types::global_dof_index
*sp3_p=sp3.get_column_numbers()+sp3.get_rowstart_indices()[row];
- const unsigned int
+ const types::global_dof_index
*sp4_p=sp4.get_column_numbers()+sp4.get_rowstart_indices()[row];
for (; sp3_p != (sp3.get_column_numbers() +
sp3.get_rowstart_indices()[row+1]);
Assert (sparsity_pattern(sparsity_pattern.matrix_position(i).first,
sparsity_pattern.matrix_position(i).second) == i,
ExcInternalError());
- for (unsigned int row=0; row<sparsity_pattern.n_rows(); ++row)
- for (unsigned int col=0; col<sparsity_pattern.n_cols(); ++col)
+ for (types::global_dof_index row=0; row<sparsity_pattern.n_rows(); ++row)
+ for (types::global_dof_index col=0; col<sparsity_pattern.n_cols(); ++col)
if (sparsity_pattern(row,col) != SparsityPattern::invalid_entry)
Assert (sparsity_pattern.matrix_position(sparsity_pattern(row,col)) ==
std::make_pair(row,col),
const unsigned int dofs_per_cell = fe_eval.dofs_per_cell;
AlignedVector<VectorizedArray<Number> > values (n_q_points);
AlignedVector<VectorizedArray<Number> > gradients (dim*n_q_points);
- std::vector<unsigned int> dof_indices (dofs_per_cell);
+ std::vector<types::global_dof_index> dof_indices (dofs_per_cell);
for(unsigned int cell=cell_range.first;cell<cell_range.second;++cell)
{
fe_eval.reinit(cell);
AlignedVector<VectorizedArray<Number> > gradients0 (dim*n_q_points0);
AlignedVector<VectorizedArray<Number> > values1 (n_q_points1);
AlignedVector<VectorizedArray<Number> > gradients1 (dim*n_q_points1);
- std::vector<unsigned int> dof_indices0 (dofs_per_cell0);
- std::vector<unsigned int> dof_indices1 (dofs_per_cell1);
+ std::vector<types::global_dof_index> dof_indices0 (dofs_per_cell0);
+ std::vector<types::global_dof_index> dof_indices1 (dofs_per_cell1);
for(unsigned int cell=cell_range.first;cell<cell_range.second;++cell)
{
fe_eval0.reinit(cell);
AlignedVector<VectorizedArray<Number> > gradients0 (dim*n_q_points0);
AlignedVector<VectorizedArray<Number> > values1 (n_q_points1);
AlignedVector<VectorizedArray<Number> > gradients1 (dim*n_q_points1);
- std::vector<unsigned int> dof_indices0 (dofs_per_cell0);
- std::vector<unsigned int> dof_indices1 (dofs_per_cell1);
+ std::vector<types::global_dof_index> dof_indices0 (dofs_per_cell0);
+ std::vector<types::global_dof_index> dof_indices1 (dofs_per_cell1);
for(unsigned int cell=cell_range.first;cell<cell_range.second;++cell)
{
fe_eval0.reinit(cell);
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(nlevels);
+ std::vector<std::set<types::global_dof_index> > boundary_indices(nlevels);
MGTools::make_boundary_list (dof, 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);
mg_constraints[level].close();
constraints.close ();
- std::vector<unsigned int> dofs_per_block (dim+1);
+ std::vector<types::global_dof_index> dofs_per_block (dim+1);
DoFTools::count_dofs_per_component (dof_handler, dofs_per_block);
//std::cout << " Number of active cells: "
constraints_p);
constraints_p.close ();
- 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,
stokes_sub_blocks);
{
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]);
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 (mg_dof_handler,
dirichlet_boundary,
boundary_indices);
DoFHandler<dim> dof_handler (triangulation);
dof_handler.distribute_dofs (fe);
- std::vector<unsigned int> dofs_per_block (fe.n_blocks());
+ std::vector<types::global_dof_inex> dofs_per_block (fe.n_blocks());
DoFTools::count_dofs_per_block (dof_handler, dofs_per_block);
if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0)
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)
triangulation.refine_global (2);
dof_handler.distribute_dofs (fe);
- std::vector<unsigned int> dofs_per_component (fe.n_components());
+ std::vector<types::global_dof_index> dofs_per_component (fe.n_components());
DoFTools::count_dofs_per_component (dof_handler, dofs_per_component);
Assert (std::accumulate (dofs_per_component.begin(), dofs_per_component.end(), 0U)
unsigned int num_local=10;
unsigned int n=numprocs*num_local;
- std::vector<unsigned int> rows_per_cpu;
+ std::vector<types::global_dof_index> rows_per_cpu;
for (unsigned int i=0;i<numprocs;++i)
rows_per_cpu.push_back(num_local);
unsigned int num_local=10;
unsigned int n=numprocs*num_local;
- std::vector<unsigned int> rows_per_cpu;
+ std::vector<types::global_dof_index> rows_per_cpu;
for (unsigned int i=0;i<numprocs;++i)
rows_per_cpu.push_back(num_local);
DoFHandler<dim> dofh(tr);
dofh.distribute_dofs (fe);
- std::map<unsigned int, Point<dim> > points;
+ std::map<types::global_dof_index, Point<dim> > points;
DoFTools::map_dofs_to_support_points (MappingQ1<dim>(),
dofh,
points);
for (;cell!=endc;++cell)
{
- std::vector<unsigned int> dofs(fe.n_dofs_per_cell());
+ std::vector<types::global_dof_index> dofs(fe.n_dofs_per_cell());
cell->get_mg_dof_indices(dofs);
for (unsigned int i=0;i<dofs.size();++i)
{
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);
}
0, 0,
block_component, block_component);
- std::vector<std::vector<unsigned int> > dofs_per_block(tr.n_levels(), std::vector<unsigned int>(2));
+ std::vector<std::vector<types::global_dof_index> > dofs_per_block(tr.n_levels(), std::vector<types::global_dof_index>(2));
MGTools::count_dofs_per_block(mg_dof_handler, dofs_per_block, block_component);
FullMatrix<double> prolong_0_1 (dofs_per_block[1][0],
dofs_per_block[0][0]);
selected_block, selected_block,
block_component, block_component);
- std::vector<unsigned int> dofs_per_block(3);
+ std::vector<types::global_dof_index> dofs_per_block(3);
DoFTools::count_dofs_per_block(mg_dof_handler, dofs_per_block, block_component);
- std::vector<std::vector<unsigned int> > mg_dofs_per_block(tr.n_levels(), std::vector<unsigned int>(3));
+ std::vector<std::vector<types::global_dof_index> > mg_dofs_per_block(tr.n_levels(),
+ std::vector<types::global_dof_index>(3));
MGTools::count_dofs_per_block(mg_dof_handler, mg_dofs_per_block, block_component);
deallog << "Global dofs:";
for (unsigned int level=0; level<tr.n_levels(); ++level)
DoFRenumbering::component_wise (mg_dof_handler, level);
- std::vector<std::set<unsigned int> > boundary_indices(tr.n_levels());
+ std::vector<std::set<types::global_dof_index> > boundary_indices(tr.n_levels());
typename FunctionMap<dim>::type dirichlet_boundary;
ZeroFunction<dim> dirichlet_bc(fe.n_components());
dirichlet_boundary[3] = &dirichlet_bc;
for (unsigned int level=0; level<tr.n_levels(); ++level)
DoFRenumbering::component_wise (mg_dof_handler, level);
- std::vector<std::set<unsigned int> > boundary_indices(tr.n_levels());
+ std::vector<std::set<types::global_dof_index> > boundary_indices(tr.n_levels());
typename FunctionMap<dim>::type dirichlet_boundary;
ZeroFunction<dim> dirichlet_bc(fe.n_components());
dirichlet_boundary[3] = &dirichlet_bc;
transfer.build_matrices(mg_dof_handler, mg_dof_handler,
0, 0, block_selected, block_selected);
- std::vector<std::vector<unsigned int> >
- dofs_per_block(tr.n_levels(), std::vector<unsigned int>(2));
+ std::vector<std::vector<types::global_dof_index> >
+ dofs_per_block(tr.n_levels(), std::vector<types::global_dof_index>(2));
MGTools::count_dofs_per_block(mg_dof_handler,
dofs_per_block, block_selected);
DoFRenumbering::component_wise (mg_dof_handler,
level, block_selected);
- std::vector<std::set<unsigned int> > boundary_indices(tr.n_levels());
+ std::vector<std::set<types::global_dof_index> > boundary_indices(tr.n_levels());
typename FunctionMap<dim>::type dirichlet_boundary;
ZeroFunction<dim> dirichlet_bc(fe.n_components());
dirichlet_boundary[3] = &dirichlet_bc;
transfer.build_matrices(mg_dof_handler, mg_dof_handler,
0, 0, block_selected, block_selected, boundary_indices);
- std::vector<std::vector<unsigned int> >
- dofs_per_block(tr.n_levels(), std::vector<unsigned int>(2));
+ std::vector<std::vector<types::global_dof_index> >
+ dofs_per_block(tr.n_levels(), std::vector<types::global_dof_index>(2));
MGTools::count_dofs_per_block(mg_dof_handler,
dofs_per_block, block_selected);
selected_block, selected_block,
block_component, block_component);
- std::vector<unsigned int> dofs_per_block(3);
+ std::vector<types::global_dof_index> dofs_per_block(3);
DoFTools::count_dofs_per_block(mg_dof_handler, dofs_per_block, block_component);
- std::vector<std::vector<unsigned int> > mg_dofs_per_block(tr.n_levels(), std::vector<unsigned int>(3));
+ std::vector<std::vector<types::global_dof_index> > mg_dofs_per_block(tr.n_levels(),
+ std::vector<types::global_dof_index>(3));
MGTools::count_dofs_per_block(mg_dof_handler, mg_dofs_per_block, block_component);
deallog << "Global dofs:";
// compare dofs on this cell and then on the faces
if (c1->has_children() == false)
{
- std::vector<unsigned int> local_dofs_1 (c1->get_fe().dofs_per_cell);
- std::vector<unsigned int> local_dofs_2 (c2->get_fe().dofs_per_cell);
+ std::vector<types::local_dof_types> local_dofs_1 (c1->get_fe().dofs_per_cell);
+ std::vector<types::local_dof_types> local_dofs_2 (c2->get_fe().dofs_per_cell);
c1->get_dof_indices (local_dofs_1);
c2->get_dof_indices (local_dofs_2);
for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
{
- std::vector<unsigned int> local_dofs_1 (c1->get_fe().dofs_per_face);
- std::vector<unsigned int> local_dofs_2 (c2->get_fe().dofs_per_face);
+ std::vector<types::global_dof_index> local_dofs_1 (c1->get_fe().dofs_per_face);
+ std::vector<types::global_dof_index> local_dofs_2 (c2->get_fe().dofs_per_face);
c1->face(f)->get_dof_indices (local_dofs_1);
c2->face(f)->get_dof_indices (local_dofs_2);