26#ifndef OOMPH_DOUBLE_VECTOR_WITH_HALO_CLASS_HEADER
27#define OOMPH_DOUBLE_VECTOR_WITH_HALO_CLASS_HEADER
31#include <oomph-lib-config.h>
39 class DoubleVectorWithHaloEntries;
132 <<
"has not been set as halo\n";
169 const double&
v = 0.0)
183 const double&
v = 0.0)
215 this->
build(old_vector);
245 <<
"Halo data requested, but no halo scheme has been setup\n"
246 <<
"You should call this->build_halo_scheme(halo_scheme_pt).\n"
247 <<
"You may wish to setup the scheme for the Problem using \n"
248 <<
"Problem::setup_dof_halo_scheme()\n";
292 <<
"Halo data requested, but no halo scheme has been setup\n"
293 <<
"You should call this->build_halo_scheme(halo_scheme_pt).\n"
294 <<
"You may wish to setup the scheme for the Problem using \n"
295 <<
"Problem::setup_dof_halo_scheme()\n";
bool distributed() const
distribution is serial or distributed
unsigned nrow_local() const
access function for the num of local rows on this processor.
unsigned first_row() const
access function for the first row on this processor
A class that stores the halo/haloed entries required when using a DoubleVectorWithHaloEntries....
Vector< int > Haloed_n
Storage for the number of haloed entries to be sent to each processor.
Vector< int > Halo_displacement
Storage for the offsets of the processor data in the receive buffer.
Vector< int > Halo_n
Storage for the number of entries to be received from each other processor.
unsigned n_halo_values() const
Return the number of halo values.
LinearAlgebraDistribution * Distribution_pt
Store the distribution that was used to setup the halo scheme.
std::map< unsigned, unsigned > Local_index
Storage for the translation scheme from global unknown to local index in the additional storage vecto...
Vector< int > Haloed_displacement
Storage for the offsets of the haloed entries for each processor in the packed Haloed_eqns array.
void 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.
Vector< unsigned > Haloed_eqns
The haloed entries that will be sent in a format compatible with MPI_Alltoallv i.e....
LinearAlgebraDistribution *& distribution_pt()
Return the pointer to the distirbution used to setup the halo information.
unsigned local_index(const unsigned &global_eqn)
Return the local index associated with the global equation.
Vector< unsigned > Halo_eqns
Storage for all the entries that are to be received from other processors (received_from_proc0,...
===================================================================== An extension of DoubleVector th...
DoubleVectorWithHaloEntries()
Constructor for an uninitialized DoubleVectorWithHaloEntries.
DoubleVectorWithHaloEntries(const LinearAlgebraDistribution *const &dist_pt, DoubleVectorHaloScheme *const &halo_scheme_pt=0, const double &v=0.0)
Constructor. Assembles a DoubleVectorWithHaloEntries with a prescribed distribution....
void build_halo_scheme(DoubleVectorHaloScheme *const &halo_scheme_pt)
Construct the halo scheme and storage for the halo data.
DoubleVectorHaloScheme *const & halo_scheme_pt() const
Access function for halo scheme (const version)
DoubleVectorWithHaloEntries(const LinearAlgebraDistribution &dist, DoubleVectorHaloScheme *const &halo_scheme_pt=0, const double &v=0.0)
Constructor. Assembles a DoubleVectorWithHaloEntries with a prescribed distribution....
DoubleVectorWithHaloEntries(const DoubleVector &new_vector, DoubleVectorHaloScheme *const &halo_scheme_pt=0)
Copy constructor from any DoubleVector.
DoubleVectorHaloScheme * Halo_scheme_pt
Pointer to the lookup scheme that stores information about on which processor the required informatio...
void synchronise()
Synchronise the halo data.
void sum_all_halo_and_haloed_values()
Sum all the data, store in the master (haloed) data and then synchronise.
DoubleVectorHaloScheme *& halo_scheme_pt()
Access function for halo scheme.
DoubleVectorWithHaloEntries(const DoubleVectorWithHaloEntries &new_vector)
Copy constructor from any DoubleVector.
void operator=(const DoubleVectorWithHaloEntries &old_vector)
assignment operator
Vector< double > Halo_value
Vector of the halo values.
double & global_value(const unsigned &i)
Direct access to global entry.
const double & global_value(const unsigned &i) const
Direct access to the global entry (const version)
~DoubleVectorWithHaloEntries()
Destructor.
A vector in the mathematical sense, initially developed for linear algebra type applications....
void build(const DoubleVector &old_vector)
Just copys the argument DoubleVector.
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
Describes the distribution of a distributable linear algebra type object. Typically this is a contain...
An OomphLibError object which should be thrown when an run-time error is encountered....
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).