44 #ifndef EPETRA_MULTIVECTOR_H 45 #define EPETRA_MULTIVECTOR_H 235 double *A,
int MyLDA,
int NumVectors);
254 double **ArrayOfPointers,
int NumVectors);
320 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 321 int ReplaceGlobalValue(
int GlobalRow,
int VectorIndex,
double ScalarValue);
323 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 324 int ReplaceGlobalValue(
long long GlobalRow,
int VectorIndex,
double ScalarValue);
347 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 348 int ReplaceGlobalValue(
int GlobalBlockRow,
int BlockRowOffset,
int VectorIndex,
double ScalarValue);
350 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 351 int ReplaceGlobalValue(
long long GlobalBlockRow,
int BlockRowOffset,
int VectorIndex,
double ScalarValue);
375 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 376 int SumIntoGlobalValue(
int GlobalRow,
int VectorIndex,
double ScalarValue);
378 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 379 int SumIntoGlobalValue(
long long GlobalRow,
int VectorIndex,
double ScalarValue);
402 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 403 int SumIntoGlobalValue(
int GlobalBlockRow,
int BlockRowOffset,
int VectorIndex,
double ScalarValue);
405 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 406 int SumIntoGlobalValue(
long long GlobalBlockRow,
int BlockRowOffset,
int VectorIndex,
double ScalarValue);
434 int ReplaceMyValue(
int MyRow,
int VectorIndex,
double ScalarValue);
456 int ReplaceMyValue(
int MyBlockRow,
int BlockRowOffset,
int VectorIndex,
double ScalarValue);
479 int SumIntoMyValue(
int MyRow,
int VectorIndex,
double ScalarValue);
501 int SumIntoMyValue(
int MyBlockRow,
int BlockRowOffset,
int VectorIndex,
double ScalarValue);
510 int PutScalar (
double ScalarConstant);
541 int ExtractCopy(
double *A,
int MyLDA)
const;
554 int ExtractCopy(
double **ArrayOfPointers)
const;
574 int ExtractView(
double **A,
int *MyLDA)
const;
587 int ExtractView(
double ***ArrayOfPointers)
const;
645 int Scale(
double ScalarValue);
703 int Norm1 (
double * Result)
const;
713 int Norm2 (
double * Result)
const;
722 int NormInf (
double * Result)
const;
752 int MinValue (
double * Result)
const;
764 int MaxValue (
double * Result)
const;
774 int MeanValue (
double * Result)
const;
830 int Multiply(
char TransA,
char TransB,
double ScalarAB,
870 int SetSeed(
unsigned int Seed_in){
return(Util_.SetSeed(Seed_in));};
876 unsigned int Seed(){
return(Util_.Seed());};
900 double*& operator [] (
int i) {
return Pointers_[i]; }
906 double *
const & operator [] (
int i)
const {
return Pointers_[i]; }
931 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 933 if(
Map().GlobalIndicesInt())
934 return (
int) GlobalLength_;
935 throw "Epetra_MultiVector::GlobalLength: GlobalIndices not int.";
956 virtual void Print(std::ostream & os)
const;
982 int ResetView(
double ** ArrayOfPointers);
985 double*
Values()
const {
return Values_;};
1007 int AllocateForCopy(
void);
1011 {
if (DoubleTemp_==0) DoubleTemp_=
new double[NumVectors_+1];
return;}
1014 for (
int i=0; i<NumVectors_; i++) Vectors_[i] = 0;}
1018 int AllocateForView(
void);
1020 template<
typename int_type>
1021 int ChangeGlobalValue(int_type GlobalBlockRow,
1026 int ChangeMyValue(
int MyBlockRow,
1037 int * PermuteToLIDs,
1038 int * PermuteFromLIDs,
Epetra_MultiVector: A class for constructing and using dense multi-vectors, vectors and matrices in p...
double * Values() const
Get pointer to MultiVector values.
const Epetra_BlockMap & Map() const
Returns the address of the Epetra_BlockMap for this multi-vector.
Epetra_Map: A class for partitioning vectors and matrices.
bool ConstantStride() const
Returns true if this multi-vector has constant stride between vectors.
int MyLength() const
Returns the local vector length on the calling processor of vectors in the multi-vector.
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.
virtual void Print(std::ostream &os) const
Print method.
Epetra_OffsetIndex: This class builds index for efficient mapping of data from one Epetra_CrsGraph ba...
int GlobalLength() const
Returns the global vector length of vectors in the multi-vector.
int Stride() const
Returns the stride between vectors in the multi-vector (only meaningful if ConstantStride() is true)...
void UpdateDoubleTemp() const
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...
virtual int CheckSizes(const Epetra_SrcDistObject &Source)=0
Allows the source and target (this) objects to be compared for compatibility, return nonzero if not...
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.
int NumVectors() const
Returns the number of vectors in the multi-vector.
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.
long long GlobalLength64() const
void UpdateVectors() const
unsigned int Seed()
Get seed from Random function.
Epetra_SrcDistObject: A class for supporting flexible source distributed objects for import/export op...
double ** Pointers() const
Get pointer to individual vector pointers.
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().