Classes | Namespaces | Functions
double_vector.h File Reference

Go to the source code of this file.

Classes

class  oomph::DoubleVector
 A vector in the mathematical sense, initially developed for linear algebra type applications. If MPI then this vector can be distributed - its distribution is described by the LinearAlgebraDistribution object at Distribution_pt. Data is stored in a C-style pointer vector (double*) More...
 

Namespaces

 oomph
 //////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
 
 oomph::DoubleVectorHelpers
 Namespace for helper functions for DoubleVectors.
 

Functions

void oomph::DoubleVectorHelpers::concatenate (const Vector< DoubleVector * > &in_vector_pt, DoubleVector &out_vector)
 Concatenate DoubleVectors. Takes a Vector of DoubleVectors. If the out vector is built, we will not build a new distribution. Otherwise we build a uniform distribution. More...
 
void oomph::DoubleVectorHelpers::concatenate (Vector< DoubleVector > &in_vector, DoubleVector &out_vector)
 Wrapper around the other concatenate(...) function. Be careful with Vector of vectors. If the DoubleVectors are resized, there could be reallocation of memory. If we wanted to use the function which takes a Vector of pointers to DoubleVectors, we would either have to invoke new and remember to delete, or create a temporary Vector to store pointers to the DoubleVector objects. This wrapper is meant to make life easier for the user by avoiding calls to new/delete AND without creating a temporary vector of pointers to DoubleVectors. If we had C++ 11, this would be so much nicer since we can use smart pointers which will delete themselves, so we do not have to remember to delete! More...
 
void oomph::DoubleVectorHelpers::split (const DoubleVector &in_vector, Vector< DoubleVector * > &out_vector_pt)
 Split a DoubleVector into the out DoubleVectors. Let vec_A be the in Vector, and let vec_B and vec_C be the out vectors. Then the splitting of vec_A is depicted below: vec_A: [a0 (on p0) a1] (on p0) [a2 (on p1) a3] (on p1) More...
 
void oomph::DoubleVectorHelpers::split (const DoubleVector &in_vector, Vector< DoubleVector > &out_vector)
 Wrapper around the other split(...) function. Be careful with Vector of vectors. If the DoubleVectors are resized, there could be reallocation of memory. If we wanted to use the function which takes a Vector of pointers to DoubleVectors, we would either have to invoke new and remember to delete, or create a temporary Vector to store pointers to the DoubleVector objects. This wrapper is meant to make life easier for the user by avoiding calls to new/delete AND without creating a temporary vector of pointers to DoubleVectors. If we had C++ 11, this would be so much nicer since we can use smart pointers which will delete themselves, so we do not have to remember to delete! More...
 
void oomph::DoubleVectorHelpers::concatenate_without_communication (const Vector< DoubleVector * > &in_vector_pt, DoubleVector &out_vector)
 Concatenate DoubleVectors. Takes a Vector of DoubleVectors. If the out vector is built, we will not build a new distribution. Otherwise a new distribution will be built using LinearAlgebraDistribution::concatenate(...). More...
 
void oomph::DoubleVectorHelpers::concatenate_without_communication (Vector< DoubleVector > &in_vector, DoubleVector &out_vector)
 Wrapper around the other concatenate_without_communication(...) function. Be careful with Vector of vectors. If the DoubleVectors are resized, there could be reallocation of memory. If we wanted to use the function which takes a Vector of pointers to DoubleVectors, we would either have to invoke new and remember to delete, or create a temporary Vector to store pointers to the DoubleVector objects. This wrapper is meant to make life easier for the user by avoiding calls to new/delete AND without creating a temporary vector of pointers to DoubleVectors. If we had C++ 11, this would be so much nicer since we can use smart pointers which will delete themselves, so we do not have to remember to delete! More...
 
void oomph::DoubleVectorHelpers::split_without_communication (const DoubleVector &in_vector, Vector< DoubleVector * > &out_vector_pt)
 Split a DoubleVector into the out DoubleVectors. Data stays on its current processor, no data is sent between processors. This results in our vectors which are a permutation of the in vector. More...
 
void oomph::DoubleVectorHelpers::split_without_communication (const DoubleVector &in_vector, Vector< DoubleVector > &out_vector)
 Wrapper around the other split_without_communication(...) function. Be careful with Vector of vectors. If the DoubleVectors are resized, there could be reallocation of memory. If we wanted to use the function which takes a Vector of pointers to DoubleVectors, we would either have to invoke new and remember to delete, or create a temporary Vector to store pointers to the DoubleVector objects. This wrapper is meant to make life easier for the user by avoiding calls to new/delete AND without creating a temporary vector of pointers to DoubleVectors. If we had C++ 11, this would be so much nicer since we can use smart pointers which will delete themselves, so we do not have to remember to delete! More...