![]() |
|
#include <double_vector_with_halo.h>
Public Member Functions | |
| DoubleVectorHaloScheme (LinearAlgebraDistribution *const &dist_pt, const Vector< unsigned > &required_global_eqn) | |
| unsigned | n_halo_values () const |
| Return the number of halo values. More... | |
| LinearAlgebraDistribution *& | distribution_pt () |
| void | setup_halo_dofs (const std::map< unsigned, double * > &halo_data_pt, Vector< double * > &halo_dof_pt) |
| unsigned | local_index (const unsigned &global_eqn) |
| Return the local index associated with the global equation. More... | |
Private Attributes | |
| std::map< unsigned, unsigned > | Local_index |
| Vector< unsigned > | Haloed_eqns |
| Vector< int > | Haloed_n |
| Vector< int > | Haloed_displacement |
| Vector< unsigned > | Halo_eqns |
| Vector< int > | Halo_n |
| Vector< int > | Halo_displacement |
| LinearAlgebraDistribution * | Distribution_pt |
| Store the distribution that was used to setup the halo scheme. More... | |
Friends | |
| class | DoubleVectorWithHaloEntries |
A class that stores the halo/haloed entries required when using a DoubleVectorWithHaloEntries. This is a separate class so thay many different Vectors can share the same object. The constructor requires the distribution of the DoubleVector (if you pass in a different distribution things will go badly wrong) and a vector that specifies which GLOBAL eqn numbers are required on each processor.
| oomph::DoubleVectorHaloScheme::DoubleVectorHaloScheme | ( | LinearAlgebraDistribution *const & | dist_pt, |
| const Vector< unsigned > & | required_global_eqn | ||
| ) |
Constructor that sets up the required information communicating between all processors. Requires two "all to all" communications. Arguments are the distribution of the DoubleVector and a Vector of global unknowns required on this processor.
References oomph::LinearAlgebraDistribution::communicator_pt(), oomph::LinearAlgebraDistribution::distributed(), oomph::LinearAlgebraDistribution::first_row(), Halo_displacement, Halo_eqns, Halo_n, Haloed_displacement, Haloed_eqns, Haloed_n, i, Local_index, oomph::OomphCommunicator::my_rank(), n, oomph::OomphCommunicator::nproc(), and oomph::LinearAlgebraDistribution::rank_of_global_row().
|
inline |
Return the pointer to the distirbution used to setup the halo information
References Distribution_pt.
Referenced by oomph::Problem::global_dof_pt().
Return the local index associated with the global equation.
References Local_index, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.
Referenced by oomph::Problem::global_dof_pt(), and oomph::DoubleVectorWithHaloEntries::global_value().
|
inline |
Return the number of halo values.
References Local_index.
| void oomph::DoubleVectorHaloScheme::setup_halo_dofs | ( | const std::map< unsigned, double * > & | halo_data_pt, |
| Vector< double * > & | halo_dof_pt | ||
| ) |
Function that sets up a vector of pointers to halo data, index using the scheme in Local_index
Function that sets up a vector of pointers to halo data, index using the scheme in Local_index. The first arguement is a map of pointers to all halo data index by the global equation number
References Local_index, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.
|
friend |
The DoubleVectorWithHaloEntries should be able to access the private data.
|
private |
Store the distribution that was used to setup the halo scheme.
Referenced by distribution_pt().
Storage for the offsets of the processor data in the receive buffer
Referenced by DoubleVectorHaloScheme(), oomph::DoubleVectorWithHaloEntries::sum_all_halo_and_haloed_values(), and oomph::DoubleVectorWithHaloEntries::synchronise().
Storage for all the entries that are to be received from other processors (received_from_proc0,received_from_proc1,...received_from_procn)
Referenced by DoubleVectorHaloScheme(), oomph::DoubleVectorWithHaloEntries::sum_all_halo_and_haloed_values(), and oomph::DoubleVectorWithHaloEntries::synchronise().
Storage for the number of entries to be received from each other processor
Referenced by DoubleVectorHaloScheme(), oomph::DoubleVectorWithHaloEntries::sum_all_halo_and_haloed_values(), and oomph::DoubleVectorWithHaloEntries::synchronise().
Storage for the offsets of the haloed entries for each processor in the packed Haloed_eqns array
Referenced by DoubleVectorHaloScheme(), oomph::DoubleVectorWithHaloEntries::sum_all_halo_and_haloed_values(), and oomph::DoubleVectorWithHaloEntries::synchronise().
The haloed entries that will be sent in a format compatible with MPI_Alltoallv i.e. (send_to_proc0,send_to_proc1 ... send_to_procn)
Referenced by DoubleVectorHaloScheme(), oomph::DoubleVectorWithHaloEntries::sum_all_halo_and_haloed_values(), and oomph::DoubleVectorWithHaloEntries::synchronise().
Storage for the number of haloed entries to be sent to each processor
Referenced by DoubleVectorHaloScheme(), oomph::DoubleVectorWithHaloEntries::sum_all_halo_and_haloed_values(), and oomph::DoubleVectorWithHaloEntries::synchronise().
Storage for the translation scheme from global unknown to local index in the additional storage vector.
Referenced by oomph::DoubleVectorWithHaloEntries::build_halo_scheme(), DoubleVectorHaloScheme(), local_index(), n_halo_values(), and setup_halo_dofs().