Reference documentation for deal.II version 9.4.1
|
#include <deal.II/dofs/number_cache.h>
Public Member Functions | |
NumberCache () | |
NumberCache (const NumberCache &)=default | |
NumberCache (NumberCache &&)=default | |
NumberCache (const types::global_dof_index n_global_dofs) | |
NumberCache (const std::vector< IndexSet > &locally_owned_dofs_per_processor, const unsigned int my_rank) | |
NumberCache & | operator= (const NumberCache &)=default |
NumberCache & | operator= (NumberCache &&)=default |
std::size_t | memory_consumption () const |
void | clear () |
std::vector< types::global_dof_index > | get_n_locally_owned_dofs_per_processor (const MPI_Comm &mpi_communicator) const |
std::vector< IndexSet > | get_locally_owned_dofs_per_processor (const MPI_Comm &mpi_communicator) const |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Public Attributes | |
types::global_dof_index | n_global_dofs |
types::global_dof_index | n_locally_owned_dofs |
IndexSet | locally_owned_dofs |
std::vector< types::global_dof_index > | n_locally_owned_dofs_per_processor |
std::vector< IndexSet > | locally_owned_dofs_per_processor |
A structure used by the DoFHandler classes to store information about the degrees of freedom they deal with.
Definition at line 37 of file number_cache.h.
internal::DoFHandlerImplementation::NumberCache::NumberCache | ( | ) |
Default constructor.
Definition at line 30 of file number_cache.cc.
|
default |
Copy constructor. Simply copy all members of the referenced object to the current object.
|
default |
Move constructor. Simply move all members of the referenced object to the current object.
internal::DoFHandlerImplementation::NumberCache::NumberCache | ( | const types::global_dof_index | n_global_dofs | ) |
Create a NumberCache object that corresponds to a sequential DoFHandler object in which a single processor stores all degrees of freedom. (Here, "sequential" means that either the whole program does not use MPI, or that it uses MPI but only uses a single MPI process, or that there are multiple MPI processes but the Triangulation on which this DoFHandler builds works only on one MPI process.)
Definition at line 36 of file number_cache.cc.
internal::DoFHandlerImplementation::NumberCache::NumberCache | ( | const std::vector< IndexSet > & | locally_owned_dofs_per_processor, |
const unsigned int | my_rank | ||
) |
Create a NumberCache object that corresponds to a parallel DoFHandler object with as many processors as the size of the given argument, in which each processor stores the degrees of freedom indicated in the corresponding element of the vector passed as first argument. The second argument indicates the rank among all participating processors the current processor has, so that we can set the locally_owned_dofs
and n_locally_owned_dofs
fields.
All other fields stored by the current object can be and are computed from the argument.
Definition at line 46 of file number_cache.cc.
|
default |
Copy operator. Simply copy all members of the referenced object to the current object.
|
default |
Move assignment operator. Simply move all members of the referenced object to the current object.
std::size_t internal::DoFHandlerImplementation::NumberCache::memory_consumption | ( | ) | const |
Determine an estimate for the memory consumption (in bytes) of this object.
Definition at line 132 of file number_cache.cc.
void internal::DoFHandlerImplementation::NumberCache::clear | ( | ) |
This function resets all the stored information.
Definition at line 74 of file number_cache.cc.
std::vector< types::global_dof_index > internal::DoFHandlerImplementation::NumberCache::get_n_locally_owned_dofs_per_processor | ( | const MPI_Comm & | mpi_communicator | ) | const |
Return a representation of n_locally_owned_dofs_per_processor
both in case it was set up (directly returning the array) or in case we need to accumulate some information over all processors. The latter case involves global communication and is typically expensive to set up because it invokes MPI_Allgather.
Definition at line 86 of file number_cache.cc.
std::vector< IndexSet > internal::DoFHandlerImplementation::NumberCache::get_locally_owned_dofs_per_processor | ( | const MPI_Comm & | mpi_communicator | ) | const |
Return a representation of locally_owned_dofs_per_processor
both in case it was set up (directly returning the array of IndexSet fields) or in case we need to accumulate some information over all processors. The latter case involves global communication and is typically expensive to set up because it invokes MPI_Allgather.
Definition at line 109 of file number_cache.cc.
void internal::DoFHandlerImplementation::NumberCache::serialize | ( | Archive & | ar, |
const unsigned int | version | ||
) |
Read or write the data of this object to or from a stream for the purpose of serialization using the BOOST serialization library.
Definition at line 195 of file number_cache.h.
types::global_dof_index internal::DoFHandlerImplementation::NumberCache::n_global_dofs |
Total number of dofs, accumulated over all processors that may participate on this mesh.
Definition at line 137 of file number_cache.h.
types::global_dof_index internal::DoFHandlerImplementation::NumberCache::n_locally_owned_dofs |
Number of dofs owned by this MPI process. If this is a sequential computation, then this equals n_global_dofs. (Here, "sequential" means that either the whole program does not use MPI, or that it uses MPI but only uses a single MPI process, or that there are multiple MPI processes but the Triangulation on which this DoFHandler builds works only on one MPI process.)
Definition at line 147 of file number_cache.h.
IndexSet internal::DoFHandlerImplementation::NumberCache::locally_owned_dofs |
An index set denoting the set of locally owned dofs. If this is a sequential computation, then it contains the entire range [0,n_global_dofs). (Here, "sequential" means that either the whole program does not use MPI, or that it uses MPI but only uses a single MPI process, or that there are multiple MPI processes but the Triangulation on which this DoFHandler builds works only on one MPI process.)
Definition at line 158 of file number_cache.h.
std::vector<types::global_dof_index> internal::DoFHandlerImplementation::NumberCache::n_locally_owned_dofs_per_processor |
The number of dofs owned by each of the various MPI processes. If this is a sequential computation, then the vector contains a single element equal to n_global_dofs. (Here, "sequential" means that either the whole program does not use MPI, or that it uses MPI but only uses a single MPI process, or that there are multiple MPI processes but the Triangulation on which this DoFHandler builds works only on one MPI process.)
Definition at line 169 of file number_cache.h.
std::vector<IndexSet> internal::DoFHandlerImplementation::NumberCache::locally_owned_dofs_per_processor |
The dofs owned by each of the various MPI processes. If this is a sequential DoFHandler, then the vector has a single element equal to locally_owned_dofs. (Here, "sequential" means that either the whole program does not use MPI, or that it uses MPI but only uses a single MPI process, or that there are multiple MPI processes but the Triangulation on which this DoFHandler builds works only on one MPI process.)
Definition at line 180 of file number_cache.h.