"associated DoF handler objects, asking for any subdomain other "
"than the locally owned one does not make sense."));
- std::vector<unsigned int> dofs_on_this_cell;
+ std::vector<types::global_dof_index> dofs_on_this_cell;
dofs_on_this_cell.reserve (max_dofs_per_cell(dof));
typename DH::active_cell_iterator cell = dof.begin_active(),
endc = dof.end();
}
- std::vector<unsigned int> dofs_on_this_cell(fe_collection.max_dofs_per_cell());
+ std::vector<types::global_dof_index> dofs_on_this_cell(fe_collection.max_dofs_per_cell());
typename DH::active_cell_iterator cell = dof.begin_active(),
endc = dof.end();
cell_row->get_fe().dofs_per_cell;
const unsigned int dofs_per_cell_col =
cell_col->get_fe().dofs_per_cell;
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
local_dof_indices_row(dofs_per_cell_row);
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
local_dof_indices_col(dofs_per_cell_col);
cell_row->get_dof_indices (local_dof_indices_row);
cell_col->get_dof_indices (local_dof_indices_col);
cell_row_child->get_fe().dofs_per_cell;
const unsigned int dofs_per_cell_col =
cell_col->get_fe().dofs_per_cell;
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
local_dof_indices_row(dofs_per_cell_row);
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
local_dof_indices_col(dofs_per_cell_col);
cell_row_child->get_dof_indices (local_dof_indices_row);
cell_col->get_dof_indices (local_dof_indices_col);
cell_row->get_fe().dofs_per_cell;
const unsigned int dofs_per_cell_col =
cell_col_child->get_fe().dofs_per_cell;
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
local_dof_indices_row(dofs_per_cell_row);
- std::vector<unsigned int>
+ std::vector<types::global_dof_index>
local_dof_indices_col(dofs_per_cell_col);
cell_row->get_dof_indices (local_dof_indices_row);
cell_col_child->get_dof_indices (local_dof_indices_col);
void
make_boundary_sparsity_pattern (
const DH &dof,
- const std::vector<unsigned int> &dof_to_boundary_mapping,
+ const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SparsityPattern &sparsity)
{
if (DH::dimension == 1)
if (sparsity.n_rows() != 0)
{
unsigned int max_element = 0;
- for (std::vector<unsigned int>::const_iterator i=dof_to_boundary_mapping.begin();
+ for (std::vector<types::global_dof_index>::const_iterator i=dof_to_boundary_mapping.begin();
i!=dof_to_boundary_mapping.end(); ++i)
if ((*i != DH::invalid_dof_index) &&
(*i > max_element))
};
#endif
- std::vector<unsigned int> dofs_on_this_face;
+ std::vector<types::global_dof_index> dofs_on_this_face;
dofs_on_this_face.reserve (max_dofs_per_face(dof));
// loop over all faces to check
void make_boundary_sparsity_pattern (
const DH &dof,
const typename FunctionMap<DH::space_dimension>::type &boundary_indicators,
- const std::vector<unsigned int> &dof_to_boundary_mapping,
+ const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SparsityPattern &sparsity)
{
if (DH::dimension == 1)
cell = cell->child(direction);
const unsigned int dofs_per_vertex = cell->get_fe().dofs_per_vertex;
- std::vector<unsigned int> boundary_dof_boundary_indices (dofs_per_vertex);
+ std::vector<types::global_dof_index> boundary_dof_boundary_indices (dofs_per_vertex);
// next get boundary mapped dof
// indices of boundary dofs
if (sparsity.n_rows() != 0)
{
unsigned int max_element = 0;
- for (std::vector<unsigned int>::const_iterator i=dof_to_boundary_mapping.begin();
+ for (std::vector<types::global_dof_index>::const_iterator i=dof_to_boundary_mapping.begin();
i!=dof_to_boundary_mapping.end(); ++i)
if ((*i != DH::invalid_dof_index) &&
(*i > max_element))
};
#endif
- std::vector<unsigned int> dofs_on_this_face;
+ std::vector<types::global_dof_index> dofs_on_this_face;
dofs_on_this_face.reserve (max_dofs_per_face(dof));
typename DH::active_cell_iterator cell = dof.begin_active(),
endc = dof.end();
"associated DoF handler objects, asking for any subdomain other "
"than the locally owned one does not make sense."));
- std::vector<unsigned int> dofs_on_this_cell;
- std::vector<unsigned int> dofs_on_other_cell;
+ std::vector<types::global_dof_index> dofs_on_this_cell;
+ std::vector<types::global_dof_index> dofs_on_other_cell;
dofs_on_this_cell.reserve (max_dofs_per_cell(dof));
dofs_on_other_cell.reserve (max_dofs_per_cell(dof));
typename DH::active_cell_iterator cell = dof.begin_active(),
{
const FiniteElement<DH::dimension,DH::space_dimension> &fe = dof.get_fe();
- std::vector<unsigned int> dofs_on_this_cell(fe.dofs_per_cell);
- std::vector<unsigned int> dofs_on_other_cell(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> dofs_on_this_cell(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> dofs_on_other_cell(fe.dofs_per_cell);
const Table<2,Coupling>
int_dof_mask = dof_couplings_from_component_couplings(fe, int_mask),
const dealii::hp::FECollection<dim,spacedim> &fe = dof.get_fe();
- std::vector<unsigned int> dofs_on_this_cell(DoFTools::max_dofs_per_cell(dof));
- std::vector<unsigned int> dofs_on_other_cell(DoFTools::max_dofs_per_cell(dof));
+ std::vector<types::global_dof_index> dofs_on_this_cell(DoFTools::max_dofs_per_cell(dof));
+ std::vector<types::global_dof_index> dofs_on_other_cell(DoFTools::max_dofs_per_cell(dof));
const std::vector<Table<2,Coupling> >
int_dof_mask
inline
bool
check_master_dof_list (const FullMatrix<double> &face_interpolation_matrix,
- const std::vector<unsigned int> &master_dof_list)
+ const std::vector<types::global_dof_index> &master_dof_list)
{
const unsigned int N = master_dof_list.size();
// the other one. this latter case
// shows up when running
// hp/hp_constraints_q_system_06
- std::vector<unsigned int> master_dof_list;
+ std::vector<types::global_dof_index> master_dof_list;
unsigned int index = 0;
for (int v=0;
v<static_cast<signed int>(GeometryInfo<dim>::vertices_per_face);
// finally copy the list into the
// mask
std::fill (master_dof_mask.begin(), master_dof_mask.end(), false);
- for (std::vector<unsigned int>::const_iterator i=master_dof_list.begin();
+ for (std::vector<types::global_dof_index>::const_iterator i=master_dof_list.begin();
i!=master_dof_list.end(); ++i)
master_dof_mask[*i] = true;
}
* fuller than necessary.
*/
void
- filter_constraints (const std::vector<unsigned int> &master_dofs,
- const std::vector<unsigned int> &slave_dofs,
+ filter_constraints (const std::vector<types::global_dof_index> &master_dofs,
+ const std::vector<types::global_dof_index> &slave_dofs,
const FullMatrix<double> &face_constraints,
ConstraintMatrix &constraints)
{
const unsigned int spacedim = DH::space_dimension;
- std::vector<unsigned int> dofs_on_mother;
- std::vector<unsigned int> dofs_on_children;
+ std::vector<types::global_dof_index> dofs_on_mother;
+ std::vector<types::global_dof_index> dofs_on_children;
// loop over all lines; only on
// lines there can be constraints.
{
const unsigned int dim = 3;
- std::vector<unsigned int> dofs_on_mother;
- std::vector<unsigned int> dofs_on_children;
+ std::vector<types::global_dof_index> dofs_on_mother;
+ std::vector<types::global_dof_index> dofs_on_children;
// loop over all quads; only on
// quads there can be constraints.
// dof numbers, as well as a
// scratch array needed for the
// complicated case below
- std::vector<unsigned int> master_dofs;
- std::vector<unsigned int> slave_dofs;
- std::vector<unsigned int> scratch_dofs;
+ std::vector<types::global_dof_index> master_dofs;
+ std::vector<types::global_dof_index> slave_dofs;
+ std::vector<types::global_dof_index> scratch_dofs;
// caches for the face and
// subface interpolation
const unsigned int dofs_per_face = fe.dofs_per_face;
- std::vector<unsigned int> dofs_1(dofs_per_face);
- std::vector<unsigned int> dofs_2(dofs_per_face);
+ std::vector<types::global_dof_index> dofs_1(dofs_per_face);
+ std::vector<types::global_dof_index> dofs_2(dofs_per_face);
face_1->get_dof_indices(dofs_1, face_1_index);
face_2->get_dof_indices(dofs_2, face_2_index);
// then loop over all cells and do
// the work
- std::vector<unsigned int> indices;
+ std::vector<types::global_dof_index> indices;
for (typename DH::active_cell_iterator c=dof.begin_active();
c!=dof.end(); ++ c)
if (c->is_locally_owned())
typename DH::active_cell_iterator cell = dof_handler.begin_active(),
endc = dof_handler.end();
- std::vector<unsigned int> dof_indices;
+ std::vector<types::global_dof_index> dof_indices;
dof_indices.reserve (max_dofs_per_cell(dof_handler));
for (unsigned int present_cell = 0; cell!=endc; ++cell, ++present_cell)
// then loop over all cells and do
// work
- std::vector<unsigned int> indices(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> indices(fe.dofs_per_cell);
typename DH::cell_iterator c;
for (c = dof.begin(level) ; c != dof.end(level) ; ++ c)
{
= (component_select != std::vector<bool>(component_select.size(),
true));
- std::vector<unsigned int> face_dof_indices;
+ std::vector<types::global_dof_index> face_dof_indices;
face_dof_indices.reserve (max_dofs_per_face(dof_handler));
// now loop over all cells and
// values
selected_dofs.clear ();
selected_dofs.resize (dof_handler.n_dofs(), false);
- std::vector<unsigned int> cell_dof_indices;
+ std::vector<types::global_dof_index> cell_dof_indices;
cell_dof_indices.reserve (max_dofs_per_cell(dof_handler));
// now loop over all cells and
// preset all values by false
std::fill_n (selected_dofs.begin(), dof_handler.n_dofs(), false);
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
local_dof_indices.reserve (max_dofs_per_cell(dof_handler));
// this function is similar to the
// because we can't be sure that the dof
// range of locally_owned_dofs is really
// contiguous.
- std::vector<unsigned int> dof_indices;
- std::set<unsigned int> global_dof_indices;
+ std::vector<types::global_dof_index> dof_indices;
+ std::set<types::global_dof_index> global_dof_indices;
typename DH::active_cell_iterator cell = dof_handler.begin_active(),
endc = dof_handler.end();
dof_indices.resize(cell->get_fe().dofs_per_cell);
cell->get_dof_indices(dof_indices);
- for (std::vector<unsigned int>::iterator it=dof_indices.begin();
+ for (std::vector<types::global_dof_index>::iterator it=dof_indices.begin();
it!=dof_indices.end();
++it)
if (!dof_set.is_element(*it))
// because we can't be sure that the dof
// range of locally_owned_dofs is really
// contiguous.
- std::vector<unsigned int> dof_indices;
- std::set<unsigned int> global_dof_indices;
+ std::vector<types::global_dof_index> dof_indices;
+ std::set<types::global_dof_index> global_dof_indices;
typename DH::active_cell_iterator cell = dof_handler.begin_active(),
endc = dof_handler.end();
dof_indices.resize(cell->get_fe().dofs_per_cell);
cell->get_dof_indices(dof_indices);
- for (std::vector<unsigned int>::iterator it=dof_indices.begin();
+ for (std::vector<types::global_dof_index>::iterator it=dof_indices.begin();
it!=dof_indices.end();
++it)
if (!dof_set.is_element(*it))
std::fill_n (subdomain_association.begin(), dof_handler.n_dofs(),
types::invalid_subdomain_id);
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
local_dof_indices.reserve (max_dofs_per_cell(dof_handler));
// pseudo-randomly assign variables
IndexSet index_set (dof_handler.n_dofs());
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
local_dof_indices.reserve (max_dofs_per_cell(dof_handler));
// first generate an unsorted list of all
// hence too expensive. Could also use
// std::set, but that is in general more
// expensive than a vector
- std::vector<unsigned int> subdomain_indices;
+ std::vector<types::global_dof_index> subdomain_indices;
typename DH::active_cell_iterator
cell = dof_handler.begin_active(),
const std::vector<unsigned char> &dofs_by_component,
const std::vector<unsigned int> &target_component,
const bool only_once,
- std::vector<unsigned int> &dofs_per_component,
+ std::vector<types::global_dof_index> &dofs_per_component,
unsigned int &component)
{
for (unsigned int b=0;b<fe.n_base_elements();++b)
const std::vector<unsigned char> &dofs_by_component,
const std::vector<unsigned int> &target_component,
const bool only_once,
- std::vector<unsigned int> &dofs_per_component,
+ std::vector<types::global_dof_index> &dofs_per_component,
unsigned int &component)
{
// assert that all elements in the collection have the same
void
count_dofs_per_component (
const DH & dof_handler,
- std::vector<unsigned int>& dofs_per_component,
+ std::vector<types::global_dof_index>& dofs_per_component,
bool only_once,
std::vector<unsigned int> target_component)
{
template <class DH>
void
count_dofs_per_block (const DH &dof_handler,
- std::vector<unsigned int> &dofs_per_block,
+ std::vector<types::global_dof_index> &dofs_per_block,
std::vector<unsigned int> target_block)
{
const dealii::hp::FECollection<DH::dimension,DH::space_dimension>
template <int dim, int spacedim>
void
count_dofs_per_component (const DoFHandler<dim,spacedim> &dof_handler,
- std::vector<unsigned int> &dofs_per_component,
+ std::vector<types::global_dof_index> &dofs_per_component,
std::vector<unsigned int> target_component)
{
count_dofs_per_component (dof_handler, dofs_per_component,
dealii::Vector<double> global_parameter_representation (n_fine_dofs);
typename dealii::DoFHandler<dim,spacedim>::active_cell_iterator cell;
- std::vector<unsigned int> parameter_dof_indices (coarse_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> parameter_dof_indices (coarse_fe.dofs_per_cell);
for (cell=begin; cell!=end; ++cell)
{
// interesting dof. finally count
// how many true's there
std::vector<bool> dof_is_interesting (fine_grid.n_dofs(), false);
- std::vector<unsigned int> local_dof_indices (fine_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (fine_fe.dofs_per_cell);
for (typename dealii::DoFHandler<dim,spacedim>::active_cell_iterator
cell=fine_grid.begin_active();
if (true)
{
- std::vector<unsigned int> local_dof_indices(fine_fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices(fine_fe.dofs_per_cell);
unsigned int next_free_index=0;
for (typename dealii::DoFHandler<dim,spacedim>::active_cell_iterator
cell=fine_grid.begin_active();
template <class DH>
void
map_dof_to_boundary_indices (const DH &dof_handler,
- std::vector<unsigned int> &mapping)
+ std::vector<types::global_dof_index> &mapping)
{
Assert (&dof_handler.get_fe() != 0, ExcNoFESelected());
mapping.insert (mapping.end(), dof_handler.n_dofs(),
DH::invalid_dof_index);
- std::vector<unsigned int> dofs_on_face;
+ std::vector<types::global_dof_index> dofs_on_face;
dofs_on_face.reserve (max_dofs_per_face(dof_handler));
unsigned int next_boundary_index = 0;
void map_dof_to_boundary_indices (
const DH &dof_handler,
const std::set<types::boundary_id_t> &boundary_indicators,
- std::vector<unsigned int> &mapping)
+ std::vector<types::global_dof_index> &mapping)
{
Assert (&dof_handler.get_fe() != 0, ExcNoFESelected());
Assert (boundary_indicators.find (types::internal_face_boundary_id) == boundary_indicators.end(),
if (boundary_indicators.size() == 0)
return;
- std::vector<unsigned int> dofs_on_face;
+ std::vector<types::global_dof_index> dofs_on_face;
dofs_on_face.reserve (max_dofs_per_face(dof_handler));
unsigned int next_boundary_index = 0;
void
map_dofs_to_support_points(const hp::MappingCollection<DH::dimension, DH::space_dimension> & mapping,
const DH &dof_handler,
- std::map<unsigned int,Point<DH::space_dimension> > &support_points)
+ std::map<types::global_dof_index,Point<DH::space_dimension> > &support_points)
{
const unsigned int dim = DH::dimension;
const unsigned int spacedim = DH::space_dimension;
typename DH::active_cell_iterator cell =
dof_handler.begin_active(), endc = dof_handler.end();
- std::vector<unsigned int> local_dof_indices;
+ std::vector<types::global_dof_index> local_dof_indices;
for (; cell != endc; ++cell)
// only work on locally relevant cells
if (cell->is_artificial() == false)
std::vector<Point<DH::space_dimension> > &support_points)
{
// get the data in the form of the map as above
- std::map<unsigned int,Point<DH::space_dimension> > x_support_points;
+ std::map<types::global_dof_index,Point<DH::space_dimension> > x_support_points;
map_dofs_to_support_points(mapping, dof_handler, x_support_points);
// now convert from the map to the linear vector. make sure every
void
map_dofs_to_support_points (const Mapping<dim,spacedim> &mapping,
const DoFHandler<dim,spacedim> &dof_handler,
- std::map<unsigned int, Point<spacedim> > &support_points)
+ std::map<types::global_dof_index, Point<spacedim> > &support_points)
{
support_points.clear();
void
map_dofs_to_support_points(const hp::MappingCollection<dim, spacedim> &mapping,
const hp::DoFHandler<dim, spacedim> &dof_handler,
- std::map<unsigned int, Point<spacedim> > &support_points)
+ std::map<types::global_dof_index, Point<spacedim> > &support_points)
{
support_points.clear();
VectorTools::ExcNoComponentSelected());
// a field to store the indices
- std::vector<unsigned int> face_dofs;
+ std::vector<types::global_dof_index> face_dofs;
face_dofs.reserve (max_dofs_per_face(dof));
typename DH<dim,spacedim>::active_cell_iterator
const DH& dof_handler,
const unsigned int level,
const std::vector<bool>& selected_dofs,
- unsigned int offset)
+ types::global_dof_index offset)
{
typename DH::cell_iterator cell;
typename DH::cell_iterator endc = dof_handler.end(level);