00001 //************************************************************************** 00002 // 00003 // NOTICE 00004 // 00005 // This software is a result of the research described in the report 00006 // 00007 // " A comparison of algorithms for modal analysis in the absence 00008 // of a sparse direct method", P. Arbenz, R. Lehoucq, and U. Hetmaniuk, 00009 // Sandia National Laboratories, Technical report SAND2003-1028J. 00010 // 00011 // It is based on the Epetra, AztecOO, and ML packages defined in the Trilinos 00012 // framework ( http://software.sandia.gov/trilinos/ ). 00013 // 00014 // The distribution of this software follows also the rules defined in Trilinos. 00015 // This notice shall be marked on any reproduction of this software, in whole or 00016 // in part. 00017 // 00018 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00019 // license for use of this work by or on behalf of the U.S. Government. 00020 // 00021 // This program is distributed in the hope that it will be useful, but 00022 // WITHOUT ANY WARRANTY; without even the implied warranty of 00023 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00024 // 00025 // Code Authors: U. Hetmaniuk (ulhetma@sandia.gov), R. Lehoucq (rblehou@sandia.gov) 00026 // 00027 //************************************************************************** 00028 00029 #ifndef SORTING_TOOLS_H 00030 #define SORTING_TOOLS_H 00031 00032 #include <cstring> 00033 using std::memcpy; 00034 00035 class SortingTools { 00036 00037 public: 00038 00039 int sortScalars(int n, double *y, int *perm = 0) const; 00040 00041 int sortScalars_Vectors(int, double *, double * = 0, int = 0) const; 00042 00043 }; 00044 00045 #endif 00046