44 #ifndef EPETRA_MULTIVECTOR_H
45 #define EPETRA_MULTIVECTOR_H
47 #if defined(Epetra_SHOW_DEPRECATED_WARNINGS)
49 #warning "The Epetra package is deprecated"
243 double *
A,
int MyLDA,
int NumVectors);
262 double **ArrayOfPointers,
int NumVectors);
328 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
329 int ReplaceGlobalValue(
int GlobalRow,
int VectorIndex,
double ScalarValue);
331 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
332 int ReplaceGlobalValue(
long long GlobalRow,
int VectorIndex,
double ScalarValue);
355 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
356 int ReplaceGlobalValue(
int GlobalBlockRow,
int BlockRowOffset,
int VectorIndex,
double ScalarValue);
358 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
359 int ReplaceGlobalValue(
long long GlobalBlockRow,
int BlockRowOffset,
int VectorIndex,
double ScalarValue);
383 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
384 int SumIntoGlobalValue(
int GlobalRow,
int VectorIndex,
double ScalarValue);
386 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
387 int SumIntoGlobalValue(
long long GlobalRow,
int VectorIndex,
double ScalarValue);
410 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
411 int SumIntoGlobalValue(
int GlobalBlockRow,
int BlockRowOffset,
int VectorIndex,
double ScalarValue);
413 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
414 int SumIntoGlobalValue(
long long GlobalBlockRow,
int BlockRowOffset,
int VectorIndex,
double ScalarValue);
442 int ReplaceMyValue(
int MyRow,
int VectorIndex,
double ScalarValue);
464 int ReplaceMyValue(
int MyBlockRow,
int BlockRowOffset,
int VectorIndex,
double ScalarValue);
487 int SumIntoMyValue(
int MyRow,
int VectorIndex,
double ScalarValue);
509 int SumIntoMyValue(
int MyBlockRow,
int BlockRowOffset,
int VectorIndex,
double ScalarValue);
518 int PutScalar (
double ScalarConstant);
549 int ExtractCopy(
double *A,
int MyLDA)
const;
562 int ExtractCopy(
double **ArrayOfPointers)
const;
582 int ExtractView(
double **A,
int *MyLDA)
const;
595 int ExtractView(
double ***ArrayOfPointers)
const;
653 int Scale(
double ScalarValue);
711 int Norm1 (
double * Result)
const;
721 int Norm2 (
double * Result)
const;
730 int NormInf (
double * Result)
const;
760 int MinValue (
double * Result)
const;
772 int MaxValue (
double * Result)
const;
782 int MeanValue (
double * Result)
const;
838 int Multiply(
char TransA,
char TransB,
double ScalarAB,
878 int SetSeed(
unsigned int Seed_in){
return(Util_.SetSeed(Seed_in));};
884 unsigned int Seed(){
return(Util_.Seed());};
908 double*& operator [] (
int i) {
return Pointers_[i]; }
914 double *
const & operator [] (
int i)
const {
return Pointers_[i]; }
939 int GlobalLength()
const {
int ret_val = GlobalLength_;
return ret_val; }
960 virtual void Print(std::ostream & os)
const;
986 int ResetView(
double ** ArrayOfPointers);
989 double*
Values()
const {
return Values_;};
1014 int AllocateForCopy(
void);
1018 {
if (DoubleTemp_==0) DoubleTemp_=
new double[NumVectors_+1];
return;}
1021 for (
int i=0; i<NumVectors_; i++) Vectors_[i] = 0;}
1025 int AllocateForView(
void);
1027 template<
typename int_type>
1028 int ChangeGlobalValue(int_type GlobalBlockRow,
1033 int ChangeMyValue(
int MyBlockRow,
1044 int * PermuteToLIDs,
1045 int * PermuteFromLIDs,
Epetra_MultiVector: A class for constructing and using dense multi-vectors, vectors and matrices in p...
int GlobalLength() const
Returns the global vector length of vectors in the multi-vector.
Epetra_Map: A class for partitioning vectors and matrices.
Epetra_Distributor: The Epetra Gather/Scatter Setup Base Class.
virtual int CopyAndPermute(const Epetra_SrcDistObject &Source, int NumSameIDs, int NumPermuteIDs, int *PermuteToLIDs, int *PermuteFromLIDs, const Epetra_OffsetIndex *Indexor, Epetra_CombineMode CombineMode=Zero)=0
Perform ID copies and permutations that are on processor.
Epetra_OffsetIndex: This class builds index for efficient mapping of data from one Epetra_CrsGraph ba...
virtual void Print(std::ostream &os) const
Print method.
int MyLength() const
Returns the local vector length on the calling processor of vectors in the multi-vector.
double ** Pointers() const
Get pointer to individual vector pointers.
Epetra_Export: This class builds an export object for efficient exporting of off-processor elements...
Epetra_Vector: A class for constructing and using dense vectors on a parallel computer.
Epetra_CompObject & operator=(const Epetra_CompObject &src)
int SetSeed(unsigned int Seed_in)
Set seed for Random function.
Epetra_Import: This class builds an import object for efficient importing of off-processor elements...
int NumVectors() const
Returns the number of vectors in the multi-vector.
virtual int CheckSizes(const Epetra_SrcDistObject &Source)=0
Allows the source and target (this) objects to be compared for compatibility, return nonzero if not...
void UpdateDoubleTemp() const
Epetra_Vector ** Vectors_
Epetra_Util: The Epetra Util Wrapper Class.
Epetra_BLAS: The Epetra BLAS Wrapper Class.
Epetra_Comm: The Epetra Communication Abstract Base Class.
long long GlobalLength64() const
Returns the 64-bit global vector length of vectors in the multi-vector.
void UpdateVectors() const
Epetra_CompObject: Functionality and data that is common to all computational classes.
virtual int UnpackAndCombine(const Epetra_SrcDistObject &Source, int NumImportIDs, int *ImportLIDs, int LenImports, char *Imports, int &SizeOfPacket, Epetra_Distributor &Distor, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor)=0
Perform any unpacking and combining after call to DoTransfer().
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
int Stride() const
Returns the stride between vectors in the multi-vector (only meaningful if ConstantStride() is true)...
bool ConstantStride() const
Returns true if this multi-vector has constant stride between vectors.
double * Values() const
Get pointer to MultiVector values.
unsigned int Seed()
Get seed from Random function.
Epetra_SrcDistObject: A class for supporting flexible source distributed objects for import/export op...
Epetra_DistObject: A class for constructing and using dense multi-vectors, vectors and matrices in pa...
virtual int PackAndPrepare(const Epetra_SrcDistObject &Source, int NumExportIDs, int *ExportLIDs, int &LenExports, char *&Exports, int &SizeOfPacket, int *Sizes, bool &VarSizes, Epetra_Distributor &Distor)=0
Perform any packing or preparation required for call to DoTransfer().