?
typename
internal::Triangulation::Iterators<dim,spacedim>::
- raw_cell_iterator (&dof_handler.get_tria(),
+ raw_cell_iterator (&dof_handler.get_triangulation(),
obj_level,
obj_index)->used()
:
?
typename
internal::Triangulation::Iterators<dim,spacedim>::
- raw_line_iterator (&dof_handler.get_tria(),
+ raw_line_iterator (&dof_handler.get_triangulation(),
obj_level,
obj_index)->used()
:
?
typename
internal::Triangulation::Iterators<dim,spacedim>::
- raw_cell_iterator (&dof_handler.get_tria(),
+ raw_cell_iterator (&dof_handler.get_triangulation(),
obj_level,
obj_index)->used()
:
?
typename
internal::Triangulation::Iterators<dim,spacedim>::
- raw_line_iterator (&dof_handler.get_tria(),
+ raw_line_iterator (&dof_handler.get_triangulation(),
obj_level,
obj_index)->used()
:
* renumbered.
*
* @pre @p cell_order must have size
- * <code>dof_handler.get_tria().n_active_cells()</code>. Every active
+ * <code>dof_handler.get_triangulation().n_active_cells()</code>. Every active
* cell iterator of that triangulation needs to be present in @p cell_order
* exactly once.
*/
* renumbered.
*
* @pre @p cell_order must have size
- * <code>dof_handler.get_tria().n_active_cells()</code>. Every active
+ * <code>dof_handler.get_triangulation().n_active_cells()</code>. Every active
* cell iterator of that triangulation needs to be present in @p cell_order
* exactly once.
* @post For each @p i between zero and <code>dof_handler.n_dofs()</code>,
std::pair<unsigned int,unsigned int> index =
cell_level_index[macro_cell_number*vectorization_length+vector_number];
return typename DoFHandler<dim>::cell_iterator
- (&dofh->get_tria(), index.first, index.second, dofh);
+ (&dofh->get_triangulation(), index.first, index.second, dofh);
}
std::pair<unsigned int,unsigned int> index =
cell_level_index[macro_cell_number*vectorization_length+vector_number];
return typename hp::DoFHandler<dim>::cell_iterator
- (&dofh->get_tria(), index.first, index.second, dofh);
+ (&dofh->get_triangulation(), index.first, index.second, dofh);
}
AssertDimension (dof_handler.size(), locally_owned_set.size());
// set variables that are independent of FE
- internal::assert_communicator_equality (dof_handler[0]->get_tria(),
+ internal::assert_communicator_equality (dof_handler[0]->get_triangulation(),
additional_data.mpi_communicator);
size_info.communicator = additional_data.mpi_communicator;
if (Utilities::MPI::job_supports_mpi() == true)
// general case?
if (additional_data.initialize_mapping == true)
{
- mapping_info.initialize (dof_handler[0]->get_tria(), cell_level_index,
+ mapping_info.initialize (dof_handler[0]->get_triangulation(), cell_level_index,
dof_info[0].cell_active_fe_index, mapping, quad,
additional_data.mapping_update_flags);
AssertDimension (dof_handler.size(), locally_owned_set.size());
// set variables that are independent of FE
- internal::assert_communicator_equality (dof_handler[0]->get_tria(),
+ internal::assert_communicator_equality (dof_handler[0]->get_triangulation(),
additional_data.mpi_communicator);
size_info.communicator = additional_data.mpi_communicator;
if (Utilities::MPI::job_supports_mpi() == true)
// determined in @p extract_local_to_global_indices.
if (additional_data.initialize_mapping == true)
{
- mapping_info.initialize (dof_handler[0]->get_tria(), cell_level_index,
+ mapping_info.initialize (dof_handler[0]->get_triangulation(), cell_level_index,
dof_info[0].cell_active_fe_index, mapping, quad,
additional_data.mapping_update_flags);
const unsigned int n_mpi_procs = size_info.n_procs;
const unsigned int my_pid = size_info.my_pid;
- const Triangulation<dim> &tria = dof_handlers.dof_handler[0]->get_tria();
+ const Triangulation<dim> &tria = dof_handlers.dof_handler[0]->get_triangulation();
if (level == numbers::invalid_unsigned_int)
{
if (n_mpi_procs == 1)
// if we have no level given, use the same as for the standard DoFHandler,
// otherwise we must loop through the respective level
- const Triangulation<dim> &tria = dof_handler[0]->get_tria();
+ const Triangulation<dim> &tria = dof_handler[0]->get_triangulation();
if (n_mpi_procs == 1)
{
{
const DoFHandler<dim> *dofh = &*dof_handlers.dof_handler[no];
typename DoFHandler<dim>::active_cell_iterator
- cell_it (&dofh->get_tria(),
+ cell_it (&dofh->get_triangulation(),
cell_level_index[counter].first,
cell_level_index[counter].second,
dofh);
dof_handlers.level != numbers::invalid_unsigned_int)
{
const DoFHandler<dim> *dofh = dof_handlers.dof_handler[no];
- AssertIndexRange (dof_handlers.level, dofh->get_tria().n_levels());
+ AssertIndexRange (dof_handlers.level, dofh->get_triangulation().n_levels());
typename DoFHandler<dim>::cell_iterator
- cell_it (&dofh->get_tria(),
+ cell_it (&dofh->get_triangulation(),
cell_level_index[counter].first,
cell_level_index[counter].second,
dofh);
const hp::DoFHandler<dim> *dofh =
dof_handlers.hp_dof_handler[no];
typename hp::DoFHandler<dim>::active_cell_iterator
- cell_it (&dofh->get_tria(),
+ cell_it (&dofh->get_triangulation(),
cell_level_index[counter].first,
cell_level_index[counter].second,
dofh);
void
MGConstrainedDoFs::initialize(const DoFHandler<dim,spacedim> &dof)
{
- const unsigned int nlevels = dof.get_tria().n_global_levels();
+ const unsigned int nlevels = dof.get_triangulation().n_global_levels();
boundary_indices.resize(nlevels);
const unsigned int n_target_blocks = max_block + 1;
std::vector<std::vector<types::global_dof_index> >
- ndofs(mg_dof.get_tria().n_levels(),
+ ndofs(mg_dof.get_triangulation().n_levels(),
std::vector<types::global_dof_index>(n_target_blocks));
MGTools::count_dofs_per_block (mg_dof, ndofs, target_component);
{
const parallel::Triangulation<dim,spacedim> *tria =
(dynamic_cast<const parallel::Triangulation<dim,spacedim>*>
- (&mg_dof.get_tria()));
+ (&mg_dof.get_triangulation()));
for (unsigned int level=v.min_level();
level<=v.max_level(); ++level)
{
const dealii::parallel::distributed::Triangulation<dim,spacedim> *tria =
(dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>
- (&mg_dof.get_tria()));
+ (&mg_dof.get_triangulation()));
AssertThrow(tria!=NULL, ExcMessage("multigrid with Trilinos vectors only works with distributed Triangulation!"));
#ifdef DEAL_II_WITH_P4EST
std::cout << "copy_to_mg src " << src.l2_norm() << std::endl;
MPI_Barrier(MPI_COMM_WORLD);
#endif
- for (unsigned int level=mg_dof_handler.get_tria().n_global_levels(); level != 0;)
+ for (unsigned int level=mg_dof_handler.get_triangulation().n_global_levels(); level != 0;)
{
--level;
VectorType &dst_level = dst[level];
// have fine level basis
// functions
dst = 0;
- for (unsigned int level=0; level<mg_dof_handler.get_tria().n_global_levels(); ++level)
+ for (unsigned int level=0; level<mg_dof_handler.get_triangulation().n_global_levels(); ++level)
{
#ifdef DEBUG_OUTPUT
MPI_Barrier(MPI_COMM_WORLD);
// to the coarse level, but
// have fine level basis
// functions
- for (unsigned int level=0; level<mg_dof_handler.get_tria().n_global_levels(); ++level)
+ for (unsigned int level=0; level<mg_dof_handler.get_triangulation().n_global_levels(); ++level)
{
typedef std::vector<std::pair<types::global_dof_index, types::global_dof_index> >::const_iterator dof_pair_iterator;
BlockVector<number2> &dst,
const MGLevelObject<Vector<number> > &src) const
{
- for (unsigned int level=0; level<mg_dof_handler.get_tria().n_levels(); ++level)
+ for (unsigned int level=0; level<mg_dof_handler.get_triangulation().n_levels(); ++level)
for (IT i= copy_indices[selected_block][level].begin();
i != copy_indices[selected_block][level].end(); ++i)
dst.block(selected_block)(i->first) = src[level](i->second);
Vector<number2> &dst,
const MGLevelObject<Vector<number> > &src) const
{
- for (unsigned int level=0; level<mg_dof_handler.get_tria().n_levels(); ++level)
+ for (unsigned int level=0; level<mg_dof_handler.get_triangulation().n_levels(); ++level)
for (IT i= copy_indices[selected_block][level].begin();
i != copy_indices[selected_block][level].end(); ++i)
dst(i->first) = src[level](i->second);
BlockVector<number2> &dst,
const MGLevelObject<Vector<number> > &src) const
{
- for (unsigned int level=0; level<mg_dof_handler.get_tria().n_levels(); ++level)
+ for (unsigned int level=0; level<mg_dof_handler.get_triangulation().n_levels(); ++level)
for (IT i= copy_indices[selected_block][level].begin();
i != copy_indices[selected_block][level].end(); ++i)
dst.block(selected_block)(i->first) += src[level](i->second);
Vector<number2> &dst,
const MGLevelObject<Vector<number> > &src) const
{
- for (unsigned int level=0; level<mg_dof_handler.get_tria().n_levels(); ++level)
+ for (unsigned int level=0; level<mg_dof_handler.get_triangulation().n_levels(); ++level)
for (IT i= copy_indices[selected_block][level].begin();
i != copy_indices[selected_block][level].end(); ++i)
dst(i->first) += src[level](i->second);
{
for (unsigned int block=0; block<selected.size(); ++block)
if (selected[block])
- for (unsigned int level=0; level<mg_dof_handler.get_tria().n_levels(); ++level)
+ for (unsigned int level=0; level<mg_dof_handler.get_triangulation().n_levels(); ++level)
for (IT i= copy_indices[block][level].begin();
i != copy_indices[block][level].end(); ++i)
dst.block(block)(i->first) = src[level].block(mg_block[block])(i->second);
{
for (unsigned int block=0; block<selected.size(); ++block)
if (selected[block])
- for (unsigned int level=0; level<mg_dof_handler.get_tria().n_levels(); ++level)
+ for (unsigned int level=0; level<mg_dof_handler.get_triangulation().n_levels(); ++level)
for (IT i= copy_indices[block][level].begin();
i != copy_indices[block][level].end(); ++i)
dst.block(block)(i->first) += src[level].block(mg_block[block])(i->second);
:
cycle_type(cycle),
minlevel(0),
- maxlevel(mg_dof_handler.get_tria().n_global_levels()-1),
+ maxlevel(mg_dof_handler.get_triangulation().n_global_levels()-1),
defect(minlevel,maxlevel),
solution(minlevel,maxlevel),
t(minlevel,maxlevel),
void
SparseMatrixCollection<number>::reinit(const DoFHandlerType &dof_handler)
{
- AssertIndexRange(sparsity.max_level(), dof_handler.get_tria().n_levels());
+ AssertIndexRange(sparsity.max_level(), dof_handler.get_triangulation().n_levels());
for (unsigned int level=sparsity.min_level();
level<=sparsity.max_level(); ++level)
{
#ifdef DEAL_II_WITH_P4EST
if (dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>
- (&dof_handler.get_tria())
+ (&dof_handler.get_triangulation())
!= 0)
Assert ((subdomain_id_ == numbers::invalid_subdomain_id)
||
(subdomain_id_ ==
dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>&>
- (dof_handler.get_tria()).locally_owned_subdomain()),
+ (dof_handler.get_triangulation()).locally_owned_subdomain()),
ExcMessage ("For parallel distributed triangulations, the only "
"valid subdomain_id that can be passed here is the "
"one that corresponds to the locally owned subdomain id."));
const types::subdomain_id subdomain_id
= ((dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>
- (&dof_handler.get_tria())
+ (&dof_handler.get_triangulation())
!= 0)
?
dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>&>
- (dof_handler.get_tria()).locally_owned_subdomain()
+ (dof_handler.get_triangulation()).locally_owned_subdomain()
:
subdomain_id_);
#else
// reserve one slot for each cell and set it to zero
for (unsigned int n=0; n<n_solution_vectors; ++n)
{
- (*errors[n]).reinit (dof_handler.get_tria().n_active_cells());
- for (unsigned int i=0; i<dof_handler.get_tria().n_active_cells(); ++i)
+ (*errors[n]).reinit (dof_handler.get_triangulation().n_active_cells());
+ for (unsigned int i=0; i<dof_handler.get_triangulation().n_active_cells(); ++i)
(*errors[n])(i)=0;
}
// function to hold on
// all parts of the boundary
const std::vector<types::boundary_id>
- used_boundary_ids = dof.get_tria().get_boundary_ids();
+ used_boundary_ids = dof.get_triangulation().get_boundary_ids();
typename FunctionMap<spacedim>::type boundary_functions;
for (unsigned int i=0; i<used_boundary_ids.size(); ++i)
ExcDimensionMismatch(weight->n_components, n_components));
}
- difference.reinit (dof.get_tria().n_active_cells());
+ difference.reinit (dof.get_triangulation().n_active_cells());
switch (norm)
{
// over the entire domain
if (const parallel::Triangulation<dim,spacedim> *
p_triangulation
- = dynamic_cast<const parallel::Triangulation<dim,spacedim> *>(&dof.get_tria()))
+ = dynamic_cast<const parallel::Triangulation<dim,spacedim> *>(&dof.get_triangulation()))
{
// The type used to store the elements of the global vector may be a
// real or a complex number. Do the global reduction always with real
// carefully selecting the right components.
FESystem<dim,spacedim> feq(FE_Q<dim,spacedim>(degree), spacedim);
- DoFHandlerType dhq(dh.get_tria());
+ DoFHandlerType dhq(dh.get_triangulation());
dhq.distribute_dofs(feq);
Vector<double> eulerq(dhq.n_dofs());
const ComponentMask maskq(spacedim, true);
dof_handler(&dof, typeid(*this).name())
{
Assert (dynamic_cast<const parallel::distributed::Triangulation<dim>*>
- (&dof_handler->get_tria()) != 0,
+ (&dof_handler->get_triangulation()) != 0,
ExcMessage("parallel::distributed::SolutionTransfer requires a parallel::distributed::Triangulation object."));
}
parallel::distributed::Triangulation<dim,DoFHandlerType::space_dimension> *tria
= (dynamic_cast<parallel::distributed::Triangulation<dim,DoFHandlerType::space_dimension>*>
(const_cast<dealii::Triangulation<dim,DoFHandlerType::space_dimension>*>
- (&dof_handler->get_tria())));
+ (&dof_handler->get_triangulation())));
Assert (tria != 0, ExcInternalError());
offset
parallel::distributed::Triangulation<dim,DoFHandlerType::space_dimension> *tria
= (dynamic_cast<parallel::distributed::Triangulation<dim,DoFHandlerType::space_dimension>*>
(const_cast<dealii::Triangulation<dim,DoFHandlerType::space_dimension>*>
- (&dof_handler->get_tria())));
+ (&dof_handler->get_triangulation())));
Assert (tria != 0, ExcInternalError());
tria->notify_ready_to_unpack(offset,
if (!active_only && dof.has_level_dofs())
{
- std::vector<std::vector<types::global_dof_index> > sizes (dof.get_tria ().n_levels ());
+ std::vector<std::vector<types::global_dof_index> > sizes (dof.get_triangulation().n_levels ());
for (unsigned int i = 0; i < sizes.size (); ++i)
sizes[i].resize (dof.get_fe ().n_blocks ());
static
void reserve_space_mg (DoFHandler<1, spacedim> &dof_handler)
{
- Assert (dof_handler.get_tria ().n_levels () > 0, ExcMessage ("Invalid triangulation"));
+ Assert (dof_handler.get_triangulation().n_levels () > 0, ExcMessage ("Invalid triangulation"));
dof_handler.clear_mg_space ();
- const dealii::Triangulation<1, spacedim> &tria = dof_handler.get_tria ();
+ const dealii::Triangulation<1, spacedim> &tria = dof_handler.get_triangulation();
const unsigned int &dofs_per_line = dof_handler.get_fe ().dofs_per_line;
const unsigned int &n_levels = tria.n_levels ();
static
void reserve_space_mg (DoFHandler<2, spacedim> &dof_handler)
{
- Assert (dof_handler.get_tria ().n_levels () > 0, ExcMessage ("Invalid triangulation"));
+ Assert (dof_handler.get_triangulation().n_levels () > 0, ExcMessage ("Invalid triangulation"));
dof_handler.clear_mg_space ();
const dealii::FiniteElement<2, spacedim> &fe = dof_handler.get_fe ();
- const dealii::Triangulation<2, spacedim> &tria = dof_handler.get_tria ();
+ const dealii::Triangulation<2, spacedim> &tria = dof_handler.get_triangulation();
const unsigned int &n_levels = tria.n_levels ();
for (unsigned int i = 0; i < n_levels; ++i)
static
void reserve_space_mg (DoFHandler<3, spacedim> &dof_handler)
{
- Assert (dof_handler.get_tria ().n_levels () > 0, ExcMessage ("Invalid triangulation"));
+ Assert (dof_handler.get_triangulation().n_levels () > 0, ExcMessage ("Invalid triangulation"));
dof_handler.clear_mg_space ();
const dealii::FiniteElement<3, spacedim> &fe = dof_handler.get_fe ();
- const dealii::Triangulation<3, spacedim> &tria = dof_handler.get_tria ();
+ const dealii::Triangulation<3, spacedim> &tria = dof_handler.get_triangulation();
const unsigned int &n_levels = tria.n_levels ();
for (unsigned int i = 0; i < n_levels; ++i)
typename DoFHandler<dim,spacedim>::cell_iterator
DoFHandler<dim,spacedim>::begin (const unsigned int level) const
{
- typename Triangulation<dim,spacedim>::cell_iterator cell = this->get_tria().begin(level);
- if (cell == this->get_tria().end(level))
+ typename Triangulation<dim,spacedim>::cell_iterator cell = this->get_triangulation().begin(level);
+ if (cell == this->get_triangulation().end(level))
return end(level);
return cell_iterator (*cell, this);
}
typename DoFHandler<dim,spacedim>::cell_iterator
DoFHandler<dim,spacedim>::end () const
{
- return cell_iterator (&this->get_tria(),
+ return cell_iterator (&this->get_triangulation(),
-1,
-1,
this);
typename DoFHandler<dim,spacedim>::cell_iterator
DoFHandler<dim,spacedim>::end (const unsigned int level) const
{
- typename Triangulation<dim,spacedim>::cell_iterator cell = this->get_tria().end(level);
+ typename Triangulation<dim,spacedim>::cell_iterator cell = this->get_triangulation().end(level);
if (cell.state() != IteratorState::valid)
return end();
return cell_iterator (*cell, this);
typename DoFHandler<dim, spacedim>::active_cell_iterator
DoFHandler<dim, spacedim>::end_active (const unsigned int level) const
{
- typename Triangulation<dim,spacedim>::cell_iterator cell = this->get_tria().end_active(level);
+ typename Triangulation<dim,spacedim>::cell_iterator cell = this->get_triangulation().end_active(level);
if (cell.state() != IteratorState::valid)
return active_cell_iterator(end());
return active_cell_iterator (*cell, this);
{
// Assert(this->has_level_dofs(), ExcMessage("You can only iterate over mg "
// "levels if mg dofs got distributed."));
- typename Triangulation<dim,spacedim>::cell_iterator cell = this->get_tria().begin(level);
- if (cell == this->get_tria().end(level))
+ typename Triangulation<dim,spacedim>::cell_iterator cell = this->get_triangulation().begin(level);
+ if (cell == this->get_triangulation().end(level))
return end_mg(level);
return level_cell_iterator (*cell, this);
}
{
// Assert(this->has_level_dofs(), ExcMessage("You can only iterate over mg "
// "levels if mg dofs got distributed."));
- typename Triangulation<dim,spacedim>::cell_iterator cell = this->get_tria().end(level);
+ typename Triangulation<dim,spacedim>::cell_iterator cell = this->get_triangulation().end(level);
if (cell.state() != IteratorState::valid)
return end();
return level_cell_iterator (*cell, this);
typename DoFHandler<dim, spacedim>::level_cell_iterator
DoFHandler<dim, spacedim>::end_mg () const
{
- return level_cell_iterator (&this->get_tria(), -1, -1, this);
+ return level_cell_iterator (&this->get_triangulation(), -1, -1, this);
}
{
// save user flags as they will be modified
std::vector<bool> user_flags;
- this->get_tria().save_user_flags(user_flags);
- const_cast<Triangulation<2> &>(this->get_tria()).clear_user_flags ();
+ this->get_triangulation().save_user_flags(user_flags);
+ const_cast<Triangulation<2> &>(this->get_triangulation()).clear_user_flags ();
// flag all lines adjacent to cells of the current
// level, as those lines logically belong to the same
cell->line(l)->clear_user_flag();
}
// finally, restore user flags
- const_cast<Triangulation<2> &>(this->get_tria()).load_user_flags (user_flags);
+ const_cast<Triangulation<2> &>(this->get_triangulation()).load_user_flags (user_flags);
}
for (std::vector<types::global_dof_index>::iterator i=mg_levels[level]->dof_object.dofs.begin();
{
// save user flags as they will be modified
std::vector<bool> user_flags;
- this->get_tria().save_user_flags(user_flags);
- const_cast<Triangulation<3> &>(this->get_tria()).clear_user_flags ();
+ this->get_triangulation().save_user_flags(user_flags);
+ const_cast<Triangulation<3> &>(this->get_triangulation()).clear_user_flags ();
// flag all lines adjacent to cells of the current
// level, as those lines logically belong to the same
cell->line(l)->clear_user_flag();
}
// finally, restore user flags
- const_cast<Triangulation<3> &>(this->get_tria()).load_user_flags (user_flags);
+ const_cast<Triangulation<3> &>(this->get_triangulation()).load_user_flags (user_flags);
}
// QUAD DoFs
{
// save user flags as they will be modified
std::vector<bool> user_flags;
- this->get_tria().save_user_flags(user_flags);
- const_cast<Triangulation<3> &>(this->get_tria()).clear_user_flags ();
+ this->get_triangulation().save_user_flags(user_flags);
+ const_cast<Triangulation<3> &>(this->get_triangulation()).clear_user_flags ();
// flag all quads adjacent to cells of the current
// level, as those lines logically belong to the same
cell->quad(q)->clear_user_flag();
}
// finally, restore user flags
- const_cast<Triangulation<3> &>(this->get_tria()).load_user_flags (user_flags);
+ const_cast<Triangulation<3> &>(this->get_triangulation()).load_user_flags (user_flags);
}
//HEX DoFs
DoFHandler<dim,spacedim> &dof_handler)
{
const dealii::Triangulation<dim,spacedim> &tria
- = dof_handler.get_tria();
+ = dof_handler.get_triangulation();
Assert (tria.n_levels() > 0, ExcMessage("Empty triangulation"));
// Clear user flags because we will need them. But first we save
const unsigned int level)
{
const dealii::Triangulation<dim,spacedim> &tria
- = dof_handler.get_tria();
+ = dof_handler.get_triangulation();
Assert (tria.n_levels() > 0, ExcMessage("Empty triangulation"));
if (level>=tria.n_levels())
return 0; //this is allowed for multigrid
// invalid_dof_index:
// check if this one
// really is unused
- Assert (dof_handler.get_tria()
+ Assert (dof_handler.get_triangulation()
.vertex_used((i-dof_handler.vertex_dofs.begin()) /
dof_handler.selected_fe->dofs_per_vertex)
== false,
// if index is invalid_dof_index:
// check if this one really is
// unused
- Assert (dof_handler.get_tria()
+ Assert (dof_handler.get_triangulation()
.vertex_used((i-dof_handler.vertex_dofs.begin()) /
dof_handler.selected_fe->dofs_per_vertex)
== false,
const unsigned int level,
const bool check_validity)
{
- if (level>=dof_handler.get_tria().n_levels())
+ if (level>=dof_handler.get_triangulation().n_levels())
return;
for (typename std::vector<typename DoFHandler<2,spacedim>::MGVertexDoFs>::iterator i=dof_handler.mg_vertex_dofs.begin();
i!=dof_handler.mg_vertex_dofs.end(); ++i)
{
// save user flags as they will be modified
std::vector<bool> user_flags;
- dof_handler.get_tria().save_user_flags(user_flags);
- const_cast<dealii::Triangulation<2,spacedim> &>(dof_handler.get_tria()).clear_user_flags ();
+ dof_handler.get_triangulation().save_user_flags(user_flags);
+ const_cast<dealii::Triangulation<2,spacedim> &>(dof_handler.get_triangulation()).clear_user_flags ();
// flag all lines adjacent to cells of the current
// level, as those lines logically belong to the same
cell->line(l)->clear_user_flag();
}
// finally, restore user flags
- const_cast<dealii::Triangulation<2,spacedim> &>(dof_handler.get_tria()).load_user_flags (user_flags);
+ const_cast<dealii::Triangulation<2,spacedim> &>(dof_handler.get_triangulation()).load_user_flags (user_flags);
}
for (std::vector<types::global_dof_index>::iterator i=dof_handler.mg_levels[level]->dof_object.dofs.begin();
// if index is invalid_dof_index:
// check if this one really is
// unused
- Assert (dof_handler.get_tria()
+ Assert (dof_handler.get_triangulation()
.vertex_used((i-dof_handler.vertex_dofs.begin()) /
dof_handler.selected_fe->dofs_per_vertex)
== false,
const unsigned int level,
const bool check_validity)
{
- if (level>=dof_handler.get_tria().n_levels())
+ if (level>=dof_handler.get_triangulation().n_levels())
return;
for (typename std::vector<typename DoFHandler<3,spacedim>::MGVertexDoFs>::iterator i=dof_handler.mg_vertex_dofs.begin();
i!=dof_handler.mg_vertex_dofs.end(); ++i)
{
// save user flags as they will be modified
std::vector<bool> user_flags;
- dof_handler.get_tria().save_user_flags(user_flags);
- const_cast<dealii::Triangulation<3,spacedim> &>(dof_handler.get_tria()).clear_user_flags ();
+ dof_handler.get_triangulation().save_user_flags(user_flags);
+ const_cast<dealii::Triangulation<3,spacedim> &>(dof_handler.get_triangulation()).clear_user_flags ();
// flag all lines adjacent to cells of the current level, as
// those lines logically belong to the same level as the cell,
}
// finally, restore user flags
- const_cast<dealii::Triangulation<3,spacedim> &>(dof_handler.get_tria()).load_user_flags (user_flags);
+ const_cast<dealii::Triangulation<3,spacedim> &>(dof_handler.get_triangulation()).load_user_flags (user_flags);
}
for (std::vector<types::global_dof_index>::iterator i=dof_handler.mg_levels[level]->dof_object.dofs.begin();
{
std::vector<bool> user_flags;
- dof_handler.get_tria().save_user_flags (user_flags);
- const_cast<dealii::Triangulation<dim, spacedim>&>(dof_handler.get_tria()).clear_user_flags ();
+ dof_handler.get_triangulation().save_user_flags (user_flags);
+ const_cast<dealii::Triangulation<dim, spacedim>&>(dof_handler.get_triangulation()).clear_user_flags ();
- for (unsigned int level = 0; level < dof_handler.get_tria().n_levels(); ++level)
+ for (unsigned int level = 0; level < dof_handler.get_triangulation().n_levels(); ++level)
{
types::global_dof_index next_free_dof = Implementation::distribute_dofs_on_level(0, numbers::invalid_subdomain_id, dof_handler, level);
number_caches[level].n_locally_owned_dofs_per_processor.resize(1);
number_caches[level].n_locally_owned_dofs_per_processor[0] = next_free_dof;
}
- const_cast<dealii::Triangulation<dim, spacedim>&>(dof_handler.get_tria()).load_user_flags (user_flags);
+ const_cast<dealii::Triangulation<dim, spacedim>&>(dof_handler.get_triangulation()).load_user_flags (user_flags);
}
template <int dim, int spacedim>
// Namely, we first restore original partition (without artificial cells)
// and then turn artificial cells on at the end of this function.
const parallel::shared::Triangulation<dim, spacedim> *tr =
- (dynamic_cast<const parallel::shared::Triangulation<dim, spacedim>*> (&dof_handler.get_tria ()));
+ (dynamic_cast<const parallel::shared::Triangulation<dim, spacedim>*> (&dof_handler.get_triangulation()));
Assert(tr != 0, ExcInternalError());
typename parallel::shared::Triangulation<dim,spacedim>::active_cell_iterator
- cell = dof_handler.get_tria().begin_active(),
- endc = dof_handler.get_tria().end();
+ cell = dof_handler.get_triangulation().begin_active(),
+ endc = dof_handler.get_triangulation().end();
std::vector<types::subdomain_id> current_subdomain_ids(tr->n_active_cells());
const std::vector<types::subdomain_id> &true_subdomain_ids = tr->get_true_subdomain_ids_of_cells();
if (tr->with_artificial_cells())
cell->set_subdomain_id(true_subdomain_ids[index]);
number_cache.locally_owned_dofs_per_processor = DoFTools::locally_owned_dofs_per_subdomain (dof_handler);
- number_cache.locally_owned_dofs = number_cache.locally_owned_dofs_per_processor[dof_handler.get_tria().locally_owned_subdomain()];
+ number_cache.locally_owned_dofs = number_cache.locally_owned_dofs_per_processor[dof_handler.get_triangulation().locally_owned_subdomain()];
number_cache.n_locally_owned_dofs_per_processor.resize (number_cache.locally_owned_dofs_per_processor.size());
for (unsigned int i = 0; i < number_cache.n_locally_owned_dofs_per_processor.size(); i++)
number_cache.n_locally_owned_dofs_per_processor[i] = number_cache.locally_owned_dofs_per_processor[i].n_elements();
- number_cache.n_locally_owned_dofs = number_cache.n_locally_owned_dofs_per_processor[dof_handler.get_tria().locally_owned_subdomain()];
+ number_cache.n_locally_owned_dofs = number_cache.n_locally_owned_dofs_per_processor[dof_handler.get_triangulation().locally_owned_subdomain()];
// restore current subdomain ids
cell = tr->begin_active();
// Similar to distribute_dofs() we need to have a special treatment in
// case artificial cells are present.
const parallel::shared::Triangulation<dim, spacedim> *tr =
- (dynamic_cast<const parallel::shared::Triangulation<dim, spacedim>*> (&dof_handler.get_tria ()));
+ (dynamic_cast<const parallel::shared::Triangulation<dim, spacedim>*> (&dof_handler.get_triangulation()));
Assert(tr != 0, ExcInternalError());
typename parallel::shared::Triangulation<dim,spacedim>::active_cell_iterator
- cell = dof_handler.get_tria().begin_active(),
- endc = dof_handler.get_tria().end();
+ cell = dof_handler.get_triangulation().begin_active(),
+ endc = dof_handler.get_triangulation().end();
std::vector<types::subdomain_id> current_subdomain_ids(tr->n_active_cells());
const std::vector<types::subdomain_id> &true_subdomain_ids = tr->get_true_subdomain_ids_of_cells();
if (tr->with_artificial_cells())
const unsigned int n_cpu = Utilities::MPI::n_mpi_processes (tr->get_communicator ());
std::vector<types::global_dof_index> gathered_new_numbers (dof_handler.n_dofs (), 0);
Assert(Utilities::MPI::this_mpi_process (tr->get_communicator ()) ==
- dof_handler.get_tria ().locally_owned_subdomain (),
+ dof_handler.get_triangulation().locally_owned_subdomain (),
ExcInternalError())
//gather new numbers among processors into one vector
number_cache.locally_owned_dofs_per_processor =
DoFTools::locally_owned_dofs_per_subdomain (dof_handler);
number_cache.locally_owned_dofs =
- number_cache.locally_owned_dofs_per_processor[dof_handler.get_tria ().locally_owned_subdomain ()];
+ number_cache.locally_owned_dofs_per_processor[dof_handler.get_triangulation().locally_owned_subdomain ()];
// sequential renumbering returns a vector of size 1 here,
// correct this:
number_cache.n_locally_owned_dofs_per_processor.resize(number_cache.locally_owned_dofs_per_processor.size());
number_cache.n_locally_owned_dofs_per_processor[i] = number_cache.locally_owned_dofs_per_processor[i].n_elements ();
number_cache.n_locally_owned_dofs =
- number_cache.n_locally_owned_dofs_per_processor[dof_handler.get_tria ().locally_owned_subdomain ()];
+ number_cache.n_locally_owned_dofs_per_processor[dof_handler.get_triangulation().locally_owned_subdomain ()];
// restore artificial cells
cell = tr->begin_active();
const parallel::distributed::Triangulation< dim, spacedim > *tr
= (dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>
- (&dof_handler.get_tria()));
+ (&dof_handler.get_triangulation()));
Assert (tr != 0, ExcInternalError());
// now collect cells and their
for (unsigned int c=0; c<cells; ++c, dofs+=1+dofs[0])
{
typename DoFHandler<dim,spacedim>::level_cell_iterator
- cell (&dof_handler.get_tria(),
+ cell (&dof_handler.get_triangulation(),
0,
p4est_tree_to_coarse_cell_permutation[treeindex[c]],
&dof_handler);
const parallel::distributed::Triangulation< dim, spacedim > *tr
= (dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>
- (&dof_handler.get_tria()));
+ (&dof_handler.get_triangulation()));
Assert (tr != 0, ExcInternalError());
// now collect cells and their
{
//artificial
}
- else if (cell->level_subdomain_id()==dof_handler.get_tria().locally_owned_subdomain())
+ else if (cell->level_subdomain_id()==dof_handler.get_triangulation().locally_owned_subdomain())
{
//own
local_dof_indices.resize (cell->get_fe().dofs_per_cell);
for (unsigned int c=0; c<cells; ++c, dofs+=1+dofs[0])
{
typename DoFHandler<dim,spacedim>::level_cell_iterator
- cell (&dof_handler.get_tria(),
+ cell (&dof_handler.get_triangulation(),
0,
p4est_tree_to_coarse_cell_permutation[treeindex[c]],
&dof_handler);
parallel::distributed::Triangulation< dim, spacedim > *tr
= (dynamic_cast<parallel::distributed::Triangulation<dim,spacedim>*>
(const_cast<dealii::Triangulation< dim, spacedim >*>
- (&dof_handler.get_tria())));
+ (&dof_handler.get_triangulation())));
Assert (tr != 0, ExcInternalError());
const unsigned int
parallel::distributed::Triangulation< dim, spacedim > *tr
= (dynamic_cast<parallel::distributed::Triangulation<dim,spacedim>*>
(const_cast<dealii::Triangulation< dim, spacedim >*>
- (&dof_handler.get_tria())));
+ (&dof_handler.get_triangulation())));
Assert (tr != 0, ExcInternalError());
AssertThrow(
const unsigned int
n_cpus = Utilities::MPI::n_mpi_processes (tr->get_communicator());
- unsigned int n_levels = Utilities::MPI::max(dof_handler.get_tria().n_levels(), tr->get_communicator());
+ unsigned int n_levels = Utilities::MPI::max(dof_handler.get_triangulation().n_levels(), tr->get_communicator());
for (unsigned int level = 0; level < n_levels; ++level)
{
parallel::distributed::Triangulation< dim, spacedim > *tr
= (dynamic_cast<parallel::distributed::Triangulation<dim,spacedim>*>
(const_cast<dealii::Triangulation< dim, spacedim >*>
- (&dof_handler.get_tria())));
+ (&dof_handler.get_triangulation())));
Assert (tr != 0, ExcInternalError());
std::vector<bool> user_flags;
dof_handler.renumber_dofs (renumbering);
- // for (unsigned int level=0;level<dof_handler.get_tria().n_levels();++level)
+ // for (unsigned int level=0;level<dof_handler.get_triangulation().n_levels();++level)
// if (dof_handler.n_dofs(level) != numbers::invalid_dof_index)
// component_wise(dof_handler, level, component_order_arg);
}
if (const parallel::Triangulation<dim,spacedim> *tria
= (dynamic_cast<const parallel::Triangulation<dim,spacedim>*>
- (&start->get_dof_handler().get_tria())))
+ (&start->get_dof_handler().get_triangulation())))
{
#ifdef DEAL_II_WITH_MPI
std::vector<types::global_dof_index> local_dof_count(n_buckets);
if (const parallel::Triangulation<dim,spacedim> *tria
= (dynamic_cast<const parallel::Triangulation<dim,spacedim>*>
- (&start->get_dof_handler().get_tria())))
+ (&start->get_dof_handler().get_triangulation())))
{
#ifdef DEAL_II_WITH_MPI
std::vector<types::global_dof_index> local_dof_count(n_buckets);
const parallel::distributed::Triangulation<dim> *tria
= dynamic_cast<const parallel::distributed::Triangulation<dim>*>
- (&dof_handler.get_tria());
+ (&dof_handler.get_triangulation());
if (tria)
{
const DoFHandlerType &dof,
const typename std::vector<typename DoFHandlerType::active_cell_iterator> &cells)
{
- Assert(cells.size() == dof.get_tria().n_active_cells(),
+ Assert(cells.size() == dof.get_triangulation().n_active_cells(),
ExcDimensionMismatch(cells.size(),
- dof.get_tria().n_active_cells()));
+ dof.get_triangulation().n_active_cells()));
types::global_dof_index n_global_dofs = dof.n_dofs();
const unsigned int level,
const typename std::vector<typename DoFHandlerType::level_cell_iterator> &cells)
{
- Assert(cells.size() == dof.get_tria().n_cells(level),
+ Assert(cells.size() == dof.get_triangulation().n_cells(level),
ExcDimensionMismatch(cells.size(),
- dof.get_tria().n_cells(level)));
+ dof.get_triangulation().n_cells(level)));
Assert (new_order.size() == dof.n_dofs(level),
ExcDimensionMismatch(new_order.size(), dof.n_dofs(level)));
Assert (reverse.size() == dof.n_dofs(level),
if (dof_wise_renumbering == false)
{
std::vector<typename DoFHandlerType::active_cell_iterator> ordered_cells;
- ordered_cells.reserve(dof.get_tria().n_active_cells());
+ ordered_cells.reserve(dof.get_triangulation().n_active_cells());
const CompareDownstream<typename DoFHandlerType::active_cell_iterator,
DoFHandlerType::space_dimension> comparator(direction);
if (dof_wise_renumbering == false)
{
std::vector<typename DoFHandlerType::level_cell_iterator> ordered_cells;
- ordered_cells.reserve (dof.get_tria().n_cells(level));
+ ordered_cells.reserve (dof.get_triangulation().n_cells(level));
const CompareDownstream<typename DoFHandlerType::level_cell_iterator,
DoFHandlerType::space_dimension> comparator(direction);
const bool counter)
{
std::vector<typename DoFHandlerType::active_cell_iterator> ordered_cells;
- ordered_cells.reserve (dof.get_tria().n_active_cells());
+ ordered_cells.reserve (dof.get_triangulation().n_active_cells());
internal::ClockCells<DoFHandlerType::space_dimension> comparator(center, counter);
typename DoFHandlerType::active_cell_iterator p = dof.begin_active();
const bool counter)
{
std::vector<typename DoFHandlerType::level_cell_iterator> ordered_cells;
- ordered_cells.reserve(dof.get_tria().n_active_cells());
+ ordered_cells.reserve(dof.get_triangulation().n_active_cells());
internal::ClockCells<DoFHandlerType::space_dimension> comparator(center, counter);
typename DoFHandlerType::level_cell_iterator p = dof.begin(level);
{
const unsigned int dim = DoFHandlerType::dimension;
const unsigned int spacedim = DoFHandlerType::space_dimension;
- const Triangulation<dim,spacedim> &tria = dof_handler.get_tria();
+ const Triangulation<dim,spacedim> &tria = dof_handler.get_triangulation();
(void)tria;
AssertDimension (cell_data.size(), tria.n_active_cells());
const std::set<types::boundary_id> &boundary_ids)
{
Assert ((dynamic_cast<const parallel::distributed::Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension>*>
- (&dof_handler.get_tria())
+ (&dof_handler.get_triangulation())
== 0),
ExcMessage ("This function can not be used with distributed triangulations."
"See the documentation for more information."));
const types::subdomain_id id = cell->level_subdomain_id();
// skip artificial and own cells (only look at ghost cells)
- if (id == dof_handler.get_tria().locally_owned_subdomain()
+ if (id == dof_handler.get_triangulation().locally_owned_subdomain()
|| id == numbers::artificial_subdomain_id)
continue;
get_active_fe_indices (const DoFHandlerType &dof_handler,
std::vector<unsigned int> &active_fe_indices)
{
- AssertDimension (active_fe_indices.size(), dof_handler.get_tria().n_active_cells());
+ AssertDimension (active_fe_indices.size(), dof_handler.get_triangulation().n_active_cells());
typename DoFHandlerType::active_cell_iterator
cell = dof_handler.begin_active(),
// ask is for its locally owned subdomain
Assert ((dynamic_cast<const parallel::distributed::
Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> *>
- (&dof_handler.get_tria()) == 0),
+ (&dof_handler.get_triangulation()) == 0),
ExcMessage ("For parallel::distributed::Triangulation objects and "
"associated DoF handler objects, asking for any information "
"related to a subdomain other than the locally owned one does "
// ask is for its locally owned subdomain
Assert ((dynamic_cast<const parallel::distributed::
Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> *>
- (&dof_handler.get_tria()) == 0),
+ (&dof_handler.get_triangulation()) == 0),
ExcMessage ("For parallel::distributed::Triangulation objects and "
"associated DoF handler objects, asking for any information "
"related to a subdomain other than the locally owned one does "
// ask is for its locally owned subdomain
Assert ((dynamic_cast<const parallel::distributed::
Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> *>
- (&dof_handler.get_tria()) == 0),
+ (&dof_handler.get_triangulation()) == 0),
ExcMessage ("For parallel::distributed::Triangulation objects and "
"associated DoF handler objects, asking for any subdomain other "
"than the locally owned one does not make sense."));
// with possibly artifical cells, we need to take "true" subdomain IDs (i.e. without
// artificial cells). Otherwise we are good to use subdomain_id as stored
// in cell->subdomain_id().
- std::vector<types::subdomain_id> cell_owners (dof_handler.get_tria().n_active_cells());
+ std::vector<types::subdomain_id> cell_owners (dof_handler.get_triangulation().n_active_cells());
if (const parallel::shared::Triangulation<DoFHandlerType::dimension, DoFHandlerType::space_dimension>
*tr = (dynamic_cast<const parallel::shared::Triangulation<DoFHandlerType::dimension,
- DoFHandlerType::space_dimension>*> (&dof_handler.get_tria ())))
+ DoFHandlerType::space_dimension>*> (&dof_handler.get_triangulation())))
{
cell_owners = tr->get_true_subdomain_ids_of_cells();
Assert (tr->get_true_subdomain_ids_of_cells().size() == tr->n_active_cells(),
// If we have a distributed::Triangulation only allow locally_owned
// subdomain.
Assert (
- (dof_handler.get_tria().locally_owned_subdomain() == numbers::invalid_subdomain_id)
+ (dof_handler.get_triangulation().locally_owned_subdomain() == numbers::invalid_subdomain_id)
||
- (subdomain == dof_handler.get_tria().locally_owned_subdomain()),
+ (subdomain == dof_handler.get_triangulation().locally_owned_subdomain()),
ExcMessage ("For parallel::distributed::Triangulation objects and "
"associated DoF handler objects, asking for any subdomain other "
"than the locally owned one does not make sense."));
bool found = false;
for (typename Triangulation<DoFHandlerType::dimension,
DoFHandlerType::space_dimension>::active_cell_iterator
- cell=dof_handler.get_tria().begin_active();
- cell!=dof_handler.get_tria().end(); ++cell)
+ cell=dof_handler.get_triangulation().begin_active();
+ cell!=dof_handler.get_triangulation().end(); ++cell)
if (cell->subdomain_id() == subdomain)
{
found = true;
if (const parallel::Triangulation<dim,spacedim> *tria
= (dynamic_cast<const parallel::Triangulation<dim,spacedim>*>
- (&dof_handler.get_tria())))
+ (&dof_handler.get_triangulation())))
{
std::vector<types::global_dof_index> local_dof_count = dofs_per_component;
// this information from all processors
if (const parallel::Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> *tria
= (dynamic_cast<const parallel::Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension>*>
- (&dof_handler.get_tria())))
+ (&dof_handler.get_triangulation())))
{
std::vector<types::global_dof_index> local_dof_count = dofs_per_block;
MPI_Allreduce ( &local_dof_count[0], &dofs_per_block[0],
{
AssertDimension(support_points.size(), dof_handler.n_dofs());
Assert ((dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>
- (&dof_handler.get_tria())
+ (&dof_handler.get_triangulation())
==
0),
ExcMessage ("This function can not be used with distributed triangulations."
{
AssertDimension(support_points.size(), dof_handler.n_dofs());
Assert ((dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>
- (&dof_handler.get_tria())
+ (&dof_handler.get_triangulation())
==
0),
ExcMessage ("This function can not be used with distributed triangulations."
const bool interior_dofs_only,
const bool boundary_dofs)
{
- Assert(level > 0 && level < dof_handler.get_tria().n_levels(),
- ExcIndexRange(level, 1, dof_handler.get_tria().n_levels()));
+ Assert(level > 0 && level < dof_handler.get_triangulation().n_levels(),
+ ExcIndexRange(level, 1, dof_handler.get_triangulation().n_levels()));
typename DoFHandlerType::level_cell_iterator pcell = dof_handler.begin(level-1);
typename DoFHandlerType::level_cell_iterator endc = dof_handler.end(level-1);
// Vector mapping from vertex index in the triangulation to consecutive
// block indices on this level The number of cells at a vertex
- std::vector<unsigned int> vertex_cell_count(dof_handler.get_tria().n_vertices(), 0);
+ std::vector<unsigned int> vertex_cell_count(dof_handler.get_triangulation().n_vertices(), 0);
// Is a vertex at the boundary?
- std::vector<bool> vertex_boundary(dof_handler.get_tria().n_vertices(), false);
+ std::vector<bool> vertex_boundary(dof_handler.get_triangulation().n_vertices(), false);
- std::vector<unsigned int> vertex_mapping(dof_handler.get_tria().n_vertices(),
+ std::vector<unsigned int> vertex_mapping(dof_handler.get_triangulation().n_vertices(),
numbers::invalid_unsigned_int);
// Estimate for the number of dofs at this point
- std::vector<unsigned int> vertex_dof_count(dof_handler.get_tria().n_vertices(), 0);
+ std::vector<unsigned int> vertex_dof_count(dof_handler.get_triangulation().n_vertices(), 0);
// Identify all vertices active on this level and remember some data
// about them
//TODO[TL]: think about this in case of anisotropic
//refinement
- Assert (dof_handler.get_tria().get_anisotropic_refinement_flag() ||
+ Assert (dof_handler.get_triangulation().get_anisotropic_refinement_flag() ||
((this_face->child(0)->vertex_index(3) ==
this_face->child(1)->vertex_index(2)) &&
(this_face->child(0)->vertex_index(3) ==
{
const typename dealii::parallel::Triangulation<dim, spacedim> &tria =
dynamic_cast<const typename dealii::parallel::Triangulation<dim, spacedim>&>
- (coarse_to_fine_grid_map.get_destination_grid().get_tria ());
+ (coarse_to_fine_grid_map.get_destination_grid().get_triangulation());
communicator = tria.get_communicator ();
is_called_in_parallel = true;
}
// Try to find out whether the grids stem from the same coarse
// grid. This is a rather crude test, but better than nothing
- Assert (coarse_grid.get_tria().n_cells(0) == fine_grid.get_tria().n_cells(0),
+ Assert (coarse_grid.get_triangulation().n_cells(0) == fine_grid.get_triangulation().n_cells(0),
ExcGridsDontMatch());
// check whether the map correlates the right objects
// subdomain. Not setting a subdomain is also okay, because we skip
// ghost cells in the loop below.
Assert (
- (dof.get_tria().locally_owned_subdomain() == numbers::invalid_subdomain_id)
+ (dof.get_triangulation().locally_owned_subdomain() == numbers::invalid_subdomain_id)
||
(subdomain_id == numbers::invalid_subdomain_id)
||
- (subdomain_id == dof.get_tria().locally_owned_subdomain()),
+ (subdomain_id == dof.get_triangulation().locally_owned_subdomain()),
ExcMessage ("For parallel::distributed::Triangulation objects and "
"associated DoF handler objects, asking for any subdomain other "
"than the locally owned one does not make sense."));
// subdomain. Not setting a subdomain is also okay, because we skip
// ghost cells in the loop below.
Assert (
- (dof.get_tria().locally_owned_subdomain() == numbers::invalid_subdomain_id)
+ (dof.get_triangulation().locally_owned_subdomain() == numbers::invalid_subdomain_id)
||
(subdomain_id == numbers::invalid_subdomain_id)
||
- (subdomain_id == dof.get_tria().locally_owned_subdomain()),
+ (subdomain_id == dof.get_triangulation().locally_owned_subdomain()),
ExcMessage ("For parallel::distributed::Triangulation objects and "
"associated DoF handler objects, asking for any subdomain other "
"than the locally owned one does not make sense."));
// subdomain. Not setting a subdomain is also okay, because we skip
// ghost cells in the loop below.
Assert (
- (dof.get_tria().locally_owned_subdomain() == numbers::invalid_subdomain_id)
+ (dof.get_triangulation().locally_owned_subdomain() == numbers::invalid_subdomain_id)
||
(subdomain_id == numbers::invalid_subdomain_id)
||
- (subdomain_id == dof.get_tria().locally_owned_subdomain()),
+ (subdomain_id == dof.get_triangulation().locally_owned_subdomain()),
ExcMessage ("For parallel::distributed::Triangulation objects and "
"associated DoF handler objects, asking for any subdomain other "
"than the locally owned one does not make sense."));
// this function the Triangulation will be in the same state as it was
// at the beginning of this function.
std::vector<bool> user_flags;
- dof.get_tria().save_user_flags(user_flags);
+ dof.get_triangulation().save_user_flags(user_flags);
const_cast<Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &>
- (dof.get_tria()).clear_user_flags ();
+ (dof.get_triangulation()).clear_user_flags ();
internal::make_flux_sparsity_pattern (dof, sparsity,
int_mask, flux_mask);
// finally restore the user flags
const_cast<Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &>
- (dof.get_tria()).load_user_flags(user_flags);
+ (dof.get_triangulation()).load_user_flags(user_flags);
}
const ConstraintMatrix &constraints,
OutVector &u2)
{
- Assert(&dof1.get_tria()==&dof2.get_tria(), ExcTriangulationMismatch());
+ Assert(&dof1.get_triangulation()==&dof2.get_triangulation(), ExcTriangulationMismatch());
Assert(u1.size()==dof1.n_dofs(),
ExcDimensionMismatch(u1.size(), dof1.n_dofs()));
// a cell, which this processor owns,
// so we have to know the subdomain_id
const types::subdomain_id subdomain_id =
- dof1.get_tria().locally_owned_subdomain();
+ dof1.get_triangulation().locally_owned_subdomain();
for (; cell1!=endc1; ++cell1, ++cell2)
if ((cell1->subdomain_id() == subdomain_id)
Vector<typename OutVector::value_type> u1_int_local(dofs_per_cell1);
const types::subdomain_id subdomain_id =
- dof1.get_tria().locally_owned_subdomain();
+ dof1.get_triangulation().locally_owned_subdomain();
typename DoFHandler<dim,spacedim>::active_cell_iterator cell = dof1.begin_active(),
endc = dof1.end();
Vector<typename OutVector::value_type> u1_int_local(DoFTools::max_dofs_per_cell(dof1));
const types::subdomain_id subdomain_id =
- dof1.get_tria().locally_owned_subdomain();
+ dof1.get_triangulation().locally_owned_subdomain();
typename DoFHandlerType<dim>::active_cell_iterator cell = dof1.begin_active(),
endc = dof1.end();
Vector<typename OutVector::value_type> u1_diff_local(dofs_per_cell);
const types::subdomain_id subdomain_id =
- dof1.get_tria().locally_owned_subdomain();
+ dof1.get_triangulation().locally_owned_subdomain();
FullMatrix<double> difference_matrix(dofs_per_cell, dofs_per_cell);
get_interpolation_difference_matrix(dof1.get_fe(), fe2,
const DoFHandler<dim,spacedim> &dof2,
OutVector &u2)
{
- Assert(&dof1.get_tria()==&dof2.get_tria(), ExcTriangulationMismatch());
+ Assert(&dof1.get_triangulation()==&dof2.get_triangulation(), ExcTriangulationMismatch());
Assert(dof1.get_fe().n_components() == dof2.get_fe().n_components(),
ExcDimensionMismatch(dof1.get_fe().n_components(), dof2.get_fe().n_components()));
Assert(u1.size()==dof1.n_dofs(), ExcDimensionMismatch(u1.size(), dof1.n_dofs()));
{
Assert(dof1.get_fe().n_components() == dof2.get_fe().n_components(),
ExcDimensionMismatch(dof1.get_fe().n_components(), dof2.get_fe().n_components()));
- Assert(&dof1.get_tria()==&dof2.get_tria(), ExcTriangulationMismatch());
+ Assert(&dof1.get_triangulation()==&dof2.get_triangulation(), ExcTriangulationMismatch());
Assert(u1.size()==dof1.n_dofs(), ExcDimensionMismatch(u1.size(), dof1.n_dofs()));
Assert(u2.size()==dof2.n_dofs(), ExcDimensionMismatch(u2.size(), dof2.n_dofs()));
}
// then traverse grid bottom up
- for (unsigned int level=0; level<dof1.get_tria().n_levels()-1; ++level)
+ for (unsigned int level=0; level<dof1.get_triangulation().n_levels()-1; ++level)
{
typename DoFHandler<dim,spacedim>::cell_iterator cell=dof2.begin(level),
endc=dof2.end(level);
typename DoFHandler<dim,spacedim>::cell_iterator
DoFHandler<dim, spacedim>::begin(const unsigned int level) const
{
- return cell_iterator (*this->get_tria().begin(level),
+ return cell_iterator (*this->get_triangulation().begin(level),
this);
}
typename DoFHandler<dim,spacedim>::cell_iterator
DoFHandler<dim,spacedim>::end () const
{
- return cell_iterator (&this->get_tria(),
+ return cell_iterator (&this->get_triangulation(),
-1,
-1,
this);
typename DoFHandler<dim,spacedim>::cell_iterator
DoFHandler<dim,spacedim>::end (const unsigned int level) const
{
- return (level == this->get_tria().n_levels()-1 ?
+ return (level == this->get_triangulation().n_levels()-1 ?
end() :
begin (level+1));
}
typename DoFHandler<dim, spacedim>::active_cell_iterator
DoFHandler<dim, spacedim>::end_active (const unsigned int level) const
{
- return (level == this->get_tria().n_levels()-1 ?
+ return (level == this->get_triangulation().n_levels()-1 ?
active_cell_iterator(end()) :
begin_active (level+1));
}
// we will mark lines that we have already treated, so first save and clear
// the user flags on lines and later restore them
std::vector<bool> user_flags;
- this->get_tria().save_user_flags_line(user_flags);
- const_cast<Triangulation<dim,spacedim> &>(this->get_tria()).clear_user_flags_line ();
+ this->get_triangulation().save_user_flags_line(user_flags);
+ const_cast<Triangulation<dim,spacedim> &>(this->get_triangulation()).clear_user_flags_line ();
// An implementation of the algorithm described in the hp paper, including
// the modification mentioned later in the "complications in 3-d" subsections
}
// finally restore the user flags
- const_cast<Triangulation<dim,spacedim> &>(this->get_tria())
+ const_cast<Triangulation<dim,spacedim> &>(this->get_triangulation())
.load_user_flags_line(user_flags);
}
// on quads and later restore
// them
std::vector<bool> user_flags;
- this->get_tria().save_user_flags_quad(user_flags);
- const_cast<Triangulation<dim,spacedim> &>(this->get_tria()).clear_user_flags_quad ();
+ this->get_triangulation().save_user_flags_quad(user_flags);
+ const_cast<Triangulation<dim,spacedim> &>(this->get_triangulation()).clear_user_flags_quad ();
// An implementation of the
// algorithm described in the hp
}
// finally restore the user flags
- const_cast<Triangulation<dim,spacedim> &>(this->get_tria())
+ const_cast<Triangulation<dim,spacedim> &>(this->get_triangulation())
.load_user_flags_quad(user_flags);
}
number_cache.n_locally_owned_dofs = number_cache.n_global_dofs;
if (dynamic_cast<const parallel::shared::Triangulation< dim, spacedim >*>
- (&this->get_tria())
+ (&this->get_triangulation())
== 0)
{
number_cache.locally_owned_dofs
// flags. Since we restore them in
// the end, this cast is safe.
Triangulation<dim,spacedim> &user_flags_triangulation =
- const_cast<Triangulation<dim,spacedim>&> (dofs.get_tria());
+ const_cast<Triangulation<dim,spacedim>&> (dofs.get_triangulation());
user_flags_triangulation.save_user_flags(old_flags);
user_flags_triangulation.clear_user_flags();
// flags. Since we restore them in
// the end, this cast is safe.
Triangulation<dim,spacedim> &user_flags_triangulation =
- const_cast<Triangulation<dim,spacedim>&> (dofs.get_tria());
+ const_cast<Triangulation<dim,spacedim>&> (dofs.get_triangulation());
user_flags_triangulation.save_user_flags(old_flags);
user_flags_triangulation.clear_user_flags();
typename DoFHandlerType::cell_iterator cell = dof.begin(level),
endc = dof.end(level);
for (; cell!=endc; ++cell)
- if (dof.get_tria().locally_owned_subdomain()==numbers::invalid_subdomain_id
- || cell->level_subdomain_id()==dof.get_tria().locally_owned_subdomain())
+ if (dof.get_triangulation().locally_owned_subdomain()==numbers::invalid_subdomain_id
+ || cell->level_subdomain_id()==dof.get_triangulation().locally_owned_subdomain())
{
cell->get_mg_dof_indices (dofs_on_this_cell);
// make sparsity pattern for this cell
SparsityPatternType &sparsity,
const unsigned int level)
{
- Assert ((level>=1) && (level<dof.get_tria().n_global_levels()),
- ExcIndexRange(level, 1, dof.get_tria().n_global_levels()));
+ Assert ((level>=1) && (level<dof.get_triangulation().n_global_levels()),
+ ExcIndexRange(level, 1, dof.get_triangulation().n_global_levels()));
const types::global_dof_index fine_dofs = dof.n_dofs(level);
const types::global_dof_index coarse_dofs = dof.n_dofs(level-1);
// same state as it was at the
// beginning of this function.
std::vector<bool> user_flags;
- dof.get_tria().save_user_flags(user_flags);
- const_cast<Triangulation<dim,spacedim> &>(dof.get_tria()).clear_user_flags ();
+ dof.get_triangulation().save_user_flags(user_flags);
+ const_cast<Triangulation<dim,spacedim> &>(dof.get_triangulation()).clear_user_flags ();
for (; cell!=endc; ++cell)
{
}
// finally restore the user flags
- const_cast<Triangulation<dim,spacedim> &>(dof.get_tria()).load_user_flags(user_flags);
+ const_cast<Triangulation<dim,spacedim> &>(dof.get_triangulation()).load_user_flags(user_flags);
}
const unsigned int n_comp = fe.n_components();
(void)n_comp;
- Assert ((level>=1) && (level<dof.get_tria().n_global_levels()),
- ExcIndexRange(level, 1, dof.get_tria().n_global_levels()));
+ Assert ((level>=1) && (level<dof.get_triangulation().n_global_levels()),
+ ExcIndexRange(level, 1, dof.get_triangulation().n_global_levels()));
const types::global_dof_index fine_dofs = dof.n_dofs(level);
const types::global_dof_index coarse_dofs = dof.n_dofs(level-1);
{
const FiniteElement<dim> &fe = dof_handler.get_fe();
const unsigned int n_components = fe.n_components();
- const unsigned int nlevels = dof_handler.get_tria().n_global_levels();
+ const unsigned int nlevels = dof_handler.get_triangulation().n_global_levels();
Assert (result.size() == nlevels,
ExcDimensionMismatch(result.size(), nlevels));
{
const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe = dof_handler.get_fe();
const unsigned int n_blocks = fe.n_blocks();
- const unsigned int n_levels = dof_handler.get_tria().n_global_levels();
+ const unsigned int n_levels = dof_handler.get_triangulation().n_global_levels();
AssertDimension (dofs_per_block.size(), n_levels);
if (function_map.size() == 0)
return;
- const unsigned int n_levels = dof.get_tria().n_global_levels();
+ const unsigned int n_levels = dof.get_triangulation().n_global_levels();
(void)n_levels;
endc = dof.end();
for (; cell!=endc; ++cell)
{
- if (dof.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id
+ if (dof.get_triangulation().locally_owned_subdomain()!=numbers::invalid_subdomain_id
&& cell->level_subdomain_id()==numbers::artificial_subdomain_id)
continue;
const FiniteElement<dim> &fe = cell->get_fe();
cell = dof.begin(),
endc = dof.end();
for (; cell!=endc; ++cell)
- if (dof.get_tria().locally_owned_subdomain()==numbers::invalid_subdomain_id
+ if (dof.get_triangulation().locally_owned_subdomain()==numbers::invalid_subdomain_id
|| cell->level_subdomain_id()!=numbers::artificial_subdomain_id)
for (unsigned int face_no = 0; face_no < GeometryInfo<dim>::faces_per_cell;
++face_no)
std::vector<IndexSet> &boundary_indices,
const ComponentMask &component_mask)
{
- Assert (boundary_indices.size() == dof.get_tria().n_global_levels(),
+ Assert (boundary_indices.size() == dof.get_triangulation().n_global_levels(),
ExcDimensionMismatch (boundary_indices.size(),
- dof.get_tria().n_global_levels()));
+ dof.get_triangulation().n_global_levels()));
std::vector<std::set<types::global_dof_index> >
- my_boundary_indices (dof.get_tria().n_global_levels());
+ my_boundary_indices (dof.get_triangulation().n_global_levels());
make_boundary_list (dof, function_map, my_boundary_indices, component_mask);
- for (unsigned int i=0; i<dof.get_tria().n_global_levels(); ++i)
+ for (unsigned int i=0; i<dof.get_triangulation().n_global_levels(); ++i)
{
boundary_indices[i] = IndexSet (dof.n_dofs(i));
boundary_indices[i].add_indices (my_boundary_indices[i].begin(),
extract_non_interface_dofs (const DoFHandler<dim,spacedim> &mg_dof_handler,
std::vector<std::set<types::global_dof_index> > &non_interface_dofs)
{
- Assert (non_interface_dofs.size() == mg_dof_handler.get_tria().n_global_levels(),
+ Assert (non_interface_dofs.size() == mg_dof_handler.get_triangulation().n_global_levels(),
ExcDimensionMismatch (non_interface_dofs.size(),
- mg_dof_handler.get_tria().n_global_levels()));
+ mg_dof_handler.get_triangulation().n_global_levels()));
const FiniteElement<dim,spacedim> &fe = mg_dof_handler.get_fe();
for (; cell!=endc; ++cell)
{
- if (mg_dof_handler.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id
- && cell->level_subdomain_id()!=mg_dof_handler.get_tria().locally_owned_subdomain())
+ if (mg_dof_handler.get_triangulation().locally_owned_subdomain()!=numbers::invalid_subdomain_id
+ && cell->level_subdomain_id()!=mg_dof_handler.get_triangulation().locally_owned_subdomain())
continue;
std::fill (cell_dofs.begin(), cell_dofs.end(), false);
extract_inner_interface_dofs (const DoFHandler<dim,spacedim> &mg_dof_handler,
std::vector<IndexSet> &interface_dofs)
{
- Assert (interface_dofs.size() == mg_dof_handler.get_tria().n_global_levels(),
+ Assert (interface_dofs.size() == mg_dof_handler.get_triangulation().n_global_levels(),
ExcDimensionMismatch (interface_dofs.size(),
- mg_dof_handler.get_tria().n_global_levels()));
+ mg_dof_handler.get_triangulation().n_global_levels()));
std::vector<std::vector<types::global_dof_index> >
tmp_interface_dofs(interface_dofs.size());
{
// Do not look at artificial level cells (in a serial computation we
// need to ignore the level_subdomain_id() because it is never set).
- if (mg_dof_handler.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id
+ if (mg_dof_handler.get_triangulation().locally_owned_subdomain()!=numbers::invalid_subdomain_id
&& cell->level_subdomain_id()==numbers::artificial_subdomain_id)
continue;
neighbor = cell->neighbor(face_nr);
// only process cell pairs if one or both of them are owned by me (ignore if running in serial)
- if (mg_dof_handler.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id
+ if (mg_dof_handler.get_triangulation().locally_owned_subdomain()!=numbers::invalid_subdomain_id
&&
neighbor->level_subdomain_id()==numbers::artificial_subdomain_id)
continue;
}
}
- for (unsigned int l=0; l<mg_dof_handler.get_tria().n_global_levels(); ++l)
+ for (unsigned int l=0; l<mg_dof_handler.get_triangulation().n_global_levels(); ++l)
{
interface_dofs[l].clear();
std::sort(tmp_interface_dofs[l].begin(), tmp_interface_dofs[l].end());
if (ndofs.size() == 0)
{
std::vector<std::vector<types::global_dof_index> >
- new_dofs(mg_dof.get_tria().n_levels(),
+ new_dofs(mg_dof.get_triangulation().n_levels(),
std::vector<types::global_dof_index>(selected.size()));
std::swap(ndofs, new_dofs);
MGTools::count_dofs_per_block (mg_dof, ndofs);
if (ndofs.size() == 0)
{
std::vector<std::vector<types::global_dof_index> >
- new_dofs(mg_dof.get_tria().n_levels(),
+ new_dofs(mg_dof.get_triangulation().n_levels(),
std::vector<types::global_dof_index>(selected.size()));
std::swap(ndofs, new_dofs);
MGTools::count_dofs_per_block (mg_dof, ndofs);
// first, since only one block is
// selected.
bool first = true;
- for (unsigned int level=mg_dof_handler.get_tria().n_levels(); level != 0;)
+ for (unsigned int level=mg_dof_handler.get_triangulation().n_levels(); level != 0;)
{
--level;
for (IT i= copy_indices[selected_block][level].begin();
// multilevel block is always the
// first, since only one block is selected.
bool first = true;
- for (unsigned int level=mg_dof_handler.get_tria().n_levels(); level != 0;)
+ for (unsigned int level=mg_dof_handler.get_triangulation().n_levels(); level != 0;)
{
--level;
for (IT i= copy_indices[selected_block][level].begin();
{
reinit_vector_by_blocks(mg_dof_handler, dst, selected, sizes);
bool first = true;
- for (unsigned int level=mg_dof_handler.get_tria().n_levels(); level != 0;)
+ for (unsigned int level=mg_dof_handler.get_triangulation().n_levels(); level != 0;)
{
--level;
for (unsigned int block=0; block<selected.size(); ++block)
const FiniteElement<dim> &fe = mg_dof.get_fe();
const unsigned int n_blocks = fe.n_blocks();
const unsigned int dofs_per_cell = fe.dofs_per_cell;
- const unsigned int n_levels = mg_dof.get_tria().n_levels();
+ const unsigned int n_levels = mg_dof.get_triangulation().n_levels();
Assert (selected.size() == n_blocks,
ExcDimensionMismatch(selected.size(), n_blocks));
std::vector<types::global_dof_index> global_dof_indices (fe.dofs_per_cell);
std::vector<types::global_dof_index> level_dof_indices (fe.dofs_per_cell);
- for (int level=dof.get_tria().n_levels()-1; level>=0; --level)
+ for (int level=dof.get_triangulation().n_levels()-1; level>=0; --level)
{
typename DoFHandler<dim,spacedim>::active_cell_iterator
level_cell = mg_dof.begin_active(level);
std::vector<std::vector<types::global_dof_index> > temp_copy_indices (n_blocks);
std::vector<types::global_dof_index> global_dof_indices (fe.dofs_per_cell);
std::vector<types::global_dof_index> level_dof_indices (fe.dofs_per_cell);
- for (int level=dof.get_tria().n_levels()-1; level>=0; --level)
+ for (int level=dof.get_triangulation().n_levels()-1; level>=0; --level)
{
typename DoFHandler<dim,spacedim>::active_cell_iterator
level_cell = mg_dof.begin_active(level);
if (ndofs.size() == 0)
{
std::vector<std::vector<types::global_dof_index> >
- new_dofs(mg_dof.get_tria().n_levels(),
+ new_dofs(mg_dof.get_triangulation().n_levels(),
std::vector<types::global_dof_index>(target_component.size()));
std::swap(ndofs, new_dofs);
MGTools::count_dofs_per_block (mg_dof, ndofs, target_component);
if (ndofs.size() == 0)
{
std::vector<std::vector<types::global_dof_index> >
- new_dofs(mg_dof.get_tria().n_levels(),
+ new_dofs(mg_dof.get_triangulation().n_levels(),
std::vector<types::global_dof_index>(target_component.size()));
std::swap(ndofs, new_dofs);
MGTools::count_dofs_per_block (mg_dof, ndofs,
{
dst=0;
- Assert(sizes.size()==mg_dof_handler.get_tria().n_levels(),
+ Assert(sizes.size()==mg_dof_handler.get_triangulation().n_levels(),
ExcMatricesNotBuilt());
reinit_vector_by_components(mg_dof_handler, dst,
// already have built.
bool first = true;
- for (unsigned int level=mg_dof_handler.get_tria().n_levels(); level!=0;)
+ for (unsigned int level=mg_dof_handler.get_triangulation().n_levels(); level!=0;)
{
--level;
const unsigned int n_components =
*std::max_element(mg_target_component.begin(), mg_target_component.end()) + 1;
const unsigned int dofs_per_cell = fe.dofs_per_cell;
- const unsigned int n_levels = mg_dof.get_tria().n_levels();
+ const unsigned int n_levels = mg_dof.get_triangulation().n_levels();
Assert (mg_component_mask.represents_n_components(fe.n_components()),
ExcMessage ("Component mask has wrong size."));
if (boundary_indices.size() != 0)
{
std::vector<std::vector<types::global_dof_index> >
- dofs_per_component(mg_dof.get_tria().n_levels(),
+ dofs_per_component(mg_dof.get_triangulation().n_levels(),
std::vector<types::global_dof_index>(n_components));
MGTools::count_dofs_per_block (mg_dof, dofs_per_component, mg_target_component);
MGTransferComponentBase::build_matrices (dof, mg_dof);
- interface_dofs.resize(mg_dof.get_tria().n_levels());
- for (unsigned int l=0; l<mg_dof.get_tria().n_levels(); ++l)
+ interface_dofs.resize(mg_dof.get_triangulation().n_levels());
+ for (unsigned int l=0; l<mg_dof.get_triangulation().n_levels(); ++l)
{
interface_dofs[l].clear();
interface_dofs[l].set_size(mg_dof.n_dofs(l));
std::vector<types::global_dof_index> temp_copy_indices;
std::vector<types::global_dof_index> global_dof_indices (fe.dofs_per_cell);
std::vector<types::global_dof_index> level_dof_indices (fe.dofs_per_cell);
- for (int level=dof.get_tria().n_levels()-1; level>=0; --level)
+ for (int level=dof.get_triangulation().n_levels()-1; level>=0; --level)
{
copy_to_and_from_indices[level].clear();
typename DoFHandler<dim,spacedim>::active_cell_iterator
void MGTransferPrebuilt<VectorType>::build_matrices
(const DoFHandler<dim,spacedim> &mg_dof)
{
- const unsigned int n_levels = mg_dof.get_tria().n_global_levels();
+ const unsigned int n_levels = mg_dof.get_triangulation().n_global_levels();
const unsigned int dofs_per_cell = mg_dof.get_fe().dofs_per_cell;
sizes.resize(n_levels);
for (typename DoFHandler<dim,spacedim>::cell_iterator cell=mg_dof.begin(level);
cell != mg_dof.end(level); ++cell)
if (cell->has_children() &&
- ( mg_dof.get_tria().locally_owned_subdomain()==numbers::invalid_subdomain_id
- || cell->level_subdomain_id()==mg_dof.get_tria().locally_owned_subdomain()
+ ( mg_dof.get_triangulation().locally_owned_subdomain()==numbers::invalid_subdomain_id
+ || cell->level_subdomain_id()==mg_dof.get_triangulation().locally_owned_subdomain()
))
{
cell->get_mg_dof_indices (dof_indices_parent);
for (typename DoFHandler<dim,spacedim>::cell_iterator cell=mg_dof.begin(level);
cell != mg_dof.end(level); ++cell)
if (cell->has_children() &&
- (mg_dof.get_tria().locally_owned_subdomain()==numbers::invalid_subdomain_id
- || cell->level_subdomain_id()==mg_dof.get_tria().locally_owned_subdomain())
+ (mg_dof.get_triangulation().locally_owned_subdomain()==numbers::invalid_subdomain_id
+ || cell->level_subdomain_id()==mg_dof.get_triangulation().locally_owned_subdomain())
)
{
cell->get_mg_dof_indices (dof_indices_parent);
// that will be copied into copy_indices_level_mine
std::vector<DoFPair> send_data_temp;
- const unsigned int n_levels = mg_dof.get_tria().n_global_levels();
+ const unsigned int n_levels = mg_dof.get_triangulation().n_global_levels();
copy_indices.resize(n_levels);
copy_indices_global_mine.resize(n_levels);
copy_indices_level_mine.resize(n_levels);
for (; level_cell!=level_end; ++level_cell)
{
- if (mg_dof.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id
+ if (mg_dof.get_triangulation().locally_owned_subdomain()!=numbers::invalid_subdomain_id
&& (level_cell->level_subdomain_id()==numbers::artificial_subdomain_id
|| level_cell->subdomain_id()==numbers::artificial_subdomain_id)
)
const dealii::parallel::distributed::Triangulation<dim,spacedim> *tria =
(dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>
- (&mg_dof.get_tria()));
+ (&mg_dof.get_triangulation()));
AssertThrow(send_data_temp.size()==0 || tria!=NULL, ExcMessage("parallel Multigrid only works with a distributed Triangulation!"));
#ifdef DEAL_II_WITH_MPI
triangulation = SmartPointer<const Triangulation<DoFHandlerType::dimension,
DoFHandlerType::space_dimension> >
- (&d.get_tria(), typeid(*this).name());
+ (&d.get_triangulation(), typeid(*this).name());
dofs = SmartPointer<const DoFHandlerType>(&d, typeid(*this).name());
}
Assert (vec.size() == dofs->n_dofs(),
Exceptions::DataOut::ExcInvalidVectorSize (vec.size(),
dofs->n_dofs(),
- dofs->get_tria().n_active_cells()));
+ dofs->get_triangulation().n_active_cells()));
internal::DataOut::DataEntryBase<DoFHandlerType> *new_entry
= new internal::DataOut::DataEntry<DoFHandlerType,VectorType>(dofs, &vec, &data_postprocessor);
// together with its DoFHandler. if we do, we know that we have
// type_dof_data, which makes things a bit simpler
if (triangulation == 0)
- triangulation = SmartPointer<const Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> >(&dof_handler.get_tria(), typeid(*this).name());
+ triangulation = SmartPointer<const Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> >(&dof_handler.get_triangulation(), typeid(*this).name());
- Assert (&dof_handler.get_tria() == triangulation,
+ Assert (&dof_handler.get_triangulation() == triangulation,
ExcMessage("The triangulation attached to the DoFHandler does not "
"match with the one set previously"));
// is cell vector: we only need one
// name
if ((n_components == 1) ||
- (vec.size() == dof_handler->get_tria().n_active_cells()))
+ (vec.size() == dof_handler->get_triangulation().n_active_cells()))
{
names.resize (1, name);
}
Exceptions::DataOut::ExcNoDoFHandlerSelected ());
// either cell data and one name,
// or dof data and n_components names
- Assert (((vec.size() == dof_handler->get_tria().n_active_cells()) &&
+ Assert (((vec.size() == dof_handler->get_triangulation().n_active_cells()) &&
(names.size() == 1))
||
((vec.size() == dof_handler->n_dofs()) &&
// n_dofs==n_cells, so only
// bomb out if the next if
// statement will not be run
- if (dof_handler->n_dofs() != dof_handler->get_tria().n_active_cells())
+ if (dof_handler->n_dofs() != dof_handler->get_triangulation().n_active_cells())
Assert (false, ExcVectorNotDeclared (names[0]));
}
// search cell data
if ((vec.size() != dof_handler->n_dofs()) ||
- (dof_handler->n_dofs() == dof_handler->get_tria().n_active_cells()))
+ (dof_handler->n_dofs() == dof_handler->get_triangulation().n_active_cells()))
{
typename std::vector<DataVector>::iterator data_vector=cell_data.begin();
for (; data_vector!=cell_data.end(); ++data_vector)
const unsigned int component,
Vector<float> &derivative_norm)
{
- Assert (derivative_norm.size() == dof_handler.get_tria().n_active_cells(),
+ Assert (derivative_norm.size() == dof_handler.get_triangulation().n_active_cells(),
ExcVectorLengthVsNActiveCells (derivative_norm.size(),
- dof_handler.get_tria().n_active_cells()));
+ dof_handler.get_triangulation().n_active_cells()));
Assert (component < dof_handler.get_fe().n_components(),
ExcIndexRange (component, 0, dof_handler.get_fe().n_components()));
{
#ifdef DEAL_II_WITH_P4EST
if (dynamic_cast<const parallel::distributed::Triangulation<1,spacedim>*>
- (&dof_handler.get_tria())
+ (&dof_handler.get_triangulation())
!= 0)
Assert ((subdomain_id_ == numbers::invalid_subdomain_id)
||
(subdomain_id_ ==
dynamic_cast<const parallel::distributed::Triangulation<1,spacedim>&>
- (dof_handler.get_tria()).locally_owned_subdomain()),
+ (dof_handler.get_triangulation()).locally_owned_subdomain()),
ExcMessage ("For parallel distributed triangulations, the only "
"valid subdomain_id that can be passed here is the "
"one that corresponds to the locally owned subdomain id."));
const types::subdomain_id subdomain_id
= ((dynamic_cast<const parallel::distributed::Triangulation<1,spacedim>*>
- (&dof_handler.get_tria())
+ (&dof_handler.get_triangulation())
!= 0)
?
dynamic_cast<const parallel::distributed::Triangulation<1,spacedim>&>
- (dof_handler.get_tria()).locally_owned_subdomain()
+ (dof_handler.get_triangulation()).locally_owned_subdomain()
:
subdomain_id_);
#else
// reserve one slot for each cell and set it to zero
for (unsigned int n=0; n<n_solution_vectors; ++n)
- (*errors[n]).reinit (dof_handler.get_tria().n_active_cells());
+ (*errors[n]).reinit (dof_handler.get_triangulation().n_active_cells());
// fields to get the gradients on the present and the neighbor cell.
//
= std::vector<std::vector <double> > (n_indep, std::vector <double> (0));
indep_names = std::vector <std::string> ();
- tria_listener = dof_handler.get_tria().signals.any_change.connect (std_cxx11::bind (&PointValueHistory<dim>::tria_change_listener,
+ tria_listener = dof_handler.get_triangulation().signals.any_change.connect (std_cxx11::bind (&PointValueHistory<dim>::tria_change_listener,
std_cxx11::ref(*this)));
}
// Presume subscribe new instance?
if (have_dof_handler)
{
- tria_listener = dof_handler->get_tria().signals.any_change.connect (std_cxx11::bind (&PointValueHistory<dim>::tria_change_listener,
+ tria_listener = dof_handler->get_triangulation().signals.any_change.connect (std_cxx11::bind (&PointValueHistory<dim>::tria_change_listener,
std_cxx11::ref(*this)));
}
}
// Presume subscribe new instance?
if (have_dof_handler)
{
- tria_listener = dof_handler->get_tria().signals.any_change.connect (std_cxx11::bind (&PointValueHistory<dim>::tria_change_listener,
+ tria_listener = dof_handler->get_triangulation().signals.any_change.connect (std_cxx11::bind (&PointValueHistory<dim>::tria_change_listener,
std_cxx11::ref(*this)));
}
clear();
- const unsigned int n_active_cells = dof_handler->get_tria().n_active_cells();
+ const unsigned int n_active_cells = dof_handler->get_triangulation().n_active_cells();
n_dofs_old=dof_handler->n_dofs();
// efficient reallocation of indices_on_cell
clear();
- const unsigned int n_active_cells = dof_handler->get_tria().n_active_cells();
+ const unsigned int n_active_cells = dof_handler->get_triangulation().n_active_cells();
(void)n_active_cells;
n_dofs_old = dof_handler->n_dofs();