9 #include <fei_ReverseMapper.hpp>
13 #include <fei_VectorSpace.hpp>
14 #include <snl_fei_RecordCollection.hpp>
21 std::vector<int> idTypes;
26 for(
size_t idt=0; idt<idTypes.size(); ++idt) {
30 throw std::runtime_error(
"fei::ReverseMapper ERROR, failed to retrieve record-collection.");
33 const std::vector<fei::Record<int> >&
36 for(
size_t i=0; i<records.size(); ++i) {
40 const std::vector<int>& fieldIDs = fm->
getFieldIDs();
45 for(
size_t i=0; i<fieldIDs.size(); ++i) {
53 erec.
IDType = idTypes[idt];
57 for(
int j=0; j<fieldSizes[i]; ++j) {
59 erec.
global_eqn = eqnNumbers[offsetIntoEqnNumbers+offset2+j];
60 eqnmap_.insert(std::make_pair(erec.
global_eqn, erec));
71 EqnRecord ReverseMapper::getEqnRecord(
int global_eqn,
int option)
const
73 std::map<int,EqnRecord>::const_iterator
74 iter = eqnmap_.find(global_eqn);
76 if (iter == eqnmap_.end()) {
87 std::ostringstream osstr;
88 osstr <<
"fei::ReverseMapper::getEqnRecord ERROR, global_eqn="<<global_eqn
90 throw std::runtime_error(osstr.str());
std::vector< fei::Record< int > > & getRecords()
void getIDTypes(std::vector< int > &idTypes) const
ReverseMapper(const VectorSpace &vspace)
std::vector< int > & getFieldSizes()
std::vector< int > & getFieldIDs()
int getFieldEqnOffset(int fieldID, int &offset) const
GlobalIDType getID() const
int getOffsetIntoEqnNumbers() const
fei::FieldMask * getFieldMask()
int getRecordCollection(int idType, snl_fei::RecordCollection *&records)
std::vector< int > & getEqnNumbers()