100 unsigned int RandomInt();
103 double RandomDouble();
109 unsigned int Seed()
const;
118 int SetSeed(
unsigned int Seed_in);
147 static void Sort(
bool SortAscending,
int NumKeys, T * Keys,
148 int NumDoubleCompanions,
double ** DoubleCompanions,
149 int NumIntCompanions,
int ** IntCompanions,
150 int NumLongLongCompanions,
long long ** LongLongCompanions);
152 static void Sort(
bool SortAscending,
int NumKeys,
int * Keys,
153 int NumDoubleCompanions,
double ** DoubleCompanions,
154 int NumIntCompanions,
int ** IntCompanions,
155 int NumLongLongCompanions,
long long ** LongLongCompanions);
157 static void Sort(
bool SortAscending,
int NumKeys,
long long * Keys,
158 int NumDoubleCompanions,
double ** DoubleCompanions,
159 int NumIntCompanions,
int ** IntCompanions,
160 int NumLongLongCompanions,
long long ** LongLongCompanions);
162 static void Sort(
bool SortAscending,
int NumKeys,
int * Keys,
163 int NumDoubleCompanions,
double ** DoubleCompanions,
164 int NumIntCompanions,
int ** IntCompanions);
166 static void Sort(
bool SortAscending,
int NumKeys,
double * Keys,
167 int NumDoubleCompanions,
double ** DoubleCompanions,
168 int NumIntCompanions,
int ** IntCompanions,
169 int NumLongLongCompanions,
long long ** LongLongCompanions);
187 bool high_rank_proc_owns_shared=
false);
195 bool high_rank_proc_owns_shared=
false);
202 static int SortCrsEntries(
int NumRows,
const int *CRS_rowptr,
int *CRS_colind,
double *CRS_vals);
207 static int SortAndMergeCrsEntries(
int NumRows,
int *CRS_rowptr,
int *CRS_colind,
double *CRS_vals);
217 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 218 static int GetPidGidPairs(
const Epetra_Import & Importer,std::vector< std::pair<int,int> > & gpids,
bool use_minus_one_for_local);
220 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 221 static int GetPidGidPairs(
const Epetra_Import & Importer,std::vector< std::pair<int,long long> > & gpids,
bool use_minus_one_for_local);
228 static int GetPids(
const Epetra_Import & Importer, std::vector<int> &pids,
bool use_minus_one_for_local);
233 static int GetRemotePIDs(
const Epetra_Import & Importer, std::vector<int> &RemotePIDs);
237 static double Chop(
const double & Value);
281 const long long* list,
313 const long long* aux_list,
323 int& allocatedLength,
324 int insertOffset,
int numPositions,
325 int allocChunkSize=32)
327 if (insertOffset < 0 || insertOffset > usedLength ||
328 usedLength > allocatedLength) {
332 if ((usedLength+numPositions) < allocatedLength) {
333 for(
int i=usedLength-1; i>=insertOffset; --i) {
334 array[i+numPositions] = array[i];
336 usedLength += numPositions;
340 allocatedLength += allocChunkSize;
343 while(allocatedLength < usedLength+numPositions) {
344 allocatedLength += allocChunkSize;
347 T* newlist =
new T[allocatedLength];
349 for(
int i=0; i<insertOffset; ++i) {
350 newlist[i] = array[i];
353 for(
int i=insertOffset; i<usedLength; ++i) {
354 newlist[i+numPositions] = array[i];
357 usedLength += numPositions;
381 int& allocatedLength,
382 int allocChunkSize=32)
384 int code = Epetra_Util_insert_empty_positions<T>(list, usedLength,
385 allocatedLength, offset, 1,
423 int & M,
int & N,
int & nz,
int * & ptr,
424 int * & ind,
double * & val,
int & Nrhs,
425 double * & rhs,
int & ldrhs,
426 double * & lhs,
int & ldlhs);
Epetra_MultiVector: A class for constructing and using dense multi-vectors, vectors and matrices in p...
Epetra_Map: A class for partitioning vectors and matrices.
int Epetra_Util_binary_search_aux(T item, const int *list, const T *aux_list, int len, int &insertPoint)
Utility function to perform a binary-search on a list of data.
static const double chopVal_
Epetra_Util()
Epetra_Util Constructor.
virtual ~Epetra_Util()
Epetra_Util Destructor.
Epetra_Import: This class builds an import object for efficient importing of off-processor elements...
Epetra_Util: The Epetra Util Wrapper Class.
int Epetra_Util_ExtractHbData(Epetra_CrsMatrix *A, Epetra_MultiVector *LHS, Epetra_MultiVector *RHS, int &M, int &N, int &nz, int *&ptr, int *&ind, double *&val, int &Nrhs, double *&rhs, int &ldrhs, double *&lhs, int &ldlhs)
Harwell-Boeing data extraction routine.
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
int Epetra_Util_binary_search(T item, const T *list, int len, int &insertPoint)
Utility function to perform a binary-search on a list of data.
Epetra_CrsMatrix: A class for constructing and using real-valued double-precision sparse compressed r...
int Epetra_Util_insert_empty_positions(T *&array, int &usedLength, int &allocatedLength, int insertOffset, int numPositions, int allocChunkSize=32)
int Epetra_Util_insert(T item, int offset, T *&list, int &usedLength, int &allocatedLength, int allocChunkSize=32)
Function to insert an item in a list, at a specified offset.