/usr/include/trilinos/fei_Aztec_Map.hpp is in libtrilinos-dev 10.4.0.dfsg-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | #ifndef _fei_Aztec_Map_hpp_
#define _fei_Aztec_Map_hpp_
/*--------------------------------------------------------------------*/
/* Copyright 2005 Sandia Corporation. */
/* Under the terms of Contract DE-AC04-94AL85000, there is a */
/* non-exclusive license for use of this work by or on behalf */
/* of the U.S. Government. Export of this program may require */
/* a license from the United States Government. */
/*--------------------------------------------------------------------*/
#include <vector>
//
// Aztec_Map is a wrapper that encapsulates the general
// information needed to describe the layout of an Aztec matrix or
// vector structure. It is a companion/support class that goes with
// the three data class wrappers Aztec_LSVector, AztecDMSR_Matrix and
// AztecDVBR_Matrix (the Aztec_BlockMap specialization is also
// required for DVBR).
//
// Aztec_Map allows the storage and retrieval of information such as
// local and global sizes, the MPI communicator, and the proc_config array.
//
namespace fei_trilinos {
class Aztec_Map {
public:
Aztec_Map(int globalSize, int N_update, const int* update, int localOffset,
MPI_Comm comm);
Aztec_Map(const Aztec_Map& map); // copy constructor
virtual ~Aztec_Map(void);
virtual const int& localSize() const {return(localSize_);}
virtual const int& globalSize() const {return(globalSize_);}
virtual const int& localOffset() const {return(localOffset_);}
int* getUpdate()
{
return update.size()>0 ? &update[0] : NULL;
}
virtual MPI_Comm getCommunicator() const {return(comm_);}
virtual int* getProcConfig()
{
return proc_config.size()>0 ? &proc_config[0] : NULL;
}
std::vector<int> proc_config;
std::vector<int> update;
int* external;
int* update_index;
int* extern_index;
int* data_org;
std::vector<int> orderingUpdate;
bool az_transformed;
int getTransformedEqn(int eqn) const {
if (az_transformed == true) {
return eqn<N_update_ ? update[orderingUpdate[eqn]] : external[eqn-N_update_];
}
return eqn;
}
bool inUpdate(int globalIndex, int& localIndex) const
{
localIndex = globalIndex - localOffset_;
if (localIndex<0 || localIndex>=localSize_) {
localIndex = -1;
return false;
}
if (az_transformed == true) {
localIndex = update_index[localIndex];
}
return true;
}
private:
void checkInput();
int globalSize_;
int localSize_;
int localOffset_;
int N_update_;
MPI_Comm comm_;
};
}//namespace fei_trilinos
#endif
|