Reference documentation for deal.II version 9.4.1
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Classes | Functions
internal::MGTransfer Namespace Reference

Classes

struct  DoFPair
 
struct  ElementInfo
 

Functions

template<int dim, int spacedim>
void fill_copy_indices (const DoFHandler< dim, spacedim > &dof_handler, const MGConstrainedDoFs *mg_constrained_dofs, std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index > > > &copy_indices, std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index > > > &copy_indices_global_mine, std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index > > > &copy_indices_level_mine, const bool skip_interface_dofs=true)
 
template<int dim>
unsigned int compute_shift_within_children (const unsigned int child, const unsigned int fe_shift_1d, const unsigned int fe_degree)
 
template<int dim, typename Number >
void setup_transfer (const DoFHandler< dim > &dof_handler, const MGConstrainedDoFs *mg_constrained_dofs, const std::vector< std::shared_ptr< const Utilities::MPI::Partitioner > > &external_partitioners, ElementInfo< Number > &elem_info, std::vector< std::vector< unsigned int > > &level_dof_indices, std::vector< std::vector< std::pair< unsigned int, unsigned int > > > &parent_child_connect, std::vector< unsigned int > &n_owned_level_cells, std::vector< std::vector< std::vector< unsigned short > > > &dirichlet_indices, std::vector< std::vector< Number > > &weights_on_refined, std::vector< Table< 2, unsigned int > > &copy_indices_global_mine, MGLevelObject< std::shared_ptr< const Utilities::MPI::Partitioner > > &vector_partitioners)
 
void resolve_identity_constraints (const MGConstrainedDoFs *mg_constrained_dofs, const unsigned int level, std::vector< types::global_dof_index > &dof_indices)
 
template<int dim, int spacedim>
void fill_copy_indices (const ::DoFHandler< dim, spacedim > &dof_handler, const MGConstrainedDoFs *mg_constrained_dofs, std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index > > > &copy_indices, std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index > > > &copy_indices_global_mine, std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index > > > &copy_indices_level_mine, const bool skip_interface_dofs)
 
void reinit_level_partitioner (const IndexSet &locally_owned, std::vector< types::global_dof_index > &ghosted_level_dofs, const std::shared_ptr< const Utilities::MPI::Partitioner > &external_partitioner, const MPI_Comm &communicator, std::shared_ptr< const Utilities::MPI::Partitioner > &target_partitioner, Table< 2, unsigned int > &copy_indices_global_mine)
 
void copy_indices_to_mpi_local_numbers (const Utilities::MPI::Partitioner &part, const std::vector< types::global_dof_index > &mine, const std::vector< types::global_dof_index > &remote, std::vector< unsigned int > &localized_indices)
 
template<int dim>
void add_child_indices (const unsigned int child, const unsigned int fe_shift_1d, const unsigned int fe_degree, const std::vector< unsigned int > &lexicographic_numbering, const std::vector< types::global_dof_index > &local_dof_indices, types::global_dof_index *target_indices)
 
template<int dim, typename Number >
void setup_element_info (ElementInfo< Number > &elem_info, const FiniteElement< 1 > &fe, const ::DoFHandler< dim > &dof_handler)
 
template<int dim, typename Number >
void setup_transfer (const ::DoFHandler< dim > &dof_handler, const MGConstrainedDoFs *mg_constrained_dofs, const std::vector< std::shared_ptr< const Utilities::MPI::Partitioner > > &external_partitioners, ElementInfo< Number > &elem_info, std::vector< std::vector< unsigned int > > &level_dof_indices, std::vector< std::vector< std::pair< unsigned int, unsigned int > > > &parent_child_connect, std::vector< unsigned int > &n_owned_level_cells, std::vector< std::vector< std::vector< unsigned short > > > &dirichlet_indices, std::vector< std::vector< Number > > &weights_on_refined, std::vector< Table< 2, unsigned int > > &copy_indices_global_mine, MGLevelObject< std::shared_ptr< const Utilities::MPI::Partitioner > > &target_partitioners)
 

Function Documentation

◆ fill_copy_indices() [1/2]

template<int dim, int spacedim>
void internal::MGTransfer::fill_copy_indices ( const DoFHandler< dim, spacedim > &  dof_handler,
const MGConstrainedDoFs mg_constrained_dofs,
std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index > > > &  copy_indices,
std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index > > > &  copy_indices_global_mine,
std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index > > > &  copy_indices_level_mine,
const bool  skip_interface_dofs = true 
)

Internal function for filling the copy indices from global to level indices

If skip_interface_dofs is false, the mapping will also contain DoFs at the interface between levels. This is desirable when transferring solution vectors instead of residuals.

◆ compute_shift_within_children()

template<int dim>
unsigned int internal::MGTransfer::compute_shift_within_children ( const unsigned int  child,
const unsigned int  fe_shift_1d,
const unsigned int  fe_degree 
)

Given the collection of child cells in lexicographic ordering as seen from the parent, this function computes the first index of the given child

Definition at line 517 of file mg_transfer_internal.cc.

◆ setup_transfer() [1/2]

template<int dim, typename Number >
void internal::MGTransfer::setup_transfer ( const DoFHandler< dim > &  dof_handler,
const MGConstrainedDoFs mg_constrained_dofs,
const std::vector< std::shared_ptr< const Utilities::MPI::Partitioner > > &  external_partitioners,
ElementInfo< Number > &  elem_info,
std::vector< std::vector< unsigned int > > &  level_dof_indices,
std::vector< std::vector< std::pair< unsigned int, unsigned int > > > &  parent_child_connect,
std::vector< unsigned int > &  n_owned_level_cells,
std::vector< std::vector< std::vector< unsigned short > > > &  dirichlet_indices,
std::vector< std::vector< Number > > &  weights_on_refined,
std::vector< Table< 2, unsigned int > > &  copy_indices_global_mine,
MGLevelObject< std::shared_ptr< const Utilities::MPI::Partitioner > > &  vector_partitioners 
)

Set up most of the internal data structures of MGTransferMatrixFree

◆ resolve_identity_constraints()

void internal::MGTransfer::resolve_identity_constraints ( const MGConstrainedDoFs mg_constrained_dofs,
const unsigned int  level,
std::vector< types::global_dof_index > &  dof_indices 
)

Helper function for setup_transfer. Checks for identity constrained dofs and replace with the indices of the dofs to which they are constrained

Definition at line 1007 of file mg_transfer_internal.cc.

◆ fill_copy_indices() [2/2]

template<int dim, int spacedim>
void internal::MGTransfer::fill_copy_indices ( const ::DoFHandler< dim, spacedim > &  dof_handler,
const MGConstrainedDoFs mg_constrained_dofs,
std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index > > > &  copy_indices,
std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index > > > &  copy_indices_global_mine,
std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index > > > &  copy_indices_level_mine,
const bool  skip_interface_dofs 
)

Definition at line 59 of file mg_transfer_internal.cc.

◆ reinit_level_partitioner()

void internal::MGTransfer::reinit_level_partitioner ( const IndexSet locally_owned,
std::vector< types::global_dof_index > &  ghosted_level_dofs,
const std::shared_ptr< const Utilities::MPI::Partitioner > &  external_partitioner,
const MPI_Comm communicator,
std::shared_ptr< const Utilities::MPI::Partitioner > &  target_partitioner,
Table< 2, unsigned int > &  copy_indices_global_mine 
)

Definition at line 429 of file mg_transfer_internal.cc.

◆ copy_indices_to_mpi_local_numbers()

void internal::MGTransfer::copy_indices_to_mpi_local_numbers ( const Utilities::MPI::Partitioner part,
const std::vector< types::global_dof_index > &  mine,
const std::vector< types::global_dof_index > &  remote,
std::vector< unsigned int > &  localized_indices 
)
inline

Definition at line 494 of file mg_transfer_internal.cc.

◆ add_child_indices()

template<int dim>
void internal::MGTransfer::add_child_indices ( const unsigned int  child,
const unsigned int  fe_shift_1d,
const unsigned int  fe_degree,
const std::vector< unsigned int > &  lexicographic_numbering,
const std::vector< types::global_dof_index > &  local_dof_indices,
types::global_dof_index target_indices 
)

Definition at line 547 of file mg_transfer_internal.cc.

◆ setup_element_info()

template<int dim, typename Number >
void internal::MGTransfer::setup_element_info ( ElementInfo< Number > &  elem_info,
const FiniteElement< 1 > &  fe,
const ::DoFHandler< dim > &  dof_handler 
)

Definition at line 584 of file mg_transfer_internal.cc.

◆ setup_transfer() [2/2]

template<int dim, typename Number >
void internal::MGTransfer::setup_transfer ( const ::DoFHandler< dim > &  dof_handler,
const MGConstrainedDoFs mg_constrained_dofs,
const std::vector< std::shared_ptr< const Utilities::MPI::Partitioner > > &  external_partitioners,
ElementInfo< Number > &  elem_info,
std::vector< std::vector< unsigned int > > &  level_dof_indices,
std::vector< std::vector< std::pair< unsigned int, unsigned int > > > &  parent_child_connect,
std::vector< unsigned int > &  n_owned_level_cells,
std::vector< std::vector< std::vector< unsigned short > > > &  dirichlet_indices,
std::vector< std::vector< Number > > &  weights_on_refined,
std::vector< Table< 2, unsigned int > > &  copy_indices_global_mine,
MGLevelObject< std::shared_ptr< const Utilities::MPI::Partitioner > > &  target_partitioners 
)

Definition at line 648 of file mg_transfer_internal.cc.